diff --git a/.github/octokit/index.js b/.github/octokit/index.js new file mode 100644 index 000000000..78efdd295 --- /dev/null +++ b/.github/octokit/index.js @@ -0,0 +1,27 @@ +import {Octokit} from "@octokit/rest"; +import {createAppAuth} from "@octokit/auth-app" + +export const getAccessToken = async () => { + + const {GITHUB_APP_ID, GITHUB_APP_PRIVATE_KEY} = process.env + + const octoKitInstance = new Octokit({ + authStrategy: createAppAuth, + auth: { + appId: GITHUB_APP_ID, + privateKey: GITHUB_APP_PRIVATE_KEY + } + }); + + const {data: installations} = await octoKitInstance.rest.apps.listInstallations() + + if(!installations.length) { + throw new Error("No Installations found for this github app") + } + + const installationId = installations[0].id; + + const installationAccessToken = await octoKitInstance.rest.apps.createInstallationAccessToken({installation_id: installationId}) + + return installationAccessToken.data.token +} \ No newline at end of file diff --git a/.github/octokit/node_modules/.package-lock.json b/.github/octokit/node_modules/.package-lock.json new file mode 100644 index 000000000..737d474d3 --- /dev/null +++ b/.github/octokit/node_modules/.package-lock.json @@ -0,0 +1,253 @@ +{ + "name": "xero-octokit", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@octokit/auth-app": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-7.1.1.tgz", + "integrity": "sha512-kRAd6yelV9OgvlEJE88H0VLlQdZcag9UlLr7dV0YYP37X8PPDvhgiTy66QVhDXdyoT0AleFN2w/qXkPdrSzINg==", + "dependencies": { + "@octokit/auth-oauth-app": "^8.1.0", + "@octokit/auth-oauth-user": "^5.1.0", + "@octokit/request": "^9.1.1", + "@octokit/request-error": "^6.1.1", + "@octokit/types": "^13.4.1", + "lru-cache": "^10.0.0", + "universal-github-app-jwt": "^2.2.0", + "universal-user-agent": "^7.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/auth-oauth-app": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-8.1.1.tgz", + "integrity": "sha512-5UtmxXAvU2wfcHIPPDWzVSAWXVJzG3NWsxb7zCFplCWEmMCArSZV0UQu5jw5goLQXbFyOr5onzEH37UJB3zQQg==", + "dependencies": { + "@octokit/auth-oauth-device": "^7.0.0", + "@octokit/auth-oauth-user": "^5.0.1", + "@octokit/request": "^9.0.0", + "@octokit/types": "^13.0.0", + "universal-user-agent": "^7.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/auth-oauth-device": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-device/-/auth-oauth-device-7.1.1.tgz", + "integrity": "sha512-HWl8lYueHonuyjrKKIup/1tiy0xcmQCdq5ikvMO1YwkNNkxb6DXfrPjrMYItNLyCP/o2H87WuijuE+SlBTT8eg==", + "dependencies": { + "@octokit/oauth-methods": "^5.0.0", + "@octokit/request": "^9.0.0", + "@octokit/types": "^13.0.0", + "universal-user-agent": "^7.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/auth-oauth-user": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-user/-/auth-oauth-user-5.1.1.tgz", + "integrity": "sha512-rRkMz0ErOppdvEfnemHJXgZ9vTPhBuC6yASeFaB7I2yLMd7QpjfrL1mnvRPlyKo+M6eeLxrKanXJ9Qte29SRsw==", + "dependencies": { + "@octokit/auth-oauth-device": "^7.0.1", + "@octokit/oauth-methods": "^5.0.0", + "@octokit/request": "^9.0.1", + "@octokit/types": "^13.0.0", + "universal-user-agent": "^7.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/auth-token": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.1.tgz", + "integrity": "sha512-rh3G3wDO8J9wSjfI436JUKzHIxq8NaiL0tVeB2aXmG6p/9859aUOAjA9pmSPNGGZxfwmaJ9ozOJImuNVJdpvbA==", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/core": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.2.tgz", + "integrity": "sha512-hEb7Ma4cGJGEUNOAVmyfdB/3WirWMg5hDuNFVejGEDFqupeOysLc2sG6HJxY2etBp5YQu5Wtxwi020jS9xlUwg==", + "dependencies": { + "@octokit/auth-token": "^5.0.0", + "@octokit/graphql": "^8.0.0", + "@octokit/request": "^9.0.0", + "@octokit/request-error": "^6.0.1", + "@octokit/types": "^13.0.0", + "before-after-hook": "^3.0.2", + "universal-user-agent": "^7.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/endpoint": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.1.tgz", + "integrity": "sha512-JYjh5rMOwXMJyUpj028cu0Gbp7qe/ihxfJMLc8VZBMMqSwLgOxDI1911gV4Enl1QSavAQNJcwmwBF9M0VvLh6Q==", + "dependencies": { + "@octokit/types": "^13.0.0", + "universal-user-agent": "^7.0.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/graphql": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.1.1.tgz", + "integrity": "sha512-ukiRmuHTi6ebQx/HFRCXKbDlOh/7xEV6QUXaE7MJEKGNAncGI/STSbOkl12qVXZrfZdpXctx5O9X1AIaebiDBg==", + "dependencies": { + "@octokit/request": "^9.0.0", + "@octokit/types": "^13.0.0", + "universal-user-agent": "^7.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/oauth-authorization-url": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@octokit/oauth-authorization-url/-/oauth-authorization-url-7.1.1.tgz", + "integrity": "sha512-ooXV8GBSabSWyhLUowlMIVd9l1s2nsOGQdlP2SQ4LnkEsGXzeCvbSbCPdZThXhEFzleGPwbapT0Sb+YhXRyjCA==", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/oauth-methods": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@octokit/oauth-methods/-/oauth-methods-5.1.2.tgz", + "integrity": "sha512-C5lglRD+sBlbrhCUTxgJAFjWgJlmTx5bQ7Ch0+2uqRjYv7Cfb5xpX4WuSC9UgQna3sqRGBL9EImX9PvTpMaQ7g==", + "dependencies": { + "@octokit/oauth-authorization-url": "^7.0.0", + "@octokit/request": "^9.1.0", + "@octokit/request-error": "^6.1.0", + "@octokit/types": "^13.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/openapi-types": { + "version": "22.2.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-22.2.0.tgz", + "integrity": "sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg==" + }, + "node_modules/@octokit/plugin-paginate-rest": { + "version": "11.3.5", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.5.tgz", + "integrity": "sha512-cgwIRtKrpwhLoBi0CUNuY83DPGRMaWVjqVI/bGKsLJ4PzyWZNaEmhHroI2xlrVXkk6nFv0IsZpOp+ZWSWUS2AQ==", + "dependencies": { + "@octokit/types": "^13.6.0" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "@octokit/core": ">=6" + } + }, + "node_modules/@octokit/plugin-request-log": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-5.3.1.tgz", + "integrity": "sha512-n/lNeCtq+9ofhC15xzmJCNKP2BWTv8Ih2TTy+jatNCCq/gQP/V7rK3fjIfuz0pDWDALO/o/4QY4hyOF6TQQFUw==", + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "@octokit/core": ">=6" + } + }, + "node_modules/@octokit/plugin-rest-endpoint-methods": { + "version": "13.2.6", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.2.6.tgz", + "integrity": "sha512-wMsdyHMjSfKjGINkdGKki06VEkgdEldIGstIEyGX0wbYHGByOwN/KiM+hAAlUwAtPkP3gvXtVQA9L3ITdV2tVw==", + "dependencies": { + "@octokit/types": "^13.6.1" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "@octokit/core": ">=6" + } + }, + "node_modules/@octokit/request": { + "version": "9.1.3", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.1.3.tgz", + "integrity": "sha512-V+TFhu5fdF3K58rs1pGUJIDH5RZLbZm5BI+MNF+6o/ssFNT4vWlCh/tVpF3NxGtP15HUxTTMUbsG5llAuU2CZA==", + "dependencies": { + "@octokit/endpoint": "^10.0.0", + "@octokit/request-error": "^6.0.1", + "@octokit/types": "^13.1.0", + "universal-user-agent": "^7.0.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/request-error": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.5.tgz", + "integrity": "sha512-IlBTfGX8Yn/oFPMwSfvugfncK2EwRLjzbrpifNaMY8o/HTEAFqCA1FZxjD9cWvSKBHgrIhc4CSBIzMxiLsbzFQ==", + "dependencies": { + "@octokit/types": "^13.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/rest": { + "version": "21.0.2", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-21.0.2.tgz", + "integrity": "sha512-+CiLisCoyWmYicH25y1cDfCrv41kRSvTq6pPWtRroRJzhsCZWZyCqGyI8foJT5LmScADSwRAnr/xo+eewL04wQ==", + "dependencies": { + "@octokit/core": "^6.1.2", + "@octokit/plugin-paginate-rest": "^11.0.0", + "@octokit/plugin-request-log": "^5.3.1", + "@octokit/plugin-rest-endpoint-methods": "^13.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/types": { + "version": "13.6.1", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.6.1.tgz", + "integrity": "sha512-PHZE9Z+kWXb23Ndik8MKPirBPziOc0D2/3KH1P+6jK5nGWe96kadZuE4jev2/Jq7FvIfTlT2Ltg8Fv2x1v0a5g==", + "dependencies": { + "@octokit/openapi-types": "^22.2.0" + } + }, + "node_modules/before-after-hook": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-3.0.2.tgz", + "integrity": "sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A==" + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + }, + "node_modules/universal-github-app-jwt": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/universal-github-app-jwt/-/universal-github-app-jwt-2.2.0.tgz", + "integrity": "sha512-G5o6f95b5BggDGuUfKDApKaCgNYy2x7OdHY0zSMF081O0EJobw+1130VONhrA7ezGSV2FNOGyM+KQpQZAr9bIQ==" + }, + "node_modules/universal-user-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz", + "integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==" + } + } +} diff --git a/.github/octokit/node_modules/@octokit/auth-app/LICENSE b/.github/octokit/node_modules/@octokit/auth-app/LICENSE new file mode 100644 index 000000000..ef2c18ee5 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2019 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.github/octokit/node_modules/@octokit/auth-app/README.md b/.github/octokit/node_modules/@octokit/auth-app/README.md new file mode 100644 index 000000000..24c81ce4c --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/README.md @@ -0,0 +1,1396 @@ +# auth-app.js + +> GitHub App authentication for JavaScript + +[![@latest](https://img.shields.io/npm/v/@octokit/auth-app.svg)](https://www.npmjs.com/package/@octokit/auth-app) +[![Build Status](https://github.com/octokit/auth-app.js/workflows/Test/badge.svg)](https://github.com/octokit/auth-app.js/actions?query=workflow%3ATest) + +`@octokit/auth-app` implements authentication for GitHub Apps using [JSON Web Token](https://jwt.io/), installation access tokens, and OAuth user-to-server access tokens. + + + +- [Standalone usage](#standalone-usage) + - [Authenticate as GitHub App (JSON Web Token)](#authenticate-as-github-app-json-web-token) + - [Authenticate as OAuth App (client ID/client secret)](#authenticate-as-oauth-app-client-idclient-secret) + - [Authenticate as installation](#authenticate-as-installation) + - [Authenticate as user](#authenticate-as-user) +- [Usage with Octokit](#usage-with-octokit) +- [`createAppAuth(options)` or `new Octokit({ auth })`](#createappauthoptions-or-new-octokit-auth-) +- [`auth(options)` or `octokit.auth(options)`](#authoptions-or-octokitauthoptions) + - [JSON Web Token (JWT) Authentication](#json-web-token-jwt-authentication) + - [OAuth App authentication](#oauth-app-authentication) + - [Installation authentication](#installation-authentication) + - [User authentication (web flow)](#user-authentication-web-flow) + - [User authentication (device flow)](#user-authentication-device-flow) +- [Authentication object](#authentication-object) + - [JSON Web Token (JWT) authentication](#json-web-token-jwt-authentication) + - [OAuth App authentication](#oauth-app-authentication-1) + - [Installation access token authentication](#installation-access-token-authentication) + - [GitHub APP user authentication token with expiring disabled](#github-app-user-authentication-token-with-expiring-disabled) + - [GitHub APP user authentication token with expiring enabled](#github-app-user-authentication-token-with-expiring-enabled) +- [`auth.hook(request, route, parameters)` or `auth.hook(request, options)`](#authhookrequest-route-parameters-or-authhookrequest-options) +- [Types](#types) +- [Implementation details](#implementation-details) +- [License](#license) + + + +## Standalone usage + + + + + + +
+Browsers + + +⚠️ `@octokit/auth-app` is not meant for usage in the browser. A private key and client secret must not be exposed to users. + +The private keys provided by GitHub are in `PKCS#1` format, but the WebCrypto API only supports `PKCS#8`. You need to convert it first: + +```shell +openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in private-key.pem -out private-key-pkcs8.key +``` + +The OAuth APIs to create user-to-server tokens cannot be used because they do not have CORS enabled. + +If you know what you are doing, load `@octokit/auth-app` directly from [esm.sh](https://esm.sh) + +```html + +``` + +
+Node + + +Install with npm install @octokit/auth-app + +```js +import { createAppAuth } from "@octokit/auth-app"; +``` + +
+ +> [!IMPORTANT] +> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json` by setting `"moduleResolution": "node16", "module": "node16"`. +> +> See the TypeScript docs on [package.json "exports"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports).
+> See this [helpful guide on transitioning to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) from [@sindresorhus](https://github.com/sindresorhus) + +### Authenticate as GitHub App (JSON Web Token) + +```js +const auth = createAppAuth({ + appId: 1, + privateKey: "-----BEGIN PRIVATE KEY-----\n...", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef12341234567890abcdef1234", +}); + +// Retrieve JSON Web Token (JWT) to authenticate as app +const appAuthentication = await auth({ type: "app" }); +``` + +resolves with + +```json +{ + "type": "app", + "token": "jsonwebtoken123", + "appId": 123, + "expiresAt": "2018-07-07T00:09:30.000Z" +} +``` + +### Authenticate as OAuth App (client ID/client secret) + +The [OAuth Application APIs](https://docs.github.com/en/rest/reference/apps#oauth-applications-api) require the app to authenticate using clientID/client as Basic Authentication + +```js +const auth = createAppAuth({ + appId: 1, + privateKey: "-----BEGIN PRIVATE KEY-----\n...", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef12341234567890abcdef1234", +}); + +const appAuthentication = await auth({ + type: "oauth-app", +}); +``` + +resolves with + +```json +{ + "type": "oauth-app", + "clientId": "lv1.1234567890abcdef", + "clientSecret": "1234567890abcdef1234567890abcdef12345678", + "headers": { + "authorization": "basic bHYxLjEyMzQ1Njc4OTBhYmNkZWY6MTIzNDU2Nzg5MGFiY2RlZjEyMzQ1Njc4OTBhYmNkZWYxMjM0NTY3OA==" + } +} +``` + +### Authenticate as installation + +```js +const auth = createAppAuth({ + appId: 1, + privateKey: "-----BEGIN PRIVATE KEY-----\n...", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef12341234567890abcdef1234", +}); + +// Retrieve installation access token +const installationAuthentication = await auth({ + type: "installation", + installationId: 123, +}); +``` + +resolves with + +```json +{ + "type": "token", + "tokenType": "installation", + "token": "token123", + "installationId": 123, + "createdAt": "2018-07-07T00:00:00.000Z", + "expiresAt": "2018-07-07T00:59:00.000Z" +} +``` + +### Authenticate as user + +```js +const auth = createAppAuth({ + appId: 1, + privateKey: "-----BEGIN PRIVATE KEY-----\n...", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef12341234567890abcdef1234", +}); + +// Retrieve an oauth-access token +const userAuthentication = await auth({ type: "oauth-user", code: "123456" }); +``` + +Resolves with + +```json +{ + "type": "token", + "tokenType": "oauth", + "token": "token123" +} +``` + +## Usage with Octokit + + + + + + +
+ +Browsers + + + +⚠️ `@octokit/auth-app` is not meant for usage in the browser. A private key and client secret must not be exposed to users. + +The private keys provided by GitHub are in `PKCS#1` format, but the WebCrypto API only supports `PKCS#8`. You need to convert it first: + +```shell +openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in private-key.pem -out private-key-pkcs8.key +``` + +The OAuth APIs to create user-to-server tokens cannot be used because they do not have CORS enabled. + +If you know what you are doing, load `@octokit/auth-app` and `@octokit/core` (or a compatible module) directly from [esm.sh](https://esm.sh) + +```html + +``` + +
+ +Node + + + +Install with `npm install @octokit/core @octokit/auth-app`. Optionally replace `@octokit/core` with a compatible module + +```js +import { Octokit } from "@octokit/core"; +import { createAppAuth, createOAuthUserAuth } from "@octokit/auth-app"; +``` + +
+ +```js +const appOctokit = new Octokit({ + authStrategy: createAppAuth, + auth: { + appId: 1, + privateKey: "-----BEGIN PRIVATE KEY-----\n...", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + }, +}); + +// Send requests as GitHub App +const { slug } = await appOctokit.request("GET /app"); +console.log("authenticated as %s", slug); + +// Send requests as OAuth App +await appOctokit.request("POST /application/{client_id}/token", { + client_id: "1234567890abcdef1234", + access_token: "existingtoken123", +}); +console.log("token is valid"); + +// create a new octokit instance that is authenticated as the user +const userOctokit = await appOctokit.auth({ + type: "oauth-user", + code: "code123", + factory: (options) => { + return new Octokit({ + authStrategy: createOAuthUserAuth, + auth: options, + }); + }, +}); + +// Exchanges the code for the user access token authentication on first request +// and caches the authentication for successive requests +const { + data: { login }, +} = await userOctokit.request("GET /user"); +console.log("Hello, %s!", login); +``` + +In order to create an `octokit` instance that is authenticated as an installation, with automated installation token refresh, set `installationId` as `auth` option + +```js +const installationOctokit = new Octokit({ + authStrategy: createAppAuth, + auth: { + appId: 1, + privateKey: "-----BEGIN PRIVATE KEY-----\n...", + installationId: 123, + }, +}); + +// transparently creates an installation access token the first time it is needed +// and refreshes it when it expires +await installationOctokit.request("POST /repos/{owner}/{repo}/issues", { + owner: "octocat", + repo: "hello-world", + title: "title", +}); +``` + +## `createAppAuth(options)` or `new Octokit({ auth })` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ appId + + number + + Required. Find App ID on the app’s about page in settings. +
+ privateKey + + string + + Required. Content of the *.pem file you downloaded from the app’s about page. You can generate a new private key if needed. If your private key contains escaped newlines (`\\n`), they will be automatically replaced with actual newlines. +
+ installationId + + number + + Default installationId to be used when calling auth({ type: "installation" }). +
+ clientId + + string + + The client ID of the GitHub App. +
+ clientSecret + + string + + A client secret for the GitHub App. +
+ request + + function + + +Automatically set to `octokit.request` when using with an `Octokit` constructor. + +For standalone usage, you can pass in your own [`@octokit/request`](https://github.com/octokit/request.js) instance. For usage with enterprise, set `baseUrl` to the hostname + `/api/v3`. Example: + +```js +import { request } from "@octokit/request"; +createAppAuth({ + appId: 1, + privateKey: "-----BEGIN PRIVATE KEY-----\n...", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ cache + + object + + Installation tokens expire after an hour. By default, @octokit/auth-app is caching up to 15000 tokens simultaneously using lru-cache. You can pass your own cache implementation by passing options.cache.{get,set} to the constructor. Example: + +```js +const CACHE = {}; +createAppAuth({ + appId: 1, + privateKey: "-----BEGIN PRIVATE KEY-----\n...", + cache: { + async get(key) { + return CACHE[key]; + }, + async set(key, value) { + CACHE[key] = value; + }, + }, +}); +``` + +
+ log + + object + + You can pass in your preferred logging tool by passing option.log to the constructor. If you would like to make the log level configurable using an environment variable or external option, we recommend the console-log-level package. For example: + +```js +import consoleLogLevel from "console-log-level"; +createAppAuth({ + appId: 1, + privateKey: "-----BEGIN PRIVATE KEY-----\n...", + log: consoleLogLevel({ level: "info" }), +}); +``` + +
+ +## `auth(options)` or `octokit.auth(options)` + +The async `auth()` method accepts different options depending on your use case + +### JSON Web Token (JWT) Authentication + +Authenticate as the GitHub app to list installations, repositories, and create installation access tokens. + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + Required. Must be either "app". +
+ +### OAuth App authentication + +Create, reset, refresh, delete OAuth user-to-server tokens + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + Required. Must be either "oauth-app". +
+ +### Installation authentication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + Required. Must be "installation". +
+ installationId + + number + + Required unless a default installationId was passed to createAppAuth(). ID of installation to retrieve authentication for. +
+ repositoryIds + + array of numbers + + The id of the repositories that the installation token can access. Also known as a databaseID when querying the repository object in GitHub's GraphQL API. This option is **(recommended)** over repositoryNames when needing to limit the scope of the access token, due to repositoryNames having the possibility of changing. Additionally, you should only include either repositoryIds or repositoryNames, but not both. +
+ repositoryNames + + array of strings + + The name of the repositories that the installation token can access. As mentioned in the repositoryIds description, you should only include either repositoryIds or repositoryNames, but not both. +
+ permissions + + object + + The permissions granted to the access token. The permissions object includes the permission names and their access type. For a complete list of permissions and allowable values, see GitHub App permissions. +
+ factory + + function + + +The `auth({type: "installation", installationId, factory })` call with resolve with whatever the factory function returns. The `factory` function will be called with all the strategy option that `auth` was created with, plus the additional options passed to `auth`, besides `type` and `factory`. + +For example, you can create a new `auth` instance for an installation which shares the internal state (especially the access token cache) with the calling `auth` instance: + +```js +const appAuth = createAppAuth({ + appId: 1, + privateKey: "-----BEGIN PRIVATE KEY-----\n...", +}); + +const installationAuth123 = await appAuth({ + type: "installation", + installationId: 123, + factory: createAppAuth, +}); +``` + +
+ refresh + + boolean + + +Installation tokens expire after one hour. By default, tokens are cached and returned from cache until expired. To bypass and update a cached token for the given `installationId`, set `refresh` to `true`. + +Defaults to `false`. + +
+ +### User authentication (web flow) + +Exchange code received from the web flow redirect described in [step 2 of GitHub's OAuth web flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + Required. Must be "oauth-user". +
+ factory + + function + + +The `auth({type: "oauth-user", factory })` call with resolve with whatever the factory function returns. The `factory` function will be called with all the strategy option that `auth` was created with, plus the additional options passed to `auth`, besides `type` and `factory`. + +For example, you can create a new `auth` instance for an installation which shares the internal state (especially the access token cache) with the calling `auth` instance: + +```js +import { createAppAuth, createOAuthUserAuth } from "@octokit/auth-oauth-app"; + +const appAuth = createAppAuth({ + appId: 1, + privateKey: "-----BEGIN PRIVATE KEY-----\n...", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef1234567890abcdef12345678", +}); + +const userAuth = await appAuth({ + type: "oauth-user", + code, + factory: createOAuthUserAuth, +}); + +// will create token upon first call, then cache authentication for successive calls, +// until token needs to be refreshed (if enabled for the GitHub App) +const authentication = await userAuth(); +``` + +
+ code + + string + + The authorization code which was passed as query parameter to the callback URL from the OAuth web application flow. +
+ redirectUrl + + string + + The URL in your application where users are sent after authorization. See redirect urls. +
+ state + + string + + The unguessable random string you provided in Step 1 of the OAuth web application flow. +
+ +### User authentication (device flow) + +Create a token using [GitHub's device flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow). + +The device flow does not require a client secret, but it is required as strategy option for `@octokit/auth-app`, even for the device flow. If you want to implement the device flow without requiring a client secret, use [`@octokit/auth-oauth-device`](https://github.com/octokit/auth-oauth-device.js#readme). + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + Required. Must be "oauth-user". +
+ onVerification + + function + + +**Required**. A function that is called once the device and user codes were retrieved. + +The `onVerification()` callback can be used to pause until the user completes step 2, which might result in a better user experience. + +```js +const auth = auth({ + type: "oauth-user", + onVerification(verification) { + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + await prompt("press enter when you are ready to continue"); + }, +}); +``` + +
+ factory + + function + + +The `auth({type: "oauth-user", factory })` call with resolve with whatever the factory function returns. The `factory` function will be called with all the strategy option that `auth` was created with, plus the additional options passed to `auth`, besides `type` and `factory`. + +For example, you can create a new `auth` instance for an installation which shares the internal state (especially the access token cache) with the calling `auth` instance: + +```js +import { createAppAuth, createOAuthUserAuth } from "@octokit/auth-oauth-app"; + +const appAuth = createAppAuth({ + appId: 1, + privateKey: "-----BEGIN PRIVATE KEY-----\n...", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef1234567890abcdef12345678", +}); + +const userAuth = await appAuth({ + type: "oauth-user", + code, + factory: createOAuthUserAuth, +}); + +// will create token upon first call, then cache authentication for successive calls, +// until token needs to be refreshed (if enabled for the GitHub App) +const authentication = await userAuth(); +``` + +
+ +## Authentication object + +Depending on on the `auth()` call, the resulting authentication object can be one of + +1. JSON Web Token (JWT) authentication +1. OAuth App authentication +1. Installation access token authentication +1. GitHub APP user authentication token with expiring disabled +1. GitHub APP user authentication token with expiring enabled + +### JSON Web Token (JWT) authentication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "app" +
+ token + + string + + The JSON Web Token (JWT) to authenticate as the app. +
+ appId + + number + + GitHub App database ID. +
+ expiresAt + + string + + Timestamp in UTC format, e.g. "2018-07-07T00:09:30.000Z". A Date object can be created using new Date(authentication.expiresAt). +
+ +### OAuth App authentication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "oauth-app" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The client ID as passed to the constructor. +
+ clientSecret + + string + + The client secret as passed to the constructor. +
+ headers + + object + + { authorization }. +
+ +### Installation access token authentication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ token + + string + + The installation access token. +
+ tokenType + + string + + "installation" +
+ installationId + + number + + Installation database ID. +
+ createdAt + + string + + Timestamp in UTC format, e.g. "2018-07-07T00:00:00.000Z". A Date object can be created using new Date(authentication.expiresAt). +
+ expiresAt + + string + + Timestamp in UTC format, e.g. "2018-07-07T00:59:00.000Z". A Date object can be created using new Date(authentication.expiresAt). +
+ repositoryIds + + array of numbers + + Only present if repositoryIds option passed to auth(options). +
+ repositoryNames + + array of strings + + Only present if repositoryNames option passed to auth(options). +
+ permissions + + object + + An object where keys are the permission name and the value is either "read" or "write". See the list of all GitHub App Permissions. +
+ singleFileName + + string + + If the single file permission is enabled, the singleFileName property is set to the path of the accessible file. +
+ +### GitHub APP user authentication token with expiring disabled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ clientSecret + + string + + One of the app's client secrets +
+ token + + string + + The user access token +
+ +### GitHub APP user authentication token with expiring enabled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ clientSecret + + string + + One of the app's client secrets +
+ token + + string + + The user access token +
+ refreshToken + + string + + The refresh token +
+ expiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z +
+ refreshTokenExpiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z +
+ +## `auth.hook(request, route, parameters)` or `auth.hook(request, options)` + +`auth.hook()` hooks directly into the request life cycle. It amends the request to authenticate either as app or as installation based on the request URL. Although the `"machine-man"` preview has graduated to the official API, https://developer.github.com/changes/2020-08-20-graduate-machine-man-and-sailor-v-previews/, it is still required in versions of GitHub Enterprise up to 2.21 so it automatically sets the `"machine-man"` preview for all endpoints requiring JWT authentication. + +The `request` option is an instance of [`@octokit/request`](https://github.com/octokit/request.js#readme). The arguments are the same as for the [`request()` method](https://github.com/octokit/request.js#request). + +`auth.hook()` can be called directly to send an authenticated request + +```js +const { data: installations } = await auth.hook( + request, + "GET /app/installations", +); +``` + +Or it can be passed as option to [`request()`](https://github.com/octokit/request.js#request). + +```js +const requestWithAuth = request.defaults({ + request: { + hook: auth.hook, + }, +}); + +const { data: installations } = await requestWithAuth("GET /app/installations"); +``` + +Note that `auth.hook()` does not create and set an OAuth authentication token. But you can use [`@octokit/auth-oauth-app`](https://github.com/octokit/auth-oauth-app.js#readme) for that functionality. And if you don't plan on sending requests to routes that require authentication with `client_id` and `client_secret`, you can just retrieve the token and then create a new instance of [`request()`](https://github.com/octokit/request.js#request) with the authentication header set: + +```js +const { token } = await auth({ + type: "oauth-user", + code: "123456", +}); +const requestWithAuth = request.defaults({ + headers: { + authentication: `token ${token}`, + }, +}); +``` + +## Types + +```ts +import { + // strategy options + StrategyOptions, + // auth options + AuthOptions, + AppAuthOptions, + OAuthAppAuthOptions, + InstallationAuthOptions, + OAuthWebFlowAuthOptions, + OAuthDeviceFlowAuthOptions, + // authentication objects + Authentication, + AppAuthentication, + OAuthAppAuthentication, + InstallationAccessTokenAuthentication, + GitHubAppUserAuthentication, + GitHubAppUserAuthenticationWithExpiration, +} from "@octokit/auth-app"; +``` + +## Implementation details + +When creating a JSON Web Token, it sets the "issued at time" (iat) to 30s in the past as we have seen people running situations where the GitHub API claimed the iat would be in future. It turned out the clocks on the different machine were not in sync. + +Installation access tokens are valid for 60 minutes. This library invalidates them after 59 minutes to account for request delays. + +All OAuth features are implemented internally using [@octokit/auth-oauth-app](https://github.com/octokit/auth-oauth-app.js/#readme). + +## License + +[MIT](LICENSE) diff --git a/.github/octokit/node_modules/@octokit/auth-app/dist-node/index.js b/.github/octokit/node_modules/@octokit/auth-app/dist-node/index.js new file mode 100644 index 000000000..b3051b581 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/dist-node/index.js @@ -0,0 +1,438 @@ +// pkg/dist-src/index.js +import { getUserAgent } from "universal-user-agent"; +import { request as defaultRequest } from "@octokit/request"; +import { createOAuthAppAuth } from "@octokit/auth-oauth-app"; + +// pkg/dist-src/get-app-authentication.js +import githubAppJwt from "universal-github-app-jwt"; +async function getAppAuthentication({ + appId, + privateKey, + timeDifference +}) { + try { + const appAuthentication = await githubAppJwt({ + id: appId, + privateKey, + now: timeDifference && Math.floor(Date.now() / 1e3) + timeDifference + }); + return { + type: "app", + token: appAuthentication.token, + appId: appAuthentication.appId, + expiresAt: new Date(appAuthentication.expiration * 1e3).toISOString() + }; + } catch (error) { + if (privateKey === "-----BEGIN RSA PRIVATE KEY-----") { + throw new Error( + "The 'privateKey` option contains only the first line '-----BEGIN RSA PRIVATE KEY-----'. If you are setting it using a `.env` file, make sure it is set on a single line with newlines replaced by '\n'" + ); + } else { + throw error; + } + } +} + +// pkg/dist-src/cache.js +import { LRUCache } from "lru-cache"; +function getCache() { + return new LRUCache({ + // cache max. 15000 tokens, that will use less than 10mb memory + max: 15e3, + // Cache for 1 minute less than GitHub expiry + ttl: 1e3 * 60 * 59 + }); +} +async function get(cache, options) { + const cacheKey = optionsToCacheKey(options); + const result = await cache.get(cacheKey); + if (!result) { + return; + } + const [ + token, + createdAt, + expiresAt, + repositorySelection, + permissionsString, + singleFileName + ] = result.split("|"); + const permissions = options.permissions || permissionsString.split(/,/).reduce((permissions2, string) => { + if (/!$/.test(string)) { + permissions2[string.slice(0, -1)] = "write"; + } else { + permissions2[string] = "read"; + } + return permissions2; + }, {}); + return { + token, + createdAt, + expiresAt, + permissions, + repositoryIds: options.repositoryIds, + repositoryNames: options.repositoryNames, + singleFileName, + repositorySelection + }; +} +async function set(cache, options, data) { + const key = optionsToCacheKey(options); + const permissionsString = options.permissions ? "" : Object.keys(data.permissions).map( + (name) => `${name}${data.permissions[name] === "write" ? "!" : ""}` + ).join(","); + const value = [ + data.token, + data.createdAt, + data.expiresAt, + data.repositorySelection, + permissionsString, + data.singleFileName + ].join("|"); + await cache.set(key, value); +} +function optionsToCacheKey({ + installationId, + permissions = {}, + repositoryIds = [], + repositoryNames = [] +}) { + const permissionsString = Object.keys(permissions).sort().map((name) => permissions[name] === "read" ? name : `${name}!`).join(","); + const repositoryIdsString = repositoryIds.sort().join(","); + const repositoryNamesString = repositoryNames.join(","); + return [ + installationId, + repositoryIdsString, + repositoryNamesString, + permissionsString + ].filter(Boolean).join("|"); +} + +// pkg/dist-src/to-token-authentication.js +function toTokenAuthentication({ + installationId, + token, + createdAt, + expiresAt, + repositorySelection, + permissions, + repositoryIds, + repositoryNames, + singleFileName +}) { + return Object.assign( + { + type: "token", + tokenType: "installation", + token, + installationId, + permissions, + createdAt, + expiresAt, + repositorySelection + }, + repositoryIds ? { repositoryIds } : null, + repositoryNames ? { repositoryNames } : null, + singleFileName ? { singleFileName } : null + ); +} + +// pkg/dist-src/get-installation-authentication.js +async function getInstallationAuthentication(state, options, customRequest) { + const installationId = Number(options.installationId || state.installationId); + if (!installationId) { + throw new Error( + "[@octokit/auth-app] installationId option is required for installation authentication." + ); + } + if (options.factory) { + const { type, factory, oauthApp, ...factoryAuthOptions } = { + ...state, + ...options + }; + return factory(factoryAuthOptions); + } + const optionsWithInstallationTokenFromState = Object.assign( + { installationId }, + options + ); + if (!options.refresh) { + const result = await get( + state.cache, + optionsWithInstallationTokenFromState + ); + if (result) { + const { + token: token2, + createdAt: createdAt2, + expiresAt: expiresAt2, + permissions: permissions2, + repositoryIds: repositoryIds2, + repositoryNames: repositoryNames2, + singleFileName: singleFileName2, + repositorySelection: repositorySelection2 + } = result; + return toTokenAuthentication({ + installationId, + token: token2, + createdAt: createdAt2, + expiresAt: expiresAt2, + permissions: permissions2, + repositorySelection: repositorySelection2, + repositoryIds: repositoryIds2, + repositoryNames: repositoryNames2, + singleFileName: singleFileName2 + }); + } + } + const appAuthentication = await getAppAuthentication(state); + const request = customRequest || state.request; + const { + data: { + token, + expires_at: expiresAt, + repositories, + permissions: permissionsOptional, + repository_selection: repositorySelectionOptional, + single_file: singleFileName + } + } = await request("POST /app/installations/{installation_id}/access_tokens", { + installation_id: installationId, + repository_ids: options.repositoryIds, + repositories: options.repositoryNames, + permissions: options.permissions, + mediaType: { + previews: ["machine-man"] + }, + headers: { + authorization: `bearer ${appAuthentication.token}` + } + }); + const permissions = permissionsOptional || {}; + const repositorySelection = repositorySelectionOptional || "all"; + const repositoryIds = repositories ? repositories.map((r) => r.id) : void 0; + const repositoryNames = repositories ? repositories.map((repo) => repo.name) : void 0; + const createdAt = (/* @__PURE__ */ new Date()).toISOString(); + await set(state.cache, optionsWithInstallationTokenFromState, { + token, + createdAt, + expiresAt, + repositorySelection, + permissions, + repositoryIds, + repositoryNames, + singleFileName + }); + return toTokenAuthentication({ + installationId, + token, + createdAt, + expiresAt, + repositorySelection, + permissions, + repositoryIds, + repositoryNames, + singleFileName + }); +} + +// pkg/dist-src/auth.js +async function auth(state, authOptions) { + switch (authOptions.type) { + case "app": + return getAppAuthentication(state); + case "oauth-app": + return state.oauthApp({ type: "oauth-app" }); + case "installation": + authOptions; + return getInstallationAuthentication(state, { + ...authOptions, + type: "installation" + }); + case "oauth-user": + return state.oauthApp(authOptions); + default: + throw new Error(`Invalid auth type: ${authOptions.type}`); + } +} + +// pkg/dist-src/hook.js +import { requiresBasicAuth } from "@octokit/auth-oauth-user"; +import { RequestError } from "@octokit/request-error"; + +// pkg/dist-src/requires-app-auth.js +var PATHS = [ + "/app", + "/app/hook/config", + "/app/hook/deliveries", + "/app/hook/deliveries/{delivery_id}", + "/app/hook/deliveries/{delivery_id}/attempts", + "/app/installations", + "/app/installations/{installation_id}", + "/app/installations/{installation_id}/access_tokens", + "/app/installations/{installation_id}/suspended", + "/app/installation-requests", + "/marketplace_listing/accounts/{account_id}", + "/marketplace_listing/plan", + "/marketplace_listing/plans", + "/marketplace_listing/plans/{plan_id}/accounts", + "/marketplace_listing/stubbed/accounts/{account_id}", + "/marketplace_listing/stubbed/plan", + "/marketplace_listing/stubbed/plans", + "/marketplace_listing/stubbed/plans/{plan_id}/accounts", + "/orgs/{org}/installation", + "/repos/{owner}/{repo}/installation", + "/users/{username}/installation" +]; +function routeMatcher(paths) { + const regexes = paths.map( + (p) => p.split("/").map((c) => c.startsWith("{") ? "(?:.+?)" : c).join("/") + ); + const regex = `^(?:${regexes.map((r) => `(?:${r})`).join("|")})$`; + return new RegExp(regex, "i"); +} +var REGEX = routeMatcher(PATHS); +function requiresAppAuth(url) { + return !!url && REGEX.test(url.split("?")[0]); +} + +// pkg/dist-src/hook.js +var FIVE_SECONDS_IN_MS = 5 * 1e3; +function isNotTimeSkewError(error) { + return !(error.message.match( + /'Expiration time' claim \('exp'\) must be a numeric value representing the future time at which the assertion expires/ + ) || error.message.match( + /'Issued at' claim \('iat'\) must be an Integer representing the time that the assertion was issued/ + )); +} +async function hook(state, request, route, parameters) { + const endpoint = request.endpoint.merge(route, parameters); + const url = endpoint.url; + if (/\/login\/oauth\/access_token$/.test(url)) { + return request(endpoint); + } + if (requiresAppAuth(url.replace(request.endpoint.DEFAULTS.baseUrl, ""))) { + const { token: token2 } = await getAppAuthentication(state); + endpoint.headers.authorization = `bearer ${token2}`; + let response; + try { + response = await request(endpoint); + } catch (error) { + if (isNotTimeSkewError(error)) { + throw error; + } + if (typeof error.response.headers.date === "undefined") { + throw error; + } + const diff = Math.floor( + (Date.parse(error.response.headers.date) - Date.parse((/* @__PURE__ */ new Date()).toString())) / 1e3 + ); + state.log.warn(error.message); + state.log.warn( + `[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.` + ); + const { token: token3 } = await getAppAuthentication({ + ...state, + timeDifference: diff + }); + endpoint.headers.authorization = `bearer ${token3}`; + return request(endpoint); + } + return response; + } + if (requiresBasicAuth(url)) { + const authentication = await state.oauthApp({ type: "oauth-app" }); + endpoint.headers.authorization = authentication.headers.authorization; + return request(endpoint); + } + const { token, createdAt } = await getInstallationAuthentication( + state, + // @ts-expect-error TBD + {}, + request.defaults({ baseUrl: endpoint.baseUrl }) + ); + endpoint.headers.authorization = `token ${token}`; + return sendRequestWithRetries( + state, + request, + endpoint, + createdAt + ); +} +async function sendRequestWithRetries(state, request, options, createdAt, retries = 0) { + const timeSinceTokenCreationInMs = +/* @__PURE__ */ new Date() - +new Date(createdAt); + try { + return await request(options); + } catch (error) { + if (error.status !== 401) { + throw error; + } + if (timeSinceTokenCreationInMs >= FIVE_SECONDS_IN_MS) { + if (retries > 0) { + error.message = `After ${retries} retries within ${timeSinceTokenCreationInMs / 1e3}s of creating the installation access token, the response remains 401. At this point, the cause may be an authentication problem or a system outage. Please check https://www.githubstatus.com for status information`; + } + throw error; + } + ++retries; + const awaitTime = retries * 1e3; + state.log.warn( + `[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime / 1e3}s)` + ); + await new Promise((resolve) => setTimeout(resolve, awaitTime)); + return sendRequestWithRetries(state, request, options, createdAt, retries); + } +} + +// pkg/dist-src/version.js +var VERSION = "7.1.1"; + +// pkg/dist-src/index.js +import { createOAuthUserAuth } from "@octokit/auth-oauth-user"; +function createAppAuth(options) { + if (!options.appId) { + throw new Error("[@octokit/auth-app] appId option is required"); + } + if (!options.privateKey) { + throw new Error("[@octokit/auth-app] privateKey option is required"); + } + if ("installationId" in options && !options.installationId) { + throw new Error( + "[@octokit/auth-app] installationId is set to a falsy value" + ); + } + const log = Object.assign( + { + warn: console.warn.bind(console) + }, + options.log + ); + const request = options.request || defaultRequest.defaults({ + headers: { + "user-agent": `octokit-auth-app.js/${VERSION} ${getUserAgent()}` + } + }); + const state = Object.assign( + { + request, + cache: getCache() + }, + options, + options.installationId ? { installationId: Number(options.installationId) } : {}, + { + log, + oauthApp: createOAuthAppAuth({ + clientType: "github-app", + clientId: options.clientId || "", + clientSecret: options.clientSecret || "", + request + }) + } + ); + return Object.assign(auth.bind(null, state), { + hook: hook.bind(null, state) + }); +} +export { + createAppAuth, + createOAuthUserAuth +}; diff --git a/.github/octokit/node_modules/@octokit/auth-app/dist-node/index.js.map b/.github/octokit/node_modules/@octokit/auth-app/dist-node/index.js.map new file mode 100644 index 000000000..e2d0263fa --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/dist-node/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../dist-src/index.js", "../dist-src/get-app-authentication.js", "../dist-src/cache.js", "../dist-src/to-token-authentication.js", "../dist-src/get-installation-authentication.js", "../dist-src/auth.js", "../dist-src/hook.js", "../dist-src/requires-app-auth.js", "../dist-src/version.js"], + "sourcesContent": ["import { getUserAgent } from \"universal-user-agent\";\nimport { request as defaultRequest } from \"@octokit/request\";\nimport { createOAuthAppAuth } from \"@octokit/auth-oauth-app\";\nimport { auth } from \"./auth.js\";\nimport { hook } from \"./hook.js\";\nimport { getCache } from \"./cache.js\";\nimport { VERSION } from \"./version.js\";\nimport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nfunction createAppAuth(options) {\n if (!options.appId) {\n throw new Error(\"[@octokit/auth-app] appId option is required\");\n }\n if (!options.privateKey) {\n throw new Error(\"[@octokit/auth-app] privateKey option is required\");\n }\n if (\"installationId\" in options && !options.installationId) {\n throw new Error(\n \"[@octokit/auth-app] installationId is set to a falsy value\"\n );\n }\n const log = Object.assign(\n {\n warn: console.warn.bind(console)\n },\n options.log\n );\n const request = options.request || defaultRequest.defaults({\n headers: {\n \"user-agent\": `octokit-auth-app.js/${VERSION} ${getUserAgent()}`\n }\n });\n const state = Object.assign(\n {\n request,\n cache: getCache()\n },\n options,\n options.installationId ? { installationId: Number(options.installationId) } : {},\n {\n log,\n oauthApp: createOAuthAppAuth({\n clientType: \"github-app\",\n clientId: options.clientId || \"\",\n clientSecret: options.clientSecret || \"\",\n request\n })\n }\n );\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state)\n });\n}\nexport {\n createAppAuth,\n createOAuthUserAuth\n};\n", "import githubAppJwt from \"universal-github-app-jwt\";\nasync function getAppAuthentication({\n appId,\n privateKey,\n timeDifference\n}) {\n try {\n const appAuthentication = await githubAppJwt({\n id: appId,\n privateKey,\n now: timeDifference && Math.floor(Date.now() / 1e3) + timeDifference\n });\n return {\n type: \"app\",\n token: appAuthentication.token,\n appId: appAuthentication.appId,\n expiresAt: new Date(appAuthentication.expiration * 1e3).toISOString()\n };\n } catch (error) {\n if (privateKey === \"-----BEGIN RSA PRIVATE KEY-----\") {\n throw new Error(\n \"The 'privateKey` option contains only the first line '-----BEGIN RSA PRIVATE KEY-----'. If you are setting it using a `.env` file, make sure it is set on a single line with newlines replaced by '\\n'\"\n );\n } else {\n throw error;\n }\n }\n}\nexport {\n getAppAuthentication\n};\n", "import { LRUCache } from \"lru-cache\";\nfunction getCache() {\n return new LRUCache({\n // cache max. 15000 tokens, that will use less than 10mb memory\n max: 15e3,\n // Cache for 1 minute less than GitHub expiry\n ttl: 1e3 * 60 * 59\n });\n}\nasync function get(cache, options) {\n const cacheKey = optionsToCacheKey(options);\n const result = await cache.get(cacheKey);\n if (!result) {\n return;\n }\n const [\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissionsString,\n singleFileName\n ] = result.split(\"|\");\n const permissions = options.permissions || permissionsString.split(/,/).reduce((permissions2, string) => {\n if (/!$/.test(string)) {\n permissions2[string.slice(0, -1)] = \"write\";\n } else {\n permissions2[string] = \"read\";\n }\n return permissions2;\n }, {});\n return {\n token,\n createdAt,\n expiresAt,\n permissions,\n repositoryIds: options.repositoryIds,\n repositoryNames: options.repositoryNames,\n singleFileName,\n repositorySelection\n };\n}\nasync function set(cache, options, data) {\n const key = optionsToCacheKey(options);\n const permissionsString = options.permissions ? \"\" : Object.keys(data.permissions).map(\n (name) => `${name}${data.permissions[name] === \"write\" ? \"!\" : \"\"}`\n ).join(\",\");\n const value = [\n data.token,\n data.createdAt,\n data.expiresAt,\n data.repositorySelection,\n permissionsString,\n data.singleFileName\n ].join(\"|\");\n await cache.set(key, value);\n}\nfunction optionsToCacheKey({\n installationId,\n permissions = {},\n repositoryIds = [],\n repositoryNames = []\n}) {\n const permissionsString = Object.keys(permissions).sort().map((name) => permissions[name] === \"read\" ? name : `${name}!`).join(\",\");\n const repositoryIdsString = repositoryIds.sort().join(\",\");\n const repositoryNamesString = repositoryNames.join(\",\");\n return [\n installationId,\n repositoryIdsString,\n repositoryNamesString,\n permissionsString\n ].filter(Boolean).join(\"|\");\n}\nexport {\n get,\n getCache,\n set\n};\n", "function toTokenAuthentication({\n installationId,\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissions,\n repositoryIds,\n repositoryNames,\n singleFileName\n}) {\n return Object.assign(\n {\n type: \"token\",\n tokenType: \"installation\",\n token,\n installationId,\n permissions,\n createdAt,\n expiresAt,\n repositorySelection\n },\n repositoryIds ? { repositoryIds } : null,\n repositoryNames ? { repositoryNames } : null,\n singleFileName ? { singleFileName } : null\n );\n}\nexport {\n toTokenAuthentication\n};\n", "import { get, set } from \"./cache.js\";\nimport { getAppAuthentication } from \"./get-app-authentication.js\";\nimport { toTokenAuthentication } from \"./to-token-authentication.js\";\nasync function getInstallationAuthentication(state, options, customRequest) {\n const installationId = Number(options.installationId || state.installationId);\n if (!installationId) {\n throw new Error(\n \"[@octokit/auth-app] installationId option is required for installation authentication.\"\n );\n }\n if (options.factory) {\n const { type, factory, oauthApp, ...factoryAuthOptions } = {\n ...state,\n ...options\n };\n return factory(factoryAuthOptions);\n }\n const optionsWithInstallationTokenFromState = Object.assign(\n { installationId },\n options\n );\n if (!options.refresh) {\n const result = await get(\n state.cache,\n optionsWithInstallationTokenFromState\n );\n if (result) {\n const {\n token: token2,\n createdAt: createdAt2,\n expiresAt: expiresAt2,\n permissions: permissions2,\n repositoryIds: repositoryIds2,\n repositoryNames: repositoryNames2,\n singleFileName: singleFileName2,\n repositorySelection: repositorySelection2\n } = result;\n return toTokenAuthentication({\n installationId,\n token: token2,\n createdAt: createdAt2,\n expiresAt: expiresAt2,\n permissions: permissions2,\n repositorySelection: repositorySelection2,\n repositoryIds: repositoryIds2,\n repositoryNames: repositoryNames2,\n singleFileName: singleFileName2\n });\n }\n }\n const appAuthentication = await getAppAuthentication(state);\n const request = customRequest || state.request;\n const {\n data: {\n token,\n expires_at: expiresAt,\n repositories,\n permissions: permissionsOptional,\n repository_selection: repositorySelectionOptional,\n single_file: singleFileName\n }\n } = await request(\"POST /app/installations/{installation_id}/access_tokens\", {\n installation_id: installationId,\n repository_ids: options.repositoryIds,\n repositories: options.repositoryNames,\n permissions: options.permissions,\n mediaType: {\n previews: [\"machine-man\"]\n },\n headers: {\n authorization: `bearer ${appAuthentication.token}`\n }\n });\n const permissions = permissionsOptional || {};\n const repositorySelection = repositorySelectionOptional || \"all\";\n const repositoryIds = repositories ? repositories.map((r) => r.id) : void 0;\n const repositoryNames = repositories ? repositories.map((repo) => repo.name) : void 0;\n const createdAt = (/* @__PURE__ */ new Date()).toISOString();\n await set(state.cache, optionsWithInstallationTokenFromState, {\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissions,\n repositoryIds,\n repositoryNames,\n singleFileName\n });\n return toTokenAuthentication({\n installationId,\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissions,\n repositoryIds,\n repositoryNames,\n singleFileName\n });\n}\nexport {\n getInstallationAuthentication\n};\n", "import { getAppAuthentication } from \"./get-app-authentication.js\";\nimport { getInstallationAuthentication } from \"./get-installation-authentication.js\";\nasync function auth(state, authOptions) {\n switch (authOptions.type) {\n case \"app\":\n return getAppAuthentication(state);\n case \"oauth-app\":\n return state.oauthApp({ type: \"oauth-app\" });\n case \"installation\":\n authOptions;\n return getInstallationAuthentication(state, {\n ...authOptions,\n type: \"installation\"\n });\n case \"oauth-user\":\n return state.oauthApp(authOptions);\n default:\n throw new Error(`Invalid auth type: ${authOptions.type}`);\n }\n}\nexport {\n auth\n};\n", "import { requiresBasicAuth } from \"@octokit/auth-oauth-user\";\nimport { RequestError } from \"@octokit/request-error\";\nimport { getAppAuthentication } from \"./get-app-authentication.js\";\nimport { getInstallationAuthentication } from \"./get-installation-authentication.js\";\nimport { requiresAppAuth } from \"./requires-app-auth.js\";\nconst FIVE_SECONDS_IN_MS = 5 * 1e3;\nfunction isNotTimeSkewError(error) {\n return !(error.message.match(\n /'Expiration time' claim \\('exp'\\) must be a numeric value representing the future time at which the assertion expires/\n ) || error.message.match(\n /'Issued at' claim \\('iat'\\) must be an Integer representing the time that the assertion was issued/\n ));\n}\nasync function hook(state, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n const url = endpoint.url;\n if (/\\/login\\/oauth\\/access_token$/.test(url)) {\n return request(endpoint);\n }\n if (requiresAppAuth(url.replace(request.endpoint.DEFAULTS.baseUrl, \"\"))) {\n const { token: token2 } = await getAppAuthentication(state);\n endpoint.headers.authorization = `bearer ${token2}`;\n let response;\n try {\n response = await request(endpoint);\n } catch (error) {\n if (isNotTimeSkewError(error)) {\n throw error;\n }\n if (typeof error.response.headers.date === \"undefined\") {\n throw error;\n }\n const diff = Math.floor(\n (Date.parse(error.response.headers.date) - Date.parse((/* @__PURE__ */ new Date()).toString())) / 1e3\n );\n state.log.warn(error.message);\n state.log.warn(\n `[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.`\n );\n const { token: token3 } = await getAppAuthentication({\n ...state,\n timeDifference: diff\n });\n endpoint.headers.authorization = `bearer ${token3}`;\n return request(endpoint);\n }\n return response;\n }\n if (requiresBasicAuth(url)) {\n const authentication = await state.oauthApp({ type: \"oauth-app\" });\n endpoint.headers.authorization = authentication.headers.authorization;\n return request(endpoint);\n }\n const { token, createdAt } = await getInstallationAuthentication(\n state,\n // @ts-expect-error TBD\n {},\n request.defaults({ baseUrl: endpoint.baseUrl })\n );\n endpoint.headers.authorization = `token ${token}`;\n return sendRequestWithRetries(\n state,\n request,\n endpoint,\n createdAt\n );\n}\nasync function sendRequestWithRetries(state, request, options, createdAt, retries = 0) {\n const timeSinceTokenCreationInMs = +/* @__PURE__ */ new Date() - +new Date(createdAt);\n try {\n return await request(options);\n } catch (error) {\n if (error.status !== 401) {\n throw error;\n }\n if (timeSinceTokenCreationInMs >= FIVE_SECONDS_IN_MS) {\n if (retries > 0) {\n error.message = `After ${retries} retries within ${timeSinceTokenCreationInMs / 1e3}s of creating the installation access token, the response remains 401. At this point, the cause may be an authentication problem or a system outage. Please check https://www.githubstatus.com for status information`;\n }\n throw error;\n }\n ++retries;\n const awaitTime = retries * 1e3;\n state.log.warn(\n `[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime / 1e3}s)`\n );\n await new Promise((resolve) => setTimeout(resolve, awaitTime));\n return sendRequestWithRetries(state, request, options, createdAt, retries);\n }\n}\nexport {\n hook\n};\n", "const PATHS = [\n \"/app\",\n \"/app/hook/config\",\n \"/app/hook/deliveries\",\n \"/app/hook/deliveries/{delivery_id}\",\n \"/app/hook/deliveries/{delivery_id}/attempts\",\n \"/app/installations\",\n \"/app/installations/{installation_id}\",\n \"/app/installations/{installation_id}/access_tokens\",\n \"/app/installations/{installation_id}/suspended\",\n \"/app/installation-requests\",\n \"/marketplace_listing/accounts/{account_id}\",\n \"/marketplace_listing/plan\",\n \"/marketplace_listing/plans\",\n \"/marketplace_listing/plans/{plan_id}/accounts\",\n \"/marketplace_listing/stubbed/accounts/{account_id}\",\n \"/marketplace_listing/stubbed/plan\",\n \"/marketplace_listing/stubbed/plans\",\n \"/marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"/orgs/{org}/installation\",\n \"/repos/{owner}/{repo}/installation\",\n \"/users/{username}/installation\"\n];\nfunction routeMatcher(paths) {\n const regexes = paths.map(\n (p) => p.split(\"/\").map((c) => c.startsWith(\"{\") ? \"(?:.+?)\" : c).join(\"/\")\n );\n const regex = `^(?:${regexes.map((r) => `(?:${r})`).join(\"|\")})$`;\n return new RegExp(regex, \"i\");\n}\nconst REGEX = routeMatcher(PATHS);\nfunction requiresAppAuth(url) {\n return !!url && REGEX.test(url.split(\"?\")[0]);\n}\nexport {\n requiresAppAuth\n};\n", "const VERSION = \"7.1.1\";\nexport {\n VERSION\n};\n"], + "mappings": ";AAAA,SAAS,oBAAoB;AAC7B,SAAS,WAAW,sBAAsB;AAC1C,SAAS,0BAA0B;;;ACFnC,OAAO,kBAAkB;AACzB,eAAe,qBAAqB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,MAAI;AACF,UAAM,oBAAoB,MAAM,aAAa;AAAA,MAC3C,IAAI;AAAA,MACJ;AAAA,MACA,KAAK,kBAAkB,KAAK,MAAM,KAAK,IAAI,IAAI,GAAG,IAAI;AAAA,IACxD,CAAC;AACD,WAAO;AAAA,MACL,MAAM;AAAA,MACN,OAAO,kBAAkB;AAAA,MACzB,OAAO,kBAAkB;AAAA,MACzB,WAAW,IAAI,KAAK,kBAAkB,aAAa,GAAG,EAAE,YAAY;AAAA,IACtE;AAAA,EACF,SAAS,OAAO;AACd,QAAI,eAAe,mCAAmC;AACpD,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF,OAAO;AACL,YAAM;AAAA,IACR;AAAA,EACF;AACF;;;AC3BA,SAAS,gBAAgB;AACzB,SAAS,WAAW;AAClB,SAAO,IAAI,SAAS;AAAA;AAAA,IAElB,KAAK;AAAA;AAAA,IAEL,KAAK,MAAM,KAAK;AAAA,EAClB,CAAC;AACH;AACA,eAAe,IAAI,OAAO,SAAS;AACjC,QAAM,WAAW,kBAAkB,OAAO;AAC1C,QAAM,SAAS,MAAM,MAAM,IAAI,QAAQ;AACvC,MAAI,CAAC,QAAQ;AACX;AAAA,EACF;AACA,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,OAAO,MAAM,GAAG;AACpB,QAAM,cAAc,QAAQ,eAAe,kBAAkB,MAAM,GAAG,EAAE,OAAO,CAAC,cAAc,WAAW;AACvG,QAAI,KAAK,KAAK,MAAM,GAAG;AACrB,mBAAa,OAAO,MAAM,GAAG,EAAE,CAAC,IAAI;AAAA,IACtC,OAAO;AACL,mBAAa,MAAM,IAAI;AAAA,IACzB;AACA,WAAO;AAAA,EACT,GAAG,CAAC,CAAC;AACL,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe,QAAQ;AAAA,IACvB,iBAAiB,QAAQ;AAAA,IACzB;AAAA,IACA;AAAA,EACF;AACF;AACA,eAAe,IAAI,OAAO,SAAS,MAAM;AACvC,QAAM,MAAM,kBAAkB,OAAO;AACrC,QAAM,oBAAoB,QAAQ,cAAc,KAAK,OAAO,KAAK,KAAK,WAAW,EAAE;AAAA,IACjF,CAAC,SAAS,GAAG,IAAI,GAAG,KAAK,YAAY,IAAI,MAAM,UAAU,MAAM,EAAE;AAAA,EACnE,EAAE,KAAK,GAAG;AACV,QAAM,QAAQ;AAAA,IACZ,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL;AAAA,IACA,KAAK;AAAA,EACP,EAAE,KAAK,GAAG;AACV,QAAM,MAAM,IAAI,KAAK,KAAK;AAC5B;AACA,SAAS,kBAAkB;AAAA,EACzB;AAAA,EACA,cAAc,CAAC;AAAA,EACf,gBAAgB,CAAC;AAAA,EACjB,kBAAkB,CAAC;AACrB,GAAG;AACD,QAAM,oBAAoB,OAAO,KAAK,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,YAAY,IAAI,MAAM,SAAS,OAAO,GAAG,IAAI,GAAG,EAAE,KAAK,GAAG;AAClI,QAAM,sBAAsB,cAAc,KAAK,EAAE,KAAK,GAAG;AACzD,QAAM,wBAAwB,gBAAgB,KAAK,GAAG;AACtD,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAC5B;;;ACxEA,SAAS,sBAAsB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,SAAO,OAAO;AAAA,IACZ;AAAA,MACE,MAAM;AAAA,MACN,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,gBAAgB,EAAE,cAAc,IAAI;AAAA,IACpC,kBAAkB,EAAE,gBAAgB,IAAI;AAAA,IACxC,iBAAiB,EAAE,eAAe,IAAI;AAAA,EACxC;AACF;;;ACvBA,eAAe,8BAA8B,OAAO,SAAS,eAAe;AAC1E,QAAM,iBAAiB,OAAO,QAAQ,kBAAkB,MAAM,cAAc;AAC5E,MAAI,CAAC,gBAAgB;AACnB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,MAAI,QAAQ,SAAS;AACnB,UAAM,EAAE,MAAM,SAAS,UAAU,GAAG,mBAAmB,IAAI;AAAA,MACzD,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AACA,WAAO,QAAQ,kBAAkB;AAAA,EACnC;AACA,QAAM,wCAAwC,OAAO;AAAA,IACnD,EAAE,eAAe;AAAA,IACjB;AAAA,EACF;AACA,MAAI,CAAC,QAAQ,SAAS;AACpB,UAAM,SAAS,MAAM;AAAA,MACnB,MAAM;AAAA,MACN;AAAA,IACF;AACA,QAAI,QAAQ;AACV,YAAM;AAAA,QACJ,OAAO;AAAA,QACP,WAAW;AAAA,QACX,WAAW;AAAA,QACX,aAAa;AAAA,QACb,eAAe;AAAA,QACf,iBAAiB;AAAA,QACjB,gBAAgB;AAAA,QAChB,qBAAqB;AAAA,MACvB,IAAI;AACJ,aAAO,sBAAsB;AAAA,QAC3B;AAAA,QACA,OAAO;AAAA,QACP,WAAW;AAAA,QACX,WAAW;AAAA,QACX,aAAa;AAAA,QACb,qBAAqB;AAAA,QACrB,eAAe;AAAA,QACf,iBAAiB;AAAA,QACjB,gBAAgB;AAAA,MAClB,CAAC;AAAA,IACH;AAAA,EACF;AACA,QAAM,oBAAoB,MAAM,qBAAqB,KAAK;AAC1D,QAAM,UAAU,iBAAiB,MAAM;AACvC,QAAM;AAAA,IACJ,MAAM;AAAA,MACJ;AAAA,MACA,YAAY;AAAA,MACZ;AAAA,MACA,aAAa;AAAA,MACb,sBAAsB;AAAA,MACtB,aAAa;AAAA,IACf;AAAA,EACF,IAAI,MAAM,QAAQ,2DAA2D;AAAA,IAC3E,iBAAiB;AAAA,IACjB,gBAAgB,QAAQ;AAAA,IACxB,cAAc,QAAQ;AAAA,IACtB,aAAa,QAAQ;AAAA,IACrB,WAAW;AAAA,MACT,UAAU,CAAC,aAAa;AAAA,IAC1B;AAAA,IACA,SAAS;AAAA,MACP,eAAe,UAAU,kBAAkB,KAAK;AAAA,IAClD;AAAA,EACF,CAAC;AACD,QAAM,cAAc,uBAAuB,CAAC;AAC5C,QAAM,sBAAsB,+BAA+B;AAC3D,QAAM,gBAAgB,eAAe,aAAa,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI;AACrE,QAAM,kBAAkB,eAAe,aAAa,IAAI,CAAC,SAAS,KAAK,IAAI,IAAI;AAC/E,QAAM,aAA6B,oBAAI,KAAK,GAAG,YAAY;AAC3D,QAAM,IAAI,MAAM,OAAO,uCAAuC;AAAA,IAC5D;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,SAAO,sBAAsB;AAAA,IAC3B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;;;ACjGA,eAAe,KAAK,OAAO,aAAa;AACtC,UAAQ,YAAY,MAAM;AAAA,IACxB,KAAK;AACH,aAAO,qBAAqB,KAAK;AAAA,IACnC,KAAK;AACH,aAAO,MAAM,SAAS,EAAE,MAAM,YAAY,CAAC;AAAA,IAC7C,KAAK;AACH;AACA,aAAO,8BAA8B,OAAO;AAAA,QAC1C,GAAG;AAAA,QACH,MAAM;AAAA,MACR,CAAC;AAAA,IACH,KAAK;AACH,aAAO,MAAM,SAAS,WAAW;AAAA,IACnC;AACE,YAAM,IAAI,MAAM,sBAAsB,YAAY,IAAI,EAAE;AAAA,EAC5D;AACF;;;ACnBA,SAAS,yBAAyB;AAClC,SAAS,oBAAoB;;;ACD7B,IAAM,QAAQ;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACA,SAAS,aAAa,OAAO;AAC3B,QAAM,UAAU,MAAM;AAAA,IACpB,CAAC,MAAM,EAAE,MAAM,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,YAAY,CAAC,EAAE,KAAK,GAAG;AAAA,EAC5E;AACA,QAAM,QAAQ,OAAO,QAAQ,IAAI,CAAC,MAAM,MAAM,CAAC,GAAG,EAAE,KAAK,GAAG,CAAC;AAC7D,SAAO,IAAI,OAAO,OAAO,GAAG;AAC9B;AACA,IAAM,QAAQ,aAAa,KAAK;AAChC,SAAS,gBAAgB,KAAK;AAC5B,SAAO,CAAC,CAAC,OAAO,MAAM,KAAK,IAAI,MAAM,GAAG,EAAE,CAAC,CAAC;AAC9C;;;AD5BA,IAAM,qBAAqB,IAAI;AAC/B,SAAS,mBAAmB,OAAO;AACjC,SAAO,EAAE,MAAM,QAAQ;AAAA,IACrB;AAAA,EACF,KAAK,MAAM,QAAQ;AAAA,IACjB;AAAA,EACF;AACF;AACA,eAAe,KAAK,OAAO,SAAS,OAAO,YAAY;AACrD,QAAM,WAAW,QAAQ,SAAS,MAAM,OAAO,UAAU;AACzD,QAAM,MAAM,SAAS;AACrB,MAAI,gCAAgC,KAAK,GAAG,GAAG;AAC7C,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACA,MAAI,gBAAgB,IAAI,QAAQ,QAAQ,SAAS,SAAS,SAAS,EAAE,CAAC,GAAG;AACvE,UAAM,EAAE,OAAO,OAAO,IAAI,MAAM,qBAAqB,KAAK;AAC1D,aAAS,QAAQ,gBAAgB,UAAU,MAAM;AACjD,QAAI;AACJ,QAAI;AACF,iBAAW,MAAM,QAAQ,QAAQ;AAAA,IACnC,SAAS,OAAO;AACd,UAAI,mBAAmB,KAAK,GAAG;AAC7B,cAAM;AAAA,MACR;AACA,UAAI,OAAO,MAAM,SAAS,QAAQ,SAAS,aAAa;AACtD,cAAM;AAAA,MACR;AACA,YAAM,OAAO,KAAK;AAAA,SACf,KAAK,MAAM,MAAM,SAAS,QAAQ,IAAI,IAAI,KAAK,OAAuB,oBAAI,KAAK,GAAG,SAAS,CAAC,KAAK;AAAA,MACpG;AACA,YAAM,IAAI,KAAK,MAAM,OAAO;AAC5B,YAAM,IAAI;AAAA,QACR,wEAAwE,IAAI;AAAA,MAC9E;AACA,YAAM,EAAE,OAAO,OAAO,IAAI,MAAM,qBAAqB;AAAA,QACnD,GAAG;AAAA,QACH,gBAAgB;AAAA,MAClB,CAAC;AACD,eAAS,QAAQ,gBAAgB,UAAU,MAAM;AACjD,aAAO,QAAQ,QAAQ;AAAA,IACzB;AACA,WAAO;AAAA,EACT;AACA,MAAI,kBAAkB,GAAG,GAAG;AAC1B,UAAM,iBAAiB,MAAM,MAAM,SAAS,EAAE,MAAM,YAAY,CAAC;AACjE,aAAS,QAAQ,gBAAgB,eAAe,QAAQ;AACxD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACA,QAAM,EAAE,OAAO,UAAU,IAAI,MAAM;AAAA,IACjC;AAAA;AAAA,IAEA,CAAC;AAAA,IACD,QAAQ,SAAS,EAAE,SAAS,SAAS,QAAQ,CAAC;AAAA,EAChD;AACA,WAAS,QAAQ,gBAAgB,SAAS,KAAK;AAC/C,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AACA,eAAe,uBAAuB,OAAO,SAAS,SAAS,WAAW,UAAU,GAAG;AACrF,QAAM,6BAA6B,CAAiB,oBAAI,KAAK,IAAI,CAAC,IAAI,KAAK,SAAS;AACpF,MAAI;AACF,WAAO,MAAM,QAAQ,OAAO;AAAA,EAC9B,SAAS,OAAO;AACd,QAAI,MAAM,WAAW,KAAK;AACxB,YAAM;AAAA,IACR;AACA,QAAI,8BAA8B,oBAAoB;AACpD,UAAI,UAAU,GAAG;AACf,cAAM,UAAU,SAAS,OAAO,mBAAmB,6BAA6B,GAAG;AAAA,MACrF;AACA,YAAM;AAAA,IACR;AACA,MAAE;AACF,UAAM,YAAY,UAAU;AAC5B,UAAM,IAAI;AAAA,MACR,kGAAkG,OAAO,WAAW,YAAY,GAAG;AAAA,IACrI;AACA,UAAM,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,SAAS,CAAC;AAC7D,WAAO,uBAAuB,OAAO,SAAS,SAAS,WAAW,OAAO;AAAA,EAC3E;AACF;;;AEzFA,IAAM,UAAU;;;AROhB,SAAS,2BAA2B;AACpC,SAAS,cAAc,SAAS;AAC9B,MAAI,CAAC,QAAQ,OAAO;AAClB,UAAM,IAAI,MAAM,8CAA8C;AAAA,EAChE;AACA,MAAI,CAAC,QAAQ,YAAY;AACvB,UAAM,IAAI,MAAM,mDAAmD;AAAA,EACrE;AACA,MAAI,oBAAoB,WAAW,CAAC,QAAQ,gBAAgB;AAC1D,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,QAAM,MAAM,OAAO;AAAA,IACjB;AAAA,MACE,MAAM,QAAQ,KAAK,KAAK,OAAO;AAAA,IACjC;AAAA,IACA,QAAQ;AAAA,EACV;AACA,QAAM,UAAU,QAAQ,WAAW,eAAe,SAAS;AAAA,IACzD,SAAS;AAAA,MACP,cAAc,uBAAuB,OAAO,IAAI,aAAa,CAAC;AAAA,IAChE;AAAA,EACF,CAAC;AACD,QAAM,QAAQ,OAAO;AAAA,IACnB;AAAA,MACE;AAAA,MACA,OAAO,SAAS;AAAA,IAClB;AAAA,IACA;AAAA,IACA,QAAQ,iBAAiB,EAAE,gBAAgB,OAAO,QAAQ,cAAc,EAAE,IAAI,CAAC;AAAA,IAC/E;AAAA,MACE;AAAA,MACA,UAAU,mBAAmB;AAAA,QAC3B,YAAY;AAAA,QACZ,UAAU,QAAQ,YAAY;AAAA,QAC9B,cAAc,QAAQ,gBAAgB;AAAA,QACtC;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACA,SAAO,OAAO,OAAO,KAAK,KAAK,MAAM,KAAK,GAAG;AAAA,IAC3C,MAAM,KAAK,KAAK,MAAM,KAAK;AAAA,EAC7B,CAAC;AACH;", + "names": [] +} diff --git a/.github/octokit/node_modules/@octokit/auth-app/dist-src/auth.js b/.github/octokit/node_modules/@octokit/auth-app/dist-src/auth.js new file mode 100644 index 000000000..42e98079d --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/dist-src/auth.js @@ -0,0 +1,23 @@ +import { getAppAuthentication } from "./get-app-authentication.js"; +import { getInstallationAuthentication } from "./get-installation-authentication.js"; +async function auth(state, authOptions) { + switch (authOptions.type) { + case "app": + return getAppAuthentication(state); + case "oauth-app": + return state.oauthApp({ type: "oauth-app" }); + case "installation": + authOptions; + return getInstallationAuthentication(state, { + ...authOptions, + type: "installation" + }); + case "oauth-user": + return state.oauthApp(authOptions); + default: + throw new Error(`Invalid auth type: ${authOptions.type}`); + } +} +export { + auth +}; diff --git a/.github/octokit/node_modules/@octokit/auth-app/dist-src/cache.js b/.github/octokit/node_modules/@octokit/auth-app/dist-src/cache.js new file mode 100644 index 000000000..a3e373dc5 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/dist-src/cache.js @@ -0,0 +1,78 @@ +import { LRUCache } from "lru-cache"; +function getCache() { + return new LRUCache({ + // cache max. 15000 tokens, that will use less than 10mb memory + max: 15e3, + // Cache for 1 minute less than GitHub expiry + ttl: 1e3 * 60 * 59 + }); +} +async function get(cache, options) { + const cacheKey = optionsToCacheKey(options); + const result = await cache.get(cacheKey); + if (!result) { + return; + } + const [ + token, + createdAt, + expiresAt, + repositorySelection, + permissionsString, + singleFileName + ] = result.split("|"); + const permissions = options.permissions || permissionsString.split(/,/).reduce((permissions2, string) => { + if (/!$/.test(string)) { + permissions2[string.slice(0, -1)] = "write"; + } else { + permissions2[string] = "read"; + } + return permissions2; + }, {}); + return { + token, + createdAt, + expiresAt, + permissions, + repositoryIds: options.repositoryIds, + repositoryNames: options.repositoryNames, + singleFileName, + repositorySelection + }; +} +async function set(cache, options, data) { + const key = optionsToCacheKey(options); + const permissionsString = options.permissions ? "" : Object.keys(data.permissions).map( + (name) => `${name}${data.permissions[name] === "write" ? "!" : ""}` + ).join(","); + const value = [ + data.token, + data.createdAt, + data.expiresAt, + data.repositorySelection, + permissionsString, + data.singleFileName + ].join("|"); + await cache.set(key, value); +} +function optionsToCacheKey({ + installationId, + permissions = {}, + repositoryIds = [], + repositoryNames = [] +}) { + const permissionsString = Object.keys(permissions).sort().map((name) => permissions[name] === "read" ? name : `${name}!`).join(","); + const repositoryIdsString = repositoryIds.sort().join(","); + const repositoryNamesString = repositoryNames.join(","); + return [ + installationId, + repositoryIdsString, + repositoryNamesString, + permissionsString + ].filter(Boolean).join("|"); +} +export { + get, + getCache, + set +}; diff --git a/.github/octokit/node_modules/@octokit/auth-app/dist-src/get-app-authentication.js b/.github/octokit/node_modules/@octokit/auth-app/dist-src/get-app-authentication.js new file mode 100644 index 000000000..e2c5dc719 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/dist-src/get-app-authentication.js @@ -0,0 +1,31 @@ +import githubAppJwt from "universal-github-app-jwt"; +async function getAppAuthentication({ + appId, + privateKey, + timeDifference +}) { + try { + const appAuthentication = await githubAppJwt({ + id: appId, + privateKey, + now: timeDifference && Math.floor(Date.now() / 1e3) + timeDifference + }); + return { + type: "app", + token: appAuthentication.token, + appId: appAuthentication.appId, + expiresAt: new Date(appAuthentication.expiration * 1e3).toISOString() + }; + } catch (error) { + if (privateKey === "-----BEGIN RSA PRIVATE KEY-----") { + throw new Error( + "The 'privateKey` option contains only the first line '-----BEGIN RSA PRIVATE KEY-----'. If you are setting it using a `.env` file, make sure it is set on a single line with newlines replaced by '\n'" + ); + } else { + throw error; + } + } +} +export { + getAppAuthentication +}; diff --git a/.github/octokit/node_modules/@octokit/auth-app/dist-src/get-installation-authentication.js b/.github/octokit/node_modules/@octokit/auth-app/dist-src/get-installation-authentication.js new file mode 100644 index 000000000..6d1749725 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/dist-src/get-installation-authentication.js @@ -0,0 +1,103 @@ +import { get, set } from "./cache.js"; +import { getAppAuthentication } from "./get-app-authentication.js"; +import { toTokenAuthentication } from "./to-token-authentication.js"; +async function getInstallationAuthentication(state, options, customRequest) { + const installationId = Number(options.installationId || state.installationId); + if (!installationId) { + throw new Error( + "[@octokit/auth-app] installationId option is required for installation authentication." + ); + } + if (options.factory) { + const { type, factory, oauthApp, ...factoryAuthOptions } = { + ...state, + ...options + }; + return factory(factoryAuthOptions); + } + const optionsWithInstallationTokenFromState = Object.assign( + { installationId }, + options + ); + if (!options.refresh) { + const result = await get( + state.cache, + optionsWithInstallationTokenFromState + ); + if (result) { + const { + token: token2, + createdAt: createdAt2, + expiresAt: expiresAt2, + permissions: permissions2, + repositoryIds: repositoryIds2, + repositoryNames: repositoryNames2, + singleFileName: singleFileName2, + repositorySelection: repositorySelection2 + } = result; + return toTokenAuthentication({ + installationId, + token: token2, + createdAt: createdAt2, + expiresAt: expiresAt2, + permissions: permissions2, + repositorySelection: repositorySelection2, + repositoryIds: repositoryIds2, + repositoryNames: repositoryNames2, + singleFileName: singleFileName2 + }); + } + } + const appAuthentication = await getAppAuthentication(state); + const request = customRequest || state.request; + const { + data: { + token, + expires_at: expiresAt, + repositories, + permissions: permissionsOptional, + repository_selection: repositorySelectionOptional, + single_file: singleFileName + } + } = await request("POST /app/installations/{installation_id}/access_tokens", { + installation_id: installationId, + repository_ids: options.repositoryIds, + repositories: options.repositoryNames, + permissions: options.permissions, + mediaType: { + previews: ["machine-man"] + }, + headers: { + authorization: `bearer ${appAuthentication.token}` + } + }); + const permissions = permissionsOptional || {}; + const repositorySelection = repositorySelectionOptional || "all"; + const repositoryIds = repositories ? repositories.map((r) => r.id) : void 0; + const repositoryNames = repositories ? repositories.map((repo) => repo.name) : void 0; + const createdAt = (/* @__PURE__ */ new Date()).toISOString(); + await set(state.cache, optionsWithInstallationTokenFromState, { + token, + createdAt, + expiresAt, + repositorySelection, + permissions, + repositoryIds, + repositoryNames, + singleFileName + }); + return toTokenAuthentication({ + installationId, + token, + createdAt, + expiresAt, + repositorySelection, + permissions, + repositoryIds, + repositoryNames, + singleFileName + }); +} +export { + getInstallationAuthentication +}; diff --git a/.github/octokit/node_modules/@octokit/auth-app/dist-src/hook.js b/.github/octokit/node_modules/@octokit/auth-app/dist-src/hook.js new file mode 100644 index 000000000..e5ab01ea7 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/dist-src/hook.js @@ -0,0 +1,93 @@ +import { requiresBasicAuth } from "@octokit/auth-oauth-user"; +import { RequestError } from "@octokit/request-error"; +import { getAppAuthentication } from "./get-app-authentication.js"; +import { getInstallationAuthentication } from "./get-installation-authentication.js"; +import { requiresAppAuth } from "./requires-app-auth.js"; +const FIVE_SECONDS_IN_MS = 5 * 1e3; +function isNotTimeSkewError(error) { + return !(error.message.match( + /'Expiration time' claim \('exp'\) must be a numeric value representing the future time at which the assertion expires/ + ) || error.message.match( + /'Issued at' claim \('iat'\) must be an Integer representing the time that the assertion was issued/ + )); +} +async function hook(state, request, route, parameters) { + const endpoint = request.endpoint.merge(route, parameters); + const url = endpoint.url; + if (/\/login\/oauth\/access_token$/.test(url)) { + return request(endpoint); + } + if (requiresAppAuth(url.replace(request.endpoint.DEFAULTS.baseUrl, ""))) { + const { token: token2 } = await getAppAuthentication(state); + endpoint.headers.authorization = `bearer ${token2}`; + let response; + try { + response = await request(endpoint); + } catch (error) { + if (isNotTimeSkewError(error)) { + throw error; + } + if (typeof error.response.headers.date === "undefined") { + throw error; + } + const diff = Math.floor( + (Date.parse(error.response.headers.date) - Date.parse((/* @__PURE__ */ new Date()).toString())) / 1e3 + ); + state.log.warn(error.message); + state.log.warn( + `[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.` + ); + const { token: token3 } = await getAppAuthentication({ + ...state, + timeDifference: diff + }); + endpoint.headers.authorization = `bearer ${token3}`; + return request(endpoint); + } + return response; + } + if (requiresBasicAuth(url)) { + const authentication = await state.oauthApp({ type: "oauth-app" }); + endpoint.headers.authorization = authentication.headers.authorization; + return request(endpoint); + } + const { token, createdAt } = await getInstallationAuthentication( + state, + // @ts-expect-error TBD + {}, + request.defaults({ baseUrl: endpoint.baseUrl }) + ); + endpoint.headers.authorization = `token ${token}`; + return sendRequestWithRetries( + state, + request, + endpoint, + createdAt + ); +} +async function sendRequestWithRetries(state, request, options, createdAt, retries = 0) { + const timeSinceTokenCreationInMs = +/* @__PURE__ */ new Date() - +new Date(createdAt); + try { + return await request(options); + } catch (error) { + if (error.status !== 401) { + throw error; + } + if (timeSinceTokenCreationInMs >= FIVE_SECONDS_IN_MS) { + if (retries > 0) { + error.message = `After ${retries} retries within ${timeSinceTokenCreationInMs / 1e3}s of creating the installation access token, the response remains 401. At this point, the cause may be an authentication problem or a system outage. Please check https://www.githubstatus.com for status information`; + } + throw error; + } + ++retries; + const awaitTime = retries * 1e3; + state.log.warn( + `[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime / 1e3}s)` + ); + await new Promise((resolve) => setTimeout(resolve, awaitTime)); + return sendRequestWithRetries(state, request, options, createdAt, retries); + } +} +export { + hook +}; diff --git a/.github/octokit/node_modules/@octokit/auth-app/dist-src/index.js b/.github/octokit/node_modules/@octokit/auth-app/dist-src/index.js new file mode 100644 index 000000000..25f76d99e --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/dist-src/index.js @@ -0,0 +1,56 @@ +import { getUserAgent } from "universal-user-agent"; +import { request as defaultRequest } from "@octokit/request"; +import { createOAuthAppAuth } from "@octokit/auth-oauth-app"; +import { auth } from "./auth.js"; +import { hook } from "./hook.js"; +import { getCache } from "./cache.js"; +import { VERSION } from "./version.js"; +import { createOAuthUserAuth } from "@octokit/auth-oauth-user"; +function createAppAuth(options) { + if (!options.appId) { + throw new Error("[@octokit/auth-app] appId option is required"); + } + if (!options.privateKey) { + throw new Error("[@octokit/auth-app] privateKey option is required"); + } + if ("installationId" in options && !options.installationId) { + throw new Error( + "[@octokit/auth-app] installationId is set to a falsy value" + ); + } + const log = Object.assign( + { + warn: console.warn.bind(console) + }, + options.log + ); + const request = options.request || defaultRequest.defaults({ + headers: { + "user-agent": `octokit-auth-app.js/${VERSION} ${getUserAgent()}` + } + }); + const state = Object.assign( + { + request, + cache: getCache() + }, + options, + options.installationId ? { installationId: Number(options.installationId) } : {}, + { + log, + oauthApp: createOAuthAppAuth({ + clientType: "github-app", + clientId: options.clientId || "", + clientSecret: options.clientSecret || "", + request + }) + } + ); + return Object.assign(auth.bind(null, state), { + hook: hook.bind(null, state) + }); +} +export { + createAppAuth, + createOAuthUserAuth +}; diff --git a/.github/octokit/node_modules/@octokit/auth-app/dist-src/requires-app-auth.js b/.github/octokit/node_modules/@octokit/auth-app/dist-src/requires-app-auth.js new file mode 100644 index 000000000..5e61d37cc --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/dist-src/requires-app-auth.js @@ -0,0 +1,37 @@ +const PATHS = [ + "/app", + "/app/hook/config", + "/app/hook/deliveries", + "/app/hook/deliveries/{delivery_id}", + "/app/hook/deliveries/{delivery_id}/attempts", + "/app/installations", + "/app/installations/{installation_id}", + "/app/installations/{installation_id}/access_tokens", + "/app/installations/{installation_id}/suspended", + "/app/installation-requests", + "/marketplace_listing/accounts/{account_id}", + "/marketplace_listing/plan", + "/marketplace_listing/plans", + "/marketplace_listing/plans/{plan_id}/accounts", + "/marketplace_listing/stubbed/accounts/{account_id}", + "/marketplace_listing/stubbed/plan", + "/marketplace_listing/stubbed/plans", + "/marketplace_listing/stubbed/plans/{plan_id}/accounts", + "/orgs/{org}/installation", + "/repos/{owner}/{repo}/installation", + "/users/{username}/installation" +]; +function routeMatcher(paths) { + const regexes = paths.map( + (p) => p.split("/").map((c) => c.startsWith("{") ? "(?:.+?)" : c).join("/") + ); + const regex = `^(?:${regexes.map((r) => `(?:${r})`).join("|")})$`; + return new RegExp(regex, "i"); +} +const REGEX = routeMatcher(PATHS); +function requiresAppAuth(url) { + return !!url && REGEX.test(url.split("?")[0]); +} +export { + requiresAppAuth +}; diff --git a/.github/octokit/node_modules/@octokit/auth-app/dist-src/to-token-authentication.js b/.github/octokit/node_modules/@octokit/auth-app/dist-src/to-token-authentication.js new file mode 100644 index 000000000..9ba6e034b --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/dist-src/to-token-authentication.js @@ -0,0 +1,30 @@ +function toTokenAuthentication({ + installationId, + token, + createdAt, + expiresAt, + repositorySelection, + permissions, + repositoryIds, + repositoryNames, + singleFileName +}) { + return Object.assign( + { + type: "token", + tokenType: "installation", + token, + installationId, + permissions, + createdAt, + expiresAt, + repositorySelection + }, + repositoryIds ? { repositoryIds } : null, + repositoryNames ? { repositoryNames } : null, + singleFileName ? { singleFileName } : null + ); +} +export { + toTokenAuthentication +}; diff --git a/.github/octokit/node_modules/@octokit/auth-app/dist-src/version.js b/.github/octokit/node_modules/@octokit/auth-app/dist-src/version.js new file mode 100644 index 000000000..75aca5056 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/dist-src/version.js @@ -0,0 +1,4 @@ +const VERSION = "7.1.1"; +export { + VERSION +}; diff --git a/.github/octokit/node_modules/@octokit/auth-app/dist-types/auth.d.ts b/.github/octokit/node_modules/@octokit/auth-app/dist-types/auth.d.ts new file mode 100644 index 000000000..64bd069a6 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/dist-types/auth.d.ts @@ -0,0 +1,20 @@ +import type * as OAuthAppAuth from "@octokit/auth-oauth-app"; +import type { State, AppAuthOptions, AppAuthentication, OAuthAppAuthentication, OAuthAppAuthOptions, InstallationAuthOptions, InstallationAccessTokenAuthentication, GitHubAppUserAuthentication, GitHubAppUserAuthenticationWithExpiration, OAuthWebFlowAuthOptions, OAuthDeviceFlowAuthOptions } from "./types.js"; +/** GitHub App authentication */ +export declare function auth(state: State, authOptions: AppAuthOptions): Promise; +/** OAuth App authentication */ +export declare function auth(state: State, authOptions: OAuthAppAuthOptions): Promise; +/** Installation authentication */ +export declare function auth(state: State, authOptions: InstallationAuthOptions): Promise; +/** User Authentication via OAuth web flow */ +export declare function auth(state: State, authOptions: OAuthWebFlowAuthOptions): Promise; +/** GitHub App Web flow with `factory` option */ +export declare function auth(state: State, authOptions: OAuthWebFlowAuthOptions & { + factory: OAuthAppAuth.FactoryGitHubWebFlow; +}): Promise; +/** User Authentication via OAuth Device flow */ +export declare function auth(state: State, authOptions: OAuthDeviceFlowAuthOptions): Promise; +/** GitHub App Device flow with `factory` option */ +export declare function auth(state: State, authOptions: OAuthDeviceFlowAuthOptions & { + factory: OAuthAppAuth.FactoryGitHubDeviceFlow; +}): Promise; diff --git a/.github/octokit/node_modules/@octokit/auth-app/dist-types/cache.d.ts b/.github/octokit/node_modules/@octokit/auth-app/dist-types/cache.d.ts new file mode 100644 index 000000000..61b3b0604 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/dist-types/cache.d.ts @@ -0,0 +1,5 @@ +import { LRUCache } from "lru-cache"; +import type { InstallationAuthOptions, Cache, CacheData, InstallationAccessTokenData } from "./types.js"; +export declare function getCache(): LRUCache; +export declare function get(cache: Cache, options: InstallationAuthOptions): Promise; +export declare function set(cache: Cache, options: InstallationAuthOptions, data: CacheData): Promise; diff --git a/.github/octokit/node_modules/@octokit/auth-app/dist-types/get-app-authentication.d.ts b/.github/octokit/node_modules/@octokit/auth-app/dist-types/get-app-authentication.d.ts new file mode 100644 index 000000000..120d16c17 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/dist-types/get-app-authentication.d.ts @@ -0,0 +1,4 @@ +import type { AppAuthentication, State } from "./types.js"; +export declare function getAppAuthentication({ appId, privateKey, timeDifference, }: State & { + timeDifference?: number; +}): Promise; diff --git a/.github/octokit/node_modules/@octokit/auth-app/dist-types/get-installation-authentication.d.ts b/.github/octokit/node_modules/@octokit/auth-app/dist-types/get-installation-authentication.d.ts new file mode 100644 index 000000000..61147923c --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/dist-types/get-installation-authentication.d.ts @@ -0,0 +1,2 @@ +import type { InstallationAuthOptions, InstallationAccessTokenAuthentication, RequestInterface, State } from "./types.js"; +export declare function getInstallationAuthentication(state: State, options: InstallationAuthOptions, customRequest?: RequestInterface): Promise; diff --git a/.github/octokit/node_modules/@octokit/auth-app/dist-types/hook.d.ts b/.github/octokit/node_modules/@octokit/auth-app/dist-types/hook.d.ts new file mode 100644 index 000000000..3d249947e --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/dist-types/hook.d.ts @@ -0,0 +1,2 @@ +import type { AnyResponse, EndpointOptions, RequestParameters, RequestInterface, Route, State } from "./types.js"; +export declare function hook(state: State, request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise; diff --git a/.github/octokit/node_modules/@octokit/auth-app/dist-types/index.d.ts b/.github/octokit/node_modules/@octokit/auth-app/dist-types/index.d.ts new file mode 100644 index 000000000..4dfb320c2 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/dist-types/index.d.ts @@ -0,0 +1,4 @@ +import type { AuthInterface, StrategyOptions } from "./types.js"; +export { createOAuthUserAuth } from "@octokit/auth-oauth-user"; +export type { StrategyOptions, AppAuthOptions, OAuthAppAuthOptions, InstallationAuthOptions, OAuthWebFlowAuthOptions, OAuthDeviceFlowAuthOptions, Authentication, AppAuthentication, OAuthAppAuthentication, InstallationAccessTokenAuthentication, GitHubAppUserAuthentication, GitHubAppUserAuthenticationWithExpiration, } from "./types.js"; +export declare function createAppAuth(options: StrategyOptions): AuthInterface; diff --git a/.github/octokit/node_modules/@octokit/auth-app/dist-types/requires-app-auth.d.ts b/.github/octokit/node_modules/@octokit/auth-app/dist-types/requires-app-auth.d.ts new file mode 100644 index 000000000..2d86d3fd3 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/dist-types/requires-app-auth.d.ts @@ -0,0 +1 @@ +export declare function requiresAppAuth(url: string | undefined): Boolean; diff --git a/.github/octokit/node_modules/@octokit/auth-app/dist-types/to-token-authentication.d.ts b/.github/octokit/node_modules/@octokit/auth-app/dist-types/to-token-authentication.d.ts new file mode 100644 index 000000000..085af4fc8 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/dist-types/to-token-authentication.d.ts @@ -0,0 +1,2 @@ +import type { CacheData, InstallationAccessTokenAuthentication, WithInstallationId } from "./types.js"; +export declare function toTokenAuthentication({ installationId, token, createdAt, expiresAt, repositorySelection, permissions, repositoryIds, repositoryNames, singleFileName, }: CacheData & WithInstallationId): InstallationAccessTokenAuthentication; diff --git a/.github/octokit/node_modules/@octokit/auth-app/dist-types/types.d.ts b/.github/octokit/node_modules/@octokit/auth-app/dist-types/types.d.ts new file mode 100644 index 000000000..6a29200ae --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/dist-types/types.d.ts @@ -0,0 +1,125 @@ +import * as OctokitTypes from "@octokit/types"; +import { LRUCache } from "lru-cache"; +import * as OAuthAppAuth from "@octokit/auth-oauth-app"; +type OAuthStrategyOptions = { + clientId?: string; + clientSecret?: string; +}; +type CommonStrategyOptions = { + appId: number | string; + privateKey: string; + installationId?: number | string; + request?: OctokitTypes.RequestInterface; + cache?: Cache; + log?: { + warn: (message: string, additionalInfo?: object) => any; + [key: string]: any; + }; +}; +export type StrategyOptions = OAuthStrategyOptions & CommonStrategyOptions & Record; +export type AppAuthOptions = { + type: "app"; +}; +/** +Users SHOULD only enter repositoryIds || repositoryNames. +However, this module still passes both to the backend API to +let the API decide how to handle the logic. We just throw the +response back to the client making the request. +**/ +export type InstallationAuthOptions = { + type: "installation"; + installationId?: number | string; + repositoryIds?: number[]; + repositoryNames?: string[]; + permissions?: Permissions; + refresh?: boolean; + factory?: never; + [key: string]: unknown; +}; +export type InstallationAuthOptionsWithFactory = { + type: "installation"; + installationId?: number | string; + repositoryIds?: number[]; + repositoryNames?: string[]; + permissions?: Permissions; + refresh?: boolean; + factory: FactoryInstallation; + [key: string]: unknown; +}; +export type OAuthAppAuthOptions = OAuthAppAuth.AppAuthOptions; +export type OAuthWebFlowAuthOptions = OAuthAppAuth.WebFlowAuthOptions; +export type OAuthDeviceFlowAuthOptions = OAuthAppAuth.GitHubAppDeviceFlowAuthOptions; +export type Authentication = AppAuthentication | OAuthAppAuthentication | InstallationAccessTokenAuthentication | GitHubAppUserAuthentication | GitHubAppUserAuthenticationWithExpiration; +export type FactoryInstallationOptions = StrategyOptions & Omit; +export interface FactoryInstallation { + (options: FactoryInstallationOptions): T; +} +export interface AuthInterface { + (options: AppAuthOptions): Promise; + (options: OAuthAppAuthOptions): Promise; + (options: InstallationAuthOptions): Promise; + (options: InstallationAuthOptionsWithFactory): Promise; + (options: OAuthWebFlowAuthOptions): Promise; + (options: OAuthDeviceFlowAuthOptions): Promise; + (options: OAuthWebFlowAuthOptions & { + factory: OAuthAppAuth.FactoryGitHubWebFlow; + }): Promise; + (options: OAuthDeviceFlowAuthOptions & { + factory: OAuthAppAuth.FactoryGitHubDeviceFlow; + }): Promise; + hook(request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>; +} +export type AnyResponse = OctokitTypes.OctokitResponse; +export type EndpointDefaults = OctokitTypes.EndpointDefaults; +export type EndpointOptions = OctokitTypes.EndpointOptions; +export type RequestParameters = OctokitTypes.RequestParameters; +export type Route = OctokitTypes.Route; +export type RequestInterface = OctokitTypes.RequestInterface; +export type Cache = LRUCache | { + get: (key: string) => string | Promise; + set: (key: string, value: string) => any; +}; +export type APP_TYPE = "app"; +export type TOKEN_TYPE = "token"; +export type INSTALLATION_TOKEN_TYPE = "installation"; +export type OAUTH_TOKEN_TYPE = "oauth"; +export type REPOSITORY_SELECTION = "all" | "selected"; +export type JWT = string; +export type ACCESS_TOKEN = string; +export type UTC_TIMESTAMP = string; +export type AppAuthentication = { + type: APP_TYPE; + token: JWT; + appId: number | string; + expiresAt: string; +}; +export type InstallationAccessTokenData = { + token: ACCESS_TOKEN; + createdAt: UTC_TIMESTAMP; + expiresAt: UTC_TIMESTAMP; + permissions: Permissions; + repositorySelection: REPOSITORY_SELECTION; + repositoryIds?: number[]; + repositoryNames?: string[]; + singleFileName?: string; +}; +export type CacheData = InstallationAccessTokenData; +export type InstallationAccessTokenAuthentication = InstallationAccessTokenData & { + type: TOKEN_TYPE; + tokenType: INSTALLATION_TOKEN_TYPE; + installationId: number; +}; +export type OAuthAppAuthentication = OAuthAppAuth.AppAuthentication; +export type GitHubAppUserAuthentication = OAuthAppAuth.GitHubAppUserAuthentication; +export type GitHubAppUserAuthenticationWithExpiration = OAuthAppAuth.GitHubAppUserAuthenticationWithExpiration; +export type FactoryOptions = Required> & State; +export type Permissions = Record; +export type WithInstallationId = { + installationId: number; +}; +export type State = Required> & { + installationId?: number; +} & OAuthStrategyOptions & { + oauthApp: OAuthAppAuth.GitHubAuthInterface; +}; +export {}; diff --git a/.github/octokit/node_modules/@octokit/auth-app/dist-types/version.d.ts b/.github/octokit/node_modules/@octokit/auth-app/dist-types/version.d.ts new file mode 100644 index 000000000..76a73422d --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "7.1.1"; diff --git a/.github/octokit/node_modules/@octokit/auth-app/package.json b/.github/octokit/node_modules/@octokit/auth-app/package.json new file mode 100644 index 000000000..3aa4214c8 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-app/package.json @@ -0,0 +1,60 @@ +{ + "name": "@octokit/auth-app", + "publishConfig": { + "access": "public", + "provenance": true + }, + "type": "module", + "version": "7.1.1", + "description": "GitHub App authentication for JavaScript", + "repository": "github:octokit/auth-app.js", + "keywords": [ + "github", + "octokit", + "authentication", + "api" + ], + "author": "Gregor Martynus (https://github.com/gr2m)", + "license": "MIT", + "dependencies": { + "@octokit/auth-oauth-app": "^8.1.0", + "@octokit/auth-oauth-user": "^5.1.0", + "@octokit/request": "^9.1.1", + "@octokit/request-error": "^6.1.1", + "@octokit/types": "^13.4.1", + "lru-cache": "^10.0.0", + "universal-github-app-jwt": "^2.2.0", + "universal-user-agent": "^7.0.0" + }, + "devDependencies": { + "@octokit/tsconfig": "^3.0.0", + "@types/fetch-mock": "^7.3.1", + "@types/jest": "^29.0.0", + "@types/node": "^20.0.0", + "esbuild": "^0.23.0", + "fetch-mock": "npm:@gr2m/fetch-mock@9.11.0-pull-request-644.1", + "glob": "^10.2.5", + "jest": "^29.0.0", + "prettier": "3.3.3", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^29.0.0", + "typescript": "^5.0.0" + }, + "engines": { + "node": ">= 18" + }, + "files": [ + "dist-*/**", + "bin/**" + ], + "main": "dist-node/index.js", + "types": "dist-types/index.d.ts", + "exports": { + ".": { + "types": "./dist-types/index.d.ts", + "import": "./dist-node/index.js", + "default": "./dist-node/index.js" + } + }, + "sideEffects": false +} diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-app/LICENSE b/.github/octokit/node_modules/@octokit/auth-oauth-app/LICENSE new file mode 100644 index 000000000..ef2c18ee5 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-app/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2019 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-app/README.md b/.github/octokit/node_modules/@octokit/auth-oauth-app/README.md new file mode 100644 index 000000000..b61c224ff --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-app/README.md @@ -0,0 +1,1059 @@ +# auth-oauth-app.js + +> GitHub OAuth App authentication for JavaScript + +[![@latest](https://img.shields.io/npm/v/@octokit/auth-oauth-app.svg)](https://www.npmjs.com/package/@octokit/auth-oauth-app) +[![Build Status](https://github.com/octokit/auth-oauth-app.js/workflows/Test/badge.svg)](https://github.com/octokit/auth-oauth-app.js/actions?query=workflow%3ATest) + +`@octokit/auth-oauth-app` is implementing one of [GitHub’s authentication strategies](https://github.com/octokit/auth.js). + +It implements authentication using an OAuth app’s client ID and secret as well as creating user access tokens GitHub's OAuth [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) and [device flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow). + + + +- [Standalone Usage](#standalone-usage) + - [Authenticate as app](#authenticate-as-app) + - [Authenticate user using OAuth Web Flow](#authenticate-user-using-oauth-web-flow) + - [Authenticate user using OAuth Device flow](#authenticate-user-using-oauth-device-flow) +- [Usage with Octokit](#usage-with-octokit) +- [`createOAuthAppAuth(options)` or `new Octokit({ auth })`](#createoauthappauthoptions-or-new-octokit-auth-) +- [`auth(options)` or `octokit.auth(options)`](#authoptions-or-octokitauthoptions) + - [Client ID/Client Secret Basic authentication](#client-idclient-secret-basic-authentication) + - [OAuth web flow](#oauth-web-flow) + - [OAuth device flow](#oauth-device-flow) +- [Authentication object](#authentication-object) + - [OAuth App authentication](#oauth-app-authentication) + - [OAuth user access token authentication](#oauth-user-access-token-authentication) + - [GitHub APP user authentication token with expiring disabled](#github-app-user-authentication-token-with-expiring-disabled) + - [GitHub APP user authentication token with expiring enabled](#github-app-user-authentication-token-with-expiring-enabled) +- [`auth.hook(request, route, parameters)` or `auth.hook(request, options)`](#authhookrequest-route-parameters-or-authhookrequest-options) +- [Types](#types) +- [Implementation details](#implementation-details) +- [License](#license) + + + +## Standalone Usage + + + + + + +
+Browsers + + +⚠️ `@octokit/auth-oauth-app` is not meant for usage in the browser. The OAuth APIs to create tokens do not have CORS enabled, and a client secret must not be exposed to the client. + +If you know what you are doing, load `@octokit/auth-oauth-app` directly from [esm.sh](https://esm.sh) + +```html + +``` + +
+Node + + +Install with npm install @octokit/auth-oauth-app + +```js +import { createOAuthAppAuth } from "@octokit/auth-oauth-app"; +``` + +
+ +> [!IMPORTANT] +> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json` by setting `"moduleResolution": "node16", "module": "node16"`. +> +> See the TypeScript docs on [package.json "exports"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports).
+> See this [helpful guide on transitioning to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) from [@sindresorhus](https://github.com/sindresorhus) + +### Authenticate as app + +```js +const auth = createOAuthAppAuth({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", +}); + +const appAuthentication = await auth({ + type: "oauth-app", +}); +``` + +resolves with + +```json +{ + "type": "oauth-app", + "clientId": "1234567890abcdef1234", + "clientSecret": "1234567890abcdef1234567890abcdef12345678", + "headers": { + "authorization": "basic MTIzNDU2Nzg5MGFiY2RlZjEyMzQ6MTIzNDU2Nzg5MGFiY2RlZjEyMzQ1Njc4OTBhYmNkZWYxMjM0NTY3OA==" + } +} +``` + +### Authenticate user using OAuth Web Flow + +Exchange code from GitHub's OAuth web flow, see https://docs.github.com/en/developers/apps/authorizing-oauth-apps#2-users-are-redirected-back-to-your-site-by-github + +```js +const auth = createOAuthAppAuth({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", +}); + +const userAuthenticationFromWebFlow = await auth({ + type: "oauth-user", + code: "random123", + state: "mystate123", +}); +``` + +resolves with + +```json +{ + "clientType": "oauth-app", + "clientId": "1234567890abcdef1234", + "clientSecret": "1234567890abcdef1234567890abcdef12345678", + "type": "token", + "tokenType": "oauth", + "token": "useraccesstoken123", + "scopes": [] +} +``` + +### Authenticate user using OAuth Device flow + +Pass an asynchronous `onVerification()` method which will be called with the response from step 1 of the device flow. In that function you have to prompt the user to enter the user code at the provided verification URL. + +`auth()` will not resolve until the user entered the code and granted access to the app. + +See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#2-users-are-redirected-back-to-your-site-by-github + +```js +const auth = createOAuthAppAuth({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", +}); + +const userAuthenticationFromDeviceFlow = await auth({ + async onVerification(verification) { + // verification example + // { + // device_code: "3584d83530557fdd1f46af8289938c8ef79f9dc5", + // user_code: "WDJB-MJHT", + // verification_uri: "https://github.com/login/device", + // expires_in: 900, + // interval: 5, + // }; + + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + }, +}); +``` + +resolves with + +```json +{ + "clientType": "oauth-app", + "clientId": "1234567890abcdef1234", + "clientSecret": "1234567890abcdef1234567890abcdef12345678", + "type": "token", + "tokenType": "oauth", + "token": "useraccesstoken123", + "scopes": [] +} +``` + +## Usage with Octokit + + + + + + +
+ +Browsers + + + +⚠️ `@octokit/auth-oauth-app` is not meant for usage in the browser. The OAuth APIs to create tokens do not have CORS enabled, and a client secret must not be exposed to the client. + +If you know what you are doing, load `@octokit/auth-oauth-app` and `@octokit/core` (or a compatible module) directly from [esm.sh](https://esm.sh) + +```html + +``` + +
+ +Node + + + +Install with `npm install @octokit/core @octokit/auth-oauth-app`. Optionally replace `@octokit/core` with a compatible module + +```js +import { Octokit } from "@octokit/core"; +import { + createOAuthAppAuth, + createOAuthUserAuth, +} from "@octokit/auth-oauth-app"; +``` + +
+ +```js +const appOctokit = new Octokit({ + authStrategy: createOAuthAppAuth, + auth: { + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + }, +}); + +// Send requests as app +await appOctokit.request("POST /application/{client_id}/token", { + client_id: "1234567890abcdef1234", + access_token: "existingtoken123", +}); +console.log("token is valid"); + +// create a new octokit instance that is authenticated as the user +const userOctokit = await appOctokit.auth({ + type: "oauth-user", + code: "code123", + factory: (options) => { + return new Octokit({ + authStrategy: createOAuthUserAuth, + auth: options, + }); + }, +}); + +// Exchanges the code for the user access token authentication on first request +// and caches the authentication for successive requests +const { + data: { login }, +} = await userOctokit.request("GET /user"); +console.log("Hello, %s!", login); +``` + +## `createOAuthAppAuth(options)` or `new Octokit({ auth })` + +The `createOAuthAppAuth` method accepts a single `options` object as argument. The same set of options can be passed as `auth` to the `Octokit` constructor when setting `authStrategy: createOAuthAppAuth` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientId + + string + + Required. Find your OAuth app’s Client ID in your account’s developer settings. +
+ clientSecret + + string + + Required. Find your OAuth app’s Client Secret in your account’s developer settings. +
+ clientType + + string + + Must be set to either "oauth-app" or "github-app". Defaults to "oauth-app" +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example: + +```js +import { request } from "@octokit/request"; +createOAuthAppAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +## `auth(options)` or `octokit.auth(options)` + +The async `auth()` method returned by `createOAuthAppAuth(options)` accepts different options depending on your use case + +### Client ID/Client Secret Basic authentication + +All REST API routes starting with `/applications/{client_id}` need to be authenticated using the OAuth/GitHub App's Client ID and a client secret. + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + Required. Must be set to "oauth-app" +
+ +### OAuth web flow + +Exchange `code` for a user access token. See [Web application flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + Required. Must be set to "oauth-user". +
+ code + + string + + Required. The authorization code which was passed as query parameter to the callback URL from the OAuth web application flow. +
+ redirectUrl + + string + + The URL in your application where users are sent after authorization. See redirect urls. +
+ state + + string + + The unguessable random string you provided in Step 1 of the OAuth web application flow. +
+ factory + + function + + +When the `factory` option is, the `auth({type: "oauth-user", code, factory })` call with resolve with whatever the `factory` function returns. The `factory` function will be called with all the strategy option that `auth` was created with, plus the additional options passed to `auth`, besides `type` and `factory`. + +For example, you can create a new `auth` instance for a user using [`createOAuthUserAuth`](https://github.com/octokit/auth-oauth-user.js/#readme) which implements auto-refreshing tokens, among other features. You can import `createOAuthUserAuth` directly from `@octokit/auth-oauth-app` which will ensure compatibility. + +```js +import { + createOAuthAppAuth, + createOAuthUserAuth, +} from "@octokit/auth-oauth-app"; + +const appAuth = createOAuthAppAuth({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef1234567890abcdef12345678", +}); + +const userAuth = await appAuth({ + type: "oauth-user", + code, + factory: createOAuthUserAuth, +}); + +// will create token upon first call, then cache authentication for successive calls, +// until token needs to be refreshed (if enabled for the GitHub App) +const authentication = await userAuth(); +``` + +
+ +### OAuth device flow + +Create a user access token without an http redirect. See [Device flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow). + +The device flow does not require a client secret, but it is required as strategy option for `@octokit/auth-oauth-app`, even for the device flow. If you want to implement the device flow without requiring a client secret, use [`@octokit/auth-oauth-device`](https://github.com/octokit/auth-oauth-device.js#readme). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + Required. Must be set to "oauth-user". +
+ onVerification + + function + + +**Required**. A function that is called once the device and user codes were retrieved. + +The `onVerification()` callback can be used to pause until the user completes step 2, which might result in a better user experience. + +```js +const auth = auth({ + type: "oauth-user", + async onVerification(verification) { + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + + await prompt("press enter when you are ready to continue"); + }, +}); +``` + +
+ scopes + + array of strings + + Only relevant if the clientType strategy option is set to "oauth-app".Array of OAuth scope names that the user access token should be granted. Defaults to no scopes ([]). +
+ factory + + function + + +When the `factory` option is, the `auth({type: "oauth-user", code, factory })` call with resolve with whatever the `factory` function returns. The `factory` function will be called with all the strategy option that `auth` was created with, plus the additional options passed to `auth`, besides `type` and `factory`. + +For example, you can create a new `auth` instance for a user using [`createOAuthUserAuth`](https://github.com/octokit/auth-oauth-user.js/#readme) which implements auto-refreshing tokens, among other features. You can import `createOAuthUserAuth` directly from `@octokit/auth-oauth-app` which will ensure compatibility. + +```js +import { + createOAuthAppAuth, + createOAuthUserAuth, +} from "@octokit/auth-oauth-app"; + +const appAuth = createOAuthAppAuth({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef1234567890abcdef12345678", +}); + +const userAuth = await appAuth({ + type: "oauth-user", + onVerification, + factory: createOAuthUserAuth, +}); + +// will create token upon first call, then cache authentication for successive calls, +// until token needs to be refreshed (if enabled for the GitHub App) +const authentication = await userAuth(); +``` + +
+ +## Authentication object + +The async `auth(options)` method to one of four possible authentication objects + +1. **OAuth App authentication** for `auth({ type: "oauth-app" })` +2. **OAuth user access token authentication** for `auth({ type: "oauth-app" })` and App is an OAuth App (OAuth user access token) +3. **GitHub APP user authentication token with expiring disabled** for `auth({ type: "oauth-app" })` and App is a GitHub App (user-to-server token) +4. **GitHub APP user authentication token with expiring enabled** for `auth({ type: "oauth-app" })` and App is a GitHub App (user-to-server token) + +### OAuth App authentication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "oauth-app" +
+ clientType + + string + + "oauth-app" or "github-app" +
+ clientId + + string + + The client ID as passed to the constructor. +
+ clientSecret + + string + + The client secret as passed to the constructor. +
+ headers + + object + + { authorization }. +
+ +### OAuth user access token authentication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "oauth-app" +
+ clientId + + string + + The clientId from the strategy options +
+ clientSecret + + string + + The clientSecret from the strategy options +
+ token + + string + + The user access token +
+ scopes + + array of strings + + array of scope names enabled for the token +
+ +### GitHub APP user authentication token with expiring disabled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ clientSecret + + string + + One of the app's client secrets +
+ token + + string + + The user access token +
+ +### GitHub APP user authentication token with expiring enabled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ clientSecret + + string + + One of the app's client secrets +
+ token + + string + + The user access token +
+ refreshToken + + string + + The refresh token +
+ expiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z +
+ refreshTokenExpiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z +
+ +## `auth.hook(request, route, parameters)` or `auth.hook(request, options)` + +`auth.hook()` hooks directly into the request life cycle. It amends the request to authenticate correctly using `clientId` and `clientSecret` as basic auth for the API endpoints that support it. It throws an error in other cases. + +The `request` option is an instance of [`@octokit/request`](https://github.com/octokit/request.js#readme). The `route`/`options` parameters are the same as for the [`request()` method](https://github.com/octokit/request.js#request). + +`auth.hook()` can be called directly to send an authenticated request + +```js +const { data: user } = await auth.hook( + request, + "POST /applications/{client_id}/token", + { + client_id: "1234567890abcdef1234", + access_token: "token123", + }, +); +``` + +Or it can be passed as option to [`request()`](https://github.com/octokit/request.js#request). + +```js +const requestWithAuth = request.defaults({ + request: { + hook: auth.hook, + }, +}); + +const { data: user } = await requestWithAuth( + "POST /applications/{client_id}/token", + { + client_id: "1234567890abcdef1234", + access_token: "token123", + }, +); +``` + +## Types + +```ts +import { + // strategy options + OAuthAppStrategyOptions, + GitHubAppStrategyOptions, + // auth options + AppAuthOptions, + WebFlowAuthOptions, + OAuthAppDeviceFlowAuthOptions, + GitHubAppDeviceFlowAuthOptions, + // auth interfaces + OAuthAppAuthInterface, + GitHubAuthInterface, + // authentication object + AppAuthentication, + OAuthAppUserAuthentication, + GitHubAppUserAuthentication, + GitHubAppUserAuthenticationWithExpiration, +} from "@octokit/auth-oauth-app"; +``` + +## Implementation details + +Client ID and secret can be passed as Basic auth in the `Authorization` header in order to get a higher rate limit compared to unauthenticated requests. This is meant for the use on servers only: never expose an OAuth client secret on a client such as a web application! + +`auth.hook` will set the correct authentication header automatically based on the request URL. For all [OAuth Application endpoints](https://developer.github.com/v3/apps/oauth_applications/), the `Authorization` header is set to basic auth. For all other endpoints and token is retrieved and used in the `Authorization` header. The token is cached and used for succeeding requests. + +To reset the cached access token, you can do this + +```js +const { token } = await auth({ type: "oauth-user" }); +await auth.hook(request, "POST /applications/{client_id}/token", { + client_id: "1234567890abcdef1234", + access_token: token, +}); +``` + +The internally cached token will be replaced and used for succeeding requests. See also ["the REST API documentation"](https://developer.github.com/v3/oauth_authorizations/). + +See also: [octokit/oauth-authorization-url.js](https://github.com/octokit/oauth-authorization-url.js). + +## License + +[MIT](LICENSE) + +``` + +``` diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-bundle/index.js b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-bundle/index.js new file mode 100644 index 000000000..223c3446d --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-bundle/index.js @@ -0,0 +1,95 @@ +// pkg/dist-src/index.js +import { getUserAgent } from "universal-user-agent"; +import { request } from "@octokit/request"; + +// pkg/dist-src/auth.js +import { createOAuthUserAuth } from "@octokit/auth-oauth-user"; +async function auth(state, authOptions) { + if (authOptions.type === "oauth-app") { + return { + type: "oauth-app", + clientId: state.clientId, + clientSecret: state.clientSecret, + clientType: state.clientType, + headers: { + authorization: `basic ${btoa( + `${state.clientId}:${state.clientSecret}` + )}` + } + }; + } + if ("factory" in authOptions) { + const { type, ...options } = { + ...authOptions, + ...state + }; + return authOptions.factory(options); + } + const common = { + clientId: state.clientId, + clientSecret: state.clientSecret, + request: state.request, + ...authOptions + }; + const userAuth = state.clientType === "oauth-app" ? await createOAuthUserAuth({ + ...common, + clientType: state.clientType + }) : await createOAuthUserAuth({ + ...common, + clientType: state.clientType + }); + return userAuth(); +} + +// pkg/dist-src/hook.js +import { requiresBasicAuth } from "@octokit/auth-oauth-user"; +async function hook(state, request2, route, parameters) { + let endpoint = request2.endpoint.merge( + route, + parameters + ); + if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { + return request2(endpoint); + } + if (state.clientType === "github-app" && !requiresBasicAuth(endpoint.url)) { + throw new Error( + `[@octokit/auth-oauth-app] GitHub Apps cannot use their client ID/secret for basic authentication for endpoints other than "/applications/{client_id}/**". "${endpoint.method} ${endpoint.url}" is not supported.` + ); + } + const credentials = btoa(`${state.clientId}:${state.clientSecret}`); + endpoint.headers.authorization = `basic ${credentials}`; + try { + return await request2(endpoint); + } catch (error) { + if (error.status !== 401) + throw error; + error.message = `[@octokit/auth-oauth-app] "${endpoint.method} ${endpoint.url}" does not support clientId/clientSecret basic authentication.`; + throw error; + } +} + +// pkg/dist-src/version.js +var VERSION = "0.0.0-development"; + +// pkg/dist-src/index.js +import { createOAuthUserAuth as createOAuthUserAuth2 } from "@octokit/auth-oauth-user"; +function createOAuthAppAuth(options) { + const state = Object.assign( + { + request: request.defaults({ + headers: { + "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}` + } + }), + clientType: "oauth-app" + }, + options + ); + return Object.assign(auth.bind(null, state), { + hook: hook.bind(null, state) + }); +} +export { + createOAuthAppAuth, + createOAuthUserAuth2 as createOAuthUserAuth +}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-bundle/index.js.map b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-bundle/index.js.map new file mode 100644 index 000000000..a32963889 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-bundle/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../dist-src/index.js", "../dist-src/auth.js", "../dist-src/hook.js", "../dist-src/version.js"], + "sourcesContent": ["import { getUserAgent } from \"universal-user-agent\";\nimport { request } from \"@octokit/request\";\nimport { auth } from \"./auth.js\";\nimport { hook } from \"./hook.js\";\nimport { VERSION } from \"./version.js\";\nimport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nfunction createOAuthAppAuth(options) {\n const state = Object.assign(\n {\n request: request.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`\n }\n }),\n clientType: \"oauth-app\"\n },\n options\n );\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state)\n });\n}\nexport {\n createOAuthAppAuth,\n createOAuthUserAuth\n};\n", "import { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nasync function auth(state, authOptions) {\n if (authOptions.type === \"oauth-app\") {\n return {\n type: \"oauth-app\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n clientType: state.clientType,\n headers: {\n authorization: `basic ${btoa(\n `${state.clientId}:${state.clientSecret}`\n )}`\n }\n };\n }\n if (\"factory\" in authOptions) {\n const { type, ...options } = {\n ...authOptions,\n ...state\n };\n return authOptions.factory(options);\n }\n const common = {\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n request: state.request,\n ...authOptions\n };\n const userAuth = state.clientType === \"oauth-app\" ? await createOAuthUserAuth({\n ...common,\n clientType: state.clientType\n }) : await createOAuthUserAuth({\n ...common,\n clientType: state.clientType\n });\n return userAuth();\n}\nexport {\n auth\n};\n", "import { requiresBasicAuth } from \"@octokit/auth-oauth-user\";\nasync function hook(state, request, route, parameters) {\n let endpoint = request.endpoint.merge(\n route,\n parameters\n );\n if (/\\/login\\/(oauth\\/access_token|device\\/code)$/.test(endpoint.url)) {\n return request(endpoint);\n }\n if (state.clientType === \"github-app\" && !requiresBasicAuth(endpoint.url)) {\n throw new Error(\n `[@octokit/auth-oauth-app] GitHub Apps cannot use their client ID/secret for basic authentication for endpoints other than \"/applications/{client_id}/**\". \"${endpoint.method} ${endpoint.url}\" is not supported.`\n );\n }\n const credentials = btoa(`${state.clientId}:${state.clientSecret}`);\n endpoint.headers.authorization = `basic ${credentials}`;\n try {\n return await request(endpoint);\n } catch (error) {\n if (error.status !== 401)\n throw error;\n error.message = `[@octokit/auth-oauth-app] \"${endpoint.method} ${endpoint.url}\" does not support clientId/clientSecret basic authentication.`;\n throw error;\n }\n}\nexport {\n hook\n};\n", "const VERSION = \"0.0.0-development\";\nexport {\n VERSION\n};\n"], + "mappings": ";AAAA,SAAS,oBAAoB;AAC7B,SAAS,eAAe;;;ACDxB,SAAS,2BAA2B;AACpC,eAAe,KAAK,OAAO,aAAa;AACtC,MAAI,YAAY,SAAS,aAAa;AACpC,WAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU,MAAM;AAAA,MAChB,cAAc,MAAM;AAAA,MACpB,YAAY,MAAM;AAAA,MAClB,SAAS;AAAA,QACP,eAAe,SAAS;AAAA,UACtB,GAAG,MAAM,QAAQ,IAAI,MAAM,YAAY;AAAA,QACzC,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AACA,MAAI,aAAa,aAAa;AAC5B,UAAM,EAAE,MAAM,GAAG,QAAQ,IAAI;AAAA,MAC3B,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AACA,WAAO,YAAY,QAAQ,OAAO;AAAA,EACpC;AACA,QAAM,SAAS;AAAA,IACb,UAAU,MAAM;AAAA,IAChB,cAAc,MAAM;AAAA,IACpB,SAAS,MAAM;AAAA,IACf,GAAG;AAAA,EACL;AACA,QAAM,WAAW,MAAM,eAAe,cAAc,MAAM,oBAAoB;AAAA,IAC5E,GAAG;AAAA,IACH,YAAY,MAAM;AAAA,EACpB,CAAC,IAAI,MAAM,oBAAoB;AAAA,IAC7B,GAAG;AAAA,IACH,YAAY,MAAM;AAAA,EACpB,CAAC;AACD,SAAO,SAAS;AAClB;;;ACpCA,SAAS,yBAAyB;AAClC,eAAe,KAAK,OAAOA,UAAS,OAAO,YAAY;AACrD,MAAI,WAAWA,SAAQ,SAAS;AAAA,IAC9B;AAAA,IACA;AAAA,EACF;AACA,MAAI,+CAA+C,KAAK,SAAS,GAAG,GAAG;AACrE,WAAOA,SAAQ,QAAQ;AAAA,EACzB;AACA,MAAI,MAAM,eAAe,gBAAgB,CAAC,kBAAkB,SAAS,GAAG,GAAG;AACzE,UAAM,IAAI;AAAA,MACR,8JAA8J,SAAS,MAAM,IAAI,SAAS,GAAG;AAAA,IAC/L;AAAA,EACF;AACA,QAAM,cAAc,KAAK,GAAG,MAAM,QAAQ,IAAI,MAAM,YAAY,EAAE;AAClE,WAAS,QAAQ,gBAAgB,SAAS,WAAW;AACrD,MAAI;AACF,WAAO,MAAMA,SAAQ,QAAQ;AAAA,EAC/B,SAAS,OAAO;AACd,QAAI,MAAM,WAAW;AACnB,YAAM;AACR,UAAM,UAAU,8BAA8B,SAAS,MAAM,IAAI,SAAS,GAAG;AAC7E,UAAM;AAAA,EACR;AACF;;;ACxBA,IAAM,UAAU;;;AHKhB,SAAS,uBAAAC,4BAA2B;AACpC,SAAS,mBAAmB,SAAS;AACnC,QAAM,QAAQ,OAAO;AAAA,IACnB;AAAA,MACE,SAAS,QAAQ,SAAS;AAAA,QACxB,SAAS;AAAA,UACP,cAAc,6BAA6B,OAAO,IAAI,aAAa,CAAC;AAAA,QACtE;AAAA,MACF,CAAC;AAAA,MACD,YAAY;AAAA,IACd;AAAA,IACA;AAAA,EACF;AACA,SAAO,OAAO,OAAO,KAAK,KAAK,MAAM,KAAK,GAAG;AAAA,IAC3C,MAAM,KAAK,KAAK,MAAM,KAAK;AAAA,EAC7B,CAAC;AACH;", + "names": ["request", "createOAuthUserAuth"] +} diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-src/auth.js b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-src/auth.js new file mode 100644 index 000000000..54fabcf7a --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-src/auth.js @@ -0,0 +1,40 @@ +import { createOAuthUserAuth } from "@octokit/auth-oauth-user"; +async function auth(state, authOptions) { + if (authOptions.type === "oauth-app") { + return { + type: "oauth-app", + clientId: state.clientId, + clientSecret: state.clientSecret, + clientType: state.clientType, + headers: { + authorization: `basic ${btoa( + `${state.clientId}:${state.clientSecret}` + )}` + } + }; + } + if ("factory" in authOptions) { + const { type, ...options } = { + ...authOptions, + ...state + }; + return authOptions.factory(options); + } + const common = { + clientId: state.clientId, + clientSecret: state.clientSecret, + request: state.request, + ...authOptions + }; + const userAuth = state.clientType === "oauth-app" ? await createOAuthUserAuth({ + ...common, + clientType: state.clientType + }) : await createOAuthUserAuth({ + ...common, + clientType: state.clientType + }); + return userAuth(); +} +export { + auth +}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-src/hook.js b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-src/hook.js new file mode 100644 index 000000000..65baebc1e --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-src/hook.js @@ -0,0 +1,28 @@ +import { requiresBasicAuth } from "@octokit/auth-oauth-user"; +async function hook(state, request, route, parameters) { + let endpoint = request.endpoint.merge( + route, + parameters + ); + if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { + return request(endpoint); + } + if (state.clientType === "github-app" && !requiresBasicAuth(endpoint.url)) { + throw new Error( + `[@octokit/auth-oauth-app] GitHub Apps cannot use their client ID/secret for basic authentication for endpoints other than "/applications/{client_id}/**". "${endpoint.method} ${endpoint.url}" is not supported.` + ); + } + const credentials = btoa(`${state.clientId}:${state.clientSecret}`); + endpoint.headers.authorization = `basic ${credentials}`; + try { + return await request(endpoint); + } catch (error) { + if (error.status !== 401) + throw error; + error.message = `[@octokit/auth-oauth-app] "${endpoint.method} ${endpoint.url}" does not support clientId/clientSecret basic authentication.`; + throw error; + } +} +export { + hook +}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-src/index.js b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-src/index.js new file mode 100644 index 000000000..40ffeadf2 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-src/index.js @@ -0,0 +1,26 @@ +import { getUserAgent } from "universal-user-agent"; +import { request } from "@octokit/request"; +import { auth } from "./auth.js"; +import { hook } from "./hook.js"; +import { VERSION } from "./version.js"; +import { createOAuthUserAuth } from "@octokit/auth-oauth-user"; +function createOAuthAppAuth(options) { + const state = Object.assign( + { + request: request.defaults({ + headers: { + "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}` + } + }), + clientType: "oauth-app" + }, + options + ); + return Object.assign(auth.bind(null, state), { + hook: hook.bind(null, state) + }); +} +export { + createOAuthAppAuth, + createOAuthUserAuth +}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-src/version.js b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-src/version.js new file mode 100644 index 000000000..efd8294c9 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-src/version.js @@ -0,0 +1,4 @@ +const VERSION = "8.1.1"; +export { + VERSION +}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-types/auth.d.ts b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-types/auth.d.ts new file mode 100644 index 000000000..cd348f3dd --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-types/auth.d.ts @@ -0,0 +1,18 @@ +import type { OAuthAppState, GitHubAppState, AppAuthOptions, WebFlowAuthOptions, OAuthAppDeviceFlowAuthOptions, GitHubAppDeviceFlowAuthOptions, FactoryOAuthAppWebFlow, FactoryOAuthAppDeviceFlow, FactoryGitHubWebFlow, FactoryGitHubDeviceFlow, AppAuthentication, OAuthAppUserAuthentication, GitHubAppUserAuthentication, GitHubAppUserAuthenticationWithExpiration } from "./types.js"; +export declare function auth(state: OAuthAppState | GitHubAppState, authOptions: AppAuthOptions): Promise; +export declare function auth(state: OAuthAppState, authOptions: WebFlowAuthOptions): Promise; +export declare function auth(state: OAuthAppState, authOptions: WebFlowAuthOptions & { + factory: FactoryOAuthAppWebFlow; +}): Promise; +export declare function auth(state: OAuthAppState, authOptions: OAuthAppDeviceFlowAuthOptions): Promise; +export declare function auth(state: OAuthAppState, authOptions: OAuthAppDeviceFlowAuthOptions & { + factory: FactoryOAuthAppDeviceFlow; +}): Promise; +export declare function auth(state: GitHubAppState, authOptions: WebFlowAuthOptions): Promise; +export declare function auth(state: GitHubAppState, authOptions: WebFlowAuthOptions & { + factory: FactoryGitHubWebFlow; +}): Promise; +export declare function auth(state: GitHubAppState, authOptions: GitHubAppDeviceFlowAuthOptions): Promise; +export declare function auth(state: GitHubAppState, authOptions: GitHubAppDeviceFlowAuthOptions & { + factory: FactoryGitHubDeviceFlow; +}): Promise; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-types/hook.d.ts b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-types/hook.d.ts new file mode 100644 index 000000000..34fe82ac7 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-types/hook.d.ts @@ -0,0 +1,3 @@ +import type { EndpointOptions, RequestParameters, Route, RequestInterface, OctokitResponse } from "@octokit/types"; +import type { OAuthAppState, GitHubAppState } from "./types.js"; +export declare function hook(state: OAuthAppState | GitHubAppState, request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-types/index.d.ts b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-types/index.d.ts new file mode 100644 index 000000000..804ae046e --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-types/index.d.ts @@ -0,0 +1,5 @@ +import type { OAuthAppStrategyOptions, GitHubAppStrategyOptions, OAuthAppAuthInterface, GitHubAuthInterface } from "./types.js"; +export type { OAuthAppStrategyOptions, GitHubAppStrategyOptions, AppAuthOptions, WebFlowAuthOptions, OAuthAppDeviceFlowAuthOptions, GitHubAppDeviceFlowAuthOptions, OAuthAppAuthInterface, GitHubAuthInterface, AppAuthentication, OAuthAppUserAuthentication, GitHubAppUserAuthentication, GitHubAppUserAuthenticationWithExpiration, FactoryGitHubWebFlow, FactoryGitHubDeviceFlow, } from "./types.js"; +export { createOAuthUserAuth } from "@octokit/auth-oauth-user"; +export declare function createOAuthAppAuth(options: OAuthAppStrategyOptions): OAuthAppAuthInterface; +export declare function createOAuthAppAuth(options: GitHubAppStrategyOptions): GitHubAuthInterface; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-types/types.d.ts b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-types/types.d.ts new file mode 100644 index 000000000..fab74de6a --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-types/types.d.ts @@ -0,0 +1,98 @@ +import type { EndpointOptions, RequestParameters, Route, RequestInterface, OctokitResponse } from "@octokit/types"; +import * as AuthOAuthUser from "@octokit/auth-oauth-user"; +import * as DeviceTypes from "@octokit/auth-oauth-device"; +export type ClientType = "oauth-app" | "github-app"; +export type OAuthAppStrategyOptions = { + clientType?: "oauth-app"; + clientId: string; + clientSecret: string; + request?: RequestInterface; +}; +export type GitHubAppStrategyOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + request?: RequestInterface; +}; +export type AppAuthOptions = { + type: "oauth-app"; +}; +export type WebFlowAuthOptions = { + type: "oauth-user"; + code: string; + redirectUrl?: string; + state?: string; +}; +export type OAuthAppDeviceFlowAuthOptions = { + type: "oauth-user"; + onVerification: DeviceTypes.OAuthAppStrategyOptions["onVerification"]; + scopes?: string[]; +}; +export type GitHubAppDeviceFlowAuthOptions = { + type: "oauth-user"; + onVerification: DeviceTypes.OAuthAppStrategyOptions["onVerification"]; +}; +export type AppAuthentication = { + type: "oauth-app"; + clientId: string; + clientSecret: string; + clientType: ClientType; + headers: { + authorization: string; + }; +}; +export type OAuthAppUserAuthentication = AuthOAuthUser.OAuthAppAuthentication; +export type GitHubAppUserAuthentication = AuthOAuthUser.GitHubAppAuthentication; +export type GitHubAppUserAuthenticationWithExpiration = AuthOAuthUser.GitHubAppAuthenticationWithExpiration; +export type FactoryOAuthAppWebFlowOptions = OAuthAppStrategyOptions & Omit & { + clientType: "oauth-app"; +}; +export type FactoryOAuthAppDeviceFlowOptions = OAuthAppStrategyOptions & Omit & { + clientType: "oauth-app"; +}; +export type FactoryGitHubAppWebFlowOptions = GitHubAppStrategyOptions & Omit; +export type FactoryGitHubAppDeviceFlowOptions = GitHubAppStrategyOptions & Omit; +export interface FactoryOAuthAppWebFlow { + (options: FactoryOAuthAppWebFlowOptions): T; +} +export interface FactoryOAuthAppDeviceFlow { + (options: FactoryOAuthAppDeviceFlowOptions): T; +} +export interface FactoryGitHubWebFlow { + (options: FactoryGitHubAppWebFlowOptions): T; +} +export interface FactoryGitHubDeviceFlow { + (options: FactoryGitHubAppDeviceFlowOptions): T; +} +export interface OAuthAppAuthInterface { + (options: AppAuthOptions): Promise; + (options: WebFlowAuthOptions & { + factory: FactoryOAuthAppWebFlow; + }): Promise; + (options: OAuthAppDeviceFlowAuthOptions & { + factory: FactoryOAuthAppDeviceFlow; + }): Promise; + (options: WebFlowAuthOptions): Promise; + (options: OAuthAppDeviceFlowAuthOptions): Promise; + hook(request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>; +} +export interface GitHubAuthInterface { + (options?: AppAuthOptions): Promise; + (options: WebFlowAuthOptions & { + factory: FactoryGitHubWebFlow; + }): Promise; + (options: GitHubAppDeviceFlowAuthOptions & { + factory: FactoryGitHubDeviceFlow; + }): Promise; + (options?: WebFlowAuthOptions): Promise; + (options?: GitHubAppDeviceFlowAuthOptions): Promise; + hook(request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>; +} +export type OAuthAppState = OAuthAppStrategyOptions & { + clientType: "oauth-app"; + request: RequestInterface; +}; +export type GitHubAppState = GitHubAppStrategyOptions & { + clientType: "github-app"; + request: RequestInterface; +}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-types/version.d.ts b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-types/version.d.ts new file mode 100644 index 000000000..0aca66546 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-app/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "8.1.1"; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-app/package.json b/.github/octokit/node_modules/@octokit/auth-oauth-app/package.json new file mode 100644 index 000000000..aa053f1e4 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-app/package.json @@ -0,0 +1,57 @@ +{ + "name": "@octokit/auth-oauth-app", + "publishConfig": { + "access": "public", + "provenance": true + }, + "type": "module", + "version": "8.1.1", + "description": "GitHub OAuth App authentication for JavaScript", + "repository": "github:octokit/auth-oauth-app.js", + "keywords": [ + "github", + "octokit", + "authentication", + "oauth", + "api" + ], + "author": "Gregor Martynus (https://github.com/gr2m)", + "license": "MIT", + "dependencies": { + "@octokit/auth-oauth-device": "^7.0.0", + "@octokit/auth-oauth-user": "^5.0.1", + "@octokit/request": "^9.0.0", + "@octokit/types": "^13.0.0", + "universal-user-agent": "^7.0.0" + }, + "devDependencies": { + "@octokit/core": "^6.0.0", + "@octokit/tsconfig": "^3.0.0", + "@types/fetch-mock": "^7.3.1", + "@types/jest": "^29.0.0", + "esbuild": "^0.20.0", + "fetch-mock": "npm:@gr2m/fetch-mock@9.11.0-pull-request-644.1", + "glob": "^10.2.7", + "jest": "^29.0.0", + "prettier": "3.2.5", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^29.1.0", + "typescript": "^5.3.0" + }, + "engines": { + "node": ">= 18" + }, + "files": [ + "dist-*/**", + "bin/**" + ], + "types": "./dist-types/index.d.ts", + "exports": { + ".": { + "types": "./dist-types/index.d.ts", + "import": "./dist-bundle/index.js", + "default": "./dist-bundle/index.js" + } + }, + "sideEffects": false +} diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-device/LICENSE b/.github/octokit/node_modules/@octokit/auth-oauth-device/LICENSE new file mode 100644 index 000000000..57049d04c --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-device/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2021 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-device/README.md b/.github/octokit/node_modules/@octokit/auth-oauth-device/README.md new file mode 100644 index 000000000..32249b769 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-device/README.md @@ -0,0 +1,662 @@ +# auth-oauth-device.js + +> GitHub OAuth Device authentication strategy for JavaScript + +[![@latest](https://img.shields.io/npm/v/@octokit/auth-oauth-device.svg)](https://www.npmjs.com/package/@octokit/auth-oauth-device) +[![Build Status](https://github.com/octokit/auth-oauth-device.js/workflows/Test/badge.svg)](https://github.com/octokit/auth-oauth-device.js/actions?query=workflow%3ATest+branch%3Amain) + +`@octokit/auth-oauth-device` is implementing one of [GitHub’s OAuth Device Flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow). + + + +- [Usage](#usage) + - [For OAuth Apps](#for-oauth-apps) + - [For GitHub Apps](#for-github-apps) +- [`createOAuthDeviceAuth(options)`](#createoauthdeviceauthoptions) +- [`auth(options)`](#authoptions) +- [Authentication object](#authentication-object) + - [OAuth APP user authentication](#oauth-app-user-authentication) + - [GitHub APP user authentication with expiring tokens disabled](#github-app-user-authentication-with-expiring-tokens-disabled) + - [GitHub APP user authentication with expiring tokens enabled](#github-app-user-authentication-with-expiring-tokens-enabled) +- [`auth.hook(request, route, parameters)` or `auth.hook(request, options)`](#authhookrequest-route-parameters-or-authhookrequest-options) +- [Types](#types) +- [How it works](#how-it-works) +- [Contributing](#contributing) +- [License](#license) + + + +## Usage + + + + + + +
+ +Browsers + + + +Load `@octokit/auth-oauth-device` directly from [esm.sh](https://esm.sh) + +```html + +``` + +
+ +Node + + + +Install with `npm install @octokit/core @octokit/auth-oauth-device` + +```js +import { createOAuthDeviceAuth } from "@octokit/auth-oauth-device"; +``` + +
+ +> [!IMPORTANT] +> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json` by setting `"moduleResolution": "node16", "module": "node16"`. +> +> See the TypeScript docs on [package.json "exports"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports).
+> See this [helpful guide on transitioning to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) from [@sindresorhus](https://github.com/sindresorhus) + +### For OAuth Apps + +```js +const auth = createOAuthDeviceAuth({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["public_repo"], + onVerification(verification) { + // verification example + // { + // device_code: "3584d83530557fdd1f46af8289938c8ef79f9dc5", + // user_code: "WDJB-MJHT", + // verification_uri: "https://github.com/login/device", + // expires_in: 900, + // interval: 5, + // }; + + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + }, +}); + +const tokenAuthentication = await auth({ + type: "oauth", +}); +// resolves with +// { +// type: "token", +// tokenType: "oauth", +// clientType: "oauth-app", +// clientId: "1234567890abcdef1234", +// token: "...", /* the created oauth token */ +// scopes: [] /* depend on request scopes by OAuth app */ +// } +``` + +### For GitHub Apps + +GitHub Apps do not support `scopes`. Client IDs of GitHub Apps have a `lv1.` prefix. If the GitHub App has expiring user tokens enabled, the resulting `authentication` object has extra properties related to expiration and refreshing the token. + +```js +const auth = createOAuthDeviceAuth({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + onVerification(verification) { + // verification example + // { + // device_code: "3584d83530557fdd1f46af8289938c8ef79f9dc5", + // user_code: "WDJB-MJHT", + // verification_uri: "https://github.com/login/device", + // expires_in: 900, + // interval: 5, + // }; + + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + }, +}); + +const tokenAuthentication = await auth({ + type: "oauth", +}); +// resolves with +// { +// type: "token", +// tokenType: "oauth", +// clientType: "github-app", +// clientId: "lv1.1234567890abcdef", +// token: "...", /* the created oauth token */ +// } +// or if expiring user tokens are enabled +// { +// type: "token", +// tokenType: "oauth", +// clientType: "github-app", +// clientId: "lv1.1234567890abcdef", +// token: "...", /* the created oauth token */ +// refreshToken: "...", +// expiresAt: "2022-01-01T08:00:0.000Z", +// refreshTokenExpiresAt: "2021-07-01T00:00:0.000Z", +// } +``` + +## `createOAuthDeviceAuth(options)` + +The `createOAuthDeviceAuth` method accepts a single `options` parameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientId + + string + + Required. Find your OAuth app’s Client ID in your account’s developer settings. +
+ onVerification + + function + + Required. A function that is called once the device and user codes were retrieved + +The `onVerification()` callback can be used to pause until the user completes step 2, which might result in a better user experience. + +```js +const auth = createOAuthDeviceAuth({ + clientId: "1234567890abcdef1234", + onVerification(verification) { + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + + await prompt("press enter when you are ready to continue"); + }, +}); +``` + +
+ clientType + + string + + +Must be either `oauth-app` or `github-app`. Defaults to `oauth-app`. + +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example: + +```js +import { request } from "@octokit/request"; +createOAuthDeviceAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "secret", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ scopes + + array of strings + + +Only relevant if `clientType` is set to `"oauth-app"`. + +Array of scope names enabled for the token. Defaults to `[]`. See [available scopes](https://docs.github.com/en/developers/apps/scopes-for-oauth-apps#available-scopes). + +
+ +## `auth(options)` + +The async `auth()` method returned by `createOAuthDeviceAuth(options)` accepts the following options + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + Required. Must be set to "oauth" +
+ scopes + + array of strings + + +Only relevant if the `clientType` strategy options was set to `"oauth-app"` + +Array of scope names enabled for the token. Defaults to what was set in the [strategy options](#createoauthdeviceauthoptions). See available scopes + +
+ refresh + + boolean + + +Defaults to `false`. When set to `false`, calling `auth(options)` will resolve with a token that was previously created for the same scopes if it exists. If set to `true` a new token will always be created. + +
+ +## Authentication object + +The async `auth(options)` method resolves to one of three possible objects + +1. OAuth APP user authentication +1. GitHub APP user authentication with expiring tokens disabled +1. GitHub APP user authentication with expiring tokens enabled + +The differences are + +1. `scopes` is only present for OAuth Apps +2. `refreshToken`, `expiresAt`, `refreshTokenExpiresAt` are only present for GitHub Apps, and only if token expiration is enabled + +### OAuth APP user authentication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ token + + string + + The personal access token +
+ scopes + + array of strings + + array of scope names enabled for the token +
+ +### GitHub APP user authentication with expiring tokens disabled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ token + + string + + The personal access token +
+ +### GitHub APP user authentication with expiring tokens enabled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ token + + string + + The user access token +
+ refreshToken + + string + + The refresh token +
+ expiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z +
+ refreshTokenExpiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z +
+ +## `auth.hook(request, route, parameters)` or `auth.hook(request, options)` + +`auth.hook()` hooks directly into the request life cycle. It amends the request to authenticate correctly based on the request URL. + +The `request` option is an instance of [`@octokit/request`](https://github.com/octokit/request.js#readme). The `route`/`options` parameters are the same as for the [`request()` method](https://github.com/octokit/request.js#request). + +`auth.hook()` can be called directly to send an authenticated request + +```js +const { data: user } = await auth.hook(request, "GET /user"); +``` + +Or it can be passed as option to [`request()`](https://github.com/octokit/request.js#request). + +```js +const requestWithAuth = request.defaults({ + request: { + hook: auth.hook, + }, +}); + +const { data: user } = await requestWithAuth("GET /user"); +``` + +## Types + +```ts +import { + OAuthAppStrategyOptions, + OAuthAppAuthOptions, + OAuthAppAuthentication, + GitHubAppStrategyOptions, + GitHubAppAuthOptions, + GitHubAppAuthentication, + GitHubAppAuthenticationWithExpiration, +} from "@octokit/auth-oauth-device"; +``` + +## How it works + +GitHub's OAuth Device flow is different from the web flow in two ways + +1. It does not require a URL redirect, which makes it great for devices and CLI apps +2. It does not require the OAuth client secret, which means there is no user-owned server component required. + +The flow has 3 parts (see [GitHub documentation](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow)) + +1. `@octokit/auth-oauth-device` requests a device and user code +2. Then the user has to open https://github.com/login/device (or it's GitHub Enterprise Server equivalent) and enter the user code +3. While the user enters the code, `@octokit/auth-oauth-device` is sending requests in the background to retrieve the OAuth access token. Once the user completed step 2, the request will succeed and the token will be returned + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-bundle/index.js b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-bundle/index.js new file mode 100644 index 000000000..b2805fb2d --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-bundle/index.js @@ -0,0 +1,142 @@ +// pkg/dist-src/index.js +import { getUserAgent } from "universal-user-agent"; +import { request as octokitRequest } from "@octokit/request"; + +// pkg/dist-src/get-oauth-access-token.js +import { createDeviceCode, exchangeDeviceCode } from "@octokit/oauth-methods"; +async function getOAuthAccessToken(state, options) { + const cachedAuthentication = getCachedAuthentication(state, options.auth); + if (cachedAuthentication) + return cachedAuthentication; + const { data: verification } = await createDeviceCode({ + clientType: state.clientType, + clientId: state.clientId, + request: options.request || state.request, + // @ts-expect-error the extra code to make TS happy is not worth it + scopes: options.auth.scopes || state.scopes + }); + await state.onVerification(verification); + const authentication = await waitForAccessToken( + options.request || state.request, + state.clientId, + state.clientType, + verification + ); + state.authentication = authentication; + return authentication; +} +function getCachedAuthentication(state, auth2) { + if (auth2.refresh === true) + return false; + if (!state.authentication) + return false; + if (state.clientType === "github-app") { + return state.authentication; + } + const authentication = state.authentication; + const newScope = ("scopes" in auth2 && auth2.scopes || state.scopes).join( + " " + ); + const currentScope = authentication.scopes.join(" "); + return newScope === currentScope ? authentication : false; +} +async function wait(seconds) { + await new Promise((resolve) => setTimeout(resolve, seconds * 1e3)); +} +async function waitForAccessToken(request, clientId, clientType, verification) { + try { + const options = { + clientId, + request, + code: verification.device_code + }; + const { authentication } = clientType === "oauth-app" ? await exchangeDeviceCode({ + ...options, + clientType: "oauth-app" + }) : await exchangeDeviceCode({ + ...options, + clientType: "github-app" + }); + return { + type: "token", + tokenType: "oauth", + ...authentication + }; + } catch (error) { + if (!error.response) + throw error; + const errorType = error.response.data.error; + if (errorType === "authorization_pending") { + await wait(verification.interval); + return waitForAccessToken(request, clientId, clientType, verification); + } + if (errorType === "slow_down") { + await wait(verification.interval + 5); + return waitForAccessToken(request, clientId, clientType, verification); + } + throw error; + } +} + +// pkg/dist-src/auth.js +async function auth(state, authOptions) { + return getOAuthAccessToken(state, { + auth: authOptions + }); +} + +// pkg/dist-src/hook.js +async function hook(state, request, route, parameters) { + let endpoint = request.endpoint.merge( + route, + parameters + ); + if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { + return request(endpoint); + } + const { token } = await getOAuthAccessToken(state, { + request, + auth: { type: "oauth" } + }); + endpoint.headers.authorization = `token ${token}`; + return request(endpoint); +} + +// pkg/dist-src/version.js +var VERSION = "0.0.0-development"; + +// pkg/dist-src/index.js +function createOAuthDeviceAuth(options) { + const requestWithDefaults = options.request || octokitRequest.defaults({ + headers: { + "user-agent": `octokit-auth-oauth-device.js/${VERSION} ${getUserAgent()}` + } + }); + const { request = requestWithDefaults, ...otherOptions } = options; + const state = options.clientType === "github-app" ? { + ...otherOptions, + clientType: "github-app", + request + } : { + ...otherOptions, + clientType: "oauth-app", + request, + scopes: options.scopes || [] + }; + if (!options.clientId) { + throw new Error( + '[@octokit/auth-oauth-device] "clientId" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)' + ); + } + if (!options.onVerification) { + throw new Error( + '[@octokit/auth-oauth-device] "onVerification" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)' + ); + } + return Object.assign(auth.bind(null, state), { + hook: hook.bind(null, state) + }); +} +export { + createOAuthDeviceAuth +}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-bundle/index.js.map b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-bundle/index.js.map new file mode 100644 index 000000000..5d7eda3ec --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-bundle/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../dist-src/index.js", "../dist-src/get-oauth-access-token.js", "../dist-src/auth.js", "../dist-src/hook.js", "../dist-src/version.js"], + "sourcesContent": ["import { getUserAgent } from \"universal-user-agent\";\nimport { request as octokitRequest } from \"@octokit/request\";\nimport { auth } from \"./auth.js\";\nimport { hook } from \"./hook.js\";\nimport { VERSION } from \"./version.js\";\nfunction createOAuthDeviceAuth(options) {\n const requestWithDefaults = options.request || octokitRequest.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-device.js/${VERSION} ${getUserAgent()}`\n }\n });\n const { request = requestWithDefaults, ...otherOptions } = options;\n const state = options.clientType === \"github-app\" ? {\n ...otherOptions,\n clientType: \"github-app\",\n request\n } : {\n ...otherOptions,\n clientType: \"oauth-app\",\n request,\n scopes: options.scopes || []\n };\n if (!options.clientId) {\n throw new Error(\n '[@octokit/auth-oauth-device] \"clientId\" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)'\n );\n }\n if (!options.onVerification) {\n throw new Error(\n '[@octokit/auth-oauth-device] \"onVerification\" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)'\n );\n }\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state)\n });\n}\nexport {\n createOAuthDeviceAuth\n};\n", "import { createDeviceCode, exchangeDeviceCode } from \"@octokit/oauth-methods\";\nasync function getOAuthAccessToken(state, options) {\n const cachedAuthentication = getCachedAuthentication(state, options.auth);\n if (cachedAuthentication)\n return cachedAuthentication;\n const { data: verification } = await createDeviceCode({\n clientType: state.clientType,\n clientId: state.clientId,\n request: options.request || state.request,\n // @ts-expect-error the extra code to make TS happy is not worth it\n scopes: options.auth.scopes || state.scopes\n });\n await state.onVerification(verification);\n const authentication = await waitForAccessToken(\n options.request || state.request,\n state.clientId,\n state.clientType,\n verification\n );\n state.authentication = authentication;\n return authentication;\n}\nfunction getCachedAuthentication(state, auth) {\n if (auth.refresh === true)\n return false;\n if (!state.authentication)\n return false;\n if (state.clientType === \"github-app\") {\n return state.authentication;\n }\n const authentication = state.authentication;\n const newScope = (\"scopes\" in auth && auth.scopes || state.scopes).join(\n \" \"\n );\n const currentScope = authentication.scopes.join(\" \");\n return newScope === currentScope ? authentication : false;\n}\nasync function wait(seconds) {\n await new Promise((resolve) => setTimeout(resolve, seconds * 1e3));\n}\nasync function waitForAccessToken(request, clientId, clientType, verification) {\n try {\n const options = {\n clientId,\n request,\n code: verification.device_code\n };\n const { authentication } = clientType === \"oauth-app\" ? await exchangeDeviceCode({\n ...options,\n clientType: \"oauth-app\"\n }) : await exchangeDeviceCode({\n ...options,\n clientType: \"github-app\"\n });\n return {\n type: \"token\",\n tokenType: \"oauth\",\n ...authentication\n };\n } catch (error) {\n if (!error.response)\n throw error;\n const errorType = error.response.data.error;\n if (errorType === \"authorization_pending\") {\n await wait(verification.interval);\n return waitForAccessToken(request, clientId, clientType, verification);\n }\n if (errorType === \"slow_down\") {\n await wait(verification.interval + 5);\n return waitForAccessToken(request, clientId, clientType, verification);\n }\n throw error;\n }\n}\nexport {\n getOAuthAccessToken\n};\n", "import { getOAuthAccessToken } from \"./get-oauth-access-token.js\";\nasync function auth(state, authOptions) {\n return getOAuthAccessToken(state, {\n auth: authOptions\n });\n}\nexport {\n auth\n};\n", "import { getOAuthAccessToken } from \"./get-oauth-access-token.js\";\nasync function hook(state, request, route, parameters) {\n let endpoint = request.endpoint.merge(\n route,\n parameters\n );\n if (/\\/login\\/(oauth\\/access_token|device\\/code)$/.test(endpoint.url)) {\n return request(endpoint);\n }\n const { token } = await getOAuthAccessToken(state, {\n request,\n auth: { type: \"oauth\" }\n });\n endpoint.headers.authorization = `token ${token}`;\n return request(endpoint);\n}\nexport {\n hook\n};\n", "const VERSION = \"0.0.0-development\";\nexport {\n VERSION\n};\n"], + "mappings": ";AAAA,SAAS,oBAAoB;AAC7B,SAAS,WAAW,sBAAsB;;;ACD1C,SAAS,kBAAkB,0BAA0B;AACrD,eAAe,oBAAoB,OAAO,SAAS;AACjD,QAAM,uBAAuB,wBAAwB,OAAO,QAAQ,IAAI;AACxE,MAAI;AACF,WAAO;AACT,QAAM,EAAE,MAAM,aAAa,IAAI,MAAM,iBAAiB;AAAA,IACpD,YAAY,MAAM;AAAA,IAClB,UAAU,MAAM;AAAA,IAChB,SAAS,QAAQ,WAAW,MAAM;AAAA;AAAA,IAElC,QAAQ,QAAQ,KAAK,UAAU,MAAM;AAAA,EACvC,CAAC;AACD,QAAM,MAAM,eAAe,YAAY;AACvC,QAAM,iBAAiB,MAAM;AAAA,IAC3B,QAAQ,WAAW,MAAM;AAAA,IACzB,MAAM;AAAA,IACN,MAAM;AAAA,IACN;AAAA,EACF;AACA,QAAM,iBAAiB;AACvB,SAAO;AACT;AACA,SAAS,wBAAwB,OAAOA,OAAM;AAC5C,MAAIA,MAAK,YAAY;AACnB,WAAO;AACT,MAAI,CAAC,MAAM;AACT,WAAO;AACT,MAAI,MAAM,eAAe,cAAc;AACrC,WAAO,MAAM;AAAA,EACf;AACA,QAAM,iBAAiB,MAAM;AAC7B,QAAM,YAAY,YAAYA,SAAQA,MAAK,UAAU,MAAM,QAAQ;AAAA,IACjE;AAAA,EACF;AACA,QAAM,eAAe,eAAe,OAAO,KAAK,GAAG;AACnD,SAAO,aAAa,eAAe,iBAAiB;AACtD;AACA,eAAe,KAAK,SAAS;AAC3B,QAAM,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,UAAU,GAAG,CAAC;AACnE;AACA,eAAe,mBAAmB,SAAS,UAAU,YAAY,cAAc;AAC7E,MAAI;AACF,UAAM,UAAU;AAAA,MACd;AAAA,MACA;AAAA,MACA,MAAM,aAAa;AAAA,IACrB;AACA,UAAM,EAAE,eAAe,IAAI,eAAe,cAAc,MAAM,mBAAmB;AAAA,MAC/E,GAAG;AAAA,MACH,YAAY;AAAA,IACd,CAAC,IAAI,MAAM,mBAAmB;AAAA,MAC5B,GAAG;AAAA,MACH,YAAY;AAAA,IACd,CAAC;AACD,WAAO;AAAA,MACL,MAAM;AAAA,MACN,WAAW;AAAA,MACX,GAAG;AAAA,IACL;AAAA,EACF,SAAS,OAAO;AACd,QAAI,CAAC,MAAM;AACT,YAAM;AACR,UAAM,YAAY,MAAM,SAAS,KAAK;AACtC,QAAI,cAAc,yBAAyB;AACzC,YAAM,KAAK,aAAa,QAAQ;AAChC,aAAO,mBAAmB,SAAS,UAAU,YAAY,YAAY;AAAA,IACvE;AACA,QAAI,cAAc,aAAa;AAC7B,YAAM,KAAK,aAAa,WAAW,CAAC;AACpC,aAAO,mBAAmB,SAAS,UAAU,YAAY,YAAY;AAAA,IACvE;AACA,UAAM;AAAA,EACR;AACF;;;ACxEA,eAAe,KAAK,OAAO,aAAa;AACtC,SAAO,oBAAoB,OAAO;AAAA,IAChC,MAAM;AAAA,EACR,CAAC;AACH;;;ACJA,eAAe,KAAK,OAAO,SAAS,OAAO,YAAY;AACrD,MAAI,WAAW,QAAQ,SAAS;AAAA,IAC9B;AAAA,IACA;AAAA,EACF;AACA,MAAI,+CAA+C,KAAK,SAAS,GAAG,GAAG;AACrE,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACA,QAAM,EAAE,MAAM,IAAI,MAAM,oBAAoB,OAAO;AAAA,IACjD;AAAA,IACA,MAAM,EAAE,MAAM,QAAQ;AAAA,EACxB,CAAC;AACD,WAAS,QAAQ,gBAAgB,SAAS,KAAK;AAC/C,SAAO,QAAQ,QAAQ;AACzB;;;ACfA,IAAM,UAAU;;;AJKhB,SAAS,sBAAsB,SAAS;AACtC,QAAM,sBAAsB,QAAQ,WAAW,eAAe,SAAS;AAAA,IACrE,SAAS;AAAA,MACP,cAAc,gCAAgC,OAAO,IAAI,aAAa,CAAC;AAAA,IACzE;AAAA,EACF,CAAC;AACD,QAAM,EAAE,UAAU,qBAAqB,GAAG,aAAa,IAAI;AAC3D,QAAM,QAAQ,QAAQ,eAAe,eAAe;AAAA,IAClD,GAAG;AAAA,IACH,YAAY;AAAA,IACZ;AAAA,EACF,IAAI;AAAA,IACF,GAAG;AAAA,IACH,YAAY;AAAA,IACZ;AAAA,IACA,QAAQ,QAAQ,UAAU,CAAC;AAAA,EAC7B;AACA,MAAI,CAAC,QAAQ,UAAU;AACrB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,MAAI,CAAC,QAAQ,gBAAgB;AAC3B,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,SAAO,OAAO,OAAO,KAAK,KAAK,MAAM,KAAK,GAAG;AAAA,IAC3C,MAAM,KAAK,KAAK,MAAM,KAAK;AAAA,EAC7B,CAAC;AACH;", + "names": ["auth"] +} diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-src/auth.js b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-src/auth.js new file mode 100644 index 000000000..2ce4b0ac8 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-src/auth.js @@ -0,0 +1,9 @@ +import { getOAuthAccessToken } from "./get-oauth-access-token.js"; +async function auth(state, authOptions) { + return getOAuthAccessToken(state, { + auth: authOptions + }); +} +export { + auth +}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-src/get-oauth-access-token.js b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-src/get-oauth-access-token.js new file mode 100644 index 000000000..2002734cb --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-src/get-oauth-access-token.js @@ -0,0 +1,77 @@ +import { createDeviceCode, exchangeDeviceCode } from "@octokit/oauth-methods"; +async function getOAuthAccessToken(state, options) { + const cachedAuthentication = getCachedAuthentication(state, options.auth); + if (cachedAuthentication) + return cachedAuthentication; + const { data: verification } = await createDeviceCode({ + clientType: state.clientType, + clientId: state.clientId, + request: options.request || state.request, + // @ts-expect-error the extra code to make TS happy is not worth it + scopes: options.auth.scopes || state.scopes + }); + await state.onVerification(verification); + const authentication = await waitForAccessToken( + options.request || state.request, + state.clientId, + state.clientType, + verification + ); + state.authentication = authentication; + return authentication; +} +function getCachedAuthentication(state, auth) { + if (auth.refresh === true) + return false; + if (!state.authentication) + return false; + if (state.clientType === "github-app") { + return state.authentication; + } + const authentication = state.authentication; + const newScope = ("scopes" in auth && auth.scopes || state.scopes).join( + " " + ); + const currentScope = authentication.scopes.join(" "); + return newScope === currentScope ? authentication : false; +} +async function wait(seconds) { + await new Promise((resolve) => setTimeout(resolve, seconds * 1e3)); +} +async function waitForAccessToken(request, clientId, clientType, verification) { + try { + const options = { + clientId, + request, + code: verification.device_code + }; + const { authentication } = clientType === "oauth-app" ? await exchangeDeviceCode({ + ...options, + clientType: "oauth-app" + }) : await exchangeDeviceCode({ + ...options, + clientType: "github-app" + }); + return { + type: "token", + tokenType: "oauth", + ...authentication + }; + } catch (error) { + if (!error.response) + throw error; + const errorType = error.response.data.error; + if (errorType === "authorization_pending") { + await wait(verification.interval); + return waitForAccessToken(request, clientId, clientType, verification); + } + if (errorType === "slow_down") { + await wait(verification.interval + 5); + return waitForAccessToken(request, clientId, clientType, verification); + } + throw error; + } +} +export { + getOAuthAccessToken +}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-src/hook.js b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-src/hook.js new file mode 100644 index 000000000..511d2f614 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-src/hook.js @@ -0,0 +1,19 @@ +import { getOAuthAccessToken } from "./get-oauth-access-token.js"; +async function hook(state, request, route, parameters) { + let endpoint = request.endpoint.merge( + route, + parameters + ); + if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { + return request(endpoint); + } + const { token } = await getOAuthAccessToken(state, { + request, + auth: { type: "oauth" } + }); + endpoint.headers.authorization = `token ${token}`; + return request(endpoint); +} +export { + hook +}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-src/index.js b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-src/index.js new file mode 100644 index 000000000..989b6fe57 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-src/index.js @@ -0,0 +1,39 @@ +import { getUserAgent } from "universal-user-agent"; +import { request as octokitRequest } from "@octokit/request"; +import { auth } from "./auth.js"; +import { hook } from "./hook.js"; +import { VERSION } from "./version.js"; +function createOAuthDeviceAuth(options) { + const requestWithDefaults = options.request || octokitRequest.defaults({ + headers: { + "user-agent": `octokit-auth-oauth-device.js/${VERSION} ${getUserAgent()}` + } + }); + const { request = requestWithDefaults, ...otherOptions } = options; + const state = options.clientType === "github-app" ? { + ...otherOptions, + clientType: "github-app", + request + } : { + ...otherOptions, + clientType: "oauth-app", + request, + scopes: options.scopes || [] + }; + if (!options.clientId) { + throw new Error( + '[@octokit/auth-oauth-device] "clientId" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)' + ); + } + if (!options.onVerification) { + throw new Error( + '[@octokit/auth-oauth-device] "onVerification" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)' + ); + } + return Object.assign(auth.bind(null, state), { + hook: hook.bind(null, state) + }); +} +export { + createOAuthDeviceAuth +}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-src/version.js b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-src/version.js new file mode 100644 index 000000000..75aca5056 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-src/version.js @@ -0,0 +1,4 @@ +const VERSION = "7.1.1"; +export { + VERSION +}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-types/auth.d.ts b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-types/auth.d.ts new file mode 100644 index 000000000..e9067b20f --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-types/auth.d.ts @@ -0,0 +1,2 @@ +import type { OAuthAppAuthOptions, GitHubAppAuthOptions, OAuthAppAuthentication, GitHubAppAuthentication, OAuthAppState, GitHubAppState } from "./types.js"; +export declare function auth(state: OAuthAppState | GitHubAppState, authOptions: OAuthAppAuthOptions | GitHubAppAuthOptions): Promise; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-types/get-oauth-access-token.d.ts b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-types/get-oauth-access-token.d.ts new file mode 100644 index 000000000..ac6e16c0a --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-types/get-oauth-access-token.d.ts @@ -0,0 +1,6 @@ +import type { RequestInterface } from "@octokit/types"; +import type { OAuthAppState, GitHubAppState, OAuthAppAuthOptions, GitHubAppAuthOptions, OAuthAppAuthentication, GitHubAppAuthentication } from "./types.js"; +export declare function getOAuthAccessToken(state: OAuthAppState | GitHubAppState, options: { + request?: RequestInterface; + auth: OAuthAppAuthOptions | GitHubAppAuthOptions; +}): Promise; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-types/hook.d.ts b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-types/hook.d.ts new file mode 100644 index 000000000..12fe06425 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-types/hook.d.ts @@ -0,0 +1,3 @@ +import type { RequestInterface, OctokitResponse, EndpointOptions, RequestParameters, Route } from "@octokit/types"; +import type { OAuthAppState, GitHubAppState } from "./types.js"; +export declare function hook(state: OAuthAppState | GitHubAppState, request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-types/index.d.ts b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-types/index.d.ts new file mode 100644 index 000000000..63f64cbf0 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-types/index.d.ts @@ -0,0 +1,4 @@ +import type { GitHubAppAuthInterface, GitHubAppStrategyOptions, OAuthAppAuthInterface, OAuthAppStrategyOptions } from "./types.js"; +export type { OAuthAppStrategyOptions, OAuthAppAuthOptions, OAuthAppAuthentication, GitHubAppStrategyOptions, GitHubAppAuthOptions, GitHubAppAuthentication, GitHubAppAuthenticationWithExpiration, } from "./types.js"; +export declare function createOAuthDeviceAuth(options: OAuthAppStrategyOptions): OAuthAppAuthInterface; +export declare function createOAuthDeviceAuth(options: GitHubAppStrategyOptions): GitHubAppAuthInterface; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-types/types.d.ts b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-types/types.d.ts new file mode 100644 index 000000000..1b8f86941 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-types/types.d.ts @@ -0,0 +1,68 @@ +import type { RequestInterface, Route, EndpointOptions, RequestParameters, OctokitResponse } from "@octokit/types"; +import * as OAuthMethodsTypes from "@octokit/oauth-methods"; +export type ClientType = "oauth-app" | "github-app"; +export type OAuthAppStrategyOptions = { + clientId: string; + clientType?: "oauth-app"; + onVerification: OnVerificationCallback; + scopes?: string[]; + request?: RequestInterface; +}; +export type GitHubAppStrategyOptions = { + clientId: string; + clientType: "github-app"; + onVerification: OnVerificationCallback; + request?: RequestInterface; +}; +export interface OAuthAppAuthInterface { + (options: OAuthAppAuthOptions): Promise; + hook(request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>; +} +export interface GitHubAppAuthInterface { + (options: GitHubAppAuthOptions): Promise; + hook(request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>; +} +export type OAuthAppAuthOptions = { + type: "oauth"; + scopes?: string[]; + refresh?: boolean; +}; +export type GitHubAppAuthOptions = { + type: "oauth"; + refresh?: boolean; +}; +export type OAuthAppAuthentication = { + type: "token"; + tokenType: "oauth"; +} & Omit; +export type GitHubAppAuthentication = { + type: "token"; + tokenType: "oauth"; +} & Omit; +export type GitHubAppAuthenticationWithExpiration = { + type: "token"; + tokenType: "oauth"; +} & Omit; +export type Verification = { + device_code: string; + user_code: string; + verification_uri: string; + expires_in: number; + interval: number; +}; +export type OnVerificationCallback = (verification: Verification) => any | Promise; +export type OAuthAppState = { + clientId: string; + clientType: "oauth-app"; + onVerification: OnVerificationCallback; + scopes: string[]; + request: RequestInterface; + authentication?: OAuthAppAuthentication; +}; +export type GitHubAppState = { + clientId: string; + clientType: "github-app"; + onVerification: OnVerificationCallback; + request: RequestInterface; + authentication?: GitHubAppAuthentication | GitHubAppAuthenticationWithExpiration; +}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-types/version.d.ts b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-types/version.d.ts new file mode 100644 index 000000000..76a73422d --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-device/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "7.1.1"; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-device/package.json b/.github/octokit/node_modules/@octokit/auth-oauth-device/package.json new file mode 100644 index 000000000..8075efea1 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-device/package.json @@ -0,0 +1,55 @@ +{ + "name": "@octokit/auth-oauth-device", + "version": "7.1.1", + "description": "GitHub OAuth Device authentication strategy for JavaScript", + "type": "module", + "repository": "github:octokit/auth-oauth-device.js", + "keywords": [ + "github", + "api", + "sdk", + "toolkit" + ], + "author": "Gregor Martynus (https://dev.to/gr2m)", + "license": "MIT", + "dependencies": { + "@octokit/oauth-methods": "^5.0.0", + "@octokit/request": "^9.0.0", + "@octokit/types": "^13.0.0", + "universal-user-agent": "^7.0.0" + }, + "devDependencies": { + "@octokit/tsconfig": "^3.0.0", + "@types/jest": "^29.0.0", + "@types/node": "^20.0.0", + "esbuild": "^0.20.0", + "fetch-mock": "npm:@gr2m/fetch-mock@9.11.0-pull-request-644.1", + "glob": "^10.2.7", + "jest": "^29.0.0", + "prettier": "3.2.5", + "semantic-release": "^23.0.0", + "semantic-release-plugin-update-version-in-files": "^1.1.0", + "ts-jest": "^29.0.0", + "typescript": "^5.0.0" + }, + "publishConfig": { + "access": "public", + "provenance": true + }, + "engines": { + "node": ">= 18" + }, + "files": [ + "dist-*/**", + "bin/**" + ], + "types": "./dist-types/index.d.ts", + "exports": { + ".": { + "types": "./dist-types/index.d.ts", + "import": "./dist-bundle/index.js", + "default": "./dist-bundle/index.js" + } + }, + "sideEffects": false +} diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-user/LICENSE b/.github/octokit/node_modules/@octokit/auth-oauth-user/LICENSE new file mode 100644 index 000000000..57049d04c --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-user/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2021 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-user/README.md b/.github/octokit/node_modules/@octokit/auth-oauth-user/README.md new file mode 100644 index 000000000..95e08ec1b --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-user/README.md @@ -0,0 +1,1038 @@ +# auth-oauth-user.js + +> Octokit authentication strategy for OAuth user authentication + +[![@latest](https://img.shields.io/npm/v/@octokit/auth-oauth-user.svg)](https://www.npmjs.com/package/@octokit/auth-oauth-user) +[![Build Status](https://github.com/octokit/auth-oauth-user.js/workflows/Test/badge.svg)](https://github.com/octokit/auth-oauth-user.js/actions?query=workflow%3ATest+branch%3Amain) + +**Important:** `@octokit/auth-oauth-user` requires your app's `client_secret`, which must not be exposed. If you are looking for an OAuth user authentication strategy that can be used on a client (browser, IoT, CLI), check out [`@octokit/auth-oauth-user-client`](https://github.com/octokit/auth-oauth-user-client.js#readme). Note that `@octokit/auth-oauth-user-client` requires a backend. The only exception is [`@octokit/auth-oauth-device`](https://github.com/octokit/auth-oauth-device.js#readme) which does not require the `client_secret`, but does not work in browsers due to CORS constraints. + +
+Table of contents + + + +- [Features](#features) +- [Standalone usage](#standalone-usage) + - [Exchange code from OAuth web flow](#exchange-code-from-oauth-web-flow) + - [OAuth Device flow](#oauth-device-flow) + - [Use an existing authentication](#use-an-existing-authentication) +- [Usage with Octokit](#usage-with-octokit) +- [`createOAuthUserAuth(options)` or `new Octokit({ auth })`](#createoauthuserauthoptions-or-new-octokit-auth-) + - [When using GitHub's OAuth web flow](#when-using-githubs-oauth-web-flow) + - [When using GitHub's OAuth device flow](#when-using-githubs-oauth-device-flow) + - [When passing an existing authentication object](#when-passing-an-existing-authentication-object) +- [`auth(options)` or `octokit.auth(options)`](#authoptions-or-octokitauthoptions) +- [Authentication object](#authentication-object) + - [OAuth APP authentication token](#oauth-app-authentication-token) + - [GitHub APP user authentication token with expiring disabled](#github-app-user-authentication-token-with-expiring-disabled) + - [GitHub APP user authentication token with expiring enabled](#github-app-user-authentication-token-with-expiring-enabled) +- [`auth.hook(request, route, parameters)` or `auth.hook(request, options)`](#authhookrequest-route-parameters-or-authhookrequest-options) +- [Types](#types) +- [Contributing](#contributing) +- [License](#license) + + + +
+ +## Features + +- Code for token exchange from [GitHub's OAuth web flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow) +- [GitHub's OAuth device flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow) +- Caches token for succesive calls +- Auto-refreshing for [expiring user access tokens](https://docs.github.com/en/developers/apps/refreshing-user-to-server-access-tokens) +- Applies the correct authentication strategy based on the request URL when using with `Octokit` +- Token verification +- Token reset +- Token invalidation +- Application grant revocation + +## Standalone usage + + + + + + +
+ +Browsers + + + +Load `@octokit/auth-oauth-user` directly from [esm.sh](https://esm.sh) + +```html + +``` + +
+ +Node + + + +Install with `npm install @octokit/auth-oauth-user` + +```js +import { createOAuthUserAuth } from "@octokit/auth-oauth-user"; +``` + +
+ +### Exchange code from OAuth web flow + +```js +const auth = createOAuthUserAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + code: "code123", + // optional + state: "state123", + redirectUrl: "https://acme-inc.com/login", +}); + +// Exchanges the code for the user access token authentication on first call +// and caches the authentication for successive calls +const { token } = await auth(); +``` + +About [GitHub's OAuth web flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow) + +### OAuth Device flow + +```js +const auth = createOAuthUserAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + onVerification(verification) { + // verification example + // { + // device_code: "3584d83530557fdd1f46af8289938c8ef79f9dc5", + // user_code: "WDJB-MJHT", + // verification_uri: "https://github.com/login/device", + // expires_in: 900, + // interval: 5, + // }; + + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + }, +}); + +// resolves once the user entered the `user_code` on `verification_uri` +const { token } = await auth(); +``` + +About [GitHub's OAuth device flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow) + +### Use an existing authentication + +```js +const auth = createOAuthUserAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + clientType: "oauth-app", + token: "token123", +}); + +// will return the passed authentication +const { token } = await auth(); +``` + +See [Authentication object](#authentication-object). + +## Usage with Octokit + + + + + + +
+ +Browsers + + + +`@octokit/auth-oauth-user` cannot be used in the browser. It requires `clientSecret` to be set which must not be exposed to clients, and some of the OAuth APIs it uses do not support CORS. + +
+ +Node + + + +Install with `npm install @octokit/core @octokit/auth-oauth-user`. Optionally replace `@octokit/core` with a compatible module + +```js +import { Octokit } from "@octokit/core"; +import { createOAuthUserAuth } from "@octokit/auth-oauth-user"; +``` + +
+ +```js +const octokit = new Octokit({ + authStrategy: createOAuthUserAuth, + auth: { + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + code: "code123", + }, +}); + +// Exchanges the code for the user access token authentication on first request +// and caches the authentication for successive requests +const { + data: { login }, +} = await octokit.request("GET /user"); +console.log("Hello, %s!", login); +``` + +## `createOAuthUserAuth(options)` or `new Octokit({ auth })` + +The `createOAuthUserAuth` method accepts a single `options` object as argument. The same set of options can be passed as `auth` to the `Octokit` constructor when setting `authStrategy: createOAuthUserAuth` + +### When using GitHub's OAuth web flow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientId + + string + + Required. Client ID of your GitHub/OAuth App. Find it on your app's settings page. +
+ clientSecret + + string + + Required. Client Secret for your GitHub/OAuth App. Create one on your app's settings page. +
+ clientType + + string + + Either "oauth-app" or "github-app". Defaults to "oauth-app". +
+ code + + string + + +**Required.** The authorization code which was passed as query parameter to the callback URL from [GitHub's OAuth web application flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow). + +
+ state + + string + + +The unguessable random string you provided in [Step 1 of GitHub's OAuth web application flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#1-request-a-users-github-identity). + +
+ redirectUrl + + string + + +The redirect_uri parameter you provided in [Step 1 of GitHub's OAuth web application flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#1-request-a-users-github-identity). + +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example: + +```js +import { request } from "@octokit/request"; +createOAuthAppAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +### When using GitHub's OAuth device flow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientId + + string + + Required. Client ID of your GitHub/OAuth App. Find it on your app's settings page. +
+ clientSecret + + string + + Required. Client Secret for your GitHub/OAuth App. The clientSecret is not needed for the OAuth device flow itself, but it is required for resetting, refreshing, and invalidating a token. Find the Client Secret on your app's settings page. +
+ clientType + + string + + Either "oauth-app" or "github-app". Defaults to "oauth-app". +
+ onVerification + + function + + +**Required**. A function that is called once the device and user codes were retrieved + +The `onVerification()` callback can be used to pause until the user completes step 2, which might result in a better user experience. + +```js +const auth = createOAuthUserAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + onVerification(verification) { + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + + await prompt("press enter when you are ready to continue"); + }, +}); +``` + +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example: + +```js +import { request } from "@octokit/request"; +createOAuthAppAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + onVerification(verification) { + console.log("Open %s", verification.verification_uri); + console.log("Enter code: %s", verification.user_code); + + await prompt("press enter when you are ready to continue"); + }, + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +### When passing an existing authentication object + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Either "oauth-app" or "github". +
+ clientId + + string + + Required. Client ID of your GitHub/OAuth App. Find it on your app's settings page. +
+ clientSecret + + string + + Required. Client Secret for your GitHub/OAuth App. Create one on your app's settings page. +
+ token + + string + + Required. The user access token +
+ scopes + + array of strings + + Required if clientType is set to "oauth-app". Array of OAuth scope names the token was granted +
+ refreshToken + + string + + Only relevant if clientType is set to "github-app" and token expiration is enabled. +
+ expiresAt + + string + + Only relevant if clientType is set to "github-app" and token expiration is enabled. Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z +
+ refreshTokenExpiresAt + + string + + Only relevant if clientType is set to "github-app" and token expiration is enabled. Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example: + +```js +import { request } from "@octokit/request"; +createOAuthAppAuth({ + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef1234567890abcdef12345678", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +> [!IMPORTANT] +> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json` by setting `"moduleResolution": "node16", "module": "node16"`. +> +> See the TypeScript docs on [package.json "exports"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports).
+> See this [helpful guide on transitioning to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) from [@sindresorhus](https://github.com/sindresorhus) + +## `auth(options)` or `octokit.auth(options)` + +The async `auth()` method is returned by `createOAuthUserAuth(options)` or set on the `octokit` instance when the `Octokit` constructor was called with `authStrategy: createOAuthUserAuth`. + +Once `auth()` receives a valid authentication object it caches it in memory and uses it for subsequent calls. It also caches if the token is invalid and no longer tries to send any requests. If the authentication is using a refresh token, a new token will be requested as needed. Calling `auth({ type: "reset" })` will replace the internally cached authentication. + +Resolves with an [authentication object](#authentication-object). + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + +Without setting `type` auth will return the current authentication object, or exchange the `code` from the strategy options on first call. If the current authentication token is expired, the tokens will be refreshed. + +Possible values for `type` are + +- `"get"`: returns the token from internal state and creates it if none was created yet +- `"check"`: sends request to verify the validity of the current token +- `"reset"`: invalidates current token and replaces it with a new one +- `"refresh"`: GitHub Apps only, and only if expiring user tokens are enabled. +- `"delete"`: invalidates current token +- `"deleteAuthorization"`: revokes OAuth access for application. All tokens for the current user created by the same app are invalidated. The user will be prompted to grant access again during the next OAuth web flow. + +
+ +## Authentication object + +There are three possible results + +1. [OAuth APP authentication token](#oauth-app-authentication-token) +1. [GitHub APP user authentication token with expiring disabled](#github-app-user-authentication-token-with-expiring-disabled) +1. [GitHub APP user authentication token with expiring enabled](#github-app-user-authentication-token-with-expiring-enabled) + +The differences are + +1. `scopes` is only present for OAuth Apps +2. `refreshToken`, `expiresAt`, `refreshTokenExpiresAt` are only present for GitHub Apps, and only if token expiration is enabled + +### OAuth APP authentication token + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "oauth-app" +
+ clientId + + string + + The clientId from the strategy options +
+ clientSecret + + string + + The clientSecret from the strategy options +
+ token + + string + + The user access token +
+ scopes + + array of strings + + array of scope names enabled for the token +
+ onTokenCreated + + function + + callback invoked when a token is "reset" or "refreshed" +
+ invalid + + boolean + + +Either `undefined` or `true`. Will be set to `true` if the token was invalided explicitly or found to be invalid + +
+ +### GitHub APP user authentication token with expiring disabled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The clientId from the strategy options +
+ clientSecret + + string + + The clientSecret from the strategy options +
+ token + + string + + The user access token +
+ onTokenCreated + + function + + callback invoked when a token is "reset" or "refreshed" +
+ invalid + + boolean + + +Either `undefined` or `true`. Will be set to `true` if the token was invalided explicitly or found to be invalid + +
+ +### GitHub APP user authentication token with expiring enabled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ tokenType + + string + + "oauth" +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The clientId from the strategy options +
+ clientSecret + + string + + The clientSecret from the strategy options +
+ token + + string + + The user access token +
+ refreshToken + + string + + The refresh token +
+ expiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z +
+ refreshTokenExpiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z +
+ invalid + + boolean + + +Either `undefined` or `true`. Will be set to `true` if the token was invalided explicitly or found to be invalid + +
+ +## `auth.hook(request, route, parameters)` or `auth.hook(request, options)` + +`auth.hook()` hooks directly into the request life cycle. It amends the request to authenticate correctly based on the request URL. + +The `request` option is an instance of [`@octokit/request`](https://github.com/octokit/request.js#readme). The `route`/`options` parameters are the same as for the [`request()` method](https://github.com/octokit/request.js#request). + +`auth.hook()` can be called directly to send an authenticated request + +```js +const { data: user } = await auth.hook(request, "GET /user"); +``` + +Or it can be passed as option to [`request()`](https://github.com/octokit/request.js#request). + +```js +const requestWithAuth = request.defaults({ + request: { + hook: auth.hook, + }, +}); + +const { data: user } = await requestWithAuth("GET /user"); +``` + +## Types + +```ts +import { + GitHubAppAuthentication, + GitHubAppAuthenticationWithExpiration, + GitHubAppAuthOptions, + GitHubAppStrategyOptions, + GitHubAppStrategyOptionsDeviceFlow, + GitHubAppStrategyOptionsExistingAuthentication, + GitHubAppStrategyOptionsExistingAuthenticationWithExpiration, + GitHubAppStrategyOptionsWebFlow, + OAuthAppAuthentication, + OAuthAppAuthOptions, + OAuthAppStrategyOptions, + OAuthAppStrategyOptionsDeviceFlow, + OAuthAppStrategyOptionsExistingAuthentication, + OAuthAppStrategyOptionsWebFlow, +} from "@octokit/auth-oauth-user"; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-bundle/index.js b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-bundle/index.js new file mode 100644 index 000000000..17769a425 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-bundle/index.js @@ -0,0 +1,209 @@ +// pkg/dist-src/index.js +import { getUserAgent } from "universal-user-agent"; +import { request as octokitRequest } from "@octokit/request"; + +// pkg/dist-src/version.js +var VERSION = "0.0.0-development"; + +// pkg/dist-src/get-authentication.js +import { createOAuthDeviceAuth } from "@octokit/auth-oauth-device"; +import { exchangeWebFlowCode } from "@octokit/oauth-methods"; +async function getAuthentication(state) { + if ("code" in state.strategyOptions) { + const { authentication } = await exchangeWebFlowCode({ + clientId: state.clientId, + clientSecret: state.clientSecret, + clientType: state.clientType, + onTokenCreated: state.onTokenCreated, + ...state.strategyOptions, + request: state.request + }); + return { + type: "token", + tokenType: "oauth", + ...authentication + }; + } + if ("onVerification" in state.strategyOptions) { + const deviceAuth = createOAuthDeviceAuth({ + clientType: state.clientType, + clientId: state.clientId, + onTokenCreated: state.onTokenCreated, + ...state.strategyOptions, + request: state.request + }); + const authentication = await deviceAuth({ + type: "oauth" + }); + return { + clientSecret: state.clientSecret, + ...authentication + }; + } + if ("token" in state.strategyOptions) { + return { + type: "token", + tokenType: "oauth", + clientId: state.clientId, + clientSecret: state.clientSecret, + clientType: state.clientType, + onTokenCreated: state.onTokenCreated, + ...state.strategyOptions + }; + } + throw new Error("[@octokit/auth-oauth-user] Invalid strategy options"); +} + +// pkg/dist-src/auth.js +import { + checkToken, + deleteAuthorization, + deleteToken, + refreshToken, + resetToken +} from "@octokit/oauth-methods"; +async function auth(state, options = {}) { + if (!state.authentication) { + state.authentication = state.clientType === "oauth-app" ? await getAuthentication(state) : await getAuthentication(state); + } + if (state.authentication.invalid) { + throw new Error("[@octokit/auth-oauth-user] Token is invalid"); + } + const currentAuthentication = state.authentication; + if ("expiresAt" in currentAuthentication) { + if (options.type === "refresh" || new Date(currentAuthentication.expiresAt) < /* @__PURE__ */ new Date()) { + const { authentication } = await refreshToken({ + clientType: "github-app", + clientId: state.clientId, + clientSecret: state.clientSecret, + refreshToken: currentAuthentication.refreshToken, + request: state.request + }); + state.authentication = { + tokenType: "oauth", + type: "token", + ...authentication + }; + } + } + if (options.type === "refresh") { + if (state.clientType === "oauth-app") { + throw new Error( + "[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens" + ); + } + if (!currentAuthentication.hasOwnProperty("expiresAt")) { + throw new Error("[@octokit/auth-oauth-user] Refresh token missing"); + } + await state.onTokenCreated?.(state.authentication, { + type: options.type + }); + } + if (options.type === "check" || options.type === "reset") { + const method = options.type === "check" ? checkToken : resetToken; + try { + const { authentication } = await method({ + // @ts-expect-error making TS happy would require unnecessary code so no + clientType: state.clientType, + clientId: state.clientId, + clientSecret: state.clientSecret, + token: state.authentication.token, + request: state.request + }); + state.authentication = { + tokenType: "oauth", + type: "token", + // @ts-expect-error TBD + ...authentication + }; + if (options.type === "reset") { + await state.onTokenCreated?.(state.authentication, { + type: options.type + }); + } + return state.authentication; + } catch (error) { + if (error.status === 404) { + error.message = "[@octokit/auth-oauth-user] Token is invalid"; + state.authentication.invalid = true; + } + throw error; + } + } + if (options.type === "delete" || options.type === "deleteAuthorization") { + const method = options.type === "delete" ? deleteToken : deleteAuthorization; + try { + await method({ + // @ts-expect-error making TS happy would require unnecessary code so no + clientType: state.clientType, + clientId: state.clientId, + clientSecret: state.clientSecret, + token: state.authentication.token, + request: state.request + }); + } catch (error) { + if (error.status !== 404) + throw error; + } + state.authentication.invalid = true; + return state.authentication; + } + return state.authentication; +} + +// pkg/dist-src/requires-basic-auth.js +var ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[^/]+\/(token|grant)s?/; +function requiresBasicAuth(url) { + return url && ROUTES_REQUIRING_BASIC_AUTH.test(url); +} + +// pkg/dist-src/hook.js +async function hook(state, request, route, parameters = {}) { + const endpoint = request.endpoint.merge( + route, + parameters + ); + if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { + return request(endpoint); + } + if (requiresBasicAuth(endpoint.url)) { + const credentials = btoa(`${state.clientId}:${state.clientSecret}`); + endpoint.headers.authorization = `basic ${credentials}`; + return request(endpoint); + } + const { token } = state.clientType === "oauth-app" ? await auth({ ...state, request }) : await auth({ ...state, request }); + endpoint.headers.authorization = "token " + token; + return request(endpoint); +} + +// pkg/dist-src/index.js +function createOAuthUserAuth({ + clientId, + clientSecret, + clientType = "oauth-app", + request = octokitRequest.defaults({ + headers: { + "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}` + } + }), + onTokenCreated, + ...strategyOptions +}) { + const state = Object.assign({ + clientType, + clientId, + clientSecret, + onTokenCreated, + strategyOptions, + request + }); + return Object.assign(auth.bind(null, state), { + // @ts-expect-error not worth the extra code needed to appease TS + hook: hook.bind(null, state) + }); +} +createOAuthUserAuth.VERSION = VERSION; +export { + createOAuthUserAuth, + requiresBasicAuth +}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-bundle/index.js.map b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-bundle/index.js.map new file mode 100644 index 000000000..0ba8e4ffb --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-bundle/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../dist-src/index.js", "../dist-src/version.js", "../dist-src/get-authentication.js", "../dist-src/auth.js", "../dist-src/requires-basic-auth.js", "../dist-src/hook.js"], + "sourcesContent": ["import { getUserAgent } from \"universal-user-agent\";\nimport { request as octokitRequest } from \"@octokit/request\";\nimport { VERSION } from \"./version.js\";\nimport { auth } from \"./auth.js\";\nimport { hook } from \"./hook.js\";\nimport { requiresBasicAuth } from \"./requires-basic-auth.js\";\nfunction createOAuthUserAuth({\n clientId,\n clientSecret,\n clientType = \"oauth-app\",\n request = octokitRequest.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`\n }\n }),\n onTokenCreated,\n ...strategyOptions\n}) {\n const state = Object.assign({\n clientType,\n clientId,\n clientSecret,\n onTokenCreated,\n strategyOptions,\n request\n });\n return Object.assign(auth.bind(null, state), {\n // @ts-expect-error not worth the extra code needed to appease TS\n hook: hook.bind(null, state)\n });\n}\ncreateOAuthUserAuth.VERSION = VERSION;\nexport {\n createOAuthUserAuth,\n requiresBasicAuth\n};\n", "const VERSION = \"0.0.0-development\";\nexport {\n VERSION\n};\n", "import { createOAuthDeviceAuth } from \"@octokit/auth-oauth-device\";\nimport { exchangeWebFlowCode } from \"@octokit/oauth-methods\";\nasync function getAuthentication(state) {\n if (\"code\" in state.strategyOptions) {\n const { authentication } = await exchangeWebFlowCode({\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n clientType: state.clientType,\n onTokenCreated: state.onTokenCreated,\n ...state.strategyOptions,\n request: state.request\n });\n return {\n type: \"token\",\n tokenType: \"oauth\",\n ...authentication\n };\n }\n if (\"onVerification\" in state.strategyOptions) {\n const deviceAuth = createOAuthDeviceAuth({\n clientType: state.clientType,\n clientId: state.clientId,\n onTokenCreated: state.onTokenCreated,\n ...state.strategyOptions,\n request: state.request\n });\n const authentication = await deviceAuth({\n type: \"oauth\"\n });\n return {\n clientSecret: state.clientSecret,\n ...authentication\n };\n }\n if (\"token\" in state.strategyOptions) {\n return {\n type: \"token\",\n tokenType: \"oauth\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n clientType: state.clientType,\n onTokenCreated: state.onTokenCreated,\n ...state.strategyOptions\n };\n }\n throw new Error(\"[@octokit/auth-oauth-user] Invalid strategy options\");\n}\nexport {\n getAuthentication\n};\n", "import { getAuthentication } from \"./get-authentication.js\";\nimport {\n checkToken,\n deleteAuthorization,\n deleteToken,\n refreshToken,\n resetToken\n} from \"@octokit/oauth-methods\";\nasync function auth(state, options = {}) {\n if (!state.authentication) {\n state.authentication = state.clientType === \"oauth-app\" ? await getAuthentication(state) : await getAuthentication(state);\n }\n if (state.authentication.invalid) {\n throw new Error(\"[@octokit/auth-oauth-user] Token is invalid\");\n }\n const currentAuthentication = state.authentication;\n if (\"expiresAt\" in currentAuthentication) {\n if (options.type === \"refresh\" || new Date(currentAuthentication.expiresAt) < /* @__PURE__ */ new Date()) {\n const { authentication } = await refreshToken({\n clientType: \"github-app\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n refreshToken: currentAuthentication.refreshToken,\n request: state.request\n });\n state.authentication = {\n tokenType: \"oauth\",\n type: \"token\",\n ...authentication\n };\n }\n }\n if (options.type === \"refresh\") {\n if (state.clientType === \"oauth-app\") {\n throw new Error(\n \"[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens\"\n );\n }\n if (!currentAuthentication.hasOwnProperty(\"expiresAt\")) {\n throw new Error(\"[@octokit/auth-oauth-user] Refresh token missing\");\n }\n await state.onTokenCreated?.(state.authentication, {\n type: options.type\n });\n }\n if (options.type === \"check\" || options.type === \"reset\") {\n const method = options.type === \"check\" ? checkToken : resetToken;\n try {\n const { authentication } = await method({\n // @ts-expect-error making TS happy would require unnecessary code so no\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: state.authentication.token,\n request: state.request\n });\n state.authentication = {\n tokenType: \"oauth\",\n type: \"token\",\n // @ts-expect-error TBD\n ...authentication\n };\n if (options.type === \"reset\") {\n await state.onTokenCreated?.(state.authentication, {\n type: options.type\n });\n }\n return state.authentication;\n } catch (error) {\n if (error.status === 404) {\n error.message = \"[@octokit/auth-oauth-user] Token is invalid\";\n state.authentication.invalid = true;\n }\n throw error;\n }\n }\n if (options.type === \"delete\" || options.type === \"deleteAuthorization\") {\n const method = options.type === \"delete\" ? deleteToken : deleteAuthorization;\n try {\n await method({\n // @ts-expect-error making TS happy would require unnecessary code so no\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: state.authentication.token,\n request: state.request\n });\n } catch (error) {\n if (error.status !== 404)\n throw error;\n }\n state.authentication.invalid = true;\n return state.authentication;\n }\n return state.authentication;\n}\nexport {\n auth\n};\n", "const ROUTES_REQUIRING_BASIC_AUTH = /\\/applications\\/[^/]+\\/(token|grant)s?/;\nfunction requiresBasicAuth(url) {\n return url && ROUTES_REQUIRING_BASIC_AUTH.test(url);\n}\nexport {\n requiresBasicAuth\n};\n", "import { auth } from \"./auth.js\";\nimport { requiresBasicAuth } from \"./requires-basic-auth.js\";\nasync function hook(state, request, route, parameters = {}) {\n const endpoint = request.endpoint.merge(\n route,\n parameters\n );\n if (/\\/login\\/(oauth\\/access_token|device\\/code)$/.test(endpoint.url)) {\n return request(endpoint);\n }\n if (requiresBasicAuth(endpoint.url)) {\n const credentials = btoa(`${state.clientId}:${state.clientSecret}`);\n endpoint.headers.authorization = `basic ${credentials}`;\n return request(endpoint);\n }\n const { token } = state.clientType === \"oauth-app\" ? await auth({ ...state, request }) : await auth({ ...state, request });\n endpoint.headers.authorization = \"token \" + token;\n return request(endpoint);\n}\nexport {\n hook\n};\n"], + "mappings": ";AAAA,SAAS,oBAAoB;AAC7B,SAAS,WAAW,sBAAsB;;;ACD1C,IAAM,UAAU;;;ACAhB,SAAS,6BAA6B;AACtC,SAAS,2BAA2B;AACpC,eAAe,kBAAkB,OAAO;AACtC,MAAI,UAAU,MAAM,iBAAiB;AACnC,UAAM,EAAE,eAAe,IAAI,MAAM,oBAAoB;AAAA,MACnD,UAAU,MAAM;AAAA,MAChB,cAAc,MAAM;AAAA,MACpB,YAAY,MAAM;AAAA,MAClB,gBAAgB,MAAM;AAAA,MACtB,GAAG,MAAM;AAAA,MACT,SAAS,MAAM;AAAA,IACjB,CAAC;AACD,WAAO;AAAA,MACL,MAAM;AAAA,MACN,WAAW;AAAA,MACX,GAAG;AAAA,IACL;AAAA,EACF;AACA,MAAI,oBAAoB,MAAM,iBAAiB;AAC7C,UAAM,aAAa,sBAAsB;AAAA,MACvC,YAAY,MAAM;AAAA,MAClB,UAAU,MAAM;AAAA,MAChB,gBAAgB,MAAM;AAAA,MACtB,GAAG,MAAM;AAAA,MACT,SAAS,MAAM;AAAA,IACjB,CAAC;AACD,UAAM,iBAAiB,MAAM,WAAW;AAAA,MACtC,MAAM;AAAA,IACR,CAAC;AACD,WAAO;AAAA,MACL,cAAc,MAAM;AAAA,MACpB,GAAG;AAAA,IACL;AAAA,EACF;AACA,MAAI,WAAW,MAAM,iBAAiB;AACpC,WAAO;AAAA,MACL,MAAM;AAAA,MACN,WAAW;AAAA,MACX,UAAU,MAAM;AAAA,MAChB,cAAc,MAAM;AAAA,MACpB,YAAY,MAAM;AAAA,MAClB,gBAAgB,MAAM;AAAA,MACtB,GAAG,MAAM;AAAA,IACX;AAAA,EACF;AACA,QAAM,IAAI,MAAM,qDAAqD;AACvE;;;AC7CA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,eAAe,KAAK,OAAO,UAAU,CAAC,GAAG;AACvC,MAAI,CAAC,MAAM,gBAAgB;AACzB,UAAM,iBAAiB,MAAM,eAAe,cAAc,MAAM,kBAAkB,KAAK,IAAI,MAAM,kBAAkB,KAAK;AAAA,EAC1H;AACA,MAAI,MAAM,eAAe,SAAS;AAChC,UAAM,IAAI,MAAM,6CAA6C;AAAA,EAC/D;AACA,QAAM,wBAAwB,MAAM;AACpC,MAAI,eAAe,uBAAuB;AACxC,QAAI,QAAQ,SAAS,aAAa,IAAI,KAAK,sBAAsB,SAAS,IAAoB,oBAAI,KAAK,GAAG;AACxG,YAAM,EAAE,eAAe,IAAI,MAAM,aAAa;AAAA,QAC5C,YAAY;AAAA,QACZ,UAAU,MAAM;AAAA,QAChB,cAAc,MAAM;AAAA,QACpB,cAAc,sBAAsB;AAAA,QACpC,SAAS,MAAM;AAAA,MACjB,CAAC;AACD,YAAM,iBAAiB;AAAA,QACrB,WAAW;AAAA,QACX,MAAM;AAAA,QACN,GAAG;AAAA,MACL;AAAA,IACF;AAAA,EACF;AACA,MAAI,QAAQ,SAAS,WAAW;AAC9B,QAAI,MAAM,eAAe,aAAa;AACpC,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AACA,QAAI,CAAC,sBAAsB,eAAe,WAAW,GAAG;AACtD,YAAM,IAAI,MAAM,kDAAkD;AAAA,IACpE;AACA,UAAM,MAAM,iBAAiB,MAAM,gBAAgB;AAAA,MACjD,MAAM,QAAQ;AAAA,IAChB,CAAC;AAAA,EACH;AACA,MAAI,QAAQ,SAAS,WAAW,QAAQ,SAAS,SAAS;AACxD,UAAM,SAAS,QAAQ,SAAS,UAAU,aAAa;AACvD,QAAI;AACF,YAAM,EAAE,eAAe,IAAI,MAAM,OAAO;AAAA;AAAA,QAEtC,YAAY,MAAM;AAAA,QAClB,UAAU,MAAM;AAAA,QAChB,cAAc,MAAM;AAAA,QACpB,OAAO,MAAM,eAAe;AAAA,QAC5B,SAAS,MAAM;AAAA,MACjB,CAAC;AACD,YAAM,iBAAiB;AAAA,QACrB,WAAW;AAAA,QACX,MAAM;AAAA;AAAA,QAEN,GAAG;AAAA,MACL;AACA,UAAI,QAAQ,SAAS,SAAS;AAC5B,cAAM,MAAM,iBAAiB,MAAM,gBAAgB;AAAA,UACjD,MAAM,QAAQ;AAAA,QAChB,CAAC;AAAA,MACH;AACA,aAAO,MAAM;AAAA,IACf,SAAS,OAAO;AACd,UAAI,MAAM,WAAW,KAAK;AACxB,cAAM,UAAU;AAChB,cAAM,eAAe,UAAU;AAAA,MACjC;AACA,YAAM;AAAA,IACR;AAAA,EACF;AACA,MAAI,QAAQ,SAAS,YAAY,QAAQ,SAAS,uBAAuB;AACvE,UAAM,SAAS,QAAQ,SAAS,WAAW,cAAc;AACzD,QAAI;AACF,YAAM,OAAO;AAAA;AAAA,QAEX,YAAY,MAAM;AAAA,QAClB,UAAU,MAAM;AAAA,QAChB,cAAc,MAAM;AAAA,QACpB,OAAO,MAAM,eAAe;AAAA,QAC5B,SAAS,MAAM;AAAA,MACjB,CAAC;AAAA,IACH,SAAS,OAAO;AACd,UAAI,MAAM,WAAW;AACnB,cAAM;AAAA,IACV;AACA,UAAM,eAAe,UAAU;AAC/B,WAAO,MAAM;AAAA,EACf;AACA,SAAO,MAAM;AACf;;;AC/FA,IAAM,8BAA8B;AACpC,SAAS,kBAAkB,KAAK;AAC9B,SAAO,OAAO,4BAA4B,KAAK,GAAG;AACpD;;;ACDA,eAAe,KAAK,OAAO,SAAS,OAAO,aAAa,CAAC,GAAG;AAC1D,QAAM,WAAW,QAAQ,SAAS;AAAA,IAChC;AAAA,IACA;AAAA,EACF;AACA,MAAI,+CAA+C,KAAK,SAAS,GAAG,GAAG;AACrE,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACA,MAAI,kBAAkB,SAAS,GAAG,GAAG;AACnC,UAAM,cAAc,KAAK,GAAG,MAAM,QAAQ,IAAI,MAAM,YAAY,EAAE;AAClE,aAAS,QAAQ,gBAAgB,SAAS,WAAW;AACrD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACA,QAAM,EAAE,MAAM,IAAI,MAAM,eAAe,cAAc,MAAM,KAAK,EAAE,GAAG,OAAO,QAAQ,CAAC,IAAI,MAAM,KAAK,EAAE,GAAG,OAAO,QAAQ,CAAC;AACzH,WAAS,QAAQ,gBAAgB,WAAW;AAC5C,SAAO,QAAQ,QAAQ;AACzB;;;ALZA,SAAS,oBAAoB;AAAA,EAC3B;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,UAAU,eAAe,SAAS;AAAA,IAChC,SAAS;AAAA,MACP,cAAc,6BAA6B,OAAO,IAAI,aAAa,CAAC;AAAA,IACtE;AAAA,EACF,CAAC;AAAA,EACD;AAAA,EACA,GAAG;AACL,GAAG;AACD,QAAM,QAAQ,OAAO,OAAO;AAAA,IAC1B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,SAAO,OAAO,OAAO,KAAK,KAAK,MAAM,KAAK,GAAG;AAAA;AAAA,IAE3C,MAAM,KAAK,KAAK,MAAM,KAAK;AAAA,EAC7B,CAAC;AACH;AACA,oBAAoB,UAAU;", + "names": [] +} diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-src/auth.js b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-src/auth.js new file mode 100644 index 000000000..b98b283c3 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-src/auth.js @@ -0,0 +1,99 @@ +import { getAuthentication } from "./get-authentication.js"; +import { + checkToken, + deleteAuthorization, + deleteToken, + refreshToken, + resetToken +} from "@octokit/oauth-methods"; +async function auth(state, options = {}) { + if (!state.authentication) { + state.authentication = state.clientType === "oauth-app" ? await getAuthentication(state) : await getAuthentication(state); + } + if (state.authentication.invalid) { + throw new Error("[@octokit/auth-oauth-user] Token is invalid"); + } + const currentAuthentication = state.authentication; + if ("expiresAt" in currentAuthentication) { + if (options.type === "refresh" || new Date(currentAuthentication.expiresAt) < /* @__PURE__ */ new Date()) { + const { authentication } = await refreshToken({ + clientType: "github-app", + clientId: state.clientId, + clientSecret: state.clientSecret, + refreshToken: currentAuthentication.refreshToken, + request: state.request + }); + state.authentication = { + tokenType: "oauth", + type: "token", + ...authentication + }; + } + } + if (options.type === "refresh") { + if (state.clientType === "oauth-app") { + throw new Error( + "[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens" + ); + } + if (!currentAuthentication.hasOwnProperty("expiresAt")) { + throw new Error("[@octokit/auth-oauth-user] Refresh token missing"); + } + await state.onTokenCreated?.(state.authentication, { + type: options.type + }); + } + if (options.type === "check" || options.type === "reset") { + const method = options.type === "check" ? checkToken : resetToken; + try { + const { authentication } = await method({ + // @ts-expect-error making TS happy would require unnecessary code so no + clientType: state.clientType, + clientId: state.clientId, + clientSecret: state.clientSecret, + token: state.authentication.token, + request: state.request + }); + state.authentication = { + tokenType: "oauth", + type: "token", + // @ts-expect-error TBD + ...authentication + }; + if (options.type === "reset") { + await state.onTokenCreated?.(state.authentication, { + type: options.type + }); + } + return state.authentication; + } catch (error) { + if (error.status === 404) { + error.message = "[@octokit/auth-oauth-user] Token is invalid"; + state.authentication.invalid = true; + } + throw error; + } + } + if (options.type === "delete" || options.type === "deleteAuthorization") { + const method = options.type === "delete" ? deleteToken : deleteAuthorization; + try { + await method({ + // @ts-expect-error making TS happy would require unnecessary code so no + clientType: state.clientType, + clientId: state.clientId, + clientSecret: state.clientSecret, + token: state.authentication.token, + request: state.request + }); + } catch (error) { + if (error.status !== 404) + throw error; + } + state.authentication.invalid = true; + return state.authentication; + } + return state.authentication; +} +export { + auth +}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-src/get-authentication.js b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-src/get-authentication.js new file mode 100644 index 000000000..c7fc2e2e3 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-src/get-authentication.js @@ -0,0 +1,50 @@ +import { createOAuthDeviceAuth } from "@octokit/auth-oauth-device"; +import { exchangeWebFlowCode } from "@octokit/oauth-methods"; +async function getAuthentication(state) { + if ("code" in state.strategyOptions) { + const { authentication } = await exchangeWebFlowCode({ + clientId: state.clientId, + clientSecret: state.clientSecret, + clientType: state.clientType, + onTokenCreated: state.onTokenCreated, + ...state.strategyOptions, + request: state.request + }); + return { + type: "token", + tokenType: "oauth", + ...authentication + }; + } + if ("onVerification" in state.strategyOptions) { + const deviceAuth = createOAuthDeviceAuth({ + clientType: state.clientType, + clientId: state.clientId, + onTokenCreated: state.onTokenCreated, + ...state.strategyOptions, + request: state.request + }); + const authentication = await deviceAuth({ + type: "oauth" + }); + return { + clientSecret: state.clientSecret, + ...authentication + }; + } + if ("token" in state.strategyOptions) { + return { + type: "token", + tokenType: "oauth", + clientId: state.clientId, + clientSecret: state.clientSecret, + clientType: state.clientType, + onTokenCreated: state.onTokenCreated, + ...state.strategyOptions + }; + } + throw new Error("[@octokit/auth-oauth-user] Invalid strategy options"); +} +export { + getAuthentication +}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-src/hook.js b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-src/hook.js new file mode 100644 index 000000000..bcf4af4a6 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-src/hook.js @@ -0,0 +1,22 @@ +import { auth } from "./auth.js"; +import { requiresBasicAuth } from "./requires-basic-auth.js"; +async function hook(state, request, route, parameters = {}) { + const endpoint = request.endpoint.merge( + route, + parameters + ); + if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { + return request(endpoint); + } + if (requiresBasicAuth(endpoint.url)) { + const credentials = btoa(`${state.clientId}:${state.clientSecret}`); + endpoint.headers.authorization = `basic ${credentials}`; + return request(endpoint); + } + const { token } = state.clientType === "oauth-app" ? await auth({ ...state, request }) : await auth({ ...state, request }); + endpoint.headers.authorization = "token " + token; + return request(endpoint); +} +export { + hook +}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-src/index.js b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-src/index.js new file mode 100644 index 000000000..911a931e0 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-src/index.js @@ -0,0 +1,36 @@ +import { getUserAgent } from "universal-user-agent"; +import { request as octokitRequest } from "@octokit/request"; +import { VERSION } from "./version.js"; +import { auth } from "./auth.js"; +import { hook } from "./hook.js"; +import { requiresBasicAuth } from "./requires-basic-auth.js"; +function createOAuthUserAuth({ + clientId, + clientSecret, + clientType = "oauth-app", + request = octokitRequest.defaults({ + headers: { + "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}` + } + }), + onTokenCreated, + ...strategyOptions +}) { + const state = Object.assign({ + clientType, + clientId, + clientSecret, + onTokenCreated, + strategyOptions, + request + }); + return Object.assign(auth.bind(null, state), { + // @ts-expect-error not worth the extra code needed to appease TS + hook: hook.bind(null, state) + }); +} +createOAuthUserAuth.VERSION = VERSION; +export { + createOAuthUserAuth, + requiresBasicAuth +}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-src/requires-basic-auth.js b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-src/requires-basic-auth.js new file mode 100644 index 000000000..98b7871cd --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-src/requires-basic-auth.js @@ -0,0 +1,7 @@ +const ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[^/]+\/(token|grant)s?/; +function requiresBasicAuth(url) { + return url && ROUTES_REQUIRING_BASIC_AUTH.test(url); +} +export { + requiresBasicAuth +}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-src/version.js b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-src/version.js new file mode 100644 index 000000000..7fb70fb6a --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-src/version.js @@ -0,0 +1,4 @@ +const VERSION = "5.1.1"; +export { + VERSION +}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-types/auth.d.ts b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-types/auth.d.ts new file mode 100644 index 000000000..2b9dffc55 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-types/auth.d.ts @@ -0,0 +1,3 @@ +import type { OAuthAppAuthOptions, GitHubAppAuthOptions, OAuthAppAuthentication, GitHubAppAuthentication, GitHubAppAuthenticationWithExpiration, OAuthAppState, GitHubAppState } from "./types.js"; +export declare function auth(state: OAuthAppState, options?: OAuthAppAuthOptions): Promise; +export declare function auth(state: GitHubAppState, options?: GitHubAppAuthOptions): Promise; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-types/get-authentication.d.ts b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-types/get-authentication.d.ts new file mode 100644 index 000000000..81713a047 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-types/get-authentication.d.ts @@ -0,0 +1,3 @@ +import type { OAuthAppState, GitHubAppState, OAuthAppAuthentication, GitHubAppAuthentication, GitHubAppAuthenticationWithExpiration } from "./types.js"; +export declare function getAuthentication(state: OAuthAppState): Promise; +export declare function getAuthentication(state: GitHubAppState): Promise; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-types/hook.d.ts b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-types/hook.d.ts new file mode 100644 index 000000000..5d5b6df80 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-types/hook.d.ts @@ -0,0 +1,6 @@ +import type { EndpointOptions, OctokitResponse, RequestInterface, RequestParameters, Route } from "@octokit/types"; +import type { OAuthAppState, GitHubAppState } from "./types.js"; +type AnyResponse = OctokitResponse; +export declare function hook(state: OAuthAppState, request: RequestInterface, route: Route | EndpointOptions, parameters: RequestParameters): Promise; +export declare function hook(state: GitHubAppState, request: RequestInterface, route: Route | EndpointOptions, parameters: RequestParameters): Promise; +export {}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-types/index.d.ts b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-types/index.d.ts new file mode 100644 index 000000000..95358421c --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-types/index.d.ts @@ -0,0 +1,8 @@ +import type { OAuthAppStrategyOptions, GitHubAppStrategyOptions, OAuthAppAuthInterface, GitHubAppAuthInterface } from "./types.js"; +export type { OAuthAppStrategyOptionsWebFlow, GitHubAppStrategyOptionsWebFlow, OAuthAppStrategyOptionsDeviceFlow, GitHubAppStrategyOptionsDeviceFlow, OAuthAppStrategyOptionsExistingAuthentication, GitHubAppStrategyOptionsExistingAuthentication, GitHubAppStrategyOptionsExistingAuthenticationWithExpiration, OAuthAppStrategyOptions, GitHubAppStrategyOptions, OAuthAppAuthOptions, GitHubAppAuthOptions, OAuthAppAuthentication, GitHubAppAuthentication, GitHubAppAuthenticationWithExpiration, } from "./types.js"; +export { requiresBasicAuth } from "./requires-basic-auth.js"; +export declare function createOAuthUserAuth(options: OAuthAppStrategyOptions): OAuthAppAuthInterface; +export declare function createOAuthUserAuth(options: GitHubAppStrategyOptions): GitHubAppAuthInterface; +export declare namespace createOAuthUserAuth { + var VERSION: string; +} diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-types/requires-basic-auth.d.ts b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-types/requires-basic-auth.d.ts new file mode 100644 index 000000000..c7a90ea5d --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-types/requires-basic-auth.d.ts @@ -0,0 +1 @@ +export declare function requiresBasicAuth(url: string | undefined): boolean | "" | undefined; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-types/types.d.ts b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-types/types.d.ts new file mode 100644 index 000000000..045d4ad05 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-types/types.d.ts @@ -0,0 +1,114 @@ +import * as OctokitTypes from "@octokit/types"; +import * as DeviceTypes from "@octokit/auth-oauth-device"; +import * as OAuthMethodsTypes from "@octokit/oauth-methods"; +export type ClientType = "oauth-app" | "github-app"; +export type WebFlowOptions = { + code: string; + state?: string; + redirectUrl?: string; +}; +type CommonAppStrategyOptions = { + clientType?: ClientType; + clientId: string; + clientSecret: string; + request?: OctokitTypes.RequestInterface; + onTokenCreated?: OnTokenCreatedCallback; +}; +type CommonOAuthAppStrategyOptions = { + clientType?: "oauth-app"; +} & CommonAppStrategyOptions; +type CommonGitHubAppStrategyOptions = { + clientType?: "github-app"; +} & CommonAppStrategyOptions; +type OAuthAppDeviceFlowOptions = { + onVerification: DeviceTypes.OAuthAppStrategyOptions["onVerification"]; + scopes?: string[]; +}; +type GitHubDeviceFlowOptions = { + onVerification: DeviceTypes.OAuthAppStrategyOptions["onVerification"]; +}; +type ExistingOAuthAppAuthenticationOptions = { + clientType: "oauth-app"; + token: string; + scopes: string[]; +}; +type ExistingGitHubAppAuthenticationOptions = { + token: string; +}; +type ExistingGitHubAppAuthenticationWithExpirationOptions = { + token: string; + refreshToken: string; + expiresAt: string; + refreshTokenExpiresAt: string; +}; +export type OAuthAppStrategyOptionsWebFlow = CommonOAuthAppStrategyOptions & WebFlowOptions; +export type GitHubAppStrategyOptionsWebFlow = CommonGitHubAppStrategyOptions & WebFlowOptions; +export type OAuthAppStrategyOptionsDeviceFlow = CommonOAuthAppStrategyOptions & OAuthAppDeviceFlowOptions; +export type GitHubAppStrategyOptionsDeviceFlow = CommonGitHubAppStrategyOptions & GitHubDeviceFlowOptions; +export type OAuthAppStrategyOptionsExistingAuthentication = CommonOAuthAppStrategyOptions & ExistingOAuthAppAuthenticationOptions; +export type GitHubAppStrategyOptionsExistingAuthentication = CommonGitHubAppStrategyOptions & ExistingGitHubAppAuthenticationOptions; +export type GitHubAppStrategyOptionsExistingAuthenticationWithExpiration = CommonGitHubAppStrategyOptions & ExistingGitHubAppAuthenticationWithExpirationOptions; +export type OAuthAppStrategyOptions = OAuthAppStrategyOptionsWebFlow | OAuthAppStrategyOptionsDeviceFlow | OAuthAppStrategyOptionsExistingAuthentication; +export type GitHubAppStrategyOptions = GitHubAppStrategyOptionsWebFlow | GitHubAppStrategyOptionsDeviceFlow | GitHubAppStrategyOptionsExistingAuthentication | GitHubAppStrategyOptionsExistingAuthenticationWithExpiration; +export type OAuthAppAuthentication = { + tokenType: "oauth"; + type: "token"; +} & OAuthMethodsTypes.OAuthAppAuthentication; +export type GitHubAppAuthentication = { + tokenType: "oauth"; + type: "token"; +} & OAuthMethodsTypes.GitHubAppAuthentication; +export type GitHubAppAuthenticationWithExpiration = { + tokenType: "oauth"; + type: "token"; +} & OAuthMethodsTypes.GitHubAppAuthenticationWithExpiration; +export interface OAuthAppAuthInterface { + (options?: OAuthAppAuthOptions): Promise; + hook(request: OctokitTypes.RequestInterface, route: OctokitTypes.Route | OctokitTypes.EndpointOptions, parameters?: OctokitTypes.RequestParameters): Promise>; +} +export interface GitHubAppAuthInterface { + (options?: GitHubAppAuthOptions): Promise; + hook(request: OctokitTypes.RequestInterface, route: OctokitTypes.Route | OctokitTypes.EndpointOptions, parameters?: OctokitTypes.RequestParameters): Promise>; +} +type OnTokenCreatedCallback = (authentication: OAuthAppAuthentication | GitHubAppAuthentication | GitHubAppAuthenticationWithExpiration | undefined, options: OAuthAppAuthOptions | GitHubAppAuthOptions) => void | Promise; +export type OAuthAppState = { + clientId: string; + clientSecret: string; + clientType: "oauth-app"; + request: OctokitTypes.RequestInterface; + onTokenCreated?: CommonAppStrategyOptions["onTokenCreated"]; + strategyOptions: WebFlowOptions | OAuthAppDeviceFlowOptions | ExistingOAuthAppAuthenticationOptions; + authentication?: OAuthAppAuthentication & { + invalid?: true; + }; +}; +type GitHubAppStateAuthentication = GitHubAppAuthentication & { + invalid?: true; +}; +type GitHubAppStateAuthenticationWIthExpiration = GitHubAppAuthenticationWithExpiration & { + invalid?: true; +}; +export type GitHubAppState = { + clientId: string; + clientSecret: string; + clientType: "github-app"; + request: OctokitTypes.RequestInterface; + onTokenCreated?: CommonAppStrategyOptions["onTokenCreated"]; + strategyOptions: WebFlowOptions | GitHubDeviceFlowOptions | ExistingGitHubAppAuthenticationOptions | ExistingGitHubAppAuthenticationWithExpirationOptions; + authentication?: GitHubAppStateAuthentication | GitHubAppStateAuthenticationWIthExpiration; +}; +export type State = OAuthAppState | GitHubAppState; +export type WebFlowState = { + clientId: string; + clientSecret: string; + clientType: ClientType; + request: OctokitTypes.RequestInterface; + strategyOptions: WebFlowOptions; +}; +export type OAuthAppAuthOptions = { + type?: "get" | "check" | "reset" | "delete" | "deleteAuthorization"; +}; +export type GitHubAppAuthOptions = { + type?: "get" | "check" | "reset" | "refresh" | "delete" | "deleteAuthorization"; +}; +export {}; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-types/version.d.ts b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-types/version.d.ts new file mode 100644 index 000000000..04ceedfce --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-user/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "5.1.1"; diff --git a/.github/octokit/node_modules/@octokit/auth-oauth-user/package.json b/.github/octokit/node_modules/@octokit/auth-oauth-user/package.json new file mode 100644 index 000000000..8b8238b5a --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-oauth-user/package.json @@ -0,0 +1,57 @@ +{ + "name": "@octokit/auth-oauth-user", + "publishConfig": { + "access": "public", + "provenance": true + }, + "type": "module", + "version": "5.1.1", + "description": "Octokit authentication strategy for OAuth clients", + "repository": "https://github.com/octokit/auth-oauth-user.js", + "keywords": [ + "github", + "api", + "sdk", + "toolkit" + ], + "author": "Gregor Martynus (https://dev.to/gr2m)", + "license": "MIT", + "dependencies": { + "@octokit/auth-oauth-device": "^7.0.1", + "@octokit/oauth-methods": "^5.0.0", + "@octokit/request": "^9.0.1", + "@octokit/types": "^13.0.0", + "universal-user-agent": "^7.0.0" + }, + "devDependencies": { + "@octokit/core": "^6.0.1", + "@octokit/tsconfig": "^3.0.0", + "@types/jest": "^29.0.0", + "@types/node": "^20.0.0", + "esbuild": "^0.20.0", + "fetch-mock": "npm:@gr2m/fetch-mock@9.11.0-pull-request-644.1", + "glob": "^10.2.7", + "jest": "^29.0.0", + "mockdate": "^3.0.4", + "prettier": "3.2.5", + "semantic-release-plugin-update-version-in-files": "^1.1.0", + "ts-jest": "^29.0.0", + "typescript": "^5.0.0" + }, + "engines": { + "node": ">= 18" + }, + "files": [ + "dist-*/**", + "bin/**" + ], + "types": "./dist-types/index.d.ts", + "exports": { + ".": { + "types": "./dist-types/index.d.ts", + "import": "./dist-bundle/index.js", + "default": "./dist-bundle/index.js" + } + }, + "sideEffects": false +} diff --git a/.github/octokit/node_modules/@octokit/auth-token/LICENSE b/.github/octokit/node_modules/@octokit/auth-token/LICENSE new file mode 100644 index 000000000..ef2c18ee5 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-token/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2019 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.github/octokit/node_modules/@octokit/auth-token/README.md b/.github/octokit/node_modules/@octokit/auth-token/README.md new file mode 100644 index 000000000..f94e2f288 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-token/README.md @@ -0,0 +1,284 @@ +# auth-token.js + +> GitHub API token authentication for browsers and Node.js + +[![@latest](https://img.shields.io/npm/v/@octokit/auth-token.svg)](https://www.npmjs.com/package/@octokit/auth-token) +[![Build Status](https://github.com/octokit/auth-token.js/workflows/Test/badge.svg)](https://github.com/octokit/auth-token.js/actions?query=workflow%3ATest) + +`@octokit/auth-token` is the simplest of [GitHub’s authentication strategies](https://github.com/octokit/auth.js). + +It is useful if you want to support multiple authentication strategies, as it’s API is compatible with its sibling packages for [basic](https://github.com/octokit/auth-basic.js), [GitHub App](https://github.com/octokit/auth-app.js) and [OAuth app](https://github.com/octokit/auth.js) authentication. + + + +- [Usage](#usage) +- [`createTokenAuth(token) options`](#createtokenauthtoken-options) +- [`auth()`](#auth) +- [Authentication object](#authentication-object) +- [`auth.hook(request, route, options)` or `auth.hook(request, options)`](#authhookrequest-route-options-or-authhookrequest-options) +- [Find more information](#find-more-information) + - [Find out what scopes are enabled for oauth tokens](#find-out-what-scopes-are-enabled-for-oauth-tokens) + - [Find out if token is a personal access token or if it belongs to an OAuth app](#find-out-if-token-is-a-personal-access-token-or-if-it-belongs-to-an-oauth-app) + - [Find out what permissions are enabled for a repository](#find-out-what-permissions-are-enabled-for-a-repository) + - [Use token for git operations](#use-token-for-git-operations) +- [License](#license) + + + +## Usage + + + + + + +
+Browsers + + +Load `@octokit/auth-token` directly from [esm.sh](https://esm.sh) + +```html + +``` + +
+Node + + +Install with npm install @octokit/auth-token + +```js +import { createTokenAuth } from "@octokit/auth-token"; +``` + +
+ +```js +const auth = createTokenAuth("ghp_PersonalAccessToken01245678900000000"); +const authentication = await auth(); +// { +// type: 'token', +// token: 'ghp_PersonalAccessToken01245678900000000', +// tokenType: 'oauth' +// } +``` + +## `createTokenAuth(token) options` + +The `createTokenAuth` method accepts a single argument of type string, which is the token. The passed token can be one of the following: + +- [Personal access token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) +- [OAuth access token](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/) +- [GITHUB_TOKEN provided to GitHub Actions](https://developer.github.com/actions/creating-github-actions/accessing-the-runtime-environment/#environment-variables) +- Installation access token ([server-to-server](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation)) +- User authentication for installation ([user-to-server](https://docs.github.com/en/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps)) + +Examples + +```js +// Personal access token or OAuth access token +createTokenAuth("ghp_PersonalAccessToken01245678900000000"); +// { +// type: 'token', +// token: 'ghp_PersonalAccessToken01245678900000000', +// tokenType: 'oauth' +// } + +// Installation access token or GitHub Action token +createTokenAuth("ghs_InstallallationOrActionToken00000000"); +// { +// type: 'token', +// token: 'ghs_InstallallationOrActionToken00000000', +// tokenType: 'installation' +// } + +// Installation access token or GitHub Action token +createTokenAuth("ghu_InstallationUserToServer000000000000"); +// { +// type: 'token', +// token: 'ghu_InstallationUserToServer000000000000', +// tokenType: 'user-to-server' +// } +``` + +## `auth()` + +The `auth()` method has no options. It returns a promise which resolves with the the authentication object. + +## Authentication object + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ token + + string + + The provided token. +
+ tokenType + + string + + Can be either "oauth" for personal access tokens and OAuth tokens, "installation" for installation access tokens (includes GITHUB_TOKEN provided to GitHub Actions), "app" for a GitHub App JSON Web Token, or "user-to-server" for a user authentication token through an app installation. +
+ +## `auth.hook(request, route, options)` or `auth.hook(request, options)` + +`auth.hook()` hooks directly into the request life cycle. It authenticates the request using the provided token. + +The `request` option is an instance of [`@octokit/request`](https://github.com/octokit/request.js#readme). The `route`/`options` parameters are the same as for the [`request()` method](https://github.com/octokit/request.js#request). + +`auth.hook()` can be called directly to send an authenticated request + +```js +const { data: authorizations } = await auth.hook( + request, + "GET /authorizations", +); +``` + +Or it can be passed as option to [`request()`](https://github.com/octokit/request.js#request). + +```js +const requestWithAuth = request.defaults({ + request: { + hook: auth.hook, + }, +}); + +const { data: authorizations } = await requestWithAuth("GET /authorizations"); +``` + +## Find more information + +`auth()` does not send any requests, it only transforms the provided token string into an authentication object. + +Here is a list of things you can do to retrieve further information + +### Find out what scopes are enabled for oauth tokens + +Note that this does not work for installations. There is no way to retrieve permissions based on an installation access tokens. + +```js +const TOKEN = "ghp_PersonalAccessToken01245678900000000"; + +const auth = createTokenAuth(TOKEN); +const authentication = await auth(); + +const response = await request("HEAD /"); +const scopes = response.headers["x-oauth-scopes"].split(/,\s+/); + +if (scopes.length) { + console.log( + `"${TOKEN}" has ${scopes.length} scopes enabled: ${scopes.join(", ")}`, + ); +} else { + console.log(`"${TOKEN}" has no scopes enabled`); +} +``` + +### Find out if token is a personal access token or if it belongs to an OAuth app + +```js +const TOKEN = "ghp_PersonalAccessToken01245678900000000"; + +const auth = createTokenAuth(TOKEN); +const authentication = await auth(); + +const response = await request("HEAD /"); +const clientId = response.headers["x-oauth-client-id"]; + +if (clientId) { + console.log( + `"${token}" is an OAuth token, its app’s client_id is ${clientId}.`, + ); +} else { + console.log(`"${token}" is a personal access token`); +} +``` + +### Find out what permissions are enabled for a repository + +Note that the `permissions` key is not set when authenticated using an installation access token. + +```js +const TOKEN = "ghp_PersonalAccessToken01245678900000000"; + +const auth = createTokenAuth(TOKEN); +const authentication = await auth(); + +const response = await request("GET /repos/{owner}/{repo}", { + owner: "octocat", + repo: "hello-world", +}); + +console.log(response.data.permissions); +// { +// admin: true, +// push: true, +// pull: true +// } +``` + +### Use token for git operations + +Both OAuth and installation access tokens can be used for git operations. However, when using with an installation, [the token must be prefixed with `x-access-token`](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#http-based-git-access-by-an-installation). + +This example is using the [`execa`](https://github.com/sindresorhus/execa) package to run a `git push` command. + +```js +const TOKEN = "ghp_PersonalAccessToken01245678900000000"; + +const auth = createTokenAuth(TOKEN); +const { token, tokenType } = await auth(); +const tokenWithPrefix = + tokenType === "installation" ? `x-access-token:${token}` : token; + +const repositoryUrl = `https://${tokenWithPrefix}@github.com/octocat/hello-world.git`; + +const { stdout } = await execa("git", ["push", repositoryUrl]); +console.log(stdout); +``` + +## License + +[MIT](LICENSE) diff --git a/.github/octokit/node_modules/@octokit/auth-token/dist-bundle/index.js b/.github/octokit/node_modules/@octokit/auth-token/dist-bundle/index.js new file mode 100644 index 000000000..b6f7249c5 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-token/dist-bundle/index.js @@ -0,0 +1,52 @@ +// pkg/dist-src/auth.js +var REGEX_IS_INSTALLATION_LEGACY = /^v1\./; +var REGEX_IS_INSTALLATION = /^ghs_/; +var REGEX_IS_USER_TO_SERVER = /^ghu_/; +async function auth(token) { + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; + return { + type: "token", + token, + tokenType + }; +} + +// pkg/dist-src/with-authorization-prefix.js +function withAuthorizationPrefix(token) { + if (token.split(/\./).length === 3) { + return `bearer ${token}`; + } + return `token ${token}`; +} + +// pkg/dist-src/hook.js +async function hook(token, request, route, parameters) { + const endpoint = request.endpoint.merge( + route, + parameters + ); + endpoint.headers.authorization = withAuthorizationPrefix(token); + return request(endpoint); +} + +// pkg/dist-src/index.js +var createTokenAuth = function createTokenAuth2(token) { + if (!token) { + throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); + } + if (typeof token !== "string") { + throw new Error( + "[@octokit/auth-token] Token passed to createTokenAuth is not a string" + ); + } + token = token.replace(/^(token|bearer) +/i, ""); + return Object.assign(auth.bind(null, token), { + hook: hook.bind(null, token) + }); +}; +export { + createTokenAuth +}; diff --git a/.github/octokit/node_modules/@octokit/auth-token/dist-bundle/index.js.map b/.github/octokit/node_modules/@octokit/auth-token/dist-bundle/index.js.map new file mode 100644 index 000000000..a90dde5ce --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-token/dist-bundle/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../dist-src/auth.js", "../dist-src/with-authorization-prefix.js", "../dist-src/hook.js", "../dist-src/index.js"], + "sourcesContent": ["const REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nconst REGEX_IS_INSTALLATION = /^ghs_/;\nconst REGEX_IS_USER_TO_SERVER = /^ghu_/;\nasync function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp ? \"app\" : isInstallation ? \"installation\" : isUserToServer ? \"user-to-server\" : \"oauth\";\n return {\n type: \"token\",\n token,\n tokenType\n };\n}\nexport {\n auth\n};\n", "function withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n return `token ${token}`;\n}\nexport {\n withAuthorizationPrefix\n};\n", "import { withAuthorizationPrefix } from \"./with-authorization-prefix.js\";\nasync function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(\n route,\n parameters\n );\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\nexport {\n hook\n};\n", "import { auth } from \"./auth.js\";\nimport { hook } from \"./hook.js\";\nconst createTokenAuth = function createTokenAuth2(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n if (typeof token !== \"string\") {\n throw new Error(\n \"[@octokit/auth-token] Token passed to createTokenAuth is not a string\"\n );\n }\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token)\n });\n};\nexport {\n createTokenAuth\n};\n"], + "mappings": ";AAAA,IAAM,+BAA+B;AACrC,IAAM,wBAAwB;AAC9B,IAAM,0BAA0B;AAChC,eAAe,KAAK,OAAO;AACzB,QAAM,QAAQ,MAAM,MAAM,IAAI,EAAE,WAAW;AAC3C,QAAM,iBAAiB,6BAA6B,KAAK,KAAK,KAAK,sBAAsB,KAAK,KAAK;AACnG,QAAM,iBAAiB,wBAAwB,KAAK,KAAK;AACzD,QAAM,YAAY,QAAQ,QAAQ,iBAAiB,iBAAiB,iBAAiB,mBAAmB;AACxG,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA;AAAA,EACF;AACF;;;ACbA,SAAS,wBAAwB,OAAO;AACtC,MAAI,MAAM,MAAM,IAAI,EAAE,WAAW,GAAG;AAClC,WAAO,UAAU,KAAK;AAAA,EACxB;AACA,SAAO,SAAS,KAAK;AACvB;;;ACJA,eAAe,KAAK,OAAO,SAAS,OAAO,YAAY;AACrD,QAAM,WAAW,QAAQ,SAAS;AAAA,IAChC;AAAA,IACA;AAAA,EACF;AACA,WAAS,QAAQ,gBAAgB,wBAAwB,KAAK;AAC9D,SAAO,QAAQ,QAAQ;AACzB;;;ACNA,IAAM,kBAAkB,SAAS,iBAAiB,OAAO;AACvD,MAAI,CAAC,OAAO;AACV,UAAM,IAAI,MAAM,0DAA0D;AAAA,EAC5E;AACA,MAAI,OAAO,UAAU,UAAU;AAC7B,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,UAAQ,MAAM,QAAQ,sBAAsB,EAAE;AAC9C,SAAO,OAAO,OAAO,KAAK,KAAK,MAAM,KAAK,GAAG;AAAA,IAC3C,MAAM,KAAK,KAAK,MAAM,KAAK;AAAA,EAC7B,CAAC;AACH;", + "names": [] +} diff --git a/.github/octokit/node_modules/@octokit/auth-token/dist-src/auth.js b/.github/octokit/node_modules/@octokit/auth-token/dist-src/auth.js new file mode 100644 index 000000000..d3efbf5a7 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-token/dist-src/auth.js @@ -0,0 +1,17 @@ +const REGEX_IS_INSTALLATION_LEGACY = /^v1\./; +const REGEX_IS_INSTALLATION = /^ghs_/; +const REGEX_IS_USER_TO_SERVER = /^ghu_/; +async function auth(token) { + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; + return { + type: "token", + token, + tokenType + }; +} +export { + auth +}; diff --git a/.github/octokit/node_modules/@octokit/auth-token/dist-src/hook.js b/.github/octokit/node_modules/@octokit/auth-token/dist-src/hook.js new file mode 100644 index 000000000..be336adf5 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-token/dist-src/hook.js @@ -0,0 +1,12 @@ +import { withAuthorizationPrefix } from "./with-authorization-prefix.js"; +async function hook(token, request, route, parameters) { + const endpoint = request.endpoint.merge( + route, + parameters + ); + endpoint.headers.authorization = withAuthorizationPrefix(token); + return request(endpoint); +} +export { + hook +}; diff --git a/.github/octokit/node_modules/@octokit/auth-token/dist-src/index.js b/.github/octokit/node_modules/@octokit/auth-token/dist-src/index.js new file mode 100644 index 000000000..a68cea6ee --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-token/dist-src/index.js @@ -0,0 +1,19 @@ +import { auth } from "./auth.js"; +import { hook } from "./hook.js"; +const createTokenAuth = function createTokenAuth2(token) { + if (!token) { + throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); + } + if (typeof token !== "string") { + throw new Error( + "[@octokit/auth-token] Token passed to createTokenAuth is not a string" + ); + } + token = token.replace(/^(token|bearer) +/i, ""); + return Object.assign(auth.bind(null, token), { + hook: hook.bind(null, token) + }); +}; +export { + createTokenAuth +}; diff --git a/.github/octokit/node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js b/.github/octokit/node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js new file mode 100644 index 000000000..02a4bb5eb --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js @@ -0,0 +1,9 @@ +function withAuthorizationPrefix(token) { + if (token.split(/\./).length === 3) { + return `bearer ${token}`; + } + return `token ${token}`; +} +export { + withAuthorizationPrefix +}; diff --git a/.github/octokit/node_modules/@octokit/auth-token/dist-types/auth.d.ts b/.github/octokit/node_modules/@octokit/auth-token/dist-types/auth.d.ts new file mode 100644 index 000000000..63985288e --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-token/dist-types/auth.d.ts @@ -0,0 +1,2 @@ +import type { Token, Authentication } from "./types.js"; +export declare function auth(token: Token): Promise; diff --git a/.github/octokit/node_modules/@octokit/auth-token/dist-types/hook.d.ts b/.github/octokit/node_modules/@octokit/auth-token/dist-types/hook.d.ts new file mode 100644 index 000000000..cf969654b --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-token/dist-types/hook.d.ts @@ -0,0 +1,2 @@ +import type { AnyResponse, EndpointOptions, RequestInterface, RequestParameters, Route, Token } from "./types.js"; +export declare function hook(token: Token, request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise; diff --git a/.github/octokit/node_modules/@octokit/auth-token/dist-types/index.d.ts b/.github/octokit/node_modules/@octokit/auth-token/dist-types/index.d.ts new file mode 100644 index 000000000..9f8a318e9 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-token/dist-types/index.d.ts @@ -0,0 +1,7 @@ +import type { StrategyInterface, Token, Authentication } from "./types.js"; +export type Types = { + StrategyOptions: Token; + AuthOptions: never; + Authentication: Authentication; +}; +export declare const createTokenAuth: StrategyInterface; diff --git a/.github/octokit/node_modules/@octokit/auth-token/dist-types/types.d.ts b/.github/octokit/node_modules/@octokit/auth-token/dist-types/types.d.ts new file mode 100644 index 000000000..c3e1ae0ef --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-token/dist-types/types.d.ts @@ -0,0 +1,33 @@ +import type * as OctokitTypes from "@octokit/types"; +export type AnyResponse = OctokitTypes.OctokitResponse; +export type StrategyInterface = OctokitTypes.StrategyInterface<[ + Token +], [ +], Authentication>; +export type EndpointDefaults = OctokitTypes.EndpointDefaults; +export type EndpointOptions = OctokitTypes.EndpointOptions; +export type RequestParameters = OctokitTypes.RequestParameters; +export type RequestInterface = OctokitTypes.RequestInterface; +export type Route = OctokitTypes.Route; +export type Token = string; +export type OAuthTokenAuthentication = { + type: "token"; + tokenType: "oauth"; + token: Token; +}; +export type InstallationTokenAuthentication = { + type: "token"; + tokenType: "installation"; + token: Token; +}; +export type AppAuthentication = { + type: "token"; + tokenType: "app"; + token: Token; +}; +export type UserToServerAuthentication = { + type: "token"; + tokenType: "user-to-server"; + token: Token; +}; +export type Authentication = OAuthTokenAuthentication | InstallationTokenAuthentication | AppAuthentication | UserToServerAuthentication; diff --git a/.github/octokit/node_modules/@octokit/auth-token/dist-types/with-authorization-prefix.d.ts b/.github/octokit/node_modules/@octokit/auth-token/dist-types/with-authorization-prefix.d.ts new file mode 100644 index 000000000..2e52c31db --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-token/dist-types/with-authorization-prefix.d.ts @@ -0,0 +1,6 @@ +/** + * Prefix token for usage in the Authorization header + * + * @param token OAuth token or JSON Web Token + */ +export declare function withAuthorizationPrefix(token: string): string; diff --git a/.github/octokit/node_modules/@octokit/auth-token/package.json b/.github/octokit/node_modules/@octokit/auth-token/package.json new file mode 100644 index 000000000..3ce3b3951 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/auth-token/package.json @@ -0,0 +1,53 @@ +{ + "name": "@octokit/auth-token", + "publishConfig": { + "access": "public", + "provenance": true + }, + "type": "module", + "version": "5.1.1", + "description": "GitHub API token authentication for browsers and Node.js", + "repository": "github:octokit/auth-token.js", + "keywords": [ + "github", + "octokit", + "authentication", + "api" + ], + "author": "Gregor Martynus (https://github.com/gr2m)", + "license": "MIT", + "devDependencies": { + "@octokit/request": "^9.0.0", + "@octokit/tsconfig": "^3.0.0", + "@octokit/types": "^13.0.0", + "@types/fetch-mock": "^7.3.8", + "@types/jest": "^29.0.0", + "esbuild": "^0.20.0", + "fetch-mock": "npm:@gr2m/fetch-mock@9.11.0-pull-request-644.1", + "glob": "^10.2.6", + "jest": "^29.0.0", + "prettier": "3.2.5", + "semantic-release": "^23.0.0", + "ts-jest": "^29.1.0", + "typescript": "^5.3.0" + }, + "engines": { + "node": ">= 18" + }, + "files": [ + "dist-*/**", + "bin/**" + ], + "types": "./dist-types/index.d.ts", + "exports": { + ".": { + "types": "./dist-types/index.d.ts", + "import": "./dist-bundle/index.js", + "default": "./dist-bundle/index.js" + }, + "./types": { + "types": "./dist-types/index.d.ts" + } + }, + "sideEffects": false +} diff --git a/.github/octokit/node_modules/@octokit/core/LICENSE b/.github/octokit/node_modules/@octokit/core/LICENSE new file mode 100644 index 000000000..ef2c18ee5 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/core/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2019 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.github/octokit/node_modules/@octokit/core/README.md b/.github/octokit/node_modules/@octokit/core/README.md new file mode 100644 index 000000000..ed4c07002 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/core/README.md @@ -0,0 +1,457 @@ +# core.js + +> Extendable client for GitHub's REST & GraphQL APIs + +[![@latest](https://img.shields.io/npm/v/@octokit/core.svg)](https://www.npmjs.com/package/@octokit/core) +[![Build Status](https://github.com/octokit/core.js/workflows/Test/badge.svg)](https://github.com/octokit/core.js/actions?query=workflow%3ATest+branch%3Amain) + + + +- [Usage](#usage) + - [REST API example](#rest-api-example) + - [GraphQL example](#graphql-example) +- [Options](#options) +- [Defaults](#defaults) +- [Authentication](#authentication) +- [Logging](#logging) +- [Hooks](#hooks) +- [Plugins](#plugins) +- [Build your own Octokit with Plugins and Defaults](#build-your-own-octokit-with-plugins-and-defaults) +- [LICENSE](#license) + + + +If you need a minimalistic library to utilize GitHub's [REST API](https://developer.github.com/v3/) and [GraphQL API](https://developer.github.com/v4/) which you can extend with plugins as needed, then `@octokit/core` is a great starting point. + +If you don't need the Plugin API then using [`@octokit/request`](https://github.com/octokit/request.js/) or [`@octokit/graphql`](https://github.com/octokit/graphql.js/) directly is a good alternative. + +## Usage + + + + + + +
+Browsers + +Load @octokit/core directly from esm.sh + +```html + +``` + +
+Node + + +Install with npm install @octokit/core + +```js +import { Octokit } from "@octokit/core"; +``` + +
+ +As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json`. See the TypeScript docs on [package.json "exports"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports). + +### REST API example + +```js +// Create a personal access token at https://github.com/settings/tokens/new?scopes=repo +const octokit = new Octokit({ auth: `personal-access-token123` }); + +const response = await octokit.request("GET /orgs/{org}/repos", { + org: "octokit", + type: "private", +}); +``` + +See [`@octokit/request`](https://github.com/octokit/request.js) for full documentation of the `.request` method. + +### GraphQL example + +```js +const octokit = new Octokit({ auth: `secret123` }); + +const response = await octokit.graphql( + `query ($login: String!) { + organization(login: $login) { + repositories(privacy: PRIVATE) { + totalCount + } + } + }`, + { login: "octokit" }, +); +``` + +See [`@octokit/graphql`](https://github.com/octokit/graphql.js) for full documentation of the `.graphql` method. + +## Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ options.authStrategy + + Function + + Defaults to @octokit/auth-token. See Authentication below for examples. +
+ options.auth + + String or Object + + See Authentication below for examples. +
+ options.baseUrl + + String + + +When using with GitHub Enterprise Server, set `options.baseUrl` to the root URL of the API. For example, if your GitHub Enterprise Server's hostname is `github.acme-inc.com`, then set `options.baseUrl` to `https://github.acme-inc.com/api/v3`. Example + +```js +const octokit = new Octokit({ + baseUrl: "https://github.acme-inc.com/api/v3", +}); +``` + +
+ options.previews + + Array of Strings + + +Some REST API endpoints require preview headers to be set, or enable +additional features. Preview headers can be set on a per-request basis, e.g. + +```js +octokit.request("POST /repos/{owner}/{repo}/pulls", { + mediaType: { + previews: ["shadow-cat"], + }, + owner, + repo, + title: "My pull request", + base: "main", + head: "my-feature", + draft: true, +}); +``` + +You can also set previews globally, by setting the `options.previews` option on the constructor. Example: + +```js +const octokit = new Octokit({ + previews: ["shadow-cat"], +}); +``` + +
+ options.request + + Object + + +Set a default request timeout (`options.request.timeout`) or an [`http(s).Agent`](https://nodejs.org/api/http.html#http_class_http_agent) e.g. for proxy usage (Node only, `options.request.agent`). + +There are more `options.request.*` options, see [`@octokit/request` options](https://github.com/octokit/request.js#request). `options.request` can also be set on a per-request basis. + +
+ options.timeZone + + String + + +Sets the `Time-Zone` header which defines a timezone according to the [list of names from the Olson database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + +```js +const octokit = new Octokit({ + timeZone: "America/Los_Angeles", +}); +``` + +The time zone header will determine the timezone used for generating the timestamp when creating commits. See [GitHub's Timezones documentation](https://developer.github.com/v3/#timezones). + +
+ options.userAgent + + String + + +A custom user agent string for your app or library. Example + +```js +const octokit = new Octokit({ + userAgent: "my-app/v1.2.3", +}); +``` + +
+ +## Defaults + +You can create a new Octokit class with customized default options. + +```js +const MyOctokit = Octokit.defaults({ + auth: "personal-access-token123", + baseUrl: "https://github.acme-inc.com/api/v3", + userAgent: "my-app/v1.2.3", +}); +const octokit1 = new MyOctokit(); +const octokit2 = new MyOctokit(); +``` + +If you pass additional options to your new constructor, the options will be merged shallowly. + +```js +const MyOctokit = Octokit.defaults({ + foo: { + opt1: 1, + }, +}); +const octokit = new MyOctokit({ + foo: { + opt2: 1, + }, +}); +// options will be { foo: { opt2: 1 }} +``` + +If you need a deep or conditional merge, you can pass a function instead. + +```js +const MyOctokit = Octokit.defaults((options) => { + return { + foo: Object.assign({}, options.foo, { opt1: 1 }), + }; +}); +const octokit = new MyOctokit({ + foo: { opt2: 1 }, +}); +// options will be { foo: { opt1: 1, opt2: 1 }} +``` + +Be careful about mutating the `options` object in the `Octokit.defaults` callback, as it can have unforeseen consequences. + +## Authentication + +Authentication is optional for some REST API endpoints accessing public data, but is required for GraphQL queries. Using authentication also increases your [API rate limit](https://developer.github.com/v3/#rate-limiting). + +By default, Octokit authenticates using the [token authentication strategy](https://github.com/octokit/auth-token.js). Pass in a token using `options.auth`. It can be a personal access token, an OAuth token, an installation access token or a JSON Web Token for GitHub App authentication. The `Authorization` header will be set according to the type of token. + +```js +import { Octokit } from "@octokit/core"; + +const octokit = new Octokit({ + auth: "mypersonalaccesstoken123", +}); + +const { data } = await octokit.request("/user"); +``` + +To use a different authentication strategy, set `options.authStrategy`. A list of authentication strategies is available at [octokit/authentication-strategies.js](https://github.com/octokit/authentication-strategies.js/#readme). + +Example + +```js +import { Octokit } from "@octokit/core"; +import { createAppAuth } from "@octokit/auth-app"; + +const appOctokit = new Octokit({ + authStrategy: createAppAuth, + auth: { + appId: 123, + privateKey: process.env.PRIVATE_KEY, + }, +}); + +const { data } = await appOctokit.request("/app"); +``` + +The `.auth()` method returned by the current authentication strategy can be accessed at `octokit.auth()`. Example + +```js +const { token } = await appOctokit.auth({ + type: "installation", + installationId: 123, +}); +``` + +## Logging + +There are four built-in log methods + +1. `octokit.log.debug(message[, additionalInfo])` +1. `octokit.log.info(message[, additionalInfo])` +1. `octokit.log.warn(message[, additionalInfo])` +1. `octokit.log.error(message[, additionalInfo])` + +They can be configured using the [`log` client option](client-options). By default, `octokit.log.debug()` and `octokit.log.info()` are no-ops, while the other two call `console.warn()` and `console.error()` respectively. + +This is useful if you build reusable [plugins](#plugins). + +If you would like to make the log level configurable using an environment variable or external option, we recommend the [console-log-level](https://github.com/watson/console-log-level) package. Example + +```js +import consoleLogLevel from "console-log-level"; +const octokit = new Octokit({ + log: consoleLogLevel({ level: "info" }), +}); +``` + +## Hooks + +You can customize Octokit's request lifecycle with hooks. + +```js +octokit.hook.before("request", async (options) => { + validate(options); +}); +octokit.hook.after("request", async (response, options) => { + console.log(`${options.method} ${options.url}: ${response.status}`); +}); +octokit.hook.error("request", async (error, options) => { + if (error.status === 304) { + return findInCache(error.response.headers.etag); + } + + throw error; +}); +octokit.hook.wrap("request", async (request, options) => { + // add logic before, after, catch errors or replace the request altogether + return request(options); +}); +``` + +See [before-after-hook](https://github.com/gr2m/before-after-hook#readme) for more documentation on hooks. + +## Plugins + +Octokit’s functionality can be extended using plugins. The `Octokit.plugin()` method accepts a plugin (or many) and returns a new constructor. + +A plugin is a function which gets two arguments: + +1. the current instance +2. the options passed to the constructor. + +In order to extend `octokit`'s API, the plugin must return an object with the new methods. Please refrain from adding methods directly to the `octokit` instance, especialy if you depend on keys that do not exist in `@octokit/core`, such as `octokit.rest`. + +```js +// index.js +import { Octokit } from "@octokit/core"; +import myPlugin from "./lib/my-plugin.js"; +import octokitPluginExample from "octokit-plugin-example"; +const MyOctokit = Octokit.plugin( + myPlugin, + octokitPluginExample +); + +const octokit = new MyOctokit({ greeting: "Moin moin" }); +octokit.helloWorld(); // logs "Moin moin, world!" +octokit.request("GET /"); // logs "GET / - 200 in 123ms" + +// lib/my-plugin.js +const plugin = (octokit, options = { greeting: "Hello" }) => { + // hook into the request lifecycle + octokit.hook.wrap("request", async (request, options) => { + const time = Date.now(); + const response = await request(options); + console.log( + `${options.method} ${options.url} – ${response.status} in ${Date.now() - + time}ms` + ); + return response; + }); + + // add a custom method + return { + helloWorld: () => console.log(`${options.greeting}, world!`); + } +}; +export default plugin; +``` + +## Build your own Octokit with Plugins and Defaults + +You can build your own Octokit class with preset default options and plugins. In fact, this is mostly how the `@octokit/` modules work, such as [`@octokit/action`](https://github.com/octokit/action.js): + +```js +import { Octokit } from "@octokit/core"; +import { paginateRest } from "@octokit/plugin-paginate-rest"; +import { throttling } from "@octokit/plugin-throttling"; +import { retry } from "@octokit/plugin-retry"; +import { createActionAuth } from "@octokit/auth-action"; +const MyActionOctokit = Octokit.plugin( + paginateRest, + throttling, + retry, +).defaults({ + throttle: { + onAbuseLimit: (retryAfter, options) => { + /* ... */ + }, + onRateLimit: (retryAfter, options) => { + /* ... */ + }, + }, + authStrategy: createActionAuth, + userAgent: `my-octokit-action/v1.2.3`, +}); + +const octokit = new MyActionOctokit(); +const installations = await octokit.paginate("GET /app/installations"); +``` + +## LICENSE + +[MIT](LICENSE) diff --git a/.github/octokit/node_modules/@octokit/core/dist-src/index.js b/.github/octokit/node_modules/@octokit/core/dist-src/index.js new file mode 100644 index 000000000..1f48266d9 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/core/dist-src/index.js @@ -0,0 +1,134 @@ +import { getUserAgent } from "universal-user-agent"; +import Hook from "before-after-hook"; +import { request } from "@octokit/request"; +import { withCustomRequest } from "@octokit/graphql"; +import { createTokenAuth } from "@octokit/auth-token"; +import { VERSION } from "./version.js"; +const noop = () => { +}; +const consoleWarn = console.warn.bind(console); +const consoleError = console.error.bind(console); +const userAgentTrail = `octokit-core.js/${VERSION} ${getUserAgent()}`; +class Octokit { + static VERSION = VERSION; + static defaults(defaults) { + const OctokitWithDefaults = class extends this { + constructor(...args) { + const options = args[0] || {}; + if (typeof defaults === "function") { + super(defaults(options)); + return; + } + super( + Object.assign( + {}, + defaults, + options, + options.userAgent && defaults.userAgent ? { + userAgent: `${options.userAgent} ${defaults.userAgent}` + } : null + ) + ); + } + }; + return OctokitWithDefaults; + } + static plugins = []; + /** + * Attach a plugin (or many) to your Octokit instance. + * + * @example + * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) + */ + static plugin(...newPlugins) { + const currentPlugins = this.plugins; + const NewOctokit = class extends this { + static plugins = currentPlugins.concat( + newPlugins.filter((plugin) => !currentPlugins.includes(plugin)) + ); + }; + return NewOctokit; + } + constructor(options = {}) { + const hook = new Hook.Collection(); + const requestDefaults = { + baseUrl: request.endpoint.DEFAULTS.baseUrl, + headers: {}, + request: Object.assign({}, options.request, { + // @ts-ignore internal usage only, no need to type + hook: hook.bind(null, "request") + }), + mediaType: { + previews: [], + format: "" + } + }; + requestDefaults.headers["user-agent"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail; + if (options.baseUrl) { + requestDefaults.baseUrl = options.baseUrl; + } + if (options.previews) { + requestDefaults.mediaType.previews = options.previews; + } + if (options.timeZone) { + requestDefaults.headers["time-zone"] = options.timeZone; + } + this.request = request.defaults(requestDefaults); + this.graphql = withCustomRequest(this.request).defaults(requestDefaults); + this.log = Object.assign( + { + debug: noop, + info: noop, + warn: consoleWarn, + error: consoleError + }, + options.log + ); + this.hook = hook; + if (!options.authStrategy) { + if (!options.auth) { + this.auth = async () => ({ + type: "unauthenticated" + }); + } else { + const auth = createTokenAuth(options.auth); + hook.wrap("request", auth.hook); + this.auth = auth; + } + } else { + const { authStrategy, ...otherOptions } = options; + const auth = authStrategy( + Object.assign( + { + request: this.request, + log: this.log, + // we pass the current octokit instance as well as its constructor options + // to allow for authentication strategies that return a new octokit instance + // that shares the same internal state as the current one. The original + // requirement for this was the "event-octokit" authentication strategy + // of https://github.com/probot/octokit-auth-probot. + octokit: this, + octokitOptions: otherOptions + }, + options.auth + ) + ); + hook.wrap("request", auth.hook); + this.auth = auth; + } + const classConstructor = this.constructor; + for (let i = 0; i < classConstructor.plugins.length; ++i) { + Object.assign(this, classConstructor.plugins[i](this, options)); + } + } + // assigned during constructor + request; + graphql; + log; + hook; + // TODO: type `octokit.auth` based on passed options.authStrategy + auth; +} +export { + Octokit +}; diff --git a/.github/octokit/node_modules/@octokit/core/dist-src/version.js b/.github/octokit/node_modules/@octokit/core/dist-src/version.js new file mode 100644 index 000000000..e33ac3a10 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/core/dist-src/version.js @@ -0,0 +1,4 @@ +const VERSION = "6.1.2"; +export { + VERSION +}; diff --git a/.github/octokit/node_modules/@octokit/core/dist-types/index.d.ts b/.github/octokit/node_modules/@octokit/core/dist-types/index.d.ts new file mode 100644 index 000000000..3f7a1da3e --- /dev/null +++ b/.github/octokit/node_modules/@octokit/core/dist-types/index.d.ts @@ -0,0 +1,31 @@ +import type { HookCollection } from "before-after-hook"; +import { request } from "@octokit/request"; +import { type graphql } from "@octokit/graphql"; +import type { Constructor, Hooks, OctokitOptions, OctokitPlugin, ReturnTypeOf, UnionToIntersection } from "./types.js"; +export type { OctokitOptions } from "./types.js"; +export declare class Octokit { + static VERSION: string; + static defaults>(this: S, defaults: OctokitOptions | Function): S; + static plugins: OctokitPlugin[]; + /** + * Attach a plugin (or many) to your Octokit instance. + * + * @example + * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) + */ + static plugin & { + plugins: any[]; + }, T extends OctokitPlugin[]>(this: S, ...newPlugins: T): S & Constructor>>; + constructor(options?: OctokitOptions); + request: typeof request; + graphql: typeof graphql; + log: { + debug: (message: string, additionalInfo?: object) => any; + info: (message: string, additionalInfo?: object) => any; + warn: (message: string, additionalInfo?: object) => any; + error: (message: string, additionalInfo?: object) => any; + [key: string]: any; + }; + hook: HookCollection; + auth: (...args: unknown[]) => Promise; +} diff --git a/.github/octokit/node_modules/@octokit/core/dist-types/types.d.ts b/.github/octokit/node_modules/@octokit/core/dist-types/types.d.ts new file mode 100644 index 000000000..3f8f09b42 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/core/dist-types/types.d.ts @@ -0,0 +1,44 @@ +import * as OctokitTypes from "@octokit/types"; +import { RequestError } from "@octokit/request-error"; +import type { Octokit } from "./index.js"; +export type RequestParameters = OctokitTypes.RequestParameters; +export interface OctokitOptions { + authStrategy?: any; + auth?: any; + userAgent?: string; + previews?: string[]; + baseUrl?: string; + log?: { + debug: (message: string) => unknown; + info: (message: string) => unknown; + warn: (message: string) => unknown; + error: (message: string) => unknown; + }; + request?: OctokitTypes.RequestRequestOptions; + timeZone?: string; + [option: string]: any; +} +export type Constructor = new (...args: any[]) => T; +export type ReturnTypeOf = T extends AnyFunction ? ReturnType : T extends AnyFunction[] ? UnionToIntersection, void>> : never; +/** + * @author https://stackoverflow.com/users/2887218/jcalz + * @see https://stackoverflow.com/a/50375286/10325032 + */ +export type UnionToIntersection = (Union extends any ? (argument: Union) => void : never) extends (argument: infer Intersection) => void ? Intersection : never; +type AnyFunction = (...args: any) => any; +export type OctokitPlugin = (octokit: Octokit, options: OctokitOptions) => { + [key: string]: any; +} | void; +export type Hooks = { + request: { + Options: Required; + Result: OctokitTypes.OctokitResponse; + Error: RequestError | Error; + }; + [key: string]: { + Options: unknown; + Result: unknown; + Error: unknown; + }; +}; +export {}; diff --git a/.github/octokit/node_modules/@octokit/core/dist-types/version.d.ts b/.github/octokit/node_modules/@octokit/core/dist-types/version.d.ts new file mode 100644 index 000000000..4cd7ce6f3 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/core/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "6.1.2"; diff --git a/.github/octokit/node_modules/@octokit/core/package.json b/.github/octokit/node_modules/@octokit/core/package.json new file mode 100644 index 000000000..071caff90 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/core/package.json @@ -0,0 +1,72 @@ +{ + "name": "@octokit/core", + "version": "6.1.2", + "publishConfig": { + "access": "public", + "provenance": true + }, + "type": "module", + "description": "Extendable client for GitHub's REST & GraphQL APIs", + "repository": "github:octokit/core.js", + "keywords": [ + "octokit", + "github", + "api", + "sdk", + "toolkit" + ], + "author": "Gregor Martynus (https://github.com/gr2m)", + "license": "MIT", + "dependencies": { + "@octokit/auth-token": "^5.0.0", + "@octokit/graphql": "^8.0.0", + "@octokit/request": "^9.0.0", + "@octokit/request-error": "^6.0.1", + "@octokit/types": "^13.0.0", + "before-after-hook": "^3.0.2", + "universal-user-agent": "^7.0.0" + }, + "devDependencies": { + "@octokit/auth-action": "^5.0.0", + "@octokit/auth-app": "^6.0.0", + "@octokit/auth-oauth-app": "^8.0.0", + "@octokit/tsconfig": "^3.0.0", + "@sinonjs/fake-timers": "^11.2.2", + "@types/fetch-mock": "^7.3.8", + "@types/jest": "^29.0.0", + "@types/lolex": "^5.1.0", + "@types/node": "^20.0.0", + "@types/sinonjs__fake-timers": "^8.1.5", + "esbuild": "^0.20.0", + "fetch-mock": "npm:@gr2m/fetch-mock@9.11.0-pull-request-644.1", + "glob": "^10.2.5", + "http-proxy-agent": "^7.0.0", + "jest": "^29.0.0", + "prettier": "3.2.5", + "proxy": "^2.0.0", + "semantic-release": "^23.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^29.0.0", + "typescript": "^5.0.0", + "undici": "^6.0.0" + }, + "engines": { + "node": ">= 18" + }, + "files": [ + "dist-*/**", + "bin/**" + ], + "types": "./dist-types/index.d.ts", + "exports": { + ".": { + "types": "./dist-types/index.d.ts", + "import": "./dist-src/index.js", + "default": "./dist-src/index.js" + }, + "./types": { + "types": "./dist-types/types.d.ts" + } + }, + "sideEffects": false +} diff --git a/.github/octokit/node_modules/@octokit/endpoint/LICENSE b/.github/octokit/node_modules/@octokit/endpoint/LICENSE new file mode 100644 index 000000000..af5366d0d --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2018 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.github/octokit/node_modules/@octokit/endpoint/README.md b/.github/octokit/node_modules/@octokit/endpoint/README.md new file mode 100644 index 000000000..164f60d1e --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/README.md @@ -0,0 +1,412 @@ +# endpoint.js + +> Turns GitHub REST API endpoints into generic request options + +[![@latest](https://img.shields.io/npm/v/@octokit/endpoint.svg)](https://www.npmjs.com/package/@octokit/endpoint) +[![Build Status](https://github.com/octokit/endpoint.js/workflows/Test/badge.svg)](https://github.com/octokit/endpoint.js/actions/workflows/test.yml?query=branch%3Amain) + +`@octokit/endpoint` combines [GitHub REST API routes](https://developer.github.com/v3/) with your parameters and turns them into generic request options that can be used in any request library. + + + + + +- [Usage](#usage) +- [API](#api) + - [`endpoint(route, options)` or `endpoint(options)`](#endpointroute-options-or-endpointoptions) + - [`endpoint.defaults()`](#endpointdefaults) + - [`endpoint.DEFAULTS`](#endpointdefaults) + - [`endpoint.merge(route, options)` or `endpoint.merge(options)`](#endpointmergeroute-options-or-endpointmergeoptions) + - [`endpoint.parse()`](#endpointparse) +- [Special cases](#special-cases) + - [The `data` parameter – set request body directly](#the-data-parameter-%E2%80%93-set-request-body-directly) + - [Set parameters for both the URL/query and the request body](#set-parameters-for-both-the-urlquery-and-the-request-body) +- [LICENSE](#license) + + + +## Usage + + + + + + +
+Browsers + +Load @octokit/endpoint directly from esm.sh + +```html + +``` + +
+Node + + +Install with npm install @octokit/endpoint + +```js +import { endpoint } from "@octokit/endpoint"; +``` + +
+ +Example for [List organization repositories](https://developer.github.com/v3/repos/#list-organization-repositories) + +```js +const requestOptions = endpoint("GET /orgs/{org}/repos", { + headers: { + authorization: "token 0000000000000000000000000000000000000001", + }, + org: "octokit", + type: "private", +}); +``` + +The resulting `requestOptions` looks as follows + +```json +{ + "method": "GET", + "url": "https://api.github.com/orgs/octokit/repos?type=private", + "headers": { + "accept": "application/vnd.github.v3+json", + "authorization": "token 0000000000000000000000000000000000000001", + "user-agent": "octokit/endpoint.js v1.2.3" + } +} +``` + +You can pass `requestOptions` to common request libraries + +```js +const { url, ...options } = requestOptions; +// using with fetch (https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) +fetch(url, options); +// using with request (https://github.com/request/request) +request(requestOptions); +// using with got (https://github.com/sindresorhus/got) +got[options.method](url, options); +// using with axios +axios(requestOptions); +``` + +> [!IMPORTANT] +> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json`. See the TypeScript docs on [package.json "exports"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports). + +## API + +### `endpoint(route, options)` or `endpoint(options)` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ route + + String + + If set, it has to be a string consisting of URL and the request method, e.g., GET /orgs/{org}. If it’s set to a URL, only the method defaults to GET. +
+ options.method + + String + + Required unless route is set. Any supported http verb. Defaults to GET. +
+ options.url + + String + + Required unless route is set. A path or full URL which may contain :variable or {variable} placeholders, + e.g., /orgs/{org}/repos. The url is parsed using url-template. +
+ options.baseUrl + + String + + Defaults to https://api.github.com. +
+ options.headers + + Object + + Custom headers. Passed headers are merged with defaults:
+ headers['user-agent'] defaults to octokit-endpoint.js/1.2.3 (where 1.2.3 is the released version).
+ headers['accept'] defaults to application/vnd.github.v3+json.
+
+ options.mediaType.format + + String + + Media type param, such as raw, diff, or text+json. See Media Types. Setting options.mediaType.format will amend the headers.accept value. +
+ options.data + + Any + + Set request body directly instead of setting it to JSON based on additional parameters. See "The data parameter" below. +
+ options.request + + Object + + Pass custom meta information for the request. The request object will be returned as is. +
+ +All other options will be passed depending on the `method` and `url` options. + +1. If the option key has a placeholder in the `url`, it will be used as the replacement. For example, if the passed options are `{url: '/orgs/{org}/repos', org: 'foo'}` the returned `options.url` is `https://api.github.com/orgs/foo/repos`. +2. If the `method` is `GET` or `HEAD`, the option is passed as a query parameter. +3. Otherwise, the parameter is passed in the request body as a JSON key. + +**Result** + +`endpoint()` is a synchronous method and returns an object with the following keys: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ key + + type + + description +
methodStringThe http method. Always lowercase.
urlStringThe url with placeholders replaced with passed parameters.
headersObjectAll header names are lowercased.
bodyAnyThe request body if one is present. Only for PATCH, POST, PUT, DELETE requests.
requestObjectRequest meta option, it will be returned as it was passed into endpoint()
+ +### `endpoint.defaults()` + +Override or set default options. Example: + +```js +const request = require("request"); +const myEndpoint = require("@octokit/endpoint").defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", + headers: { + "user-agent": "myApp/1.2.3", + authorization: `token 0000000000000000000000000000000000000001`, + }, + org: "my-project", + per_page: 100, +}); + +request(myEndpoint(`GET /orgs/{org}/repos`)); +``` + +You can call `.defaults()` again on the returned method, the defaults will cascade. + +```js +const myProjectEndpoint = endpoint.defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", + headers: { + "user-agent": "myApp/1.2.3", + }, + org: "my-project", +}); +const myProjectEndpointWithAuth = myProjectEndpoint.defaults({ + headers: { + authorization: `token 0000000000000000000000000000000000000001`, + }, +}); +``` + +`myProjectEndpointWithAuth` now defaults the `baseUrl`, `headers['user-agent']`, +`org` and `headers['authorization']` on top of `headers['accept']` that is set +by the global default. + +### `endpoint.DEFAULTS` + +The current default options. + +```js +endpoint.DEFAULTS.baseUrl; // https://api.github.com +const myEndpoint = endpoint.defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", +}); +myEndpoint.DEFAULTS.baseUrl; // https://github-enterprise.acme-inc.com/api/v3 +``` + +### `endpoint.merge(route, options)` or `endpoint.merge(options)` + +Get the defaulted endpoint options, but without parsing them into request options: + +```js +const myProjectEndpoint = endpoint.defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", + headers: { + "user-agent": "myApp/1.2.3", + }, + org: "my-project", +}); +myProjectEndpoint.merge("GET /orgs/{org}/repos", { + headers: { + authorization: `token 0000000000000000000000000000000000000001`, + }, + org: "my-secret-project", + type: "private", +}); + +// { +// baseUrl: 'https://github-enterprise.acme-inc.com/api/v3', +// method: 'GET', +// url: '/orgs/{org}/repos', +// headers: { +// accept: 'application/vnd.github.v3+json', +// authorization: `token 0000000000000000000000000000000000000001`, +// 'user-agent': 'myApp/1.2.3' +// }, +// org: 'my-secret-project', +// type: 'private' +// } +``` + +### `endpoint.parse()` + +Stateless method to turn endpoint options into request options. Calling +`endpoint(options)` is the same as calling `endpoint.parse(endpoint.merge(options))`. + +## Special cases + + + +### The `data` parameter – set request body directly + +Some endpoints such as [Render a Markdown document in raw mode](https://developer.github.com/v3/markdown/#render-a-markdown-document-in-raw-mode) don’t have parameters that are sent as request body keys, instead, the request body needs to be set directly. In these cases, set the `data` parameter. + +```js +const options = endpoint("POST /markdown/raw", { + data: "Hello world github/linguist#1 **cool**, and #1!", + headers: { + accept: "text/html;charset=utf-8", + "content-type": "text/plain", + }, +}); + +// options is +// { +// method: 'post', +// url: 'https://api.github.com/markdown/raw', +// headers: { +// accept: 'text/html;charset=utf-8', +// 'content-type': 'text/plain', +// 'user-agent': userAgent +// }, +// body: 'Hello world github/linguist#1 **cool**, and #1!' +// } +``` + +### Set parameters for both the URL/query and the request body + +There are API endpoints that accept both query parameters as well as a body. In that case, you need to add the query parameters as templates to `options.url`, as defined in the [RFC 6570 URI Template specification](https://tools.ietf.org/html/rfc6570). + +Example + +```js +endpoint( + "POST https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}", + { + name: "example.zip", + label: "short description", + headers: { + "content-type": "text/plain", + "content-length": 14, + authorization: `token 0000000000000000000000000000000000000001`, + }, + data: "Hello, world!", + }, +); +``` + +## LICENSE + +[MIT](LICENSE) diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-bundle/index.js b/.github/octokit/node_modules/@octokit/endpoint/dist-bundle/index.js new file mode 100644 index 000000000..96ef49422 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-bundle/index.js @@ -0,0 +1,351 @@ +// pkg/dist-src/defaults.js +import { getUserAgent } from "universal-user-agent"; + +// pkg/dist-src/version.js +var VERSION = "0.0.0-development"; + +// pkg/dist-src/defaults.js +var userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; +var DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "" + } +}; + +// pkg/dist-src/util/lowercase-keys.js +function lowercaseKeys(object) { + if (!object) { + return {}; + } + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); +} + +// pkg/dist-src/util/is-plain-object.js +function isPlainObject(value) { + if (typeof value !== "object" || value === null) + return false; + if (Object.prototype.toString.call(value) !== "[object Object]") + return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) + return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); +} + +// pkg/dist-src/util/merge-deep.js +function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach((key) => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); + } else { + Object.assign(result, { [key]: options[key] }); + } + }); + return result; +} + +// pkg/dist-src/util/remove-undefined-properties.js +function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === void 0) { + delete obj[key]; + } + } + return obj; +} + +// pkg/dist-src/merge.js +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { method, url } : { url: method }, options); + } else { + options = Object.assign({}, route); + } + options.headers = lowercaseKeys(options.headers); + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + if (options.url === "/graphql") { + if (defaults && defaults.mediaType.previews?.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews.filter( + (preview) => !mergedOptions.mediaType.previews.includes(preview) + ).concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); + } + return mergedOptions; +} + +// pkg/dist-src/util/add-query-parameters.js +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url; + } + return url + separator + names.map((name) => { + if (name === "q") { + return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); + } + return `${name}=${encodeURIComponent(parameters[name])}`; + }).join("&"); +} + +// pkg/dist-src/util/extract-url-variable-names.js +var urlVariableRegex = /\{[^}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} +function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + if (!matches) { + return []; + } + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} + +// pkg/dist-src/util/omit.js +function omit(object, keysToOmit) { + const result = { __proto__: null }; + for (const key of Object.keys(object)) { + if (keysToOmit.indexOf(key) === -1) { + result[key] = object[key]; + } + } + return result; +} + +// pkg/dist-src/util/url-template.js +function encodeReserved(str) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }).join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } else { + return value; + } +} +function isDefined(value) { + return value !== void 0 && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push( + encodeValue(operator, value, isKeyOperator(operator) ? key : "") + ); + } else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function(value2) { + result.push( + encodeValue(operator, value2, isKeyOperator(operator) ? key : "") + ); + }); + } else { + Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function(value2) { + tmp.push(encodeValue(operator, value2)); + }); + } else { + Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } else if (value === "") { + result.push(""); + } + } + return result; +} +function parseUrl(template) { + return { + expand: expand.bind(null, template) + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + template = template.replace( + /\{([^\{\}]+)\}|([^\{\}]+)/g, + function(_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function(variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } else { + return values.join(","); + } + } else { + return encodeReserved(literal); + } + } + ); + if (template === "/") { + return template; + } else { + return template.replace(/\/$/, ""); + } +} + +// pkg/dist-src/parse.js +function parse(options) { + let method = options.method.toUpperCase(); + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType" + ]); + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + if (options.mediaType.format) { + headers.accept = headers.accept.split(/,/).map( + (format) => format.replace( + /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, + `application/vnd$1$2.${options.mediaType.format}` + ) + ).join(","); + } + if (url.endsWith("/graphql")) { + if (options.mediaType.previews?.length) { + const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; + headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => { + const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; + return `application/vnd.github.${preview}-preview${format}`; + }).join(","); + } + } + } + if (["GET", "HEAD"].includes(method)) { + url = addQueryParameters(url, remainingParameters); + } else { + if ("data" in remainingParameters) { + body = remainingParameters.data; + } else { + if (Object.keys(remainingParameters).length) { + body = remainingParameters; + } + } + } + if (!headers["content-type"] && typeof body !== "undefined") { + headers["content-type"] = "application/json; charset=utf-8"; + } + if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { + body = ""; + } + return Object.assign( + { method, url, headers }, + typeof body !== "undefined" ? { body } : null, + options.request ? { request: options.request } : null + ); +} + +// pkg/dist-src/endpoint-with-defaults.js +function endpointWithDefaults(defaults, route, options) { + return parse(merge(defaults, route, options)); +} + +// pkg/dist-src/with-defaults.js +function withDefaults(oldDefaults, newDefaults) { + const DEFAULTS2 = merge(oldDefaults, newDefaults); + const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); + return Object.assign(endpoint2, { + DEFAULTS: DEFAULTS2, + defaults: withDefaults.bind(null, DEFAULTS2), + merge: merge.bind(null, DEFAULTS2), + parse + }); +} + +// pkg/dist-src/index.js +var endpoint = withDefaults(null, DEFAULTS); +export { + endpoint +}; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-bundle/index.js.map b/.github/octokit/node_modules/@octokit/endpoint/dist-bundle/index.js.map new file mode 100644 index 000000000..d6ab4f5f0 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-bundle/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../dist-src/defaults.js", "../dist-src/version.js", "../dist-src/util/lowercase-keys.js", "../dist-src/util/is-plain-object.js", "../dist-src/util/merge-deep.js", "../dist-src/util/remove-undefined-properties.js", "../dist-src/merge.js", "../dist-src/util/add-query-parameters.js", "../dist-src/util/extract-url-variable-names.js", "../dist-src/util/omit.js", "../dist-src/util/url-template.js", "../dist-src/parse.js", "../dist-src/endpoint-with-defaults.js", "../dist-src/with-defaults.js", "../dist-src/index.js"], + "sourcesContent": ["import { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version.js\";\nconst userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;\nconst DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent\n },\n mediaType: {\n format: \"\"\n }\n};\nexport {\n DEFAULTS\n};\n", "const VERSION = \"0.0.0-development\";\nexport {\n VERSION\n};\n", "function lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\nexport {\n lowercaseKeys\n};\n", "function isPlainObject(value) {\n if (typeof value !== \"object\" || value === null)\n return false;\n if (Object.prototype.toString.call(value) !== \"[object Object]\")\n return false;\n const proto = Object.getPrototypeOf(value);\n if (proto === null)\n return true;\n const Ctor = Object.prototype.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);\n}\nexport {\n isPlainObject\n};\n", "import { isPlainObject } from \"./is-plain-object.js\";\nfunction mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n } else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\nexport {\n mergeDeep\n};\n", "function removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === void 0) {\n delete obj[key];\n }\n }\n return obj;\n}\nexport {\n removeUndefinedProperties\n};\n", "import { lowercaseKeys } from \"./util/lowercase-keys.js\";\nimport { mergeDeep } from \"./util/merge-deep.js\";\nimport { removeUndefinedProperties } from \"./util/remove-undefined-properties.js\";\nfunction merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n } else {\n options = Object.assign({}, route);\n }\n options.headers = lowercaseKeys(options.headers);\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n if (options.url === \"/graphql\") {\n if (defaults && defaults.mediaType.previews?.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(\n (preview) => !mergedOptions.mediaType.previews.includes(preview)\n ).concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, \"\"));\n }\n return mergedOptions;\n}\nexport {\n merge\n};\n", "function addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return url + separator + names.map((name) => {\n if (name === \"q\") {\n return \"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\");\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n }).join(\"&\");\n}\nexport {\n addQueryParameters\n};\n", "const urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nfunction extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\nexport {\n extractUrlVariableNames\n};\n", "function omit(object, keysToOmit) {\n const result = { __proto__: null };\n for (const key of Object.keys(object)) {\n if (keysToOmit.indexOf(key) === -1) {\n result[key] = object[key];\n }\n }\n return result;\n}\nexport {\n omit\n};\n", "function encodeReserved(str) {\n return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n }).join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value = operator === \"+\" || operator === \"#\" ? encodeReserved(value) : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n } else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== void 0 && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(\n encodeValue(operator, value, isKeyOperator(operator) ? key : \"\")\n );\n } else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function(value2) {\n result.push(\n encodeValue(operator, value2, isKeyOperator(operator) ? key : \"\")\n );\n });\n } else {\n Object.keys(value).forEach(function(k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n } else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function(value2) {\n tmp.push(encodeValue(operator, value2));\n });\n } else {\n Object.keys(value).forEach(function(k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n } else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n } else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n } else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n } else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nfunction parseUrl(template) {\n return {\n expand: expand.bind(null, template)\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n template = template.replace(\n /\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g,\n function(_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function(variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n } else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n } else {\n return values.join(\",\");\n }\n } else {\n return encodeReserved(literal);\n }\n }\n );\n if (template === \"/\") {\n return template;\n } else {\n return template.replace(/\\/$/, \"\");\n }\n}\nexport {\n parseUrl\n};\n", "import { addQueryParameters } from \"./util/add-query-parameters.js\";\nimport { extractUrlVariableNames } from \"./util/extract-url-variable-names.js\";\nimport { omit } from \"./util/omit.js\";\nimport { parseUrl } from \"./util/url-template.js\";\nfunction parse(options) {\n let method = options.method.toUpperCase();\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\"\n ]);\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n headers.accept = headers.accept.split(/,/).map(\n (format) => format.replace(\n /application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/,\n `application/vnd$1$2.${options.mediaType.format}`\n )\n ).join(\",\");\n }\n if (url.endsWith(\"/graphql\")) {\n if (options.mediaType.previews?.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {\n const format = options.mediaType.format ? `.${options.mediaType.format}` : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n }).join(\",\");\n }\n }\n }\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n } else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n } else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n }\n }\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n return Object.assign(\n { method, url, headers },\n typeof body !== \"undefined\" ? { body } : null,\n options.request ? { request: options.request } : null\n );\n}\nexport {\n parse\n};\n", "import { DEFAULTS } from \"./defaults.js\";\nimport { merge } from \"./merge.js\";\nimport { parse } from \"./parse.js\";\nfunction endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\nexport {\n endpointWithDefaults\n};\n", "import { endpointWithDefaults } from \"./endpoint-with-defaults.js\";\nimport { merge } from \"./merge.js\";\nimport { parse } from \"./parse.js\";\nfunction withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse\n });\n}\nexport {\n withDefaults\n};\n", "import { withDefaults } from \"./with-defaults.js\";\nimport { DEFAULTS } from \"./defaults.js\";\nconst endpoint = withDefaults(null, DEFAULTS);\nexport {\n endpoint\n};\n"], + "mappings": ";AAAA,SAAS,oBAAoB;;;ACA7B,IAAM,UAAU;;;ADEhB,IAAM,YAAY,uBAAuB,OAAO,IAAI,aAAa,CAAC;AAClE,IAAM,WAAW;AAAA,EACf,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,IACP,QAAQ;AAAA,IACR,cAAc;AAAA,EAChB;AAAA,EACA,WAAW;AAAA,IACT,QAAQ;AAAA,EACV;AACF;;;AEbA,SAAS,cAAc,QAAQ;AAC7B,MAAI,CAAC,QAAQ;AACX,WAAO,CAAC;AAAA,EACV;AACA,SAAO,OAAO,KAAK,MAAM,EAAE,OAAO,CAAC,QAAQ,QAAQ;AACjD,WAAO,IAAI,YAAY,CAAC,IAAI,OAAO,GAAG;AACtC,WAAO;AAAA,EACT,GAAG,CAAC,CAAC;AACP;;;ACRA,SAAS,cAAc,OAAO;AAC5B,MAAI,OAAO,UAAU,YAAY,UAAU;AACzC,WAAO;AACT,MAAI,OAAO,UAAU,SAAS,KAAK,KAAK,MAAM;AAC5C,WAAO;AACT,QAAM,QAAQ,OAAO,eAAe,KAAK;AACzC,MAAI,UAAU;AACZ,WAAO;AACT,QAAM,OAAO,OAAO,UAAU,eAAe,KAAK,OAAO,aAAa,KAAK,MAAM;AACjF,SAAO,OAAO,SAAS,cAAc,gBAAgB,QAAQ,SAAS,UAAU,KAAK,IAAI,MAAM,SAAS,UAAU,KAAK,KAAK;AAC9H;;;ACTA,SAAS,UAAU,UAAU,SAAS;AACpC,QAAM,SAAS,OAAO,OAAO,CAAC,GAAG,QAAQ;AACzC,SAAO,KAAK,OAAO,EAAE,QAAQ,CAAC,QAAQ;AACpC,QAAI,cAAc,QAAQ,GAAG,CAAC,GAAG;AAC/B,UAAI,EAAE,OAAO;AACX,eAAO,OAAO,QAAQ,EAAE,CAAC,GAAG,GAAG,QAAQ,GAAG,EAAE,CAAC;AAAA;AAE7C,eAAO,GAAG,IAAI,UAAU,SAAS,GAAG,GAAG,QAAQ,GAAG,CAAC;AAAA,IACvD,OAAO;AACL,aAAO,OAAO,QAAQ,EAAE,CAAC,GAAG,GAAG,QAAQ,GAAG,EAAE,CAAC;AAAA,IAC/C;AAAA,EACF,CAAC;AACD,SAAO;AACT;;;ACdA,SAAS,0BAA0B,KAAK;AACtC,aAAW,OAAO,KAAK;AACrB,QAAI,IAAI,GAAG,MAAM,QAAQ;AACvB,aAAO,IAAI,GAAG;AAAA,IAChB;AAAA,EACF;AACA,SAAO;AACT;;;ACJA,SAAS,MAAM,UAAU,OAAO,SAAS;AACvC,MAAI,OAAO,UAAU,UAAU;AAC7B,QAAI,CAAC,QAAQ,GAAG,IAAI,MAAM,MAAM,GAAG;AACnC,cAAU,OAAO,OAAO,MAAM,EAAE,QAAQ,IAAI,IAAI,EAAE,KAAK,OAAO,GAAG,OAAO;AAAA,EAC1E,OAAO;AACL,cAAU,OAAO,OAAO,CAAC,GAAG,KAAK;AAAA,EACnC;AACA,UAAQ,UAAU,cAAc,QAAQ,OAAO;AAC/C,4BAA0B,OAAO;AACjC,4BAA0B,QAAQ,OAAO;AACzC,QAAM,gBAAgB,UAAU,YAAY,CAAC,GAAG,OAAO;AACvD,MAAI,QAAQ,QAAQ,YAAY;AAC9B,QAAI,YAAY,SAAS,UAAU,UAAU,QAAQ;AACnD,oBAAc,UAAU,WAAW,SAAS,UAAU,SAAS;AAAA,QAC7D,CAAC,YAAY,CAAC,cAAc,UAAU,SAAS,SAAS,OAAO;AAAA,MACjE,EAAE,OAAO,cAAc,UAAU,QAAQ;AAAA,IAC3C;AACA,kBAAc,UAAU,YAAY,cAAc,UAAU,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,QAAQ,QAAQ,YAAY,EAAE,CAAC;AAAA,EAC9H;AACA,SAAO;AACT;;;ACvBA,SAAS,mBAAmB,KAAK,YAAY;AAC3C,QAAM,YAAY,KAAK,KAAK,GAAG,IAAI,MAAM;AACzC,QAAM,QAAQ,OAAO,KAAK,UAAU;AACpC,MAAI,MAAM,WAAW,GAAG;AACtB,WAAO;AAAA,EACT;AACA,SAAO,MAAM,YAAY,MAAM,IAAI,CAAC,SAAS;AAC3C,QAAI,SAAS,KAAK;AAChB,aAAO,OAAO,WAAW,EAAE,MAAM,GAAG,EAAE,IAAI,kBAAkB,EAAE,KAAK,GAAG;AAAA,IACxE;AACA,WAAO,GAAG,IAAI,IAAI,mBAAmB,WAAW,IAAI,CAAC,CAAC;AAAA,EACxD,CAAC,EAAE,KAAK,GAAG;AACb;;;ACZA,IAAM,mBAAmB;AACzB,SAAS,eAAe,cAAc;AACpC,SAAO,aAAa,QAAQ,cAAc,EAAE,EAAE,MAAM,GAAG;AACzD;AACA,SAAS,wBAAwB,KAAK;AACpC,QAAM,UAAU,IAAI,MAAM,gBAAgB;AAC1C,MAAI,CAAC,SAAS;AACZ,WAAO,CAAC;AAAA,EACV;AACA,SAAO,QAAQ,IAAI,cAAc,EAAE,OAAO,CAAC,GAAG,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;AACrE;;;ACVA,SAAS,KAAK,QAAQ,YAAY;AAChC,QAAM,SAAS,EAAE,WAAW,KAAK;AACjC,aAAW,OAAO,OAAO,KAAK,MAAM,GAAG;AACrC,QAAI,WAAW,QAAQ,GAAG,MAAM,IAAI;AAClC,aAAO,GAAG,IAAI,OAAO,GAAG;AAAA,IAC1B;AAAA,EACF;AACA,SAAO;AACT;;;ACRA,SAAS,eAAe,KAAK;AAC3B,SAAO,IAAI,MAAM,oBAAoB,EAAE,IAAI,SAAS,MAAM;AACxD,QAAI,CAAC,eAAe,KAAK,IAAI,GAAG;AAC9B,aAAO,UAAU,IAAI,EAAE,QAAQ,QAAQ,GAAG,EAAE,QAAQ,QAAQ,GAAG;AAAA,IACjE;AACA,WAAO;AAAA,EACT,CAAC,EAAE,KAAK,EAAE;AACZ;AACA,SAAS,iBAAiB,KAAK;AAC7B,SAAO,mBAAmB,GAAG,EAAE,QAAQ,YAAY,SAAS,GAAG;AAC7D,WAAO,MAAM,EAAE,WAAW,CAAC,EAAE,SAAS,EAAE,EAAE,YAAY;AAAA,EACxD,CAAC;AACH;AACA,SAAS,YAAY,UAAU,OAAO,KAAK;AACzC,UAAQ,aAAa,OAAO,aAAa,MAAM,eAAe,KAAK,IAAI,iBAAiB,KAAK;AAC7F,MAAI,KAAK;AACP,WAAO,iBAAiB,GAAG,IAAI,MAAM;AAAA,EACvC,OAAO;AACL,WAAO;AAAA,EACT;AACF;AACA,SAAS,UAAU,OAAO;AACxB,SAAO,UAAU,UAAU,UAAU;AACvC;AACA,SAAS,cAAc,UAAU;AAC/B,SAAO,aAAa,OAAO,aAAa,OAAO,aAAa;AAC9D;AACA,SAAS,UAAU,SAAS,UAAU,KAAK,UAAU;AACnD,MAAI,QAAQ,QAAQ,GAAG,GAAG,SAAS,CAAC;AACpC,MAAI,UAAU,KAAK,KAAK,UAAU,IAAI;AACpC,QAAI,OAAO,UAAU,YAAY,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW;AACxF,cAAQ,MAAM,SAAS;AACvB,UAAI,YAAY,aAAa,KAAK;AAChC,gBAAQ,MAAM,UAAU,GAAG,SAAS,UAAU,EAAE,CAAC;AAAA,MACnD;AACA,aAAO;AAAA,QACL,YAAY,UAAU,OAAO,cAAc,QAAQ,IAAI,MAAM,EAAE;AAAA,MACjE;AAAA,IACF,OAAO;AACL,UAAI,aAAa,KAAK;AACpB,YAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,gBAAM,OAAO,SAAS,EAAE,QAAQ,SAAS,QAAQ;AAC/C,mBAAO;AAAA,cACL,YAAY,UAAU,QAAQ,cAAc,QAAQ,IAAI,MAAM,EAAE;AAAA,YAClE;AAAA,UACF,CAAC;AAAA,QACH,OAAO;AACL,iBAAO,KAAK,KAAK,EAAE,QAAQ,SAAS,GAAG;AACrC,gBAAI,UAAU,MAAM,CAAC,CAAC,GAAG;AACvB,qBAAO,KAAK,YAAY,UAAU,MAAM,CAAC,GAAG,CAAC,CAAC;AAAA,YAChD;AAAA,UACF,CAAC;AAAA,QACH;AAAA,MACF,OAAO;AACL,cAAM,MAAM,CAAC;AACb,YAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,gBAAM,OAAO,SAAS,EAAE,QAAQ,SAAS,QAAQ;AAC/C,gBAAI,KAAK,YAAY,UAAU,MAAM,CAAC;AAAA,UACxC,CAAC;AAAA,QACH,OAAO;AACL,iBAAO,KAAK,KAAK,EAAE,QAAQ,SAAS,GAAG;AACrC,gBAAI,UAAU,MAAM,CAAC,CAAC,GAAG;AACvB,kBAAI,KAAK,iBAAiB,CAAC,CAAC;AAC5B,kBAAI,KAAK,YAAY,UAAU,MAAM,CAAC,EAAE,SAAS,CAAC,CAAC;AAAA,YACrD;AAAA,UACF,CAAC;AAAA,QACH;AACA,YAAI,cAAc,QAAQ,GAAG;AAC3B,iBAAO,KAAK,iBAAiB,GAAG,IAAI,MAAM,IAAI,KAAK,GAAG,CAAC;AAAA,QACzD,WAAW,IAAI,WAAW,GAAG;AAC3B,iBAAO,KAAK,IAAI,KAAK,GAAG,CAAC;AAAA,QAC3B;AAAA,MACF;AAAA,IACF;AAAA,EACF,OAAO;AACL,QAAI,aAAa,KAAK;AACpB,UAAI,UAAU,KAAK,GAAG;AACpB,eAAO,KAAK,iBAAiB,GAAG,CAAC;AAAA,MACnC;AAAA,IACF,WAAW,UAAU,OAAO,aAAa,OAAO,aAAa,MAAM;AACjE,aAAO,KAAK,iBAAiB,GAAG,IAAI,GAAG;AAAA,IACzC,WAAW,UAAU,IAAI;AACvB,aAAO,KAAK,EAAE;AAAA,IAChB;AAAA,EACF;AACA,SAAO;AACT;AACA,SAAS,SAAS,UAAU;AAC1B,SAAO;AAAA,IACL,QAAQ,OAAO,KAAK,MAAM,QAAQ;AAAA,EACpC;AACF;AACA,SAAS,OAAO,UAAU,SAAS;AACjC,MAAI,YAAY,CAAC,KAAK,KAAK,KAAK,KAAK,KAAK,KAAK,GAAG;AAClD,aAAW,SAAS;AAAA,IAClB;AAAA,IACA,SAAS,GAAG,YAAY,SAAS;AAC/B,UAAI,YAAY;AACd,YAAI,WAAW;AACf,cAAM,SAAS,CAAC;AAChB,YAAI,UAAU,QAAQ,WAAW,OAAO,CAAC,CAAC,MAAM,IAAI;AAClD,qBAAW,WAAW,OAAO,CAAC;AAC9B,uBAAa,WAAW,OAAO,CAAC;AAAA,QAClC;AACA,mBAAW,MAAM,IAAI,EAAE,QAAQ,SAAS,UAAU;AAChD,cAAI,MAAM,4BAA4B,KAAK,QAAQ;AACnD,iBAAO,KAAK,UAAU,SAAS,UAAU,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;AAAA,QACpE,CAAC;AACD,YAAI,YAAY,aAAa,KAAK;AAChC,cAAI,YAAY;AAChB,cAAI,aAAa,KAAK;AACpB,wBAAY;AAAA,UACd,WAAW,aAAa,KAAK;AAC3B,wBAAY;AAAA,UACd;AACA,kBAAQ,OAAO,WAAW,IAAI,WAAW,MAAM,OAAO,KAAK,SAAS;AAAA,QACtE,OAAO;AACL,iBAAO,OAAO,KAAK,GAAG;AAAA,QACxB;AAAA,MACF,OAAO;AACL,eAAO,eAAe,OAAO;AAAA,MAC/B;AAAA,IACF;AAAA,EACF;AACA,MAAI,aAAa,KAAK;AACpB,WAAO;AAAA,EACT,OAAO;AACL,WAAO,SAAS,QAAQ,OAAO,EAAE;AAAA,EACnC;AACF;;;AC7HA,SAAS,MAAM,SAAS;AACtB,MAAI,SAAS,QAAQ,OAAO,YAAY;AACxC,MAAI,OAAO,QAAQ,OAAO,KAAK,QAAQ,gBAAgB,MAAM;AAC7D,MAAI,UAAU,OAAO,OAAO,CAAC,GAAG,QAAQ,OAAO;AAC/C,MAAI;AACJ,MAAI,aAAa,KAAK,SAAS;AAAA,IAC7B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,mBAAmB,wBAAwB,GAAG;AACpD,QAAM,SAAS,GAAG,EAAE,OAAO,UAAU;AACrC,MAAI,CAAC,QAAQ,KAAK,GAAG,GAAG;AACtB,UAAM,QAAQ,UAAU;AAAA,EAC1B;AACA,QAAM,oBAAoB,OAAO,KAAK,OAAO,EAAE,OAAO,CAAC,WAAW,iBAAiB,SAAS,MAAM,CAAC,EAAE,OAAO,SAAS;AACrH,QAAM,sBAAsB,KAAK,YAAY,iBAAiB;AAC9D,QAAM,kBAAkB,6BAA6B,KAAK,QAAQ,MAAM;AACxE,MAAI,CAAC,iBAAiB;AACpB,QAAI,QAAQ,UAAU,QAAQ;AAC5B,cAAQ,SAAS,QAAQ,OAAO,MAAM,GAAG,EAAE;AAAA,QACzC,CAAC,WAAW,OAAO;AAAA,UACjB;AAAA,UACA,uBAAuB,QAAQ,UAAU,MAAM;AAAA,QACjD;AAAA,MACF,EAAE,KAAK,GAAG;AAAA,IACZ;AACA,QAAI,IAAI,SAAS,UAAU,GAAG;AAC5B,UAAI,QAAQ,UAAU,UAAU,QAAQ;AACtC,cAAM,2BAA2B,QAAQ,OAAO,MAAM,qBAAqB,KAAK,CAAC;AACjF,gBAAQ,SAAS,yBAAyB,OAAO,QAAQ,UAAU,QAAQ,EAAE,IAAI,CAAC,YAAY;AAC5F,gBAAM,SAAS,QAAQ,UAAU,SAAS,IAAI,QAAQ,UAAU,MAAM,KAAK;AAC3E,iBAAO,0BAA0B,OAAO,WAAW,MAAM;AAAA,QAC3D,CAAC,EAAE,KAAK,GAAG;AAAA,MACb;AAAA,IACF;AAAA,EACF;AACA,MAAI,CAAC,OAAO,MAAM,EAAE,SAAS,MAAM,GAAG;AACpC,UAAM,mBAAmB,KAAK,mBAAmB;AAAA,EACnD,OAAO;AACL,QAAI,UAAU,qBAAqB;AACjC,aAAO,oBAAoB;AAAA,IAC7B,OAAO;AACL,UAAI,OAAO,KAAK,mBAAmB,EAAE,QAAQ;AAC3C,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACA,MAAI,CAAC,QAAQ,cAAc,KAAK,OAAO,SAAS,aAAa;AAC3D,YAAQ,cAAc,IAAI;AAAA,EAC5B;AACA,MAAI,CAAC,SAAS,KAAK,EAAE,SAAS,MAAM,KAAK,OAAO,SAAS,aAAa;AACpE,WAAO;AAAA,EACT;AACA,SAAO,OAAO;AAAA,IACZ,EAAE,QAAQ,KAAK,QAAQ;AAAA,IACvB,OAAO,SAAS,cAAc,EAAE,KAAK,IAAI;AAAA,IACzC,QAAQ,UAAU,EAAE,SAAS,QAAQ,QAAQ,IAAI;AAAA,EACnD;AACF;;;AC/DA,SAAS,qBAAqB,UAAU,OAAO,SAAS;AACtD,SAAO,MAAM,MAAM,UAAU,OAAO,OAAO,CAAC;AAC9C;;;ACFA,SAAS,aAAa,aAAa,aAAa;AAC9C,QAAMA,YAAW,MAAM,aAAa,WAAW;AAC/C,QAAMC,YAAW,qBAAqB,KAAK,MAAMD,SAAQ;AACzD,SAAO,OAAO,OAAOC,WAAU;AAAA,IAC7B,UAAAD;AAAA,IACA,UAAU,aAAa,KAAK,MAAMA,SAAQ;AAAA,IAC1C,OAAO,MAAM,KAAK,MAAMA,SAAQ;AAAA,IAChC;AAAA,EACF,CAAC;AACH;;;ACVA,IAAM,WAAW,aAAa,MAAM,QAAQ;", + "names": ["DEFAULTS", "endpoint"] +} diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-src/defaults.js b/.github/octokit/node_modules/@octokit/endpoint/dist-src/defaults.js new file mode 100644 index 000000000..5f65ced4d --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-src/defaults.js @@ -0,0 +1,17 @@ +import { getUserAgent } from "universal-user-agent"; +import { VERSION } from "./version.js"; +const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; +const DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "" + } +}; +export { + DEFAULTS +}; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js b/.github/octokit/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js new file mode 100644 index 000000000..e67c9e5f0 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js @@ -0,0 +1,9 @@ +import { DEFAULTS } from "./defaults.js"; +import { merge } from "./merge.js"; +import { parse } from "./parse.js"; +function endpointWithDefaults(defaults, route, options) { + return parse(merge(defaults, route, options)); +} +export { + endpointWithDefaults +}; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-src/index.js b/.github/octokit/node_modules/@octokit/endpoint/dist-src/index.js new file mode 100644 index 000000000..7d60502d0 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-src/index.js @@ -0,0 +1,6 @@ +import { withDefaults } from "./with-defaults.js"; +import { DEFAULTS } from "./defaults.js"; +const endpoint = withDefaults(null, DEFAULTS); +export { + endpoint +}; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-src/merge.js b/.github/octokit/node_modules/@octokit/endpoint/dist-src/merge.js new file mode 100644 index 000000000..cf1b37ef6 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-src/merge.js @@ -0,0 +1,27 @@ +import { lowercaseKeys } from "./util/lowercase-keys.js"; +import { mergeDeep } from "./util/merge-deep.js"; +import { removeUndefinedProperties } from "./util/remove-undefined-properties.js"; +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { method, url } : { url: method }, options); + } else { + options = Object.assign({}, route); + } + options.headers = lowercaseKeys(options.headers); + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + if (options.url === "/graphql") { + if (defaults && defaults.mediaType.previews?.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews.filter( + (preview) => !mergedOptions.mediaType.previews.includes(preview) + ).concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); + } + return mergedOptions; +} +export { + merge +}; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-src/parse.js b/.github/octokit/node_modules/@octokit/endpoint/dist-src/parse.js new file mode 100644 index 000000000..926b6e3c4 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-src/parse.js @@ -0,0 +1,70 @@ +import { addQueryParameters } from "./util/add-query-parameters.js"; +import { extractUrlVariableNames } from "./util/extract-url-variable-names.js"; +import { omit } from "./util/omit.js"; +import { parseUrl } from "./util/url-template.js"; +function parse(options) { + let method = options.method.toUpperCase(); + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType" + ]); + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + if (options.mediaType.format) { + headers.accept = headers.accept.split(/,/).map( + (format) => format.replace( + /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, + `application/vnd$1$2.${options.mediaType.format}` + ) + ).join(","); + } + if (url.endsWith("/graphql")) { + if (options.mediaType.previews?.length) { + const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; + headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => { + const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; + return `application/vnd.github.${preview}-preview${format}`; + }).join(","); + } + } + } + if (["GET", "HEAD"].includes(method)) { + url = addQueryParameters(url, remainingParameters); + } else { + if ("data" in remainingParameters) { + body = remainingParameters.data; + } else { + if (Object.keys(remainingParameters).length) { + body = remainingParameters; + } + } + } + if (!headers["content-type"] && typeof body !== "undefined") { + headers["content-type"] = "application/json; charset=utf-8"; + } + if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { + body = ""; + } + return Object.assign( + { method, url, headers }, + typeof body !== "undefined" ? { body } : null, + options.request ? { request: options.request } : null + ); +} +export { + parse +}; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js b/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js new file mode 100644 index 000000000..6bdf7367c --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js @@ -0,0 +1,16 @@ +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url; + } + return url + separator + names.map((name) => { + if (name === "q") { + return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); + } + return `${name}=${encodeURIComponent(parameters[name])}`; + }).join("&"); +} +export { + addQueryParameters +}; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js b/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js new file mode 100644 index 000000000..1d75bb913 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js @@ -0,0 +1,14 @@ +const urlVariableRegex = /\{[^}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} +function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + if (!matches) { + return []; + } + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} +export { + extractUrlVariableNames +}; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/is-plain-object.js b/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/is-plain-object.js new file mode 100644 index 000000000..44b5eb2a6 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/is-plain-object.js @@ -0,0 +1,14 @@ +function isPlainObject(value) { + if (typeof value !== "object" || value === null) + return false; + if (Object.prototype.toString.call(value) !== "[object Object]") + return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) + return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); +} +export { + isPlainObject +}; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js b/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js new file mode 100644 index 000000000..9bd7bb991 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js @@ -0,0 +1,12 @@ +function lowercaseKeys(object) { + if (!object) { + return {}; + } + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); +} +export { + lowercaseKeys +}; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js b/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js new file mode 100644 index 000000000..fc7de8523 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js @@ -0,0 +1,18 @@ +import { isPlainObject } from "./is-plain-object.js"; +function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach((key) => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); + } else { + Object.assign(result, { [key]: options[key] }); + } + }); + return result; +} +export { + mergeDeep +}; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/omit.js b/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/omit.js new file mode 100644 index 000000000..aceffe25e --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/omit.js @@ -0,0 +1,12 @@ +function omit(object, keysToOmit) { + const result = { __proto__: null }; + for (const key of Object.keys(object)) { + if (keysToOmit.indexOf(key) === -1) { + result[key] = object[key]; + } + } + return result; +} +export { + omit +}; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js b/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js new file mode 100644 index 000000000..8653027c8 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js @@ -0,0 +1,11 @@ +function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === void 0) { + delete obj[key]; + } + } + return obj; +} +export { + removeUndefinedProperties +}; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/url-template.js b/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/url-template.js new file mode 100644 index 000000000..f70aa5c73 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-src/util/url-template.js @@ -0,0 +1,133 @@ +function encodeReserved(str) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }).join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } else { + return value; + } +} +function isDefined(value) { + return value !== void 0 && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push( + encodeValue(operator, value, isKeyOperator(operator) ? key : "") + ); + } else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function(value2) { + result.push( + encodeValue(operator, value2, isKeyOperator(operator) ? key : "") + ); + }); + } else { + Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function(value2) { + tmp.push(encodeValue(operator, value2)); + }); + } else { + Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } else if (value === "") { + result.push(""); + } + } + return result; +} +function parseUrl(template) { + return { + expand: expand.bind(null, template) + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + template = template.replace( + /\{([^\{\}]+)\}|([^\{\}]+)/g, + function(_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function(variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } else { + return values.join(","); + } + } else { + return encodeReserved(literal); + } + } + ); + if (template === "/") { + return template; + } else { + return template.replace(/\/$/, ""); + } +} +export { + parseUrl +}; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-src/version.js b/.github/octokit/node_modules/@octokit/endpoint/dist-src/version.js new file mode 100644 index 000000000..5581b6e3c --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-src/version.js @@ -0,0 +1,4 @@ +const VERSION = "10.1.1"; +export { + VERSION +}; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-src/with-defaults.js b/.github/octokit/node_modules/@octokit/endpoint/dist-src/with-defaults.js new file mode 100644 index 000000000..5551d42b3 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-src/with-defaults.js @@ -0,0 +1,16 @@ +import { endpointWithDefaults } from "./endpoint-with-defaults.js"; +import { merge } from "./merge.js"; +import { parse } from "./parse.js"; +function withDefaults(oldDefaults, newDefaults) { + const DEFAULTS = merge(oldDefaults, newDefaults); + const endpoint = endpointWithDefaults.bind(null, DEFAULTS); + return Object.assign(endpoint, { + DEFAULTS, + defaults: withDefaults.bind(null, DEFAULTS), + merge: merge.bind(null, DEFAULTS), + parse + }); +} +export { + withDefaults +}; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-types/defaults.d.ts b/.github/octokit/node_modules/@octokit/endpoint/dist-types/defaults.d.ts new file mode 100644 index 000000000..d65e889bc --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-types/defaults.d.ts @@ -0,0 +1,2 @@ +import type { EndpointDefaults } from "@octokit/types"; +export declare const DEFAULTS: EndpointDefaults; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts b/.github/octokit/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts new file mode 100644 index 000000000..ec25627cd --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts @@ -0,0 +1,3 @@ +import type { EndpointOptions, RequestParameters, Route } from "@octokit/types"; +import { DEFAULTS } from "./defaults.js"; +export declare function endpointWithDefaults(defaults: typeof DEFAULTS, route: Route | EndpointOptions, options?: RequestParameters): import("@octokit/types").RequestOptions; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-types/index.d.ts b/.github/octokit/node_modules/@octokit/endpoint/dist-types/index.d.ts new file mode 100644 index 000000000..1ede13667 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-types/index.d.ts @@ -0,0 +1 @@ +export declare const endpoint: import("@octokit/types").EndpointInterface; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-types/merge.d.ts b/.github/octokit/node_modules/@octokit/endpoint/dist-types/merge.d.ts new file mode 100644 index 000000000..f58398120 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-types/merge.d.ts @@ -0,0 +1,2 @@ +import type { EndpointDefaults, RequestParameters, Route } from "@octokit/types"; +export declare function merge(defaults: EndpointDefaults | null, route?: Route | RequestParameters, options?: RequestParameters): EndpointDefaults; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-types/parse.d.ts b/.github/octokit/node_modules/@octokit/endpoint/dist-types/parse.d.ts new file mode 100644 index 000000000..5d0927ae8 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-types/parse.d.ts @@ -0,0 +1,2 @@ +import type { EndpointDefaults, RequestOptions } from "@octokit/types"; +export declare function parse(options: EndpointDefaults): RequestOptions; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts b/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts new file mode 100644 index 000000000..4b192ac41 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts @@ -0,0 +1,4 @@ +export declare function addQueryParameters(url: string, parameters: { + [x: string]: string | undefined; + q?: string; +}): string; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts b/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts new file mode 100644 index 000000000..93586d4db --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts @@ -0,0 +1 @@ +export declare function extractUrlVariableNames(url: string): string[]; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/is-plain-object.d.ts b/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/is-plain-object.d.ts new file mode 100644 index 000000000..004fa4bf5 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/is-plain-object.d.ts @@ -0,0 +1 @@ +export declare function isPlainObject(value: unknown): value is Object; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts b/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts new file mode 100644 index 000000000..1daf30736 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts @@ -0,0 +1,5 @@ +export declare function lowercaseKeys(object?: { + [key: string]: any; +}): { + [key: string]: any; +}; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts b/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts new file mode 100644 index 000000000..914411cf9 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts @@ -0,0 +1 @@ +export declare function mergeDeep(defaults: any, options: any): object; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts b/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts new file mode 100644 index 000000000..06927d6bd --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts @@ -0,0 +1,5 @@ +export declare function omit(object: { + [key: string]: any; +}, keysToOmit: string[]): { + [key: string]: any; +}; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/remove-undefined-properties.d.ts b/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/remove-undefined-properties.d.ts new file mode 100644 index 000000000..92d8d8505 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/remove-undefined-properties.d.ts @@ -0,0 +1 @@ +export declare function removeUndefinedProperties(obj: any): any; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts b/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts new file mode 100644 index 000000000..5d967cab3 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts @@ -0,0 +1,3 @@ +export declare function parseUrl(template: string): { + expand: (context: object) => string; +}; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-types/version.d.ts b/.github/octokit/node_modules/@octokit/endpoint/dist-types/version.d.ts new file mode 100644 index 000000000..a889a1a2b --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "10.1.1"; diff --git a/.github/octokit/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts b/.github/octokit/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts new file mode 100644 index 000000000..e09354c56 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts @@ -0,0 +1,2 @@ +import type { EndpointInterface, RequestParameters, EndpointDefaults } from "@octokit/types"; +export declare function withDefaults(oldDefaults: EndpointDefaults | null, newDefaults: RequestParameters): EndpointInterface; diff --git a/.github/octokit/node_modules/@octokit/endpoint/package.json b/.github/octokit/node_modules/@octokit/endpoint/package.json new file mode 100644 index 000000000..9873e6943 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/endpoint/package.json @@ -0,0 +1,52 @@ +{ + "name": "@octokit/endpoint", + "version": "10.1.1", + "type": "module", + "publishConfig": { + "access": "public", + "provenance": true + }, + "description": "Turns REST API endpoints into generic request options", + "repository": "github:octokit/endpoint.js", + "keywords": [ + "octokit", + "github", + "api", + "rest" + ], + "author": "Gregor Martynus (https://github.com/gr2m)", + "license": "MIT", + "devDependencies": { + "@octokit/tsconfig": "^3.0.0", + "@types/jest": "^29.0.0", + "@types/node": "^20.10.0", + "esbuild": "^0.20.0", + "glob": "^10.2.7", + "jest": "^29.0.0", + "prettier": "3.2.5", + "semantic-release": "^23.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^29.0.0", + "typescript": "^5.0.0" + }, + "dependencies": { + "@octokit/types": "^13.0.0", + "universal-user-agent": "^7.0.2" + }, + "engines": { + "node": ">= 18" + }, + "files": [ + "dist-*/**", + "bin/**" + ], + "types": "./dist-types/index.d.ts", + "exports": { + ".": { + "types": "./dist-types/index.d.ts", + "import": "./dist-bundle/index.js", + "default": "./dist-bundle/index.js" + } + }, + "sideEffects": false +} diff --git a/.github/octokit/node_modules/@octokit/graphql/LICENSE b/.github/octokit/node_modules/@octokit/graphql/LICENSE new file mode 100644 index 000000000..af5366d0d --- /dev/null +++ b/.github/octokit/node_modules/@octokit/graphql/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2018 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.github/octokit/node_modules/@octokit/graphql/README.md b/.github/octokit/node_modules/@octokit/graphql/README.md new file mode 100644 index 000000000..074cb056f --- /dev/null +++ b/.github/octokit/node_modules/@octokit/graphql/README.md @@ -0,0 +1,408 @@ +# graphql.js + +> GitHub GraphQL API client for browsers and Node + +[![@latest](https://img.shields.io/npm/v/@octokit/graphql.svg)](https://www.npmjs.com/package/@octokit/graphql) +[![Build Status](https://github.com/octokit/graphql.js/workflows/Test/badge.svg)](https://github.com/octokit/graphql.js/actions?query=workflow%3ATest+branch%3Amain) + + + +- [Usage](#usage) + - [Send a simple query](#send-a-simple-query) + - [Authentication](#authentication) + - [Variables](#variables) + - [Pass query together with headers and variables](#pass-query-together-with-headers-and-variables) + - [Use with GitHub Enterprise](#use-with-github-enterprise) + - [Use custom `@octokit/request` instance](#use-custom-octokitrequest-instance) +- [TypeScript](#typescript) + - [Additional Types](#additional-types) +- [Errors](#errors) +- [Partial responses](#partial-responses) +- [Writing tests](#writing-tests) +- [License](#license) + + + +## Usage + + + + + + +
+Browsers + + +Load `@octokit/graphql` directly from [esm.sh](https://esm.sh) + +```html + +``` + +
+Node + + +Install with npm install @octokit/graphql + +```js +import { graphql } from "@octokit/graphql"; +``` + +
+ +### Send a simple query + +```js +const { repository } = await graphql( + ` + { + repository(owner: "octokit", name: "graphql.js") { + issues(last: 3) { + edges { + node { + title + } + } + } + } + } + `, + { + headers: { + authorization: `token secret123`, + }, + }, +); +``` + +### Authentication + +The simplest way to authenticate a request is to set the `Authorization` header, e.g. to a [personal access token](https://github.com/settings/tokens/). + +```js +const graphqlWithAuth = graphql.defaults({ + headers: { + authorization: `token secret123`, + }, +}); +const { repository } = await graphqlWithAuth(` + { + repository(owner: "octokit", name: "graphql.js") { + issues(last: 3) { + edges { + node { + title + } + } + } + } + } +`); +``` + +For more complex authentication strategies such as GitHub Apps or Basic, we recommend the according authentication library exported by [`@octokit/auth`](https://github.com/octokit/auth.js). + +```js +const { createAppAuth } = await import("@octokit/auth-app"); +const auth = createAppAuth({ + appId: process.env.APP_ID, + privateKey: process.env.PRIVATE_KEY, + installationId: 123, +}); +const graphqlWithAuth = graphql.defaults({ + request: { + hook: auth.hook, + }, +}); + +const { repository } = await graphqlWithAuth( + `{ + repository(owner: "octokit", name: "graphql.js") { + issues(last: 3) { + edges { + node { + title + } + } + } + } + }`, +); +``` + +### Variables + +⚠️ Do not use [template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) in the query strings as they make your code vulnerable to query injection attacks (see [#2](https://github.com/octokit/graphql.js/issues/2)). Use variables instead: + +```js +const { repository } = await graphql( + ` + query lastIssues($owner: String!, $repo: String!, $num: Int = 3) { + repository(owner: $owner, name: $repo) { + issues(last: $num) { + edges { + node { + title + } + } + } + } + } + `, + { + owner: "octokit", + repo: "graphql.js", + headers: { + authorization: `token secret123`, + }, + }, +); +``` + +### Pass query together with headers and variables + +```js +import { graphql } from("@octokit/graphql"); +const { repository } = await graphql({ + query: `query lastIssues($owner: String!, $repo: String!, $num: Int = 3) { + repository(owner: $owner, name: $repo) { + issues(last: $num) { + edges { + node { + title + } + } + } + } + }`, + owner: "octokit", + repo: "graphql.js", + headers: { + authorization: `token secret123`, + }, +}); +``` + +### Use with GitHub Enterprise + +```js +import { graphql } from "@octokit/graphql"; +graphql = graphql.defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api", + headers: { + authorization: `token secret123`, + }, +}); +const { repository } = await graphql(` + { + repository(owner: "acme-project", name: "acme-repo") { + issues(last: 3) { + edges { + node { + title + } + } + } + } + } +`); +``` + +### Use custom `@octokit/request` instance + +```js +import { request } from "@octokit/request"; +import { withCustomRequest } from "@octokit/graphql"; + +let requestCounter = 0; +const myRequest = request.defaults({ + headers: { + authorization: "bearer secret123", + }, + request: { + hook(request, options) { + requestCounter++; + return request(options); + }, + }, +}); +const myGraphql = withCustomRequest(myRequest); +await request("/"); +await myGraphql(` + { + repository(owner: "acme-project", name: "acme-repo") { + issues(last: 3) { + edges { + node { + title + } + } + } + } + } +`); +// requestCounter is now 2 +``` + +## TypeScript + +`@octokit/graphql` is exposing proper types for its usage with TypeScript projects. + +### Additional Types + +Additionally, `GraphQlQueryResponseData` has been exposed to users: + +```ts +import type { GraphQlQueryResponseData } from "@octokit/graphql"; +``` + +## Errors + +In case of a GraphQL error, `error.message` is set to a combined message describing all errors returned by the endpoint. +All errors can be accessed at `error.errors`. `error.request` has the request options such as query, variables and headers set for easier debugging. + +```js +import { graphql, GraphqlResponseError } from "@octokit/graphql"; +graphql = graphql.defaults({ + headers: { + authorization: `token secret123`, + }, +}); +const query = `{ + viewer { + bioHtml + } +}`; + +try { + const result = await graphql(query); +} catch (error) { + if (error instanceof GraphqlResponseError) { + // do something with the error, allowing you to detect a graphql response error, + // compared to accidentally catching unrelated errors. + + // server responds with an object like the following (as an example) + // class GraphqlResponseError { + // "headers": { + // "status": "403", + // }, + // "data": null, + // "errors": [{ + // "message": "Field 'bioHtml' doesn't exist on type 'User'", + // "locations": [{ + // "line": 3, + // "column": 5 + // }] + // }] + // } + + console.log("Request failed:", error.request); // { query, variables: {}, headers: { authorization: 'token secret123' } } + console.log(error.message); // Field 'bioHtml' doesn't exist on type 'User' + } else { + // handle non-GraphQL error + } +} +``` + +## Partial responses + +A GraphQL query may respond with partial data accompanied by errors. In this case we will throw an error but the partial data will still be accessible through `error.data` + +```js +import { graphql } from "@octokit/graphql"; +graphql = graphql.defaults({ + headers: { + authorization: `token secret123`, + }, +}); +const query = `{ + repository(name: "probot", owner: "probot") { + name + ref(qualifiedName: "master") { + target { + ... on Commit { + history(first: 25, after: "invalid cursor") { + nodes { + message + } + } + } + } + } + } +}`; + +try { + const result = await graphql(query); +} catch (error) { + // server responds with + // { + // "data": { + // "repository": { + // "name": "probot", + // "ref": null + // } + // }, + // "errors": [ + // { + // "type": "INVALID_CURSOR_ARGUMENTS", + // "path": [ + // "repository", + // "ref", + // "target", + // "history" + // ], + // "locations": [ + // { + // "line": 7, + // "column": 11 + // } + // ], + // "message": "`invalid cursor` does not appear to be a valid cursor." + // } + // ] + // } + + console.log("Request failed:", error.request); // { query, variables: {}, headers: { authorization: 'token secret123' } } + console.log(error.message); // `invalid cursor` does not appear to be a valid cursor. + console.log(error.data); // { repository: { name: 'probot', ref: null } } +} +``` + +## Writing tests + +You can pass a replacement for [the built-in fetch implementation](https://github.com/bitinn/node-fetch) as `request.fetch` option. For example, using [fetch-mock](http://www.wheresrhys.co.uk/fetch-mock/) works great to write tests + +```js +import assert from "assert"; +import fetchMock from "fetch-mock"; + +import { graphql } from "@octokit/graphql"; + +graphql("{ viewer { login } }", { + headers: { + authorization: "token secret123", + }, + request: { + fetch: fetchMock + .sandbox() + .post("https://api.github.com/graphql", (url, options) => { + assert.strictEqual(options.headers.authorization, "token secret123"); + assert.strictEqual( + options.body, + '{"query":"{ viewer { login } }"}', + "Sends correct query", + ); + return { data: {} }; + }), + }, +}); +``` + +## License + +[MIT](LICENSE) diff --git a/.github/octokit/node_modules/@octokit/graphql/dist-bundle/index.js b/.github/octokit/node_modules/@octokit/graphql/dist-bundle/index.js new file mode 100644 index 000000000..ab7496a86 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/graphql/dist-bundle/index.js @@ -0,0 +1,129 @@ +// pkg/dist-src/index.js +import { request } from "@octokit/request"; +import { getUserAgent } from "universal-user-agent"; + +// pkg/dist-src/version.js +var VERSION = "0.0.0-development"; + +// pkg/dist-src/with-defaults.js +import { request as Request2 } from "@octokit/request"; + +// pkg/dist-src/graphql.js +import { request as Request } from "@octokit/request"; + +// pkg/dist-src/error.js +function _buildMessageForResponseErrors(data) { + return `Request failed due to following response errors: +` + data.errors.map((e) => ` - ${e.message}`).join("\n"); +} +var GraphqlResponseError = class extends Error { + constructor(request2, headers, response) { + super(_buildMessageForResponseErrors(response)); + this.request = request2; + this.headers = headers; + this.response = response; + this.errors = response.errors; + this.data = response.data; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + } + name = "GraphqlResponseError"; + errors; + data; +}; + +// pkg/dist-src/graphql.js +var NON_VARIABLE_OPTIONS = [ + "method", + "baseUrl", + "url", + "headers", + "request", + "query", + "mediaType" +]; +var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; +var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; +function graphql(request2, query, options) { + if (options) { + if (typeof query === "string" && "query" in options) { + return Promise.reject( + new Error(`[@octokit/graphql] "query" cannot be used as variable name`) + ); + } + for (const key in options) { + if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) + continue; + return Promise.reject( + new Error( + `[@octokit/graphql] "${key}" cannot be used as variable name` + ) + ); + } + } + const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; + const requestOptions = Object.keys( + parsedOptions + ).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = parsedOptions[key]; + return result; + } + if (!result.variables) { + result.variables = {}; + } + result.variables[key] = parsedOptions[key]; + return result; + }, {}); + const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl; + if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { + requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); + } + return request2(requestOptions).then((response) => { + if (response.data.errors) { + const headers = {}; + for (const key of Object.keys(response.headers)) { + headers[key] = response.headers[key]; + } + throw new GraphqlResponseError( + requestOptions, + headers, + response.data + ); + } + return response.data.data; + }); +} + +// pkg/dist-src/with-defaults.js +function withDefaults(request2, newDefaults) { + const newRequest = request2.defaults(newDefaults); + const newApi = (query, options) => { + return graphql(newRequest, query, options); + }; + return Object.assign(newApi, { + defaults: withDefaults.bind(null, newRequest), + endpoint: newRequest.endpoint + }); +} + +// pkg/dist-src/index.js +var graphql2 = withDefaults(request, { + headers: { + "user-agent": `octokit-graphql.js/${VERSION} ${getUserAgent()}` + }, + method: "POST", + url: "/graphql" +}); +function withCustomRequest(customRequest) { + return withDefaults(customRequest, { + method: "POST", + url: "/graphql" + }); +} +export { + GraphqlResponseError, + graphql2 as graphql, + withCustomRequest +}; diff --git a/.github/octokit/node_modules/@octokit/graphql/dist-bundle/index.js.map b/.github/octokit/node_modules/@octokit/graphql/dist-bundle/index.js.map new file mode 100644 index 000000000..b037ba302 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/graphql/dist-bundle/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../dist-src/index.js", "../dist-src/version.js", "../dist-src/with-defaults.js", "../dist-src/graphql.js", "../dist-src/error.js"], + "sourcesContent": ["import { request } from \"@octokit/request\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version.js\";\nimport { withDefaults } from \"./with-defaults.js\";\nconst graphql = withDefaults(request, {\n headers: {\n \"user-agent\": `octokit-graphql.js/${VERSION} ${getUserAgent()}`\n },\n method: \"POST\",\n url: \"/graphql\"\n});\nimport { GraphqlResponseError } from \"./error.js\";\nfunction withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\"\n });\n}\nexport {\n GraphqlResponseError,\n graphql,\n withCustomRequest\n};\n", "const VERSION = \"0.0.0-development\";\nexport {\n VERSION\n};\n", "import { request as Request } from \"@octokit/request\";\nimport { graphql } from \"./graphql.js\";\nfunction withDefaults(request, newDefaults) {\n const newRequest = request.defaults(newDefaults);\n const newApi = (query, options) => {\n return graphql(newRequest, query, options);\n };\n return Object.assign(newApi, {\n defaults: withDefaults.bind(null, newRequest),\n endpoint: newRequest.endpoint\n });\n}\nexport {\n withDefaults\n};\n", "import { request as Request } from \"@octokit/request\";\nimport { GraphqlResponseError } from \"./error.js\";\nconst NON_VARIABLE_OPTIONS = [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"query\",\n \"mediaType\"\n];\nconst FORBIDDEN_VARIABLE_OPTIONS = [\"query\", \"method\", \"url\"];\nconst GHES_V3_SUFFIX_REGEX = /\\/api\\/v3\\/?$/;\nfunction graphql(request, query, options) {\n if (options) {\n if (typeof query === \"string\" && \"query\" in options) {\n return Promise.reject(\n new Error(`[@octokit/graphql] \"query\" cannot be used as variable name`)\n );\n }\n for (const key in options) {\n if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))\n continue;\n return Promise.reject(\n new Error(\n `[@octokit/graphql] \"${key}\" cannot be used as variable name`\n )\n );\n }\n }\n const parsedOptions = typeof query === \"string\" ? Object.assign({ query }, options) : query;\n const requestOptions = Object.keys(\n parsedOptions\n ).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = parsedOptions[key];\n return result;\n }\n if (!result.variables) {\n result.variables = {};\n }\n result.variables[key] = parsedOptions[key];\n return result;\n }, {});\n const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl;\n if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {\n requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, \"/api/graphql\");\n }\n return request(requestOptions).then((response) => {\n if (response.data.errors) {\n const headers = {};\n for (const key of Object.keys(response.headers)) {\n headers[key] = response.headers[key];\n }\n throw new GraphqlResponseError(\n requestOptions,\n headers,\n response.data\n );\n }\n return response.data.data;\n });\n}\nexport {\n graphql\n};\n", "function _buildMessageForResponseErrors(data) {\n return `Request failed due to following response errors:\n` + data.errors.map((e) => ` - ${e.message}`).join(\"\\n\");\n}\nclass GraphqlResponseError extends Error {\n constructor(request, headers, response) {\n super(_buildMessageForResponseErrors(response));\n this.request = request;\n this.headers = headers;\n this.response = response;\n this.errors = response.errors;\n this.data = response.data;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n name = \"GraphqlResponseError\";\n errors;\n data;\n}\nexport {\n GraphqlResponseError\n};\n"], + "mappings": ";AAAA,SAAS,eAAe;AACxB,SAAS,oBAAoB;;;ACD7B,IAAM,UAAU;;;ACAhB,SAAS,WAAWA,gBAAe;;;ACAnC,SAAS,WAAW,eAAe;;;ACAnC,SAAS,+BAA+B,MAAM;AAC5C,SAAO;AAAA,IACL,KAAK,OAAO,IAAI,CAAC,MAAM,MAAM,EAAE,OAAO,EAAE,EAAE,KAAK,IAAI;AACvD;AACA,IAAM,uBAAN,cAAmC,MAAM;AAAA,EACvC,YAAYC,UAAS,SAAS,UAAU;AACtC,UAAM,+BAA+B,QAAQ,CAAC;AAC9C,SAAK,UAAUA;AACf,SAAK,UAAU;AACf,SAAK,WAAW;AAChB,SAAK,SAAS,SAAS;AACvB,SAAK,OAAO,SAAS;AACrB,QAAI,MAAM,mBAAmB;AAC3B,YAAM,kBAAkB,MAAM,KAAK,WAAW;AAAA,IAChD;AAAA,EACF;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA;AACF;;;ADjBA,IAAM,uBAAuB;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACA,IAAM,6BAA6B,CAAC,SAAS,UAAU,KAAK;AAC5D,IAAM,uBAAuB;AAC7B,SAAS,QAAQC,UAAS,OAAO,SAAS;AACxC,MAAI,SAAS;AACX,QAAI,OAAO,UAAU,YAAY,WAAW,SAAS;AACnD,aAAO,QAAQ;AAAA,QACb,IAAI,MAAM,4DAA4D;AAAA,MACxE;AAAA,IACF;AACA,eAAW,OAAO,SAAS;AACzB,UAAI,CAAC,2BAA2B,SAAS,GAAG;AAC1C;AACF,aAAO,QAAQ;AAAA,QACb,IAAI;AAAA,UACF,uBAAuB,GAAG;AAAA,QAC5B;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACA,QAAM,gBAAgB,OAAO,UAAU,WAAW,OAAO,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI;AACtF,QAAM,iBAAiB,OAAO;AAAA,IAC5B;AAAA,EACF,EAAE,OAAO,CAAC,QAAQ,QAAQ;AACxB,QAAI,qBAAqB,SAAS,GAAG,GAAG;AACtC,aAAO,GAAG,IAAI,cAAc,GAAG;AAC/B,aAAO;AAAA,IACT;AACA,QAAI,CAAC,OAAO,WAAW;AACrB,aAAO,YAAY,CAAC;AAAA,IACtB;AACA,WAAO,UAAU,GAAG,IAAI,cAAc,GAAG;AACzC,WAAO;AAAA,EACT,GAAG,CAAC,CAAC;AACL,QAAM,UAAU,cAAc,WAAWA,SAAQ,SAAS,SAAS;AACnE,MAAI,qBAAqB,KAAK,OAAO,GAAG;AACtC,mBAAe,MAAM,QAAQ,QAAQ,sBAAsB,cAAc;AAAA,EAC3E;AACA,SAAOA,SAAQ,cAAc,EAAE,KAAK,CAAC,aAAa;AAChD,QAAI,SAAS,KAAK,QAAQ;AACxB,YAAM,UAAU,CAAC;AACjB,iBAAW,OAAO,OAAO,KAAK,SAAS,OAAO,GAAG;AAC/C,gBAAQ,GAAG,IAAI,SAAS,QAAQ,GAAG;AAAA,MACrC;AACA,YAAM,IAAI;AAAA,QACR;AAAA,QACA;AAAA,QACA,SAAS;AAAA,MACX;AAAA,IACF;AACA,WAAO,SAAS,KAAK;AAAA,EACvB,CAAC;AACH;;;AD5DA,SAAS,aAAaC,UAAS,aAAa;AAC1C,QAAM,aAAaA,SAAQ,SAAS,WAAW;AAC/C,QAAM,SAAS,CAAC,OAAO,YAAY;AACjC,WAAO,QAAQ,YAAY,OAAO,OAAO;AAAA,EAC3C;AACA,SAAO,OAAO,OAAO,QAAQ;AAAA,IAC3B,UAAU,aAAa,KAAK,MAAM,UAAU;AAAA,IAC5C,UAAU,WAAW;AAAA,EACvB,CAAC;AACH;;;AFPA,IAAMC,WAAU,aAAa,SAAS;AAAA,EACpC,SAAS;AAAA,IACP,cAAc,sBAAsB,OAAO,IAAI,aAAa,CAAC;AAAA,EAC/D;AAAA,EACA,QAAQ;AAAA,EACR,KAAK;AACP,CAAC;AAED,SAAS,kBAAkB,eAAe;AACxC,SAAO,aAAa,eAAe;AAAA,IACjC,QAAQ;AAAA,IACR,KAAK;AAAA,EACP,CAAC;AACH;", + "names": ["Request", "request", "request", "request", "graphql"] +} diff --git a/.github/octokit/node_modules/@octokit/graphql/dist-src/error.js b/.github/octokit/node_modules/@octokit/graphql/dist-src/error.js new file mode 100644 index 000000000..e899b5afc --- /dev/null +++ b/.github/octokit/node_modules/@octokit/graphql/dist-src/error.js @@ -0,0 +1,23 @@ +function _buildMessageForResponseErrors(data) { + return `Request failed due to following response errors: +` + data.errors.map((e) => ` - ${e.message}`).join("\n"); +} +class GraphqlResponseError extends Error { + constructor(request, headers, response) { + super(_buildMessageForResponseErrors(response)); + this.request = request; + this.headers = headers; + this.response = response; + this.errors = response.errors; + this.data = response.data; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + } + name = "GraphqlResponseError"; + errors; + data; +} +export { + GraphqlResponseError +}; diff --git a/.github/octokit/node_modules/@octokit/graphql/dist-src/graphql.js b/.github/octokit/node_modules/@octokit/graphql/dist-src/graphql.js new file mode 100644 index 000000000..0b033b460 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/graphql/dist-src/graphql.js @@ -0,0 +1,66 @@ +import { request as Request } from "@octokit/request"; +import { GraphqlResponseError } from "./error.js"; +const NON_VARIABLE_OPTIONS = [ + "method", + "baseUrl", + "url", + "headers", + "request", + "query", + "mediaType" +]; +const FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; +const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; +function graphql(request, query, options) { + if (options) { + if (typeof query === "string" && "query" in options) { + return Promise.reject( + new Error(`[@octokit/graphql] "query" cannot be used as variable name`) + ); + } + for (const key in options) { + if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) + continue; + return Promise.reject( + new Error( + `[@octokit/graphql] "${key}" cannot be used as variable name` + ) + ); + } + } + const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; + const requestOptions = Object.keys( + parsedOptions + ).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = parsedOptions[key]; + return result; + } + if (!result.variables) { + result.variables = {}; + } + result.variables[key] = parsedOptions[key]; + return result; + }, {}); + const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl; + if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { + requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); + } + return request(requestOptions).then((response) => { + if (response.data.errors) { + const headers = {}; + for (const key of Object.keys(response.headers)) { + headers[key] = response.headers[key]; + } + throw new GraphqlResponseError( + requestOptions, + headers, + response.data + ); + } + return response.data.data; + }); +} +export { + graphql +}; diff --git a/.github/octokit/node_modules/@octokit/graphql/dist-src/index.js b/.github/octokit/node_modules/@octokit/graphql/dist-src/index.js new file mode 100644 index 000000000..c3e544675 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/graphql/dist-src/index.js @@ -0,0 +1,23 @@ +import { request } from "@octokit/request"; +import { getUserAgent } from "universal-user-agent"; +import { VERSION } from "./version.js"; +import { withDefaults } from "./with-defaults.js"; +const graphql = withDefaults(request, { + headers: { + "user-agent": `octokit-graphql.js/${VERSION} ${getUserAgent()}` + }, + method: "POST", + url: "/graphql" +}); +import { GraphqlResponseError } from "./error.js"; +function withCustomRequest(customRequest) { + return withDefaults(customRequest, { + method: "POST", + url: "/graphql" + }); +} +export { + GraphqlResponseError, + graphql, + withCustomRequest +}; diff --git a/.github/octokit/node_modules/@octokit/graphql/dist-src/version.js b/.github/octokit/node_modules/@octokit/graphql/dist-src/version.js new file mode 100644 index 000000000..efd8294c9 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/graphql/dist-src/version.js @@ -0,0 +1,4 @@ +const VERSION = "8.1.1"; +export { + VERSION +}; diff --git a/.github/octokit/node_modules/@octokit/graphql/dist-src/with-defaults.js b/.github/octokit/node_modules/@octokit/graphql/dist-src/with-defaults.js new file mode 100644 index 000000000..2e7dd5895 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/graphql/dist-src/with-defaults.js @@ -0,0 +1,15 @@ +import { request as Request } from "@octokit/request"; +import { graphql } from "./graphql.js"; +function withDefaults(request, newDefaults) { + const newRequest = request.defaults(newDefaults); + const newApi = (query, options) => { + return graphql(newRequest, query, options); + }; + return Object.assign(newApi, { + defaults: withDefaults.bind(null, newRequest), + endpoint: newRequest.endpoint + }); +} +export { + withDefaults +}; diff --git a/.github/octokit/node_modules/@octokit/graphql/dist-types/error.d.ts b/.github/octokit/node_modules/@octokit/graphql/dist-types/error.d.ts new file mode 100644 index 000000000..722b9e0a4 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/graphql/dist-types/error.d.ts @@ -0,0 +1,13 @@ +import type { ResponseHeaders } from "@octokit/types"; +import type { GraphQlEndpointOptions, GraphQlQueryResponse } from "./types.js"; +type ServerResponseData = Required>; +export declare class GraphqlResponseError extends Error { + readonly request: GraphQlEndpointOptions; + readonly headers: ResponseHeaders; + readonly response: ServerResponseData; + name: string; + readonly errors: GraphQlQueryResponse["errors"]; + readonly data: ResponseData; + constructor(request: GraphQlEndpointOptions, headers: ResponseHeaders, response: ServerResponseData); +} +export {}; diff --git a/.github/octokit/node_modules/@octokit/graphql/dist-types/graphql.d.ts b/.github/octokit/node_modules/@octokit/graphql/dist-types/graphql.d.ts new file mode 100644 index 000000000..f21fe222a --- /dev/null +++ b/.github/octokit/node_modules/@octokit/graphql/dist-types/graphql.d.ts @@ -0,0 +1,3 @@ +import { request as Request } from "@octokit/request"; +import type { RequestParameters, GraphQlQueryResponseData } from "./types.js"; +export declare function graphql(request: typeof Request, query: string | RequestParameters, options?: RequestParameters): Promise; diff --git a/.github/octokit/node_modules/@octokit/graphql/dist-types/index.d.ts b/.github/octokit/node_modules/@octokit/graphql/dist-types/index.d.ts new file mode 100644 index 000000000..94f3bf270 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/graphql/dist-types/index.d.ts @@ -0,0 +1,5 @@ +import { request } from "@octokit/request"; +export declare const graphql: import("./types.js").graphql; +export type { GraphQlQueryResponseData } from "./types.js"; +export { GraphqlResponseError } from "./error.js"; +export declare function withCustomRequest(customRequest: typeof request): import("./types.js").graphql; diff --git a/.github/octokit/node_modules/@octokit/graphql/dist-types/types.d.ts b/.github/octokit/node_modules/@octokit/graphql/dist-types/types.d.ts new file mode 100644 index 000000000..ceba02581 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/graphql/dist-types/types.d.ts @@ -0,0 +1,55 @@ +import type { EndpointOptions, RequestParameters as RequestParametersType, EndpointInterface } from "@octokit/types"; +export type GraphQlEndpointOptions = EndpointOptions & { + variables?: { + [key: string]: unknown; + }; +}; +export type RequestParameters = RequestParametersType; +export type Query = string; +export interface graphql { + /** + * Sends a GraphQL query request based on endpoint options + * The GraphQL query must be specified in `options`. + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: RequestParameters): GraphQlResponse; + /** + * Sends a GraphQL query request based on endpoint options + * + * @param {string} query GraphQL query. Example: `'query { viewer { login } }'`. + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (query: Query, parameters?: RequestParameters): GraphQlResponse; + /** + * Returns a new `endpoint` with updated route and parameters + */ + defaults: (newDefaults: RequestParameters) => graphql; + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: EndpointInterface; +} +export type GraphQlResponse = Promise; +export type GraphQlQueryResponseData = { + [key: string]: any; +}; +export type GraphQlQueryResponse = { + data: ResponseData; + errors?: [ + { + type: string; + message: string; + path: [string]; + extensions: { + [key: string]: any; + }; + locations: [ + { + line: number; + column: number; + } + ]; + } + ]; +}; diff --git a/.github/octokit/node_modules/@octokit/graphql/dist-types/version.d.ts b/.github/octokit/node_modules/@octokit/graphql/dist-types/version.d.ts new file mode 100644 index 000000000..0aca66546 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/graphql/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "8.1.1"; diff --git a/.github/octokit/node_modules/@octokit/graphql/dist-types/with-defaults.d.ts b/.github/octokit/node_modules/@octokit/graphql/dist-types/with-defaults.d.ts new file mode 100644 index 000000000..964486872 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/graphql/dist-types/with-defaults.d.ts @@ -0,0 +1,3 @@ +import { request as Request } from "@octokit/request"; +import type { graphql as ApiInterface, RequestParameters } from "./types.js"; +export declare function withDefaults(request: typeof Request, newDefaults: RequestParameters): ApiInterface; diff --git a/.github/octokit/node_modules/@octokit/graphql/package.json b/.github/octokit/node_modules/@octokit/graphql/package.json new file mode 100644 index 000000000..244e0effc --- /dev/null +++ b/.github/octokit/node_modules/@octokit/graphql/package.json @@ -0,0 +1,57 @@ +{ + "name": "@octokit/graphql", + "version": "8.1.1", + "publishConfig": { + "access": "public", + "provenance": true + }, + "type": "module", + "description": "GitHub GraphQL API client for browsers and Node", + "repository": "github:octokit/graphql.js", + "keywords": [ + "octokit", + "github", + "api", + "graphql" + ], + "author": "Gregor Martynus (https://github.com/gr2m)", + "license": "MIT", + "dependencies": { + "@octokit/request": "^9.0.0", + "@octokit/types": "^13.0.0", + "universal-user-agent": "^7.0.0" + }, + "devDependencies": { + "@octokit/tsconfig": "^3.0.0", + "@types/fetch-mock": "^7.2.5", + "@types/jest": "^29.0.0", + "@types/node": "^20.0.0", + "esbuild": "^0.20.0", + "fetch-mock": "npm:@gr2m/fetch-mock@9.11.0-pull-request-644.1", + "glob": "^10.2.6", + "jest": "^29.0.0", + "prettier": "3.2.5", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^29.1.0", + "typescript": "^5.3.0" + }, + "engines": { + "node": ">= 18" + }, + "files": [ + "dist-*/**", + "bin/**" + ], + "types": "./dist-types/index.d.ts", + "exports": { + ".": { + "types": "./dist-types/index.d.ts", + "import": "./dist-bundle/index.js", + "default": "./dist-bundle/index.js" + }, + "./types": { + "types": "./dist-types/types.d.ts" + } + }, + "sideEffects": false +} diff --git a/.github/octokit/node_modules/@octokit/oauth-authorization-url/LICENSE b/.github/octokit/node_modules/@octokit/oauth-authorization-url/LICENSE new file mode 100644 index 000000000..ef2c18ee5 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-authorization-url/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2019 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.github/octokit/node_modules/@octokit/oauth-authorization-url/README.md b/.github/octokit/node_modules/@octokit/oauth-authorization-url/README.md new file mode 100644 index 000000000..70c4e45a9 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-authorization-url/README.md @@ -0,0 +1,281 @@ +# oauth-authorization-url.js + +> Universal library to retrieve GitHub’s identity URL for the OAuth web flow + +[![@latest](https://img.shields.io/npm/v/@octokit/oauth-authorization-url.svg)](https://www.npmjs.com/package/@octokit/oauth-authorization-url) +[![Build Status](https://github.com/octokit/oauth-authorization-url.js/workflows/Test/badge.svg)](https://github.com/octokit/oauth-authorization-url.js/actions?query=workflow%3ATest+branch%3Amain) + +See [GitHub’s Developer Guide for the OAuth App web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). Note that the [OAuth web application flow for GitHub Apps](https://docs.github.com/en/developers/apps/identifying-and-authorizing-users-for-github-apps#web-application-flow) is slightly different. GitHub Apps do not support scopes for its user access tokens (they are called user-to-server tokens for GitHub Apps), instead they inherit the user permissions from the GitHub App's registration and the repository/organization access and permissions from the respective installation. + + + +- [Usage](#usage) + - [For OAuth Apps](#for-oauth-apps) + - [For GitHub Apps](#for-github-apps) +- [Options](#options) +- [Result](#result) +- [Types](#types) +- [License](#license) + + + +## Usage + + + + + + + + + + +
+ Browsers + + +Load `@octokit/oauth-authorization-url` directly from [esm.sh](https://esm.sh) + +```html + +``` + +
+ Node + + +Install with npm install @octokit/oauth-authorization-url + +```js +const { oauthAuthorizationUrl } = require("@octokit/oauth-authorization-url"); +// or: import { oauthAuthorizationUrl } from "@octokit/oauth-authorization-url"; +``` + +
+ +> [!IMPORTANT] +> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json` by setting `"moduleResolution": "node16", "module": "node16"`. +> +> See the TypeScript docs on [package.json "exports"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports).
+> See this [helpful guide on transitioning to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) from [@sindresorhus](https://github.com/sindresorhus) + +### For OAuth Apps + +```js +const { url, clientId, redirectUrl, login, scopes, state } = + oauthAuthorizationUrl({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + redirectUrl: "https://example.com", + login: "octocat", + scopes: ["repo", "admin:org"], + state: "secret123", + }); +``` + +### For GitHub Apps + +```js +const { url, clientId, redirectUrl, login, state } = oauthAuthorizationUrl({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + redirectUrl: "https://example.com", + login: "octocat", + state: "secret123", +}); +``` + +## Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + description +
+ clientId + + Required. The client ID you received from GitHub when you registered. +
+ clientType + + +Must be set to either `"oauth-app"` or `"github-app"`. Defaults to `"oauth-app"`. + +
+ redirectUrl + + The URL in your application where users will be sent after authorization. See Redirect URLs in GitHub’s Developer Guide. +
+ login + + Suggests a specific account to use for signing in and authorizing the app. +
+ scopes + + +Only relevant when `clientType` is set to `"oauth-app"`. + +An array of scope names (or: space-delimited list of scopes). If not provided, scope defaults to an empty list for users that have not authorized any scopes for the application. For users who have authorized scopes for the application, the user won't be shown the OAuth authorization page with the list of scopes. Instead, this step of the flow will automatically complete with the set of scopes the user has authorized for the application. For example, if a user has already performed the web flow twice and has authorized one token with user scope and another token with repo scope, a third web flow that does not provide a scope will receive a token with user and repo scope. + +Defaults to `[]` if `clientType` is set to `"oauth-app"`. + +
+ state + + An unguessable random string. It is used to protect against cross-site request forgery attacks. + Defaults to Math.random().toString(36).substr(2). +
+ allowSignup + + Whether or not unauthenticated users will be offered an option to sign up for GitHub during the OAuth flow. Use false in the case that a policy prohibits signups. Defaults to true. +
+ baseUrl + + When using GitHub Enterprise Server, set the baseUrl to the origin, e.g. https://github.my-enterprise.com. +
+ +## Result + +`oauthAuthorizationUrl()` returns an object with the following properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + description +
+ allowSignup + + Returns options.allowSignup if it was set. Defaults to true. +
+ clientType + + Returns options.clientType. Defaults to "oauth-app". +
+ clientId + + Returns options.clientId. +
+ login + + Returns options.login if it was set. Defaults to null. +
+ redirectUrl + + Returns options.redirectUrl if it was set. Defaults to null. +
+ scopes + + +Only set if `options.clientType` is set to `"oauth-app"`. + +Returns an array of strings. Returns options.scopes if it was set and turns the string into an array if a string was passed, otherwise []. + +
+ state + + Returns options.state if it was set. Defaults to Defaults to Math.random().toString(36).substr(2). +
+ url + + The authorization URL +
+ +## Types + +```ts +import { + ClientType, + OAuthAppOptions, + OAuthAppResult, + GitHubAppOptions, + GitHubAppResult, +} from "@octokit/oauth-authorization-url"; +``` + +## License + +[MIT](LICENSE) diff --git a/.github/octokit/node_modules/@octokit/oauth-authorization-url/dist-src/index.js b/.github/octokit/node_modules/@octokit/oauth-authorization-url/dist-src/index.js new file mode 100644 index 000000000..fd66f3ae6 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-authorization-url/dist-src/index.js @@ -0,0 +1,44 @@ +function oauthAuthorizationUrl(options) { + const clientType = options.clientType || "oauth-app"; + const baseUrl = options.baseUrl || "https://github.com"; + const result = { + clientType, + allowSignup: options.allowSignup === false ? false : true, + clientId: options.clientId, + login: options.login || null, + redirectUrl: options.redirectUrl || null, + state: options.state || Math.random().toString(36).substr(2), + url: "" + }; + if (clientType === "oauth-app") { + const scopes = "scopes" in options ? options.scopes : []; + result.scopes = typeof scopes === "string" ? scopes.split(/[,\s]+/).filter(Boolean) : scopes; + } + result.url = urlBuilderAuthorize(`${baseUrl}/login/oauth/authorize`, result); + return result; +} +function urlBuilderAuthorize(base, options) { + const map = { + allowSignup: "allow_signup", + clientId: "client_id", + login: "login", + redirectUrl: "redirect_uri", + scopes: "scope", + state: "state" + }; + let url = base; + Object.keys(map).filter((k) => options[k] !== null).filter((k) => { + if (k !== "scopes") + return true; + if (options.clientType === "github-app") + return false; + return !Array.isArray(options[k]) || options[k].length > 0; + }).map((key) => [map[key], `${options[key]}`]).forEach(([key, value], index) => { + url += index === 0 ? `?` : "&"; + url += `${key}=${encodeURIComponent(value)}`; + }); + return url; +} +export { + oauthAuthorizationUrl +}; diff --git a/.github/octokit/node_modules/@octokit/oauth-authorization-url/dist-types/index.d.ts b/.github/octokit/node_modules/@octokit/oauth-authorization-url/dist-types/index.d.ts new file mode 100644 index 000000000..4671a2442 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-authorization-url/dist-types/index.d.ts @@ -0,0 +1,4 @@ +import type { OAuthAppOptions, GitHubAppOptions, OAuthAppResult, GitHubAppResult } from "./types.js"; +export type { ClientType, OAuthAppOptions, GitHubAppOptions, OAuthAppResult, GitHubAppResult, } from "./types.js"; +export declare function oauthAuthorizationUrl(options: OAuthAppOptions): OAuthAppResult; +export declare function oauthAuthorizationUrl(options: GitHubAppOptions): GitHubAppResult; diff --git a/.github/octokit/node_modules/@octokit/oauth-authorization-url/dist-types/types.d.ts b/.github/octokit/node_modules/@octokit/oauth-authorization-url/dist-types/types.d.ts new file mode 100644 index 000000000..5685a8d86 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-authorization-url/dist-types/types.d.ts @@ -0,0 +1,39 @@ +export type ClientType = "oauth-app" | "github-app"; +export type OAuthAppOptions = { + clientId: string; + clientType?: "oauth-app"; + allowSignup?: boolean; + login?: string; + scopes?: string | string[]; + redirectUrl?: string; + state?: string; + baseUrl?: string; +}; +export type GitHubAppOptions = { + clientId: string; + clientType: "github-app"; + allowSignup?: boolean; + login?: string; + redirectUrl?: string; + state?: string; + baseUrl?: string; +}; +export type OAuthAppResult = { + allowSignup: boolean; + clientId: string; + clientType: "oauth-app"; + login: string | null; + redirectUrl: string | null; + scopes: string[]; + state: string; + url: string; +}; +export type GitHubAppResult = { + allowSignup: boolean; + clientId: string; + clientType: "github-app"; + login: string | null; + redirectUrl: string | null; + state: string; + url: string; +}; diff --git a/.github/octokit/node_modules/@octokit/oauth-authorization-url/package.json b/.github/octokit/node_modules/@octokit/oauth-authorization-url/package.json new file mode 100644 index 000000000..40274626c --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-authorization-url/package.json @@ -0,0 +1,44 @@ +{ + "name": "@octokit/oauth-authorization-url", + "publishConfig": { + "access": "public", + "provenance": true + }, + "type": "module", + "version": "7.1.1", + "description": "Universal library to retrieve GitHub’s identity URL for the OAuth web flow", + "repository": "github:octokit/oauth-authorization-url.js", + "files": [ + "dist-*/**" + ], + "keywords": [ + "octokit", + "github", + "oauth" + ], + "author": "Gregor Martynus (https://github.com/gr2m)", + "license": "MIT", + "devDependencies": { + "@octokit/tsconfig": "^3.0.0", + "@types/jest": "^29.0.0", + "esbuild": "^0.20.0", + "glob": "^10.2.6", + "jest": "^29.0.0", + "prettier": "3.2.5", + "ts-jest": "^29.0.0", + "typescript": "^5.0.0" + }, + "engines": { + "node": ">= 18" + }, + "types": "./dist-types/index.d.ts", + "exports": { + ".": { + "types": "./dist-types/index.d.ts", + "import": "./dist-src/index.js", + "default": "./dist-src/index.js" + } + }, + "sideEffects": false, + "unpkg": "dist-src/index.js" +} diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/LICENSE b/.github/octokit/node_modules/@octokit/oauth-methods/LICENSE new file mode 100644 index 000000000..57049d04c --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2021 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/README.md b/.github/octokit/node_modules/@octokit/oauth-methods/README.md new file mode 100644 index 000000000..1d90ea059 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/README.md @@ -0,0 +1,1613 @@ +# oauth-methods.js + +> Set of stateless request methods to create, check, reset, refresh, and delete user access tokens for OAuth and GitHub Apps + +[![@latest](https://img.shields.io/npm/v/@octokit/oauth-methods.svg)](https://www.npmjs.com/package/@octokit/oauth-methods) +[![Build Status](https://github.com/octokit/oauth-methods.js/workflows/Test/badge.svg)](https://github.com/octokit/oauth-methods.js/actions?query=workflow%3ATest+branch%3Amain) + + + +- [Usage](#usage) + - [OAuth Web Flow](#oauth-web-flow) + - [OAuth Device Flow](#oauth-device-flow) +- [Methods](#methods) + - [`getWebFlowAuthorizationUrl()`](#getwebflowauthorizationurl) + - [`exchangeWebFlowCode()`](#exchangewebflowcode) + - [`createDeviceCode()`](#createdevicecode) + - [`exchangeDeviceCode()`](#exchangedevicecode) + - [`checkToken()`](#checktoken) + - [`refreshToken()`](#refreshtoken) + - [`scopeToken()`](#scopetoken) + - [`resetToken()`](#resettoken) + - [`deleteToken()`](#deletetoken) + - [`deleteAuthorization()`](#deleteauthorization) +- [Authentication object](#authentication-object) + - [OAuth APP authentication](#oauth-app-authentication) + - [GitHub App with non-expiring user authentication](#github-app-with-non-expiring-user-authentication) + - [GitHub App with expiring user authentication](#github-app-with-expiring-user-authentication) +- [Types](#types) +- [Contributing](#contributing) +- [License](#license) + + + +The OAuth endpoints related to user access tokens are not all part of GitHub's REST API and they behave slightly different. The methods exported by `@octokit/normalize the differences so you don't have to. + +## Usage + + + + + + +
+ +Browsers + + + +`@octokit/oauth-methods` is not meant for browser usage. + +Some of the methods will work, but others do not have CORS headers enabled and will fail (`exchangeWebFlowCode()`, `createDeviceCode()`, `exchangeDeviceCode()`, `refreshToken()`). Also the Client Secret should not be exposed to clients as it can be used for a [Person-in-the-middle attack](https://en.wikipedia.org/wiki/Person-in-the-middle_attack). + +
+ +Node + + + +Install with `npm install @octokit/core @octokit/oauth-methods` + +```js +import { + exchangeWebFlowCode, + createDeviceCode, + exchangeDeviceCode, + checkToken, + refreshToken, + scopeToken, + resetToken, + deleteToken, + deleteAuthorization, +} from "@octokit/oauth-methods"; +``` + +
+ +> [!IMPORTANT] +> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json` by setting `"moduleResolution": "node16", "module": "node16"`. +> +> See the TypeScript docs on [package.json "exports"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports).
+> See this [helpful guide on transitioning to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) from [@sindresorhus](https://github.com/sindresorhus) + +### OAuth Web Flow + +After a user granted access to an OAuth App or GitHub App on [Step 1 of GitHub's OAuth Web Flow](https://docs.github.com/en/developers/apps/identifying-and-authorizing-users-for-github-apps#1-request-a-users-github-identity), they get redirected to a URL controlled by your app with a `?code=...` query parameter. + +You can exchange that code for a user access token as described in [Step 2 of GitHub's OAuth Web Flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#2-users-are-redirected-back-to-your-site-by-github). + +Setting `clientType` is required because there are slight differences between `"oauth-app"` and `"github-app"`. Most importantly, GitHub Apps do not support scopes. + +```js +const { data, authentication } = await exchangeWebFlowCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + code: "code123", + scopes: ["repo"], +}); +``` + +`data` is the raw response data. `authentication` is a [User Authentication object](#authentication-object). + +### OAuth Device Flow + +In [step 1 of GitHub's OAuth Device Flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-1-app-requests-the-device-and-user-verification-codes-from-github), you need to create a device and user code + +```js +const { + data: { device_code, user_code, verification_uri }, +} = await createDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["repo"], +}); +``` + +In [step 2 of GitHub's OAuth Device Flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-2-prompt-the-user-to-enter-the-user-code-in-a-browser), the user has to enter `user_code` on `verification_uri` (https://github.com/login/device unless you use GitHub Enterprise Server). + +Once the user entered the code and granted access, you can exchange the `device_code` for a user access token in [step 3 of GitHub's OAuth Device Flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-3-app-polls-github-to-check-if-the-user-authorized-the-device) + +```js +const { data, authentication } = await exchangeDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + code: device_code, +}); +``` + +`data` is the raw response data. `authentication` is a [User Authentication object](#authentication-object). + +## Methods + +### `getWebFlowAuthorizationUrl()` + +This is a wrapper around [`@octokit/oauth-authorization-url`](https://github.com/octokit/oauth-authorization-url.js#readme) that accepts a `request` option instead of `baseUrl` for consistency with the other OAuth methods. `getWebFlowAuthorizationUrl()` is a synchronous method and does not send any request. + +```js +const { url } = getWebFlowAuthorizationUrl({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["repo"], +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientId + + string + + Required. The client ID you received from GitHub when you registered. +
+ clientType + + string + + Required. Must be set to either "oauth-app" or "github-app". +
+ redirectUrl + + string + + The URL in your application where users will be sent after authorization. See Redirect URLs in GitHub’s Developer Guide. +
+ login + + string + + Suggests a specific account to use for signing in and authorizing the app. +
+ scopes + + array of strings + + +Only relevant if `clientType` is set to `"oauth-app"`. + +An array of scope names (or: space-delimited list of scopes). If not provided, scope defaults to an empty list for users that have not authorized any scopes for the application. For users who have authorized scopes for the application, the user won't be shown the OAuth authorization page with the list of scopes. Instead, this step of the flow will automatically complete with the set of scopes the user has authorized for the application. For example, if a user has already performed the web flow twice and has authorized one token with user scope and another token with repo scope, a third web flow that does not provide a scope will receive a token with user and repo scope. + +Defaults to `[]`. + +
+ state + + string + + An unguessable random string. It is used to protect against cross-site request forgery attacks. + Defaults to Math.random().toString(36).substr(2). +
+ allowSignup + + boolean + + Whether or not unauthenticated users will be offered an option to sign up for GitHub during the OAuth flow. Use false in the case that a policy prohibits signups. Defaults to true. +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +import { request } from "@octokit/request"; +const { url } = getWebFlowAuthorizationUrl({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["repo"], + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +The `getWebFlowAuthorizationUrl` method is synchronous and returns an object with the following properties. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ allowSignup + + boolean + + Returns options.allowSignup if it was set. Defaults to true. +
+ clientType + + string + + Returns options.clientType +
+ clientId + + string + + Returns options.clientId. +
+ login + + string + + Returns options.login if it was set. Defaults to null. +
+ redirectUrl + + string + + Returns options.redirectUrl if it was set. Defaults to null. +
+ scopes + + array of strings + + +Only set if `options.clientType` is set to `"oauth-app"`. + +Returns an array of strings. Returns options.scopes if it was set and turns the string into an array if a string was passed, otherwise []. + +
+ state + + string + + Returns options.state if it was set. Defaults to Math.random().toString(36).substr(2). +
+ url + + string + + The authorization URL +
+ +### `exchangeWebFlowCode()` + +```js +const { data, authentication } = await exchangeWebFlowCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + code: "code123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Must be set to either "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ code + + string + + Required. The code from GitHub's OAuth flow redirect's ?code=... query parameter +
+ redirectUrl + + string + + The redirectUrl option you passed to getWebFlowAuthorizationUrl() +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +import { request } from "@octokit/request"; +const { data, authentication } = await exchangeWebFlowCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + code: "code123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST /login/oauth/access_token`](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#response) (JSON) with an additional `authentication` key which is the [authentication object](#authentication-object). + +### `createDeviceCode()` + +```js +const { data, authentication } = await createDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["repo"], +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Must be set to either "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ scopes + + array of strings + + +Only permitted if `clientType` is set to `"oauth-app"`. GitHub Apps do not support scopes. + +Array of [scope names](https://docs.github.com/en/developers/apps/scopes-for-oauth-apps#available-scopes) you want to request for the user access token. + +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +import { request } from "@octokit/request"; +const { data } = await createDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + scopes: ["repo"], + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST https://github.com/login/device/code`](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#response-1) (JSON). + +### `exchangeDeviceCode()` + +```js +const { data, authentication } = await exchangeDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + code: "code123", +}); +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Must be set to either "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ code + + string + + Required. The device_code from the createDeviceCode() response +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +import { request } from "@octokit/request"; +const { data, authentication } = await exchangeDeviceCode({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + code: "code123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +### `checkToken()` + +```js +const { data, authentication } = await checkToken({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Must be set to either "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ token + + string + + Required. The user access token to check +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +import { request } from "@octokit/request"; +const { data, authentication } = await checkToken({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) with an additional `authentication` key which is the [authentication object](#authentication-object). Note that the `authentication` object will not include the keys for expiring authentication. + +### `refreshToken()` + +Expiring user access tokens are currently in preview. You can [enable them for any of your GitHub apps](https://docs.github.com/en/developers/apps/refreshing-user-to-server-access-tokens#configuring-expiring-user-tokens-for-an-existing-github-app). OAuth Apps do not support expiring user access tokens + +When a user access token expires it can be [refreshed using a refresh token](https://docs.github.com/en/developers/apps/refreshing-user-to-server-access-tokens). Refreshing a token invalidates the current user access token. + +```js +const { data, authentication } = await refreshToken({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef12347890abcdef12345678", + refreshToken: "r1.refreshtoken123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Must be set to "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ refreshToken + + string + + Required. The refresh token that was received alongside the user access token. +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +import { request } from "@octokit/request"; +const { data, authentication } = await refreshToken({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef12347890abcdef12345678", + refreshToken: "r1.refreshtoken123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST /login/oauth/access_token`](https://docs.github.com/en/developers/apps/refreshing-user-to-server-access-tokens#response) with an additional `authentication` key which is the [GitHub App expiring user authentication](#github-app-with-expiring-user-authentication). + +### `scopeToken()` + +```js +const { data, authentication } = await scopeToken({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", + target: "octokit", + repositories: ["oauth-methods.js"], + permissions: { + issues: "write", + }, +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Required. Must be set to "github-app". +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ target + + string + + Required unless targetId is set. The name of the user or organization to scope the user-to-server access token to. +
+ targetId + + integer + + Required unless target is set. The ID of the user or organization to scope the user-to-server access token to. +
+ repositories + + array of strings + + The list of repository names to scope the user-to-server access token to. repositories may not be specified if repository_ids is specified. +
+ repository_ids + + array of integers + + The list of repository IDs to scope the user-to-server access token to. repositories may not be specified if repositories is specified. +
+ permissions + + object + + The permissions granted to the user-to-server access token. See GitHub App Permissions. +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +import { request } from "@octokit/request"; +const { data, authentication } = await scopeToken({ + clientType: "github-app", + clientId: "lv1.1234567890abcdef", + token: "usertoken123", + target: "octokit", + repositories: ["oauth-methods.js"], + permissions: { + issues: "write", + }, + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) with an additional `authentication` key which is the new [authentication object](#authentication-object). + +### `resetToken()` + +```js +const { data, authentication } = await resetToken({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Must be set to "oauth-app" or "github-app". +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ token + + string + + Required. The user access token to reset +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +import { request } from "@octokit/request"; +const { data, authentication } = await resetToken({ + clientId: "1234567890abcdef1234", + clientSecret: "secret", + token: "usertoken123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) with an additional `authentication` key which is the new [authentication object](#authentication-object). + +### `deleteToken()` + +```js +const { status } = await deleteToken({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Must be set to "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ token + + string + + Required. The user access token to delete +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +import { request } from "@octokit/request"; +const { data, authentication } = await deleteToken({ + clientId: "1234567890abcdef1234", + clientSecret: "secret", + token: "usertoken123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) (which is an empty `204` response). + +### `deleteAuthorization()` + +```js +const { status } = await deleteAuthorization({ + clientType: "oauth-app", + clientId: "1234567890abcdef1234", + clientSecret: "1234567890abcdef12347890abcdef12345678", + token: "usertoken123", +}); +``` + +Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + Must be set to "oauth-app" or "github-app" +
+ clientId + + string + + Required. Your app's client ID +
+ clientSecret + + string + + Required. One of your app's client secrets +
+ token + + string + + Required. A valid user access token for the authorization +
+ request + + function + + You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the REST API root endpoint. Example: + +```js +import { request } from "@octokit/request"; +const { data, authentication } = await deleteAuthorization({ + clientId: "1234567890abcdef1234", + clientSecret: "secret", + token: "usertoken123", + request: request.defaults({ + baseUrl: "https://ghe.my-company.com/api/v3", + }), +}); +``` + +
+ +Resolves with an [`@octokit/request` response object](https://github.com/octokit/request.js/#request) for [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#delete-an-app-authorization) (which is an empty `204` response). + +## Authentication object + +The `authentication` object returned by the methods have one of three formats. + +1. [OAuth APP authentication token](#oauth-app-authentication-token) +1. [GitHub APP non-expiring user authentication token with expiring disabled](#github-app-user-authentication-token-with-expiring-disabled) +1. [GitHub APP user authentication token with expiring enabled](#github-app-user-authentication-token-with-expiring-enabled) + +The differences are + +1. `scopes` is only present for OAuth Apps +2. `refreshToken`, `expiresAt`, `refreshTokenExpiresAt` are only present for GitHub Apps, and only if token expiration is enabled + +Note that the `clientSecret` may not be set when using [`exchangeDeviceCode()`](#exchangedevicecode) as `clientSecret` is not required for the OAuth device flow. + +### OAuth APP authentication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + "oauth-app" +
+ clientId + + string + + The app's Client ID +
+ token + + string + + The user access token +
+ scopes + + array of strings + + array of scope names enabled for the token +
+ +### GitHub App with non-expiring user authentication + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ token + + string + + The user access token +
+ +### GitHub App with expiring user authentication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ clientType + + string + + "github-app" +
+ clientId + + string + + The app's Client ID +
+ token + + string + + The user access token +
+ refreshToken + + string + + The refresh token +
+ expiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z +
+ refreshTokenExpiresAt + + string + + Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z +
+ +## Types + +```ts +import { + OAuthAppAuthentication, + GitHubAppAuthentication, + GitHubAppAuthenticationWithExpiration, + GetWebFlowAuthorizationUrlOAuthAppOptions, + GetWebFlowAuthorizationUrlGitHubAppOptions, + GetWebFlowAuthorizationUrlOAuthAppResult, + GetWebFlowAuthorizationUrlGitHubAppResult, + CheckTokenOAuthAppOptions, + CheckTokenGitHubAppOptions, + CheckTokenOAuthAppResponse, + CheckTokenGitHubAppResponse, + ExchangeWebFlowCodeOAuthAppOptions, + ExchangeWebFlowCodeGitHubAppOptions, + ExchangeWebFlowCodeOAuthAppResponse, + ExchangeWebFlowCodeGitHubAppResponse, + CreateDeviceCodeOAuthAppOptions, + CreateDeviceCodeGitHubAppOptions, + CreateDeviceCodeDeviceTokenResponse, + ExchangeDeviceCodeOAuthAppOptionsWithoutClientSecret, + ExchangeDeviceCodeOAuthAppOptions, + ExchangeDeviceCodeGitHubAppOptionsWithoutClientSecret, + ExchangeDeviceCodeGitHubAppOptions, + ExchangeDeviceCodeOAuthAppResponse, + ExchangeDeviceCodeOAuthAppResponseWithoutClientSecret, + ExchangeDeviceCodeGitHubAppResponse, + ExchangeDeviceCodeGitHubAppResponseWithoutClientSecret, + RefreshTokenOptions, + RefreshTokenResponse, + ScopeTokenOptions, + ScopeTokenResponse, + ResetTokenOAuthAppOptions, + ResetTokenGitHubAppOptions, + ResetTokenOAuthAppResponse, + ResetTokenGitHubAppResponse, + DeleteTokenOAuthAppOptions, + DeleteTokenGitHubAppOptions, + DeleteTokenResponse, + DeleteAuthorizationOAuthAppOptions, + DeleteAuthorizationGitHubAppOptions, + DeleteAuthorizationResponse, +} from "@octokit/oauth-methods"; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-bundle/index.js b/.github/octokit/node_modules/@octokit/oauth-methods/dist-bundle/index.js new file mode 100644 index 000000000..53e73ff30 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-bundle/index.js @@ -0,0 +1,326 @@ +// pkg/dist-src/version.js +var VERSION = "0.0.0-development"; + +// pkg/dist-src/get-web-flow-authorization-url.js +import { oauthAuthorizationUrl } from "@octokit/oauth-authorization-url"; +import { request as defaultRequest } from "@octokit/request"; + +// pkg/dist-src/utils.js +import { RequestError } from "@octokit/request-error"; +function requestToOAuthBaseUrl(request) { + const endpointDefaults = request.endpoint.DEFAULTS; + return /^https:\/\/(api\.)?github\.com$/.test(endpointDefaults.baseUrl) ? "https://github.com" : endpointDefaults.baseUrl.replace("/api/v3", ""); +} +async function oauthRequest(request, route, parameters) { + const withOAuthParameters = { + baseUrl: requestToOAuthBaseUrl(request), + headers: { + accept: "application/json" + }, + ...parameters + }; + const response = await request(route, withOAuthParameters); + if ("error" in response.data) { + const error = new RequestError( + `${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, + 400, + { + request: request.endpoint.merge( + route, + withOAuthParameters + ) + } + ); + error.response = response; + throw error; + } + return response; +} + +// pkg/dist-src/get-web-flow-authorization-url.js +function getWebFlowAuthorizationUrl({ + request = defaultRequest, + ...options +}) { + const baseUrl = requestToOAuthBaseUrl(request); + return oauthAuthorizationUrl({ + ...options, + baseUrl + }); +} + +// pkg/dist-src/exchange-web-flow-code.js +import { request as defaultRequest2 } from "@octokit/request"; +async function exchangeWebFlowCode(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest2; + const response = await oauthRequest( + request, + "POST /login/oauth/access_token", + { + client_id: options.clientId, + client_secret: options.clientSecret, + code: options.code, + redirect_uri: options.redirectUrl + } + ); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.access_token, + scopes: response.data.scope.split(/\s+/).filter(Boolean) + }; + if (options.clientType === "github-app") { + if ("refresh_token" in response.data) { + const apiTimeInMs = new Date(response.headers.date).getTime(); + authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp( + apiTimeInMs, + response.data.expires_in + ), authentication.refreshTokenExpiresAt = toTimestamp( + apiTimeInMs, + response.data.refresh_token_expires_in + ); + } + delete authentication.scopes; + } + return { ...response, authentication }; +} +function toTimestamp(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString(); +} + +// pkg/dist-src/create-device-code.js +import { request as defaultRequest3 } from "@octokit/request"; +async function createDeviceCode(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest3; + const parameters = { + client_id: options.clientId + }; + if ("scopes" in options && Array.isArray(options.scopes)) { + parameters.scope = options.scopes.join(" "); + } + return oauthRequest(request, "POST /login/device/code", parameters); +} + +// pkg/dist-src/exchange-device-code.js +import { request as defaultRequest4 } from "@octokit/request"; +async function exchangeDeviceCode(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest4; + const response = await oauthRequest( + request, + "POST /login/oauth/access_token", + { + client_id: options.clientId, + device_code: options.code, + grant_type: "urn:ietf:params:oauth:grant-type:device_code" + } + ); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + token: response.data.access_token, + scopes: response.data.scope.split(/\s+/).filter(Boolean) + }; + if ("clientSecret" in options) { + authentication.clientSecret = options.clientSecret; + } + if (options.clientType === "github-app") { + if ("refresh_token" in response.data) { + const apiTimeInMs = new Date(response.headers.date).getTime(); + authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp2( + apiTimeInMs, + response.data.expires_in + ), authentication.refreshTokenExpiresAt = toTimestamp2( + apiTimeInMs, + response.data.refresh_token_expires_in + ); + } + delete authentication.scopes; + } + return { ...response, authentication }; +} +function toTimestamp2(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString(); +} + +// pkg/dist-src/check-token.js +import { request as defaultRequest5 } from "@octokit/request"; +async function checkToken(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest5; + const response = await request("POST /applications/{client_id}/token", { + headers: { + authorization: `basic ${btoa( + `${options.clientId}:${options.clientSecret}` + )}` + }, + client_id: options.clientId, + access_token: options.token + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: options.token, + scopes: response.data.scopes + }; + if (response.data.expires_at) + authentication.expiresAt = response.data.expires_at; + if (options.clientType === "github-app") { + delete authentication.scopes; + } + return { ...response, authentication }; +} + +// pkg/dist-src/refresh-token.js +import { request as defaultRequest6 } from "@octokit/request"; +async function refreshToken(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest6; + const response = await oauthRequest( + request, + "POST /login/oauth/access_token", + { + client_id: options.clientId, + client_secret: options.clientSecret, + grant_type: "refresh_token", + refresh_token: options.refreshToken + } + ); + const apiTimeInMs = new Date(response.headers.date).getTime(); + const authentication = { + clientType: "github-app", + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.access_token, + refreshToken: response.data.refresh_token, + expiresAt: toTimestamp3(apiTimeInMs, response.data.expires_in), + refreshTokenExpiresAt: toTimestamp3( + apiTimeInMs, + response.data.refresh_token_expires_in + ) + }; + return { ...response, authentication }; +} +function toTimestamp3(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString(); +} + +// pkg/dist-src/scope-token.js +import { request as defaultRequest7 } from "@octokit/request"; +async function scopeToken(options) { + const { + request: optionsRequest, + clientType, + clientId, + clientSecret, + token, + ...requestOptions + } = options; + const request = optionsRequest || /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest7; + const response = await request( + "POST /applications/{client_id}/token/scoped", + { + headers: { + authorization: `basic ${btoa(`${clientId}:${clientSecret}`)}` + }, + client_id: clientId, + access_token: token, + ...requestOptions + } + ); + const authentication = Object.assign( + { + clientType, + clientId, + clientSecret, + token: response.data.token + }, + response.data.expires_at ? { expiresAt: response.data.expires_at } : {} + ); + return { ...response, authentication }; +} + +// pkg/dist-src/reset-token.js +import { request as defaultRequest8 } from "@octokit/request"; +async function resetToken(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest8; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + const response = await request( + "PATCH /applications/{client_id}/token", + { + headers: { + authorization: `basic ${auth}` + }, + client_id: options.clientId, + access_token: options.token + } + ); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.token, + scopes: response.data.scopes + }; + if (response.data.expires_at) + authentication.expiresAt = response.data.expires_at; + if (options.clientType === "github-app") { + delete authentication.scopes; + } + return { ...response, authentication }; +} + +// pkg/dist-src/delete-token.js +import { request as defaultRequest9 } from "@octokit/request"; +async function deleteToken(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest9; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + return request( + "DELETE /applications/{client_id}/token", + { + headers: { + authorization: `basic ${auth}` + }, + client_id: options.clientId, + access_token: options.token + } + ); +} + +// pkg/dist-src/delete-authorization.js +import { request as defaultRequest10 } from "@octokit/request"; +async function deleteAuthorization(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest10; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + return request( + "DELETE /applications/{client_id}/grant", + { + headers: { + authorization: `basic ${auth}` + }, + client_id: options.clientId, + access_token: options.token + } + ); +} +export { + VERSION, + checkToken, + createDeviceCode, + deleteAuthorization, + deleteToken, + exchangeDeviceCode, + exchangeWebFlowCode, + getWebFlowAuthorizationUrl, + refreshToken, + resetToken, + scopeToken +}; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-bundle/index.js.map b/.github/octokit/node_modules/@octokit/oauth-methods/dist-bundle/index.js.map new file mode 100644 index 000000000..668559a1e --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-bundle/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../dist-src/version.js", "../dist-src/get-web-flow-authorization-url.js", "../dist-src/utils.js", "../dist-src/exchange-web-flow-code.js", "../dist-src/create-device-code.js", "../dist-src/exchange-device-code.js", "../dist-src/check-token.js", "../dist-src/refresh-token.js", "../dist-src/scope-token.js", "../dist-src/reset-token.js", "../dist-src/delete-token.js", "../dist-src/delete-authorization.js"], + "sourcesContent": ["const VERSION = \"0.0.0-development\";\nexport {\n VERSION\n};\n", "import { oauthAuthorizationUrl } from \"@octokit/oauth-authorization-url\";\nimport { request as defaultRequest } from \"@octokit/request\";\nimport { requestToOAuthBaseUrl } from \"./utils.js\";\nfunction getWebFlowAuthorizationUrl({\n request = defaultRequest,\n ...options\n}) {\n const baseUrl = requestToOAuthBaseUrl(request);\n return oauthAuthorizationUrl({\n ...options,\n baseUrl\n });\n}\nexport {\n getWebFlowAuthorizationUrl\n};\n", "import { RequestError } from \"@octokit/request-error\";\nfunction requestToOAuthBaseUrl(request) {\n const endpointDefaults = request.endpoint.DEFAULTS;\n return /^https:\\/\\/(api\\.)?github\\.com$/.test(endpointDefaults.baseUrl) ? \"https://github.com\" : endpointDefaults.baseUrl.replace(\"/api/v3\", \"\");\n}\nasync function oauthRequest(request, route, parameters) {\n const withOAuthParameters = {\n baseUrl: requestToOAuthBaseUrl(request),\n headers: {\n accept: \"application/json\"\n },\n ...parameters\n };\n const response = await request(route, withOAuthParameters);\n if (\"error\" in response.data) {\n const error = new RequestError(\n `${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`,\n 400,\n {\n request: request.endpoint.merge(\n route,\n withOAuthParameters\n )\n }\n );\n error.response = response;\n throw error;\n }\n return response;\n}\nexport {\n oauthRequest,\n requestToOAuthBaseUrl\n};\n", "import { request as defaultRequest } from \"@octokit/request\";\nimport { oauthRequest } from \"./utils.js\";\nasync function exchangeWebFlowCode(options) {\n const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const response = await oauthRequest(\n request,\n \"POST /login/oauth/access_token\",\n {\n client_id: options.clientId,\n client_secret: options.clientSecret,\n code: options.code,\n redirect_uri: options.redirectUrl\n }\n );\n const authentication = {\n clientType: options.clientType,\n clientId: options.clientId,\n clientSecret: options.clientSecret,\n token: response.data.access_token,\n scopes: response.data.scope.split(/\\s+/).filter(Boolean)\n };\n if (options.clientType === \"github-app\") {\n if (\"refresh_token\" in response.data) {\n const apiTimeInMs = new Date(response.headers.date).getTime();\n authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp(\n apiTimeInMs,\n response.data.expires_in\n ), authentication.refreshTokenExpiresAt = toTimestamp(\n apiTimeInMs,\n response.data.refresh_token_expires_in\n );\n }\n delete authentication.scopes;\n }\n return { ...response, authentication };\n}\nfunction toTimestamp(apiTimeInMs, expirationInSeconds) {\n return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString();\n}\nexport {\n exchangeWebFlowCode\n};\n", "import { request as defaultRequest } from \"@octokit/request\";\nimport { oauthRequest } from \"./utils.js\";\nasync function createDeviceCode(options) {\n const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const parameters = {\n client_id: options.clientId\n };\n if (\"scopes\" in options && Array.isArray(options.scopes)) {\n parameters.scope = options.scopes.join(\" \");\n }\n return oauthRequest(request, \"POST /login/device/code\", parameters);\n}\nexport {\n createDeviceCode\n};\n", "import { request as defaultRequest } from \"@octokit/request\";\nimport { oauthRequest } from \"./utils.js\";\nasync function exchangeDeviceCode(options) {\n const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const response = await oauthRequest(\n request,\n \"POST /login/oauth/access_token\",\n {\n client_id: options.clientId,\n device_code: options.code,\n grant_type: \"urn:ietf:params:oauth:grant-type:device_code\"\n }\n );\n const authentication = {\n clientType: options.clientType,\n clientId: options.clientId,\n token: response.data.access_token,\n scopes: response.data.scope.split(/\\s+/).filter(Boolean)\n };\n if (\"clientSecret\" in options) {\n authentication.clientSecret = options.clientSecret;\n }\n if (options.clientType === \"github-app\") {\n if (\"refresh_token\" in response.data) {\n const apiTimeInMs = new Date(response.headers.date).getTime();\n authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp(\n apiTimeInMs,\n response.data.expires_in\n ), authentication.refreshTokenExpiresAt = toTimestamp(\n apiTimeInMs,\n response.data.refresh_token_expires_in\n );\n }\n delete authentication.scopes;\n }\n return { ...response, authentication };\n}\nfunction toTimestamp(apiTimeInMs, expirationInSeconds) {\n return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString();\n}\nexport {\n exchangeDeviceCode\n};\n", "import { request as defaultRequest } from \"@octokit/request\";\nasync function checkToken(options) {\n const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const response = await request(\"POST /applications/{client_id}/token\", {\n headers: {\n authorization: `basic ${btoa(\n `${options.clientId}:${options.clientSecret}`\n )}`\n },\n client_id: options.clientId,\n access_token: options.token\n });\n const authentication = {\n clientType: options.clientType,\n clientId: options.clientId,\n clientSecret: options.clientSecret,\n token: options.token,\n scopes: response.data.scopes\n };\n if (response.data.expires_at)\n authentication.expiresAt = response.data.expires_at;\n if (options.clientType === \"github-app\") {\n delete authentication.scopes;\n }\n return { ...response, authentication };\n}\nexport {\n checkToken\n};\n", "import { request as defaultRequest } from \"@octokit/request\";\nimport { oauthRequest } from \"./utils.js\";\nasync function refreshToken(options) {\n const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const response = await oauthRequest(\n request,\n \"POST /login/oauth/access_token\",\n {\n client_id: options.clientId,\n client_secret: options.clientSecret,\n grant_type: \"refresh_token\",\n refresh_token: options.refreshToken\n }\n );\n const apiTimeInMs = new Date(response.headers.date).getTime();\n const authentication = {\n clientType: \"github-app\",\n clientId: options.clientId,\n clientSecret: options.clientSecret,\n token: response.data.access_token,\n refreshToken: response.data.refresh_token,\n expiresAt: toTimestamp(apiTimeInMs, response.data.expires_in),\n refreshTokenExpiresAt: toTimestamp(\n apiTimeInMs,\n response.data.refresh_token_expires_in\n )\n };\n return { ...response, authentication };\n}\nfunction toTimestamp(apiTimeInMs, expirationInSeconds) {\n return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString();\n}\nexport {\n refreshToken\n};\n", "import { request as defaultRequest } from \"@octokit/request\";\nasync function scopeToken(options) {\n const {\n request: optionsRequest,\n clientType,\n clientId,\n clientSecret,\n token,\n ...requestOptions\n } = options;\n const request = optionsRequest || /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const response = await request(\n \"POST /applications/{client_id}/token/scoped\",\n {\n headers: {\n authorization: `basic ${btoa(`${clientId}:${clientSecret}`)}`\n },\n client_id: clientId,\n access_token: token,\n ...requestOptions\n }\n );\n const authentication = Object.assign(\n {\n clientType,\n clientId,\n clientSecret,\n token: response.data.token\n },\n response.data.expires_at ? { expiresAt: response.data.expires_at } : {}\n );\n return { ...response, authentication };\n}\nexport {\n scopeToken\n};\n", "import { request as defaultRequest } from \"@octokit/request\";\nasync function resetToken(options) {\n const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const auth = btoa(`${options.clientId}:${options.clientSecret}`);\n const response = await request(\n \"PATCH /applications/{client_id}/token\",\n {\n headers: {\n authorization: `basic ${auth}`\n },\n client_id: options.clientId,\n access_token: options.token\n }\n );\n const authentication = {\n clientType: options.clientType,\n clientId: options.clientId,\n clientSecret: options.clientSecret,\n token: response.data.token,\n scopes: response.data.scopes\n };\n if (response.data.expires_at)\n authentication.expiresAt = response.data.expires_at;\n if (options.clientType === \"github-app\") {\n delete authentication.scopes;\n }\n return { ...response, authentication };\n}\nexport {\n resetToken\n};\n", "import { request as defaultRequest } from \"@octokit/request\";\nasync function deleteToken(options) {\n const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const auth = btoa(`${options.clientId}:${options.clientSecret}`);\n return request(\n \"DELETE /applications/{client_id}/token\",\n {\n headers: {\n authorization: `basic ${auth}`\n },\n client_id: options.clientId,\n access_token: options.token\n }\n );\n}\nexport {\n deleteToken\n};\n", "import { request as defaultRequest } from \"@octokit/request\";\nasync function deleteAuthorization(options) {\n const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */\n defaultRequest;\n const auth = btoa(`${options.clientId}:${options.clientSecret}`);\n return request(\n \"DELETE /applications/{client_id}/grant\",\n {\n headers: {\n authorization: `basic ${auth}`\n },\n client_id: options.clientId,\n access_token: options.token\n }\n );\n}\nexport {\n deleteAuthorization\n};\n"], + "mappings": ";AAAA,IAAM,UAAU;;;ACAhB,SAAS,6BAA6B;AACtC,SAAS,WAAW,sBAAsB;;;ACD1C,SAAS,oBAAoB;AAC7B,SAAS,sBAAsB,SAAS;AACtC,QAAM,mBAAmB,QAAQ,SAAS;AAC1C,SAAO,kCAAkC,KAAK,iBAAiB,OAAO,IAAI,uBAAuB,iBAAiB,QAAQ,QAAQ,WAAW,EAAE;AACjJ;AACA,eAAe,aAAa,SAAS,OAAO,YAAY;AACtD,QAAM,sBAAsB;AAAA,IAC1B,SAAS,sBAAsB,OAAO;AAAA,IACtC,SAAS;AAAA,MACP,QAAQ;AAAA,IACV;AAAA,IACA,GAAG;AAAA,EACL;AACA,QAAM,WAAW,MAAM,QAAQ,OAAO,mBAAmB;AACzD,MAAI,WAAW,SAAS,MAAM;AAC5B,UAAM,QAAQ,IAAI;AAAA,MAChB,GAAG,SAAS,KAAK,iBAAiB,KAAK,SAAS,KAAK,KAAK,KAAK,SAAS,KAAK,SAAS;AAAA,MACtF;AAAA,MACA;AAAA,QACE,SAAS,QAAQ,SAAS;AAAA,UACxB;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,IACF;AACA,UAAM,WAAW;AACjB,UAAM;AAAA,EACR;AACA,SAAO;AACT;;;AD1BA,SAAS,2BAA2B;AAAA,EAClC,UAAU;AAAA,EACV,GAAG;AACL,GAAG;AACD,QAAM,UAAU,sBAAsB,OAAO;AAC7C,SAAO,sBAAsB;AAAA,IAC3B,GAAG;AAAA,IACH;AAAA,EACF,CAAC;AACH;;;AEZA,SAAS,WAAWA,uBAAsB;AAE1C,eAAe,oBAAoB,SAAS;AAC1C,QAAM,UAAU,QAAQ;AAAA,EACxBC;AACA,QAAM,WAAW,MAAM;AAAA,IACrB;AAAA,IACA;AAAA,IACA;AAAA,MACE,WAAW,QAAQ;AAAA,MACnB,eAAe,QAAQ;AAAA,MACvB,MAAM,QAAQ;AAAA,MACd,cAAc,QAAQ;AAAA,IACxB;AAAA,EACF;AACA,QAAM,iBAAiB;AAAA,IACrB,YAAY,QAAQ;AAAA,IACpB,UAAU,QAAQ;AAAA,IAClB,cAAc,QAAQ;AAAA,IACtB,OAAO,SAAS,KAAK;AAAA,IACrB,QAAQ,SAAS,KAAK,MAAM,MAAM,KAAK,EAAE,OAAO,OAAO;AAAA,EACzD;AACA,MAAI,QAAQ,eAAe,cAAc;AACvC,QAAI,mBAAmB,SAAS,MAAM;AACpC,YAAM,cAAc,IAAI,KAAK,SAAS,QAAQ,IAAI,EAAE,QAAQ;AAC5D,qBAAe,eAAe,SAAS,KAAK,eAAe,eAAe,YAAY;AAAA,QACpF;AAAA,QACA,SAAS,KAAK;AAAA,MAChB,GAAG,eAAe,wBAAwB;AAAA,QACxC;AAAA,QACA,SAAS,KAAK;AAAA,MAChB;AAAA,IACF;AACA,WAAO,eAAe;AAAA,EACxB;AACA,SAAO,EAAE,GAAG,UAAU,eAAe;AACvC;AACA,SAAS,YAAY,aAAa,qBAAqB;AACrD,SAAO,IAAI,KAAK,cAAc,sBAAsB,GAAG,EAAE,YAAY;AACvE;;;ACvCA,SAAS,WAAWC,uBAAsB;AAE1C,eAAe,iBAAiB,SAAS;AACvC,QAAM,UAAU,QAAQ;AAAA,EACxBC;AACA,QAAM,aAAa;AAAA,IACjB,WAAW,QAAQ;AAAA,EACrB;AACA,MAAI,YAAY,WAAW,MAAM,QAAQ,QAAQ,MAAM,GAAG;AACxD,eAAW,QAAQ,QAAQ,OAAO,KAAK,GAAG;AAAA,EAC5C;AACA,SAAO,aAAa,SAAS,2BAA2B,UAAU;AACpE;;;ACZA,SAAS,WAAWC,uBAAsB;AAE1C,eAAe,mBAAmB,SAAS;AACzC,QAAM,UAAU,QAAQ;AAAA,EACxBC;AACA,QAAM,WAAW,MAAM;AAAA,IACrB;AAAA,IACA;AAAA,IACA;AAAA,MACE,WAAW,QAAQ;AAAA,MACnB,aAAa,QAAQ;AAAA,MACrB,YAAY;AAAA,IACd;AAAA,EACF;AACA,QAAM,iBAAiB;AAAA,IACrB,YAAY,QAAQ;AAAA,IACpB,UAAU,QAAQ;AAAA,IAClB,OAAO,SAAS,KAAK;AAAA,IACrB,QAAQ,SAAS,KAAK,MAAM,MAAM,KAAK,EAAE,OAAO,OAAO;AAAA,EACzD;AACA,MAAI,kBAAkB,SAAS;AAC7B,mBAAe,eAAe,QAAQ;AAAA,EACxC;AACA,MAAI,QAAQ,eAAe,cAAc;AACvC,QAAI,mBAAmB,SAAS,MAAM;AACpC,YAAM,cAAc,IAAI,KAAK,SAAS,QAAQ,IAAI,EAAE,QAAQ;AAC5D,qBAAe,eAAe,SAAS,KAAK,eAAe,eAAe,YAAYC;AAAA,QACpF;AAAA,QACA,SAAS,KAAK;AAAA,MAChB,GAAG,eAAe,wBAAwBA;AAAA,QACxC;AAAA,QACA,SAAS,KAAK;AAAA,MAChB;AAAA,IACF;AACA,WAAO,eAAe;AAAA,EACxB;AACA,SAAO,EAAE,GAAG,UAAU,eAAe;AACvC;AACA,SAASA,aAAY,aAAa,qBAAqB;AACrD,SAAO,IAAI,KAAK,cAAc,sBAAsB,GAAG,EAAE,YAAY;AACvE;;;ACxCA,SAAS,WAAWC,uBAAsB;AAC1C,eAAe,WAAW,SAAS;AACjC,QAAM,UAAU,QAAQ;AAAA,EACxBA;AACA,QAAM,WAAW,MAAM,QAAQ,wCAAwC;AAAA,IACrE,SAAS;AAAA,MACP,eAAe,SAAS;AAAA,QACtB,GAAG,QAAQ,QAAQ,IAAI,QAAQ,YAAY;AAAA,MAC7C,CAAC;AAAA,IACH;AAAA,IACA,WAAW,QAAQ;AAAA,IACnB,cAAc,QAAQ;AAAA,EACxB,CAAC;AACD,QAAM,iBAAiB;AAAA,IACrB,YAAY,QAAQ;AAAA,IACpB,UAAU,QAAQ;AAAA,IAClB,cAAc,QAAQ;AAAA,IACtB,OAAO,QAAQ;AAAA,IACf,QAAQ,SAAS,KAAK;AAAA,EACxB;AACA,MAAI,SAAS,KAAK;AAChB,mBAAe,YAAY,SAAS,KAAK;AAC3C,MAAI,QAAQ,eAAe,cAAc;AACvC,WAAO,eAAe;AAAA,EACxB;AACA,SAAO,EAAE,GAAG,UAAU,eAAe;AACvC;;;AC1BA,SAAS,WAAWC,uBAAsB;AAE1C,eAAe,aAAa,SAAS;AACnC,QAAM,UAAU,QAAQ;AAAA,EACxBC;AACA,QAAM,WAAW,MAAM;AAAA,IACrB;AAAA,IACA;AAAA,IACA;AAAA,MACE,WAAW,QAAQ;AAAA,MACnB,eAAe,QAAQ;AAAA,MACvB,YAAY;AAAA,MACZ,eAAe,QAAQ;AAAA,IACzB;AAAA,EACF;AACA,QAAM,cAAc,IAAI,KAAK,SAAS,QAAQ,IAAI,EAAE,QAAQ;AAC5D,QAAM,iBAAiB;AAAA,IACrB,YAAY;AAAA,IACZ,UAAU,QAAQ;AAAA,IAClB,cAAc,QAAQ;AAAA,IACtB,OAAO,SAAS,KAAK;AAAA,IACrB,cAAc,SAAS,KAAK;AAAA,IAC5B,WAAWC,aAAY,aAAa,SAAS,KAAK,UAAU;AAAA,IAC5D,uBAAuBA;AAAA,MACrB;AAAA,MACA,SAAS,KAAK;AAAA,IAChB;AAAA,EACF;AACA,SAAO,EAAE,GAAG,UAAU,eAAe;AACvC;AACA,SAASA,aAAY,aAAa,qBAAqB;AACrD,SAAO,IAAI,KAAK,cAAc,sBAAsB,GAAG,EAAE,YAAY;AACvE;;;AChCA,SAAS,WAAWC,uBAAsB;AAC1C,eAAe,WAAW,SAAS;AACjC,QAAM;AAAA,IACJ,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,UAAU;AAAA,EAChBA;AACA,QAAM,WAAW,MAAM;AAAA,IACrB;AAAA,IACA;AAAA,MACE,SAAS;AAAA,QACP,eAAe,SAAS,KAAK,GAAG,QAAQ,IAAI,YAAY,EAAE,CAAC;AAAA,MAC7D;AAAA,MACA,WAAW;AAAA,MACX,cAAc;AAAA,MACd,GAAG;AAAA,IACL;AAAA,EACF;AACA,QAAM,iBAAiB,OAAO;AAAA,IAC5B;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAO,SAAS,KAAK;AAAA,IACvB;AAAA,IACA,SAAS,KAAK,aAAa,EAAE,WAAW,SAAS,KAAK,WAAW,IAAI,CAAC;AAAA,EACxE;AACA,SAAO,EAAE,GAAG,UAAU,eAAe;AACvC;;;ACjCA,SAAS,WAAWC,uBAAsB;AAC1C,eAAe,WAAW,SAAS;AACjC,QAAM,UAAU,QAAQ;AAAA,EACxBA;AACA,QAAM,OAAO,KAAK,GAAG,QAAQ,QAAQ,IAAI,QAAQ,YAAY,EAAE;AAC/D,QAAM,WAAW,MAAM;AAAA,IACrB;AAAA,IACA;AAAA,MACE,SAAS;AAAA,QACP,eAAe,SAAS,IAAI;AAAA,MAC9B;AAAA,MACA,WAAW,QAAQ;AAAA,MACnB,cAAc,QAAQ;AAAA,IACxB;AAAA,EACF;AACA,QAAM,iBAAiB;AAAA,IACrB,YAAY,QAAQ;AAAA,IACpB,UAAU,QAAQ;AAAA,IAClB,cAAc,QAAQ;AAAA,IACtB,OAAO,SAAS,KAAK;AAAA,IACrB,QAAQ,SAAS,KAAK;AAAA,EACxB;AACA,MAAI,SAAS,KAAK;AAChB,mBAAe,YAAY,SAAS,KAAK;AAC3C,MAAI,QAAQ,eAAe,cAAc;AACvC,WAAO,eAAe;AAAA,EACxB;AACA,SAAO,EAAE,GAAG,UAAU,eAAe;AACvC;;;AC5BA,SAAS,WAAWC,uBAAsB;AAC1C,eAAe,YAAY,SAAS;AAClC,QAAM,UAAU,QAAQ;AAAA,EACxBA;AACA,QAAM,OAAO,KAAK,GAAG,QAAQ,QAAQ,IAAI,QAAQ,YAAY,EAAE;AAC/D,SAAO;AAAA,IACL;AAAA,IACA;AAAA,MACE,SAAS;AAAA,QACP,eAAe,SAAS,IAAI;AAAA,MAC9B;AAAA,MACA,WAAW,QAAQ;AAAA,MACnB,cAAc,QAAQ;AAAA,IACxB;AAAA,EACF;AACF;;;ACfA,SAAS,WAAWC,wBAAsB;AAC1C,eAAe,oBAAoB,SAAS;AAC1C,QAAM,UAAU,QAAQ;AAAA,EACxBA;AACA,QAAM,OAAO,KAAK,GAAG,QAAQ,QAAQ,IAAI,QAAQ,YAAY,EAAE;AAC/D,SAAO;AAAA,IACL;AAAA,IACA;AAAA,MACE,SAAS;AAAA,QACP,eAAe,SAAS,IAAI;AAAA,MAC9B;AAAA,MACA,WAAW,QAAQ;AAAA,MACnB,cAAc,QAAQ;AAAA,IACxB;AAAA,EACF;AACF;", + "names": ["defaultRequest", "defaultRequest", "defaultRequest", "defaultRequest", "defaultRequest", "defaultRequest", "toTimestamp", "defaultRequest", "defaultRequest", "defaultRequest", "toTimestamp", "defaultRequest", "defaultRequest", "defaultRequest", "defaultRequest"] +} diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/check-token.js b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/check-token.js new file mode 100644 index 000000000..06b7028eb --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/check-token.js @@ -0,0 +1,30 @@ +import { request as defaultRequest } from "@octokit/request"; +async function checkToken(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const response = await request("POST /applications/{client_id}/token", { + headers: { + authorization: `basic ${btoa( + `${options.clientId}:${options.clientSecret}` + )}` + }, + client_id: options.clientId, + access_token: options.token + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: options.token, + scopes: response.data.scopes + }; + if (response.data.expires_at) + authentication.expiresAt = response.data.expires_at; + if (options.clientType === "github-app") { + delete authentication.scopes; + } + return { ...response, authentication }; +} +export { + checkToken +}; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/create-device-code.js b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/create-device-code.js new file mode 100644 index 000000000..a99875cf8 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/create-device-code.js @@ -0,0 +1,16 @@ +import { request as defaultRequest } from "@octokit/request"; +import { oauthRequest } from "./utils.js"; +async function createDeviceCode(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const parameters = { + client_id: options.clientId + }; + if ("scopes" in options && Array.isArray(options.scopes)) { + parameters.scope = options.scopes.join(" "); + } + return oauthRequest(request, "POST /login/device/code", parameters); +} +export { + createDeviceCode +}; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/delete-authorization.js b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/delete-authorization.js new file mode 100644 index 000000000..9dcb2313a --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/delete-authorization.js @@ -0,0 +1,19 @@ +import { request as defaultRequest } from "@octokit/request"; +async function deleteAuthorization(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + return request( + "DELETE /applications/{client_id}/grant", + { + headers: { + authorization: `basic ${auth}` + }, + client_id: options.clientId, + access_token: options.token + } + ); +} +export { + deleteAuthorization +}; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/delete-token.js b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/delete-token.js new file mode 100644 index 000000000..18f68e292 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/delete-token.js @@ -0,0 +1,19 @@ +import { request as defaultRequest } from "@octokit/request"; +async function deleteToken(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + return request( + "DELETE /applications/{client_id}/token", + { + headers: { + authorization: `basic ${auth}` + }, + client_id: options.clientId, + access_token: options.token + } + ); +} +export { + deleteToken +}; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/exchange-device-code.js b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/exchange-device-code.js new file mode 100644 index 000000000..4b3103f96 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/exchange-device-code.js @@ -0,0 +1,44 @@ +import { request as defaultRequest } from "@octokit/request"; +import { oauthRequest } from "./utils.js"; +async function exchangeDeviceCode(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const response = await oauthRequest( + request, + "POST /login/oauth/access_token", + { + client_id: options.clientId, + device_code: options.code, + grant_type: "urn:ietf:params:oauth:grant-type:device_code" + } + ); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + token: response.data.access_token, + scopes: response.data.scope.split(/\s+/).filter(Boolean) + }; + if ("clientSecret" in options) { + authentication.clientSecret = options.clientSecret; + } + if (options.clientType === "github-app") { + if ("refresh_token" in response.data) { + const apiTimeInMs = new Date(response.headers.date).getTime(); + authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp( + apiTimeInMs, + response.data.expires_in + ), authentication.refreshTokenExpiresAt = toTimestamp( + apiTimeInMs, + response.data.refresh_token_expires_in + ); + } + delete authentication.scopes; + } + return { ...response, authentication }; +} +function toTimestamp(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString(); +} +export { + exchangeDeviceCode +}; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/exchange-web-flow-code.js b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/exchange-web-flow-code.js new file mode 100644 index 000000000..c4befdf23 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/exchange-web-flow-code.js @@ -0,0 +1,43 @@ +import { request as defaultRequest } from "@octokit/request"; +import { oauthRequest } from "./utils.js"; +async function exchangeWebFlowCode(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const response = await oauthRequest( + request, + "POST /login/oauth/access_token", + { + client_id: options.clientId, + client_secret: options.clientSecret, + code: options.code, + redirect_uri: options.redirectUrl + } + ); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.access_token, + scopes: response.data.scope.split(/\s+/).filter(Boolean) + }; + if (options.clientType === "github-app") { + if ("refresh_token" in response.data) { + const apiTimeInMs = new Date(response.headers.date).getTime(); + authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp( + apiTimeInMs, + response.data.expires_in + ), authentication.refreshTokenExpiresAt = toTimestamp( + apiTimeInMs, + response.data.refresh_token_expires_in + ); + } + delete authentication.scopes; + } + return { ...response, authentication }; +} +function toTimestamp(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString(); +} +export { + exchangeWebFlowCode +}; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/get-web-flow-authorization-url.js b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/get-web-flow-authorization-url.js new file mode 100644 index 000000000..b06511505 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/get-web-flow-authorization-url.js @@ -0,0 +1,16 @@ +import { oauthAuthorizationUrl } from "@octokit/oauth-authorization-url"; +import { request as defaultRequest } from "@octokit/request"; +import { requestToOAuthBaseUrl } from "./utils.js"; +function getWebFlowAuthorizationUrl({ + request = defaultRequest, + ...options +}) { + const baseUrl = requestToOAuthBaseUrl(request); + return oauthAuthorizationUrl({ + ...options, + baseUrl + }); +} +export { + getWebFlowAuthorizationUrl +}; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/index.js b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/index.js new file mode 100644 index 000000000..ee01b5eda --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/index.js @@ -0,0 +1,14 @@ +import { VERSION } from "./version.js"; +export * from "./get-web-flow-authorization-url.js"; +export * from "./exchange-web-flow-code.js"; +export * from "./create-device-code.js"; +export * from "./exchange-device-code.js"; +export * from "./check-token.js"; +export * from "./refresh-token.js"; +export * from "./scope-token.js"; +export * from "./reset-token.js"; +export * from "./delete-token.js"; +export * from "./delete-authorization.js"; +export { + VERSION +}; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/refresh-token.js b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/refresh-token.js new file mode 100644 index 000000000..f5f4556b3 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/refresh-token.js @@ -0,0 +1,36 @@ +import { request as defaultRequest } from "@octokit/request"; +import { oauthRequest } from "./utils.js"; +async function refreshToken(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const response = await oauthRequest( + request, + "POST /login/oauth/access_token", + { + client_id: options.clientId, + client_secret: options.clientSecret, + grant_type: "refresh_token", + refresh_token: options.refreshToken + } + ); + const apiTimeInMs = new Date(response.headers.date).getTime(); + const authentication = { + clientType: "github-app", + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.access_token, + refreshToken: response.data.refresh_token, + expiresAt: toTimestamp(apiTimeInMs, response.data.expires_in), + refreshTokenExpiresAt: toTimestamp( + apiTimeInMs, + response.data.refresh_token_expires_in + ) + }; + return { ...response, authentication }; +} +function toTimestamp(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString(); +} +export { + refreshToken +}; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/reset-token.js b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/reset-token.js new file mode 100644 index 000000000..ae85a1ba6 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/reset-token.js @@ -0,0 +1,32 @@ +import { request as defaultRequest } from "@octokit/request"; +async function resetToken(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const auth = btoa(`${options.clientId}:${options.clientSecret}`); + const response = await request( + "PATCH /applications/{client_id}/token", + { + headers: { + authorization: `basic ${auth}` + }, + client_id: options.clientId, + access_token: options.token + } + ); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.token, + scopes: response.data.scopes + }; + if (response.data.expires_at) + authentication.expiresAt = response.data.expires_at; + if (options.clientType === "github-app") { + delete authentication.scopes; + } + return { ...response, authentication }; +} +export { + resetToken +}; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/scope-token.js b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/scope-token.js new file mode 100644 index 000000000..82e0c73f8 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/scope-token.js @@ -0,0 +1,37 @@ +import { request as defaultRequest } from "@octokit/request"; +async function scopeToken(options) { + const { + request: optionsRequest, + clientType, + clientId, + clientSecret, + token, + ...requestOptions + } = options; + const request = optionsRequest || /* istanbul ignore next: we always pass a custom request in tests */ + defaultRequest; + const response = await request( + "POST /applications/{client_id}/token/scoped", + { + headers: { + authorization: `basic ${btoa(`${clientId}:${clientSecret}`)}` + }, + client_id: clientId, + access_token: token, + ...requestOptions + } + ); + const authentication = Object.assign( + { + clientType, + clientId, + clientSecret, + token: response.data.token + }, + response.data.expires_at ? { expiresAt: response.data.expires_at } : {} + ); + return { ...response, authentication }; +} +export { + scopeToken +}; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/utils.js b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/utils.js new file mode 100644 index 000000000..6e48170cb --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/utils.js @@ -0,0 +1,34 @@ +import { RequestError } from "@octokit/request-error"; +function requestToOAuthBaseUrl(request) { + const endpointDefaults = request.endpoint.DEFAULTS; + return /^https:\/\/(api\.)?github\.com$/.test(endpointDefaults.baseUrl) ? "https://github.com" : endpointDefaults.baseUrl.replace("/api/v3", ""); +} +async function oauthRequest(request, route, parameters) { + const withOAuthParameters = { + baseUrl: requestToOAuthBaseUrl(request), + headers: { + accept: "application/json" + }, + ...parameters + }; + const response = await request(route, withOAuthParameters); + if ("error" in response.data) { + const error = new RequestError( + `${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, + 400, + { + request: request.endpoint.merge( + route, + withOAuthParameters + ) + } + ); + error.response = response; + throw error; + } + return response; +} +export { + oauthRequest, + requestToOAuthBaseUrl +}; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/version.js b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/version.js new file mode 100644 index 000000000..44da46326 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-src/version.js @@ -0,0 +1,4 @@ +const VERSION = "5.1.2"; +export { + VERSION +}; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/check-token.d.ts b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/check-token.d.ts new file mode 100644 index 000000000..7c45d2b95 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/check-token.d.ts @@ -0,0 +1,24 @@ +import type { RequestInterface, Endpoints } from "@octokit/types"; +import type { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled } from "./types.js"; +export type CheckTokenOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export type CheckTokenGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export type CheckTokenOAuthAppResponse = Endpoints["POST /applications/{client_id}/token"]["response"] & { + authentication: OAuthAppAuthentication; +}; +export type CheckTokenGitHubAppResponse = Endpoints["POST /applications/{client_id}/token"]["response"] & { + authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled; +}; +export declare function checkToken(options: CheckTokenOAuthAppOptions): Promise; +export declare function checkToken(options: CheckTokenGitHubAppOptions): Promise; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/create-device-code.d.ts b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/create-device-code.d.ts new file mode 100644 index 000000000..4953a54e1 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/create-device-code.d.ts @@ -0,0 +1,20 @@ +import type { OctokitResponse, RequestInterface } from "@octokit/types"; +export type CreateDeviceCodeOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + scopes?: string[]; + request?: RequestInterface; +}; +export type CreateDeviceCodeGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + request?: RequestInterface; +}; +export type CreateDeviceCodeDeviceTokenResponse = OctokitResponse<{ + device_code: string; + user_code: string; + verification_uri: string; + expires_in: number; + interval: number; +}>; +export declare function createDeviceCode(options: CreateDeviceCodeOAuthAppOptions | CreateDeviceCodeGitHubAppOptions): Promise; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/delete-authorization.d.ts b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/delete-authorization.d.ts new file mode 100644 index 000000000..640c8698b --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/delete-authorization.d.ts @@ -0,0 +1,18 @@ +import type { RequestInterface, Endpoints } from "@octokit/types"; +export type DeleteAuthorizationOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export type DeleteAuthorizationGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export type DeleteAuthorizationResponse = Endpoints["DELETE /applications/{client_id}/grant"]["response"]; +export declare function deleteAuthorization(options: DeleteAuthorizationOAuthAppOptions): Promise; +export declare function deleteAuthorization(options: DeleteAuthorizationGitHubAppOptions): Promise; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/delete-token.d.ts b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/delete-token.d.ts new file mode 100644 index 000000000..9d49c22d7 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/delete-token.d.ts @@ -0,0 +1,18 @@ +import type { RequestInterface, Endpoints } from "@octokit/types"; +export type DeleteTokenOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export type DeleteTokenGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export type DeleteTokenResponse = Endpoints["DELETE /applications/{client_id}/token"]["response"]; +export declare function deleteToken(options: DeleteTokenOAuthAppOptions): Promise; +export declare function deleteToken(options: DeleteTokenGitHubAppOptions): Promise; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/exchange-device-code.d.ts b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/exchange-device-code.d.ts new file mode 100644 index 000000000..0ecd8e31a --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/exchange-device-code.d.ts @@ -0,0 +1,57 @@ +import type { OctokitResponse, RequestInterface } from "@octokit/types"; +import type { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled, GitHubAppAuthenticationWithRefreshToken, OAuthAppCreateTokenResponseData, GitHubAppCreateTokenResponseData, GitHubAppCreateTokenWithExpirationResponseData } from "./types.js"; +export type ExchangeDeviceCodeOAuthAppOptionsWithoutClientSecret = { + clientType: "oauth-app"; + clientId: string; + code: string; + redirectUrl?: string; + state?: string; + request?: RequestInterface; + scopes?: string[]; +}; +export type ExchangeDeviceCodeOAuthAppOptions = ExchangeDeviceCodeOAuthAppOptionsWithoutClientSecret & { + clientSecret: string; +}; +export type ExchangeDeviceCodeGitHubAppOptionsWithoutClientSecret = { + clientType: "github-app"; + clientId: string; + code: string; + redirectUrl?: string; + state?: string; + request?: RequestInterface; +}; +export type ExchangeDeviceCodeGitHubAppOptions = ExchangeDeviceCodeGitHubAppOptionsWithoutClientSecret & { + clientSecret: string; +}; +type OAuthAppAuthenticationWithoutClientSecret = Omit; +type GitHubAppAuthenticationWithoutClientSecret = Omit; +type GitHubAppAuthenticationWithExpirationWithoutClientSecret = Omit; +export type ExchangeDeviceCodeOAuthAppResponse = OctokitResponse & { + authentication: OAuthAppAuthentication; +}; +export type ExchangeDeviceCodeOAuthAppResponseWithoutClientSecret = OctokitResponse & { + authentication: OAuthAppAuthenticationWithoutClientSecret; +}; +export type ExchangeDeviceCodeGitHubAppResponse = OctokitResponse & { + authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled | GitHubAppAuthenticationWithRefreshToken; +}; +export type ExchangeDeviceCodeGitHubAppResponseWithoutClientSecret = OctokitResponse & { + authentication: GitHubAppAuthenticationWithoutClientSecret | GitHubAppAuthenticationWithExpirationWithoutClientSecret; +}; +/** + * Exchange the code from GitHub's OAuth Web flow for OAuth Apps. + */ +export declare function exchangeDeviceCode(options: ExchangeDeviceCodeOAuthAppOptions): Promise; +/** + * Exchange the code from GitHub's OAuth Web flow for OAuth Apps without clientSecret + */ +export declare function exchangeDeviceCode(options: ExchangeDeviceCodeOAuthAppOptionsWithoutClientSecret): Promise; +/** + * Exchange the code from GitHub's OAuth Web flow for GitHub Apps. `scopes` are not supported by GitHub Apps. + */ +export declare function exchangeDeviceCode(options: ExchangeDeviceCodeGitHubAppOptions): Promise; +/** + * Exchange the code from GitHub's OAuth Web flow for GitHub Apps without using `clientSecret`. `scopes` are not supported by GitHub Apps. + */ +export declare function exchangeDeviceCode(options: ExchangeDeviceCodeGitHubAppOptionsWithoutClientSecret): Promise; +export {}; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/exchange-web-flow-code.d.ts b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/exchange-web-flow-code.d.ts new file mode 100644 index 000000000..efef9c2c5 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/exchange-web-flow-code.d.ts @@ -0,0 +1,32 @@ +import type { OctokitResponse, RequestInterface } from "@octokit/types"; +import type { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled, GitHubAppAuthenticationWithRefreshToken, OAuthAppCreateTokenResponseData, GitHubAppCreateTokenResponseData, GitHubAppCreateTokenWithExpirationResponseData } from "./types.js"; +export type ExchangeWebFlowCodeOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + code: string; + redirectUrl?: string; + request?: RequestInterface; +}; +export type ExchangeWebFlowCodeGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + code: string; + redirectUrl?: string; + request?: RequestInterface; +}; +export type ExchangeWebFlowCodeOAuthAppResponse = OctokitResponse & { + authentication: OAuthAppAuthentication; +}; +export type ExchangeWebFlowCodeGitHubAppResponse = OctokitResponse & { + authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled | GitHubAppAuthenticationWithRefreshToken; +}; +/** + * Exchange the code from GitHub's OAuth Web flow for OAuth Apps. + */ +export declare function exchangeWebFlowCode(options: ExchangeWebFlowCodeOAuthAppOptions): Promise; +/** + * Exchange the code from GitHub's OAuth Web flow for GitHub Apps. Note that `scopes` are not supported by GitHub Apps. + */ +export declare function exchangeWebFlowCode(options: ExchangeWebFlowCodeGitHubAppOptions): Promise; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/get-web-flow-authorization-url.d.ts b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/get-web-flow-authorization-url.d.ts new file mode 100644 index 000000000..26d0f962a --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/get-web-flow-authorization-url.d.ts @@ -0,0 +1,25 @@ +import type { OAuthAppResult, GitHubAppResult } from "@octokit/oauth-authorization-url"; +import type { RequestInterface } from "@octokit/types"; +export type GetWebFlowAuthorizationUrlOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + allowSignup?: boolean; + login?: string; + scopes?: string | string[]; + redirectUrl?: string; + state?: string; + request?: RequestInterface; +}; +export type GetWebFlowAuthorizationUrlGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + allowSignup?: boolean; + login?: string; + redirectUrl?: string; + state?: string; + request?: RequestInterface; +}; +export type GetWebFlowAuthorizationUrlOAuthAppResult = OAuthAppResult; +export type GetWebFlowAuthorizationUrlGitHubAppResult = GitHubAppResult; +export declare function getWebFlowAuthorizationUrl(options: GetWebFlowAuthorizationUrlOAuthAppOptions): OAuthAppResult; +export declare function getWebFlowAuthorizationUrl(options: GetWebFlowAuthorizationUrlGitHubAppOptions): GitHubAppResult; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/index.d.ts b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/index.d.ts new file mode 100644 index 000000000..2948ea7a5 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/index.d.ts @@ -0,0 +1,12 @@ +export { VERSION } from "./version.js"; +export * from "./get-web-flow-authorization-url.js"; +export * from "./exchange-web-flow-code.js"; +export * from "./create-device-code.js"; +export * from "./exchange-device-code.js"; +export * from "./check-token.js"; +export * from "./refresh-token.js"; +export * from "./scope-token.js"; +export * from "./reset-token.js"; +export * from "./delete-token.js"; +export * from "./delete-authorization.js"; +export type { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationDisabled, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithRefreshToken, GitHubAppAuthentication, GitHubAppAuthenticationWithExpiration, } from "./types.js"; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/refresh-token.d.ts b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/refresh-token.d.ts new file mode 100644 index 000000000..a83088d47 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/refresh-token.d.ts @@ -0,0 +1,13 @@ +import type { OctokitResponse, RequestInterface } from "@octokit/types"; +import type { GitHubAppAuthenticationWithRefreshToken, GitHubAppCreateTokenWithExpirationResponseData } from "./types.js"; +export type RefreshTokenOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + refreshToken: string; + request?: RequestInterface; +}; +export type RefreshTokenResponse = OctokitResponse & { + authentication: GitHubAppAuthenticationWithRefreshToken; +}; +export declare function refreshToken(options: RefreshTokenOptions): Promise; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/reset-token.d.ts b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/reset-token.d.ts new file mode 100644 index 000000000..d19fff8f9 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/reset-token.d.ts @@ -0,0 +1,24 @@ +import type { Endpoints, RequestInterface } from "@octokit/types"; +import type { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled } from "./types.js"; +export type ResetTokenOAuthAppOptions = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export type ResetTokenGitHubAppOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + request?: RequestInterface; +}; +export type ResetTokenOAuthAppResponse = Endpoints["PATCH /applications/{client_id}/token"]["response"] & { + authentication: OAuthAppAuthentication; +}; +export type ResetTokenGitHubAppResponse = Endpoints["PATCH /applications/{client_id}/token"]["response"] & { + authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled; +}; +export declare function resetToken(options: ResetTokenOAuthAppOptions): Promise; +export declare function resetToken(options: ResetTokenGitHubAppOptions): Promise; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/scope-token.d.ts b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/scope-token.d.ts new file mode 100644 index 000000000..ea0921c17 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/scope-token.d.ts @@ -0,0 +1,29 @@ +import type { RequestInterface, Endpoints } from "@octokit/types"; +import type { GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled } from "./types.js"; +type CommonOptions = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + permissions?: Endpoint["parameters"]["permissions"]; + request?: RequestInterface; +}; +type TargetOption = { + target: string; +}; +type TargetIdOption = { + target_id: number; +}; +type RepositoriesOption = { + repositories?: string[]; +}; +type RepositoryIdsOption = { + repository_ids?: number[]; +}; +type Endpoint = Endpoints["POST /applications/{client_id}/token/scoped"]; +export type ScopeTokenOptions = (CommonOptions & TargetOption & RepositoriesOption) | (CommonOptions & TargetIdOption & RepositoriesOption) | (CommonOptions & TargetOption & RepositoryIdsOption) | (CommonOptions & TargetIdOption & RepositoryIdsOption); +export type ScopeTokenResponse = Endpoint["response"] & { + authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled; +}; +export declare function scopeToken(options: ScopeTokenOptions): Promise; +export {}; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/types.d.ts b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/types.d.ts new file mode 100644 index 000000000..b46136451 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/types.d.ts @@ -0,0 +1,58 @@ +export type OAuthAppAuthentication = { + clientType: "oauth-app"; + clientId: string; + clientSecret: string; + token: string; + scopes: string[]; +}; +export type GitHubAppAuthenticationWithExpirationDisabled = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; +}; +export type GitHubAppAuthenticationWithExpirationEnabled = GitHubAppAuthenticationWithExpirationDisabled & { + expiresAt: string; +}; +export type GitHubAppAuthenticationWithRefreshToken = GitHubAppAuthenticationWithExpirationEnabled & { + refreshToken: string; + refreshTokenExpiresAt: string; +}; +/** + * @deprecated Use `GitHubAppAuthenticationWithExpirationDisabled` or + * `GitHubAppAuthenticationWithExpirationEnabled` instead. + */ +export type GitHubAppAuthentication = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; +}; +/** + * @deprecated Use `GitHubAppAuthenticationWithRefreshToken` instead. + */ +export type GitHubAppAuthenticationWithExpiration = { + clientType: "github-app"; + clientId: string; + clientSecret: string; + token: string; + refreshToken: string; + expiresAt: string; + refreshTokenExpiresAt: string; +}; +export type OAuthAppCreateTokenResponseData = { + access_token: string; + scope: string; + token_type: "bearer"; +}; +export type GitHubAppCreateTokenResponseData = { + access_token: string; + token_type: "bearer"; +}; +export type GitHubAppCreateTokenWithExpirationResponseData = { + access_token: string; + token_type: "bearer"; + expires_in: number; + refresh_token: string; + refresh_token_expires_in: number; +}; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/utils.d.ts b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/utils.d.ts new file mode 100644 index 000000000..27ca7fc92 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/utils.d.ts @@ -0,0 +1,3 @@ +import type { RequestInterface } from "@octokit/types"; +export declare function requestToOAuthBaseUrl(request: RequestInterface): string; +export declare function oauthRequest(request: RequestInterface, route: string, parameters: Record): Promise>; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/version.d.ts b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/version.d.ts new file mode 100644 index 000000000..21c6dc770 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "5.1.2"; diff --git a/.github/octokit/node_modules/@octokit/oauth-methods/package.json b/.github/octokit/node_modules/@octokit/oauth-methods/package.json new file mode 100644 index 000000000..4abf4fac3 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/oauth-methods/package.json @@ -0,0 +1,56 @@ +{ + "name": "@octokit/oauth-methods", + "type": "module", + "version": "5.1.2", + "description": "Set of stateless request methods to create, check, reset, refresh, and delete user access tokens for OAuth and GitHub Apps", + "repository": "https://github.com/octokit/oauth-methods.js", + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "oauth" + ], + "author": "Gregor Martynus (https://dev.to/gr2m)", + "license": "MIT", + "dependencies": { + "@octokit/oauth-authorization-url": "^7.0.0", + "@octokit/request": "^9.1.0", + "@octokit/request-error": "^6.1.0", + "@octokit/types": "^13.0.0" + }, + "devDependencies": { + "@octokit/tsconfig": "^3.0.0", + "@types/jest": "^29.0.0", + "@types/node": "^20.0.0", + "esbuild": "^0.20.0", + "fetch-mock": "npm:@gr2m/fetch-mock@9.11.0-pull-request-644.1", + "glob": "^10.2.7", + "jest": "^29.0.0", + "prettier": "3.2.5", + "semantic-release": "^23.0.0", + "semantic-release-plugin-update-version-in-files": "^1.1.0", + "ts-jest": "^29.0.0", + "typescript": "^5.0.0" + }, + "publishConfig": { + "access": "public", + "provenance": true + }, + "engines": { + "node": ">= 18" + }, + "files": [ + "dist-*/**", + "bin/**" + ], + "types": "./dist-types/index.d.ts", + "exports": { + ".": { + "types": "./dist-types/index.d.ts", + "import": "./dist-bundle/index.js", + "default": "./dist-bundle/index.js" + } + }, + "sideEffects": false +} diff --git a/.github/octokit/node_modules/@octokit/openapi-types/LICENSE b/.github/octokit/node_modules/@octokit/openapi-types/LICENSE new file mode 100644 index 000000000..c61fbbe5a --- /dev/null +++ b/.github/octokit/node_modules/@octokit/openapi-types/LICENSE @@ -0,0 +1,7 @@ +Copyright 2020 Gregor Martynus + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/.github/octokit/node_modules/@octokit/openapi-types/README.md b/.github/octokit/node_modules/@octokit/openapi-types/README.md new file mode 100644 index 000000000..e61ed8d2d --- /dev/null +++ b/.github/octokit/node_modules/@octokit/openapi-types/README.md @@ -0,0 +1,17 @@ +# @octokit/openapi-types + +> Generated TypeScript definitions based on GitHub's OpenAPI spec + +This package is continuously updated based on [GitHub's OpenAPI specification](https://github.com/github/rest-api-description/) + +## Usage + +```ts +import { components } from "@octokit/openapi-types"; + +type Repository = components["schemas"]["full-repository"]; +``` + +## License + +[MIT](LICENSE) diff --git a/.github/octokit/node_modules/@octokit/openapi-types/package.json b/.github/octokit/node_modules/@octokit/openapi-types/package.json new file mode 100644 index 000000000..350a5825d --- /dev/null +++ b/.github/octokit/node_modules/@octokit/openapi-types/package.json @@ -0,0 +1,21 @@ +{ + "name": "@octokit/openapi-types", + "description": "Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com", + "repository": { + "type": "git", + "url": "https://github.com/octokit/openapi-types.ts.git", + "directory": "packages/openapi-types" + }, + "publishConfig": { + "access": "public", + "provenance": true + }, + "version": "22.2.0", + "main": "", + "types": "types.d.ts", + "author": "Gregor Martynus (https://twitter.com/gr2m)", + "license": "MIT", + "octokit": { + "openapi-version": "16.5.0" + } +} diff --git a/.github/octokit/node_modules/@octokit/openapi-types/types.d.ts b/.github/octokit/node_modules/@octokit/openapi-types/types.d.ts new file mode 100644 index 000000000..afa653c54 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/openapi-types/types.d.ts @@ -0,0 +1,110231 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +/** OneOf type helpers */ +type Without = { [P in Exclude]?: never }; +type XOR = T | U extends object + ? (Without & U) | (Without & T) + : T | U; +type OneOf = T extends [infer Only] + ? Only + : T extends [infer A, infer B, ...infer Rest] + ? OneOf<[XOR, ...Rest]> + : never; + +export interface paths { + "/": { + /** + * GitHub API Root + * @description Get Hypermedia links to resources accessible in GitHub's REST API + */ + get: operations["meta/root"]; + }; + "/advisories": { + /** + * List global security advisories + * @description Lists all global security advisories that match the specified parameters. If no other parameters are defined, the request will return only GitHub-reviewed advisories that are not malware. + * + * By default, all responses will exclude advisories for malware, because malware are not standard vulnerabilities. To list advisories for malware, you must include the `type` parameter in your request, with the value `malware`. For more information about the different types of security advisories, see "[About the GitHub Advisory database](https://docs.github.com/code-security/security-advisories/global-security-advisories/about-the-github-advisory-database#about-types-of-security-advisories)." + */ + get: operations["security-advisories/list-global-advisories"]; + }; + "/advisories/{ghsa_id}": { + /** + * Get a global security advisory + * @description Gets a global security advisory using its GitHub Security Advisory (GHSA) identifier. + */ + get: operations["security-advisories/get-global-advisory"]; + }; + "/app": { + /** + * Get the authenticated app + * @description Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations for the authenticated app](https://docs.github.com/rest/apps/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-authenticated"]; + }; + "/app-manifests/{code}/conversions": { + /** + * Create a GitHub App from a manifest + * @description Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`. + */ + post: operations["apps/create-from-manifest"]; + }; + "/app/hook/config": { + /** + * Get a webhook configuration for an app + * @description Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-webhook-config-for-app"]; + /** + * Update a webhook configuration for an app + * @description Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + patch: operations["apps/update-webhook-config-for-app"]; + }; + "/app/hook/deliveries": { + /** + * List deliveries for an app webhook + * @description Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/list-webhook-deliveries"]; + }; + "/app/hook/deliveries/{delivery_id}": { + /** + * Get a delivery for an app webhook + * @description Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-webhook-delivery"]; + }; + "/app/hook/deliveries/{delivery_id}/attempts": { + /** + * Redeliver a delivery for an app webhook + * @description Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + post: operations["apps/redeliver-webhook-delivery"]; + }; + "/app/installation-requests": { + /** + * List installation requests for the authenticated app + * @description Lists all the pending installation requests for the authenticated GitHub App. + */ + get: operations["apps/list-installation-requests-for-authenticated-app"]; + }; + "/app/installations": { + /** + * List installations for the authenticated app + * @description You must use a [JWT](https://docs.github.com/enterprise-server@3.9/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * + * The permissions the installation has are included under the `permissions` key. + */ + get: operations["apps/list-installations"]; + }; + "/app/installations/{installation_id}": { + /** + * Get an installation for the authenticated app + * @description Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-installation"]; + /** + * Delete an installation for the authenticated app + * @description Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/apps/apps#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations["apps/delete-installation"]; + }; + "/app/installations/{installation_id}/access_tokens": { + /** + * 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. + * + * Optionally, 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. + * + * Optionally, 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. + * + * When 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. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + post: operations["apps/create-installation-access-token"]; + }; + "/app/installations/{installation_id}/suspended": { + /** + * Suspend an app installation + * @description Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + put: operations["apps/suspend-installation"]; + /** + * Unsuspend an app installation + * @description Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations["apps/unsuspend-installation"]; + }; + "/applications/{client_id}/grant": { + /** + * Delete an app authorization + * @description OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. + * Deleting an application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). + */ + delete: operations["apps/delete-authorization"]; + }; + "/applications/{client_id}/token": { + /** + * Check a token + * @description OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. + */ + post: operations["apps/check-token"]; + /** + * Delete an app token + * @description OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. + */ + delete: operations["apps/delete-token"]; + /** + * Reset a token + * @description OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + */ + patch: operations["apps/reset-token"]; + }; + "/applications/{client_id}/token/scoped": { + /** + * 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. + * + * 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. + */ + post: operations["apps/scope-token"]; + }; + "/apps/{app_slug}": { + /** + * 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`). + */ + get: operations["apps/get-by-slug"]; + }; + "/assignments/{assignment_id}": { + /** + * Get an assignment + * @description Gets a GitHub Classroom assignment. Assignment will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. + */ + get: operations["classroom/get-an-assignment"]; + }; + "/assignments/{assignment_id}/accepted_assignments": { + /** + * List accepted assignments for an assignment + * @description Lists any assignment repositories that have been created by students accepting a GitHub Classroom assignment. Accepted assignments will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. + */ + get: operations["classroom/list-accepted-assigments-for-an-assignment"]; + }; + "/assignments/{assignment_id}/grades": { + /** + * Get assignment grades + * @description Gets grades for a GitHub Classroom assignment. Grades will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. + */ + get: operations["classroom/get-assignment-grades"]; + }; + "/classrooms": { + /** + * List classrooms + * @description Lists GitHub Classroom classrooms for the current user. Classrooms will only be returned if the current user is an administrator of one or more GitHub Classrooms. + */ + get: operations["classroom/list-classrooms"]; + }; + "/classrooms/{classroom_id}": { + /** + * Get a classroom + * @description Gets a GitHub Classroom classroom for the current user. Classroom will only be returned if the current user is an administrator of the GitHub Classroom. + */ + get: operations["classroom/get-a-classroom"]; + }; + "/classrooms/{classroom_id}/assignments": { + /** + * List assignments for a classroom + * @description Lists GitHub Classroom assignments for a classroom. Assignments will only be returned if the current user is an administrator of the GitHub Classroom. + */ + get: operations["classroom/list-assignments-for-a-classroom"]; + }; + "/codes_of_conduct": { + /** + * Get all codes of conduct + * @description Returns array of all GitHub's codes of conduct. + */ + get: operations["codes-of-conduct/get-all-codes-of-conduct"]; + }; + "/codes_of_conduct/{key}": { + /** + * Get a code of conduct + * @description Returns information about the specified GitHub code of conduct. + */ + get: operations["codes-of-conduct/get-conduct-code"]; + }; + "/emojis": { + /** + * Get emojis + * @description Lists all the emojis available to use on GitHub. + */ + get: operations["emojis/get"]; + }; + "/enterprises/{enterprise}/copilot/usage": { + /** + * Get a summary of Copilot usage for enterprise members + * @description **Note**: This endpoint is in beta and is subject to change. + * + * You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE + * for all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances, + * and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions. + * + * The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day, + * and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + * they must have telemetry enabled in their IDE. + * + * Only the owners and billing managers of enterprises with a Copilot Business or Enterprise subscription can view Copilot usage + * metrics for the enterprise. + * + * OAuth app tokens and personal access tokens (classic) need the `copilot`, `manage_billing:copilot`, `admin:enterprise`, or `manage_billing:enterprise` scope to use this endpoint. + */ + get: operations["copilot/usage-metrics-for-enterprise"]; + }; + "/enterprises/{enterprise}/dependabot/alerts": { + /** + * List Dependabot alerts for an enterprise + * @description Lists Dependabot alerts for repositories that are owned by the specified enterprise. + * + * 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. + */ + get: operations["dependabot/list-alerts-for-enterprise"]; + }; + "/enterprises/{enterprise}/secret-scanning/alerts": { + /** + * List secret scanning alerts for an enterprise + * @description Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * + * 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. + */ + get: operations["secret-scanning/list-alerts-for-enterprise"]; + }; + "/events": { + /** + * List public events + * @description We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. + */ + get: operations["activity/list-public-events"]; + }; + "/feeds": { + /** + * Get feeds + * @description 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`. 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. + */ + get: operations["activity/get-feeds"]; + }; + "/gists": { + /** + * List gists for the authenticated user + * @description Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: + */ + get: operations["gists/list"]; + /** + * Create a gist + * @description Allows you to add a new gist with one or more files. + * + * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + */ + post: operations["gists/create"]; + }; + "/gists/public": { + /** + * List public gists + * @description List public gists sorted by most recently updated to least recently updated. + * + * 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. + */ + get: operations["gists/list-public"]; + }; + "/gists/starred": { + /** + * List starred gists + * @description List the authenticated user's starred gists: + */ + get: operations["gists/list-starred"]; + }; + "/gists/{gist_id}": { + /** + * Get a gist + * @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. + */ + get: operations["gists/get"]; + /** Delete a gist */ + delete: operations["gists/delete"]; + /** + * 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. + */ + patch: operations["gists/update"]; + }; + "/gists/{gist_id}/comments": { + /** + * List gist comments + * @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. + */ + get: operations["gists/list-comments"]; + /** + * Create a gist comment + * @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. + */ + post: operations["gists/create-comment"]; + }; + "/gists/{gist_id}/comments/{comment_id}": { + /** + * Get a gist comment + * @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. + */ + get: operations["gists/get-comment"]; + /** Delete a gist comment */ + delete: operations["gists/delete-comment"]; + /** + * Update a gist comment + * @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. + */ + patch: operations["gists/update-comment"]; + }; + "/gists/{gist_id}/commits": { + /** List gist commits */ + get: operations["gists/list-commits"]; + }; + "/gists/{gist_id}/forks": { + /** List gist forks */ + get: operations["gists/list-forks"]; + /** Fork a gist */ + post: operations["gists/fork"]; + }; + "/gists/{gist_id}/star": { + /** Check if a gist is starred */ + get: operations["gists/check-is-starred"]; + /** + * 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 method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." + */ + put: operations["gists/star"]; + /** Unstar a gist */ + delete: operations["gists/unstar"]; + }; + "/gists/{gist_id}/{sha}": { + /** + * Get a gist revision + * @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. + */ + get: operations["gists/get-revision"]; + }; + "/gitignore/templates": { + /** + * Get all gitignore templates + * @description List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/repos/repos#create-a-repository-for-the-authenticated-user). + */ + get: operations["gitignore/get-all-templates"]; + }; + "/gitignore/templates/{name}": { + /** + * Get a gitignore template + * @description 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. + */ + get: operations["gitignore/get-template"]; + }; + "/installation/repositories": { + /** + * List repositories accessible to the app installation + * @description List repositories that an app installation can access. + */ + get: operations["apps/list-repos-accessible-to-installation"]; + }; + "/installation/token": { + /** + * Revoke an installation access token + * @description Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/apps/apps#create-an-installation-access-token-for-an-app)" endpoint. + */ + delete: operations["apps/revoke-installation-access-token"]; + }; + "/issues": { + /** + * List issues assigned to the authenticated user + * @description List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * **Note**: GitHub's REST API 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`. + */ + get: operations["issues/list"]; + }; + "/licenses": { + /** + * Get all commonly used licenses + * @description Lists the most commonly used licenses on GitHub. For more information, see "[Licensing a repository ](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)." + */ + get: operations["licenses/get-all-commonly-used"]; + }; + "/licenses/{license}": { + /** + * Get a license + * @description Gets information about a specific license. For more information, see "[Licensing a repository ](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)." + */ + get: operations["licenses/get"]; + }; + "/markdown": { + /** Render a Markdown document */ + post: operations["markdown/render"]; + }; + "/markdown/raw": { + /** + * Render a Markdown document in raw mode + * @description You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. + */ + post: operations["markdown/render-raw"]; + }; + "/marketplace_listing/accounts/{account_id}": { + /** + * Get a subscription plan for an account + * @description Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/get-subscription-plan-for-account"]; + }; + "/marketplace_listing/plans": { + /** + * List plans + * @description Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-plans"]; + }; + "/marketplace_listing/plans/{plan_id}/accounts": { + /** + * List accounts for a plan + * @description Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-accounts-for-plan"]; + }; + "/marketplace_listing/stubbed/accounts/{account_id}": { + /** + * Get a subscription plan for an account (stubbed) + * @description Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/get-subscription-plan-for-account-stubbed"]; + }; + "/marketplace_listing/stubbed/plans": { + /** + * List plans (stubbed) + * @description Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-plans-stubbed"]; + }; + "/marketplace_listing/stubbed/plans/{plan_id}/accounts": { + /** + * List accounts for a plan (stubbed) + * @description Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-accounts-for-plan-stubbed"]; + }; + "/meta": { + /** + * Get GitHub meta information + * @description Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * The API's response also includes a list of GitHub's domain names. + * + * The values shown in the documentation's response are example values. You must always query the API directly to get the latest values. + * + * **Note:** This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. + */ + get: operations["meta/get"]; + }; + "/networks/{owner}/{repo}/events": { + /** List public events for a network of repositories */ + get: operations["activity/list-public-events-for-repo-network"]; + }; + "/notifications": { + /** + * List notifications for the authenticated user + * @description List all notifications for the current user, sorted by most recently updated. + */ + get: operations["activity/list-notifications-for-authenticated-user"]; + /** + * Mark notifications as read + * @description Marks all notifications as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/rest/activity/notifications#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. + */ + put: operations["activity/mark-notifications-as-read"]; + }; + "/notifications/threads/{thread_id}": { + /** + * Get a thread + * @description Gets information about a notification thread. + */ + get: operations["activity/get-thread"]; + /** + * 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. + */ + delete: operations["activity/mark-thread-as-done"]; + /** + * Mark a thread as read + * @description Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications. + */ + patch: operations["activity/mark-thread-as-read"]; + }; + "/notifications/threads/{thread_id}/subscription": { + /** + * Get a thread subscription for the authenticated user + * @description This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/activity/watching#get-a-repository-subscription). + * + * Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread. + */ + get: operations["activity/get-thread-subscription-for-authenticated-user"]; + /** + * Set a thread subscription + * @description If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/activity/notifications#delete-a-thread-subscription) endpoint. + */ + put: operations["activity/set-thread-subscription"]; + /** + * Delete a thread subscription + * @description Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/activity/notifications#set-a-thread-subscription) endpoint and set `ignore` to `true`. + */ + delete: operations["activity/delete-thread-subscription"]; + }; + "/octocat": { + /** + * Get Octocat + * @description Get the octocat as ASCII art + */ + get: operations["meta/get-octocat"]; + }; + "/organizations": { + /** + * List organizations + * @description 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. + */ + get: operations["orgs/list"]; + }; + "/orgs/{org}": { + /** + * Get an organization + * @description 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 + * + * 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. + */ + get: operations["orgs/get"]; + /** + * Delete an organization + * @description Deletes an organization and all its repositories. + * + * The organization login will be unavailable for 90 days after deletion. + * + * Please review the Terms of Service regarding account deletion before using this endpoint: + * + * https://docs.github.com/site-policy/github-terms/github-terms-of-service + */ + delete: operations["orgs/delete"]; + /** + * Update an organization + * @description **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * 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. + */ + patch: operations["orgs/update"]; + }; + "/orgs/{org}/actions/cache/usage": { + /** + * Get GitHub Actions cache usage for an organization + * @description Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * + * OAuth tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-for-org"]; + }; + "/orgs/{org}/actions/cache/usage-by-repository": { + /** + * List repositories with GitHub Actions cache usage for an organization + * @description Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * + * OAuth tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-by-repo-for-org"]; + }; + "/orgs/{org}/actions/oidc/customization/sub": { + /** + * Get the customization template for an OIDC subject claim for an organization + * @description Gets the customization template for an OpenID Connect (OIDC) subject claim. + * + * OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. + */ + get: operations["oidc/get-oidc-custom-sub-template-for-org"]; + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + */ + put: operations["oidc/update-oidc-custom-sub-template-for-org"]; + }; + "/orgs/{org}/actions/permissions": { + /** + * Get GitHub Actions permissions for an organization + * @description Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-github-actions-permissions-organization"]; + /** + * Set GitHub Actions permissions for an organization + * @description Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-github-actions-permissions-organization"]; + }; + "/orgs/{org}/actions/permissions/repositories": { + /** + * List selected repositories enabled for GitHub Actions in an organization + * @description Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-selected-repositories-enabled-github-actions-organization"]; + /** + * Set selected repositories enabled for GitHub Actions in an organization + * @description Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-selected-repositories-enabled-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/repositories/{repository_id}": { + /** + * Enable a selected repository for GitHub Actions in an organization + * @description Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + put: operations["actions/enable-selected-repository-github-actions-organization"]; + /** + * Disable a selected repository for GitHub Actions in an organization + * @description Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/disable-selected-repository-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/selected-actions": { + /** + * 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)." + * + * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-allowed-actions-organization"]; + /** + * Set allowed actions and reusable workflows for an organization + * @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)." + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-allowed-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/workflow": { + /** + * Get default workflow permissions for an organization + * @description Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-organization"]; + /** + * Set default workflow permissions for an organization + * @description Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-organization"]; + }; + "/orgs/{org}/actions/runners": { + /** + * List self-hosted runners for an organization + * @description Lists all self-hosted runners configured in an organization. + * + * 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. + */ + get: operations["actions/list-self-hosted-runners-for-org"]; + }; + "/orgs/{org}/actions/runners/downloads": { + /** + * List runner applications for an organization + * @description Lists binaries for the runner application that you can download and run. + * + * 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. + */ + get: operations["actions/list-runner-applications-for-org"]; + }; + "/orgs/{org}/actions/runners/generate-jitconfig": { + /** + * Create configuration for a just-in-time runner for an organization + * @description Generates a configuration that can be passed to the runner application at startup. + * + * 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. + */ + post: operations["actions/generate-runner-jitconfig-for-org"]; + }; + "/orgs/{org}/actions/runners/registration-token": { + /** + * 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. + * + * 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. + */ + post: operations["actions/create-registration-token-for-org"]; + }; + "/orgs/{org}/actions/runners/remove-token": { + /** + * Create a remove token for an organization + * @description Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * 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. + */ + post: operations["actions/create-remove-token-for-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}": { + /** + * Get a self-hosted runner for an organization + * @description Gets a specific self-hosted runner configured in an organization. + * + * 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. + */ + get: operations["actions/get-self-hosted-runner-for-org"]; + /** + * Delete a self-hosted runner from an organization + * @description Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * 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. + */ + delete: operations["actions/delete-self-hosted-runner-from-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}/labels": { + /** + * List labels for a self-hosted runner for an organization + * @description Lists all labels for a self-hosted runner configured in an organization. + * + * 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. + */ + get: operations["actions/list-labels-for-self-hosted-runner-for-org"]; + /** + * Set custom labels for a self-hosted runner for an organization + * @description Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * 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. + */ + put: operations["actions/set-custom-labels-for-self-hosted-runner-for-org"]; + /** + * Add custom labels to a self-hosted runner for an organization + * @description 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. + * + * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + post: operations["actions/add-custom-labels-to-self-hosted-runner-for-org"]; + /** + * Remove all custom labels from a self-hosted runner for an organization + * @description Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * 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. + */ + delete: operations["actions/remove-all-custom-labels-from-self-hosted-runner-for-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner for an organization + * @description Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * 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. + */ + delete: operations["actions/remove-custom-label-from-self-hosted-runner-for-org"]; + }; + "/orgs/{org}/actions/secrets": { + /** + * List organization secrets + * @description Lists all secrets available in an organization 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 `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. + */ + get: operations["actions/list-org-secrets"]; + }; + "/orgs/{org}/actions/secrets/public-key": { + /** + * 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. + * + * 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. + */ + get: operations["actions/get-org-public-key"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}": { + /** + * Get an organization secret + * @description Gets a single organization secret without revealing its encrypted value. + * + * 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. + */ + get: operations["actions/get-org-secret"]; + /** + * Create or update an organization secret + * @description Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["actions/create-or-update-org-secret"]; + /** + * Delete an organization secret + * @description Deletes a secret in an organization 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`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. + */ + delete: operations["actions/delete-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories": { + /** + * 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`. + * + * 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. + */ + get: operations["actions/list-selected-repos-for-org-secret"]; + /** + * 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/actions/secrets#create-or-update-an-organization-secret). + * + * 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. + */ + put: operations["actions/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": { + /** + * 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`. 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). + * + * 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. + */ + put: operations["actions/add-selected-repo-to-org-secret"]; + /** + * 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/actions/secrets#create-or-update-an-organization-secret). + * + * 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. + */ + delete: operations["actions/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/actions/variables": { + /** + * List organization variables + * @description Lists all organization 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. + */ + get: operations["actions/list-org-variables"]; + /** + * Create an organization variable + * @description Creates an organization 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`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. + */ + post: operations["actions/create-org-variable"]; + }; + "/orgs/{org}/actions/variables/{name}": { + /** + * Get an organization variable + * @description Gets a specific variable in an organization. + * + * 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. + */ + get: operations["actions/get-org-variable"]; + /** + * Delete an organization variable + * @description Deletes an organization 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`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. + */ + delete: operations["actions/delete-org-variable"]; + /** + * Update an organization variable + * @description Updates an organization 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 `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. + */ + patch: operations["actions/update-org-variable"]; + }; + "/orgs/{org}/actions/variables/{name}/repositories": { + /** + * List selected repositories for an organization variable + * @description Lists all repositories that can access an organization variable + * that is available to selected repositories. + * + * 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. + */ + get: operations["actions/list-selected-repos-for-org-variable"]; + /** + * Set selected repositories for an organization variable + * @description Replaces all repositories for an organization variable that is available + * to selected repositories. Organization variables that are available to selected + * repositories have their `visibility` field set to `selected`. + * + * 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. + */ + put: operations["actions/set-selected-repos-for-org-variable"]; + }; + "/orgs/{org}/actions/variables/{name}/repositories/{repository_id}": { + /** + * Add selected repository to an organization variable + * @description 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`. + * + * 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. + */ + put: operations["actions/add-selected-repo-to-org-variable"]; + /** + * Remove selected repository from an organization variable + * @description Removes a repository from an organization variable that is + * available to selected repositories. Organization variables that are available to + * selected repositories have their `visibility` field set to `selected`. + * + * 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. + */ + delete: operations["actions/remove-selected-repo-from-org-variable"]; + }; + "/orgs/{org}/blocks": { + /** + * List users blocked by an organization + * @description List the users blocked by an organization. + */ + get: operations["orgs/list-blocked-users"]; + }; + "/orgs/{org}/blocks/{username}": { + /** + * Check if a user is blocked by an organization + * @description Returns a 204 if the given user is blocked by the given organization. Returns a 404 if the organization is not blocking the user, or if the user account has been identified as spam by GitHub. + */ + get: operations["orgs/check-blocked-user"]; + /** + * Block a user from an organization + * @description Blocks the given user on behalf of the specified organization and returns a 204. If the organization cannot block the given user a 422 is returned. + */ + put: operations["orgs/block-user"]; + /** + * Unblock a user from an organization + * @description Unblocks the given user on behalf of the specified organization. + */ + delete: operations["orgs/unblock-user"]; + }; + "/orgs/{org}/code-scanning/alerts": { + /** + * List code scanning alerts for an organization + * @description Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * 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 `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. + */ + get: operations["code-scanning/list-alerts-for-org"]; + }; + "/orgs/{org}/codespaces": { + /** + * List codespaces for the organization + * @description Lists the codespaces associated to a specified organization. + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/list-in-organization"]; + }; + "/orgs/{org}/codespaces/access": { + /** + * Manage access control for organization codespaces + * @deprecated + * @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. + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + put: operations["codespaces/set-codespaces-access"]; + }; + "/orgs/{org}/codespaces/access/selected_users": { + /** + * Add users to Codespaces access for an organization + * @deprecated + * @description Codespaces for the specified users will be billed to the organization. + * + * 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + post: operations["codespaces/set-codespaces-access-users"]; + /** + * Remove users from Codespaces access for an organization + * @deprecated + * @description Codespaces for the specified users will no longer be billed to the organization. + * + * 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + delete: operations["codespaces/delete-codespaces-access-users"]; + }; + "/orgs/{org}/codespaces/secrets": { + /** + * List organization secrets + * @description 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. + */ + get: operations["codespaces/list-org-secrets"]; + }; + "/orgs/{org}/codespaces/secrets/public-key": { + /** + * 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. + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/get-org-public-key"]; + }; + "/orgs/{org}/codespaces/secrets/{secret_name}": { + /** + * Get an organization secret + * @description 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. + */ + get: operations["codespaces/get-org-secret"]; + /** + * Create or update an organization secret + * @description 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + put: operations["codespaces/create-or-update-org-secret"]; + /** + * Delete an organization secret + * @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. + */ + delete: operations["codespaces/delete-org-secret"]; + }; + "/orgs/{org}/codespaces/secrets/{secret_name}/repositories": { + /** + * 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`. + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/list-selected-repos-for-org-secret"]; + /** + * Set selected repositories for an organization secret + * @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. + */ + put: operations["codespaces/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": { + /** + * Add selected repository to an organization secret + * @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. + */ + put: operations["codespaces/add-selected-repo-to-org-secret"]; + /** + * Remove selected repository from an organization secret + * @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. + */ + delete: operations["codespaces/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/copilot/billing": { + /** + * 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 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 "[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 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. + */ + get: operations["copilot/get-copilot-organization-details"]; + }; + "/orgs/{org}/copilot/billing/seats": { + /** + * List all Copilot seat assignments for an organization + * @description **Note**: This endpoint is in beta and is subject to change. + * + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + */ + get: operations["copilot/list-copilot-seats"]; + }; + "/orgs/{org}/copilot/billing/selected_teams": { + /** + * 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 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 can configure GitHub Copilot in their 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. + */ + post: operations["copilot/add-copilot-seats-for-teams"]; + /** + * Remove teams from the Copilot subscription for an organization + * @description **Note**: This endpoint is in beta and is subject to change. + * + * 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 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)". + * + * Only organization owners can configure GitHub Copilot in their organization. + * + * OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + */ + delete: operations["copilot/cancel-copilot-seat-assignment-for-teams"]; + }; + "/orgs/{org}/copilot/billing/selected_users": { + /** + * 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 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 can configure GitHub Copilot in their 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. + */ + post: operations["copilot/add-copilot-seats-for-users"]; + /** + * Remove users from the Copilot subscription for an organization + * @description **Note**: This endpoint is in beta and is subject to change. + * + * 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 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)". + * + * Only organization owners can configure GitHub Copilot in their organization. + * + * OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + */ + delete: operations["copilot/cancel-copilot-seat-assignment-for-users"]; + }; + "/orgs/{org}/copilot/usage": { + /** + * Get a summary of Copilot usage for organization members + * @description **Note**: This endpoint is in beta and is subject to change. + * + * You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE + * across an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. + * See the response schema tab for detailed metrics definitions. + * + * The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day, + * and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + * they must have telemetry enabled in their IDE. + * + * Copilot Business or Copilot Enterprise organization owners, and owners and billing managers of their parent enterprises, can view + * Copilot usage metrics. + * + * OAuth app tokens and personal access tokens (classic) need the `copilot`, `manage_billing:copilot`, `admin:org`, `admin:enterprise`, or `manage_billing:enterprise` scope to use this endpoint. + */ + get: operations["copilot/usage-metrics-for-org"]; + }; + "/orgs/{org}/dependabot/alerts": { + /** + * List Dependabot alerts for an organization + * @description Lists Dependabot alerts for an organization. + * + * 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 `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. + */ + get: operations["dependabot/list-alerts-for-org"]; + }; + "/orgs/{org}/dependabot/secrets": { + /** + * List organization secrets + * @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. + */ + get: operations["dependabot/list-org-secrets"]; + }; + "/orgs/{org}/dependabot/secrets/public-key": { + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + get: operations["dependabot/get-org-public-key"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}": { + /** + * Get an organization secret + * @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. + */ + get: operations["dependabot/get-org-secret"]; + /** + * Create or update an organization secret + * @description Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["dependabot/create-or-update-org-secret"]; + /** + * Delete an organization secret + * @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. + */ + delete: operations["dependabot/delete-org-secret"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories": { + /** + * 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`. + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + get: operations["dependabot/list-selected-repos-for-org-secret"]; + /** + * 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). + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + put: operations["dependabot/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": { + /** + * 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). + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + put: operations["dependabot/add-selected-repo-to-org-secret"]; + /** + * 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). + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + delete: operations["dependabot/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/docker/conflicts": { + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. + */ + get: operations["packages/list-docker-migration-conflicting-packages-for-organization"]; + }; + "/orgs/{org}/events": { + /** List public organization events */ + get: operations["activity/list-public-org-events"]; + }; + "/orgs/{org}/failed_invitations": { + /** + * List failed organization invitations + * @description The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. + */ + get: operations["orgs/list-failed-invitations"]; + }; + "/orgs/{org}/hooks": { + /** + * List organization webhooks + * @description You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + get: operations["orgs/list-webhooks"]; + /** + * Create an organization webhook + * @description Create a hook that posts payloads in JSON format. + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or + * edit webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + post: operations["orgs/create-webhook"]; + }; + "/orgs/{org}/hooks/{hook_id}": { + /** + * 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). + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + get: operations["orgs/get-webhook"]; + /** + * Delete an organization webhook + * @description You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + delete: operations["orgs/delete-webhook"]; + /** + * 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)". + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + patch: operations["orgs/update-webhook"]; + }; + "/orgs/{org}/hooks/{hook_id}/config": { + /** + * 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)." + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + get: operations["orgs/get-webhook-config-for-org"]; + /** + * 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)." + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + patch: operations["orgs/update-webhook-config-for-org"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries": { + /** + * List deliveries for an organization webhook + * @description Returns a list of webhook deliveries for a webhook configured in an organization. + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + get: operations["orgs/list-webhook-deliveries"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": { + /** + * Get a webhook delivery for an organization webhook + * @description Returns a delivery for a webhook configured in an organization. + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + get: operations["orgs/get-webhook-delivery"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": { + /** + * Redeliver a delivery for an organization webhook + * @description Redeliver a delivery for a webhook configured in an organization. + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + post: operations["orgs/redeliver-webhook-delivery"]; + }; + "/orgs/{org}/hooks/{hook_id}/pings": { + /** + * Ping an organization webhook + * @description This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) + * to be sent to the hook. + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + post: operations["orgs/ping-webhook"]; + }; + "/orgs/{org}/installation": { + /** + * Get an organization installation for the authenticated app + * @description Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-org-installation"]; + }; + "/orgs/{org}/installations": { + /** + * 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. + * + * 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. + */ + get: operations["orgs/list-app-installations"]; + }; + "/orgs/{org}/interaction-limits": { + /** + * Get interaction restrictions for an organization + * @description Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. + */ + get: operations["interactions/get-restrictions-for-org"]; + /** + * Set interaction restrictions for an organization + * @description Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. + */ + put: operations["interactions/set-restrictions-for-org"]; + /** + * Remove interaction restrictions for an organization + * @description Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. + */ + delete: operations["interactions/remove-restrictions-for-org"]; + }; + "/orgs/{org}/invitations": { + /** + * List pending organization invitations + * @description The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, or `hiring_manager`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + */ + get: operations["orgs/list-pending-invitations"]; + /** + * Create an organization invitation + * @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. 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)." + */ + post: operations["orgs/create-invitation"]; + }; + "/orgs/{org}/invitations/{invitation_id}": { + /** + * Cancel an organization invitation + * @description Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + delete: operations["orgs/cancel-invitation"]; + }; + "/orgs/{org}/invitations/{invitation_id}/teams": { + /** + * List organization invitation teams + * @description List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. + */ + get: operations["orgs/list-invitation-teams"]; + }; + "/orgs/{org}/issues": { + /** + * List organization issues assigned to the authenticated user + * @description List issues in an organization assigned to the authenticated user. + * + * **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`. + */ + get: operations["issues/list-for-org"]; + }; + "/orgs/{org}/members": { + /** + * List organization members + * @description List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. + */ + get: operations["orgs/list-members"]; + }; + "/orgs/{org}/members/{username}": { + /** + * Check organization membership for a user + * @description Check if a user is, publicly or privately, a member of the organization. + */ + get: operations["orgs/check-membership-for-user"]; + /** + * Remove an organization member + * @description Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. + */ + delete: operations["orgs/remove-member"]; + }; + "/orgs/{org}/members/{username}/codespaces": { + /** + * List codespaces for a user in organization + * @description Lists the codespaces that a member of an organization has for repositories in that organization. + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + get: operations["codespaces/get-codespaces-for-user-in-org"]; + }; + "/orgs/{org}/members/{username}/codespaces/{codespace_name}": { + /** + * Delete a codespace from the organization + * @description Deletes a user's codespace. + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + delete: operations["codespaces/delete-from-organization"]; + }; + "/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": { + /** + * Stop a codespace for an organization user + * @description Stops a user's codespace. + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + post: operations["codespaces/stop-in-organization"]; + }; + "/orgs/{org}/members/{username}/copilot": { + /** + * Get Copilot seat assignment details for a user + * @description **Note**: This endpoint is in beta and is subject to change. + * + * Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. + * + * 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. + */ + get: operations["copilot/get-copilot-seat-details-for-user"]; + }; + "/orgs/{org}/memberships/{username}": { + /** + * Get organization membership for a user + * @description In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. + */ + get: operations["orgs/get-membership-for-user"]; + /** + * Set organization membership for a user + * @description Only authenticated organization owners can add a member to the organization or update the member's role. + * + * * If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/orgs/members#get-organization-membership-for-a-user) will be `pending` until they accept the invitation. + * + * * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent. + * + * **Rate limits** + * + * To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. + */ + put: operations["orgs/set-membership-for-user"]; + /** + * Remove organization membership for a user + * @description In order to remove a user's membership with an organization, the authenticated user must be an organization owner. + * + * If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. + */ + delete: operations["orgs/remove-membership-for-user"]; + }; + "/orgs/{org}/migrations": { + /** + * List organization migrations + * @description Lists the most recent migrations, including both exports (which can be started through the REST API) and imports (which cannot be started using the REST API). + * + * A list of `repositories` is only returned for export migrations. + */ + get: operations["migrations/list-for-org"]; + /** + * Start an organization migration + * @description Initiates the generation of a migration archive. + */ + post: operations["migrations/start-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}": { + /** + * Get an organization migration status + * @description Fetches the status of a migration. + * + * The `state` of a migration can be one of the following values: + * + * * `pending`, which means the migration hasn't started yet. + * * `exporting`, which means the migration is in progress. + * * `exported`, which means the migration finished successfully. + * * `failed`, which means the migration failed. + */ + get: operations["migrations/get-status-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/archive": { + /** + * Download an organization migration archive + * @description Fetches the URL to a migration archive. + */ + get: operations["migrations/download-archive-for-org"]; + /** + * Delete an organization migration archive + * @description Deletes a previous migration archive. Migration archives are automatically deleted after seven days. + */ + delete: operations["migrations/delete-archive-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": { + /** + * Unlock an organization repository + * @description Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/repos/repos#delete-a-repository) when the migration is complete and you no longer need the source data. + */ + delete: operations["migrations/unlock-repo-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/repositories": { + /** + * List repositories in an organization migration + * @description List all the repositories for this organization migration. + */ + get: operations["migrations/list-repos-for-org"]; + }; + "/orgs/{org}/organization-fine-grained-permissions": { + /** + * 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. + */ + get: operations["orgs/list-organization-fine-grained-permissions"]; + }; + "/orgs/{org}/organization-roles": { + /** + * 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. + */ + get: operations["orgs/list-org-roles"]; + /** + * 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. + */ + post: operations["orgs/create-custom-organization-role"]; + }; + "/orgs/{org}/organization-roles/teams/{team_slug}": { + /** + * 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. + */ + delete: operations["orgs/revoke-all-org-roles-team"]; + }; + "/orgs/{org}/organization-roles/teams/{team_slug}/{role_id}": { + /** + * 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. + */ + put: operations["orgs/assign-team-to-org-role"]; + /** + * 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. + */ + delete: operations["orgs/revoke-org-role-team"]; + }; + "/orgs/{org}/organization-roles/users/{username}": { + /** + * 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. + */ + delete: operations["orgs/revoke-all-org-roles-user"]; + }; + "/orgs/{org}/organization-roles/users/{username}/{role_id}": { + /** + * 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. + */ + put: operations["orgs/assign-user-to-org-role"]; + /** + * 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. + */ + delete: operations["orgs/revoke-org-role-user"]; + }; + "/orgs/{org}/organization-roles/{role_id}": { + /** + * 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. + */ + get: operations["orgs/get-org-role"]; + /** + * 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. + */ + delete: operations["orgs/delete-custom-organization-role"]; + /** + * 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. + */ + patch: operations["orgs/patch-custom-organization-role"]; + }; + "/orgs/{org}/organization-roles/{role_id}/teams": { + /** + * 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. + */ + get: operations["orgs/list-org-role-teams"]; + }; + "/orgs/{org}/organization-roles/{role_id}/users": { + /** + * 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. + */ + get: operations["orgs/list-org-role-users"]; + }; + "/orgs/{org}/outside_collaborators": { + /** + * List outside collaborators for an organization + * @description List all users who are outside collaborators of an organization. + */ + get: operations["orgs/list-outside-collaborators"]; + }; + "/orgs/{org}/outside_collaborators/{username}": { + /** + * Convert an organization member to outside collaborator + * @description When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + */ + put: operations["orgs/convert-member-to-outside-collaborator"]; + /** + * Remove outside collaborator from an organization + * @description Removing a user from this list will remove them from all the organization's repositories. + */ + delete: operations["orgs/remove-outside-collaborator"]; + }; + "/orgs/{org}/packages": { + /** + * List packages for an organization + * @description Lists packages in an organization readable by the user. + * + * 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)." + */ + get: operations["packages/list-packages-for-organization"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}": { + /** + * Get a package for an organization + * @description Gets a specific package in an organization. + * + * 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)." + */ + get: operations["packages/get-package-for-organization"]; + /** + * Delete a package for an organization + * @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. + * + * 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)." + */ + delete: operations["packages/delete-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/restore": { + /** + * Restore a package for an organization + * @description Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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)." + */ + post: operations["packages/restore-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions": { + /** + * List package versions for a package owned by an organization + * @description Lists package versions for a package owned by an organization. + * + * 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)." + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Get a package version for an organization + * @description Gets a specific package version in an organization. + * + * 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)." + */ + get: operations["packages/get-package-version-for-organization"]; + /** + * Delete package version for an organization + * @description Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * 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)." + */ + delete: operations["packages/delete-package-version-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restore package version for an organization + * @description Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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)." + */ + post: operations["packages/restore-package-version-for-org"]; + }; + "/orgs/{org}/personal-access-token-requests": { + /** + * 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 use this endpoint. + */ + get: operations["orgs/list-pat-grant-requests"]; + /** + * 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 use this endpoint. + */ + post: operations["orgs/review-pat-grant-requests-in-bulk"]; + }; + "/orgs/{org}/personal-access-token-requests/{pat_request_id}": { + /** + * 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 use this endpoint. + */ + post: operations["orgs/review-pat-grant-request"]; + }; + "/orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories": { + /** + * 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 use this endpoint. + */ + get: operations["orgs/list-pat-grant-request-repositories"]; + }; + "/orgs/{org}/personal-access-tokens": { + /** + * 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 use this endpoint. + */ + get: operations["orgs/list-pat-grants"]; + /** + * 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 use this endpoint. + */ + post: operations["orgs/update-pat-accesses"]; + }; + "/orgs/{org}/personal-access-tokens/{pat_id}": { + /** + * 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 use this endpoint. + */ + post: operations["orgs/update-pat-access"]; + }; + "/orgs/{org}/personal-access-tokens/{pat_id}/repositories": { + /** + * 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 use this endpoint. + */ + get: operations["orgs/list-pat-grant-repositories"]; + }; + "/orgs/{org}/projects": { + /** + * List organization projects + * @description Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + get: operations["projects/list-for-org"]; + /** + * Create an organization project + * @description Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + post: operations["projects/create-for-org"]; + }; + "/orgs/{org}/properties/schema": { + /** + * Get all custom properties for an organization + * @description Gets all custom properties defined for an organization. + * Organization members can read these properties. + */ + get: operations["orgs/get-all-custom-properties"]; + /** + * 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. + */ + patch: operations["orgs/create-or-update-custom-properties"]; + }; + "/orgs/{org}/properties/schema/{custom_property_name}": { + /** + * Get a custom property for an organization + * @description Gets a custom property that is defined for an organization. + * Organization members can read these properties. + */ + get: operations["orgs/get-custom-property"]; + /** + * 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. + */ + put: operations["orgs/create-or-update-custom-property"]; + /** + * 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. + */ + delete: operations["orgs/remove-custom-property"]; + }; + "/orgs/{org}/properties/values": { + /** + * List custom property values for organization repositories + * @description Lists organization repositories with all of their custom property values. + * Organization members can read these properties. + */ + get: operations["orgs/list-custom-properties-values-for-repos"]; + /** + * 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. + */ + patch: operations["orgs/create-or-update-custom-properties-values-for-repos"]; + }; + "/orgs/{org}/public_members": { + /** + * List public organization members + * @description Members of an organization can choose to have their membership publicized or not. + */ + get: operations["orgs/list-public-members"]; + }; + "/orgs/{org}/public_members/{username}": { + /** + * Check public organization membership for a user + * @description Check if the provided user is a public member of the organization. + */ + get: operations["orgs/check-public-membership-for-user"]; + /** + * Set public organization membership for the authenticated user + * @description The user can publicize their own membership. (A user cannot publicize the membership for another user.) + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." + */ + put: operations["orgs/set-public-membership-for-authenticated-user"]; + /** + * Remove public organization membership for the authenticated user + * @description Removes the public membership for the authenticated user from the specified organization, unless public visibility is enforced by default. + */ + delete: operations["orgs/remove-public-membership-for-authenticated-user"]; + }; + "/orgs/{org}/repos": { + /** + * List organization repositories + * @description Lists repositories for the specified organization. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + get: operations["repos/list-for-org"]; + /** + * Create an organization repository + * @description Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * 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. + */ + post: operations["repos/create-in-org"]; + }; + "/orgs/{org}/rulesets": { + /** + * Get all organization repository rulesets + * @description Get all the repository rulesets for an organization. + */ + get: operations["repos/get-org-rulesets"]; + /** + * Create an organization repository ruleset + * @description Create a repository ruleset for an organization. + */ + post: operations["repos/create-org-ruleset"]; + }; + "/orgs/{org}/rulesets/rule-suites": { + /** + * 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)." + */ + get: operations["repos/get-org-rule-suites"]; + }; + "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}": { + /** + * 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)." + */ + get: operations["repos/get-org-rule-suite"]; + }; + "/orgs/{org}/rulesets/{ruleset_id}": { + /** + * Get an organization repository ruleset + * @description Get a repository ruleset for an organization. + */ + get: operations["repos/get-org-ruleset"]; + /** + * Update an organization repository ruleset + * @description Update a ruleset for an organization. + */ + put: operations["repos/update-org-ruleset"]; + /** + * Delete an organization repository ruleset + * @description Delete a ruleset for an organization. + */ + delete: operations["repos/delete-org-ruleset"]; + }; + "/orgs/{org}/secret-scanning/alerts": { + /** + * List secret scanning alerts for an organization + * @description Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * + * 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. + */ + get: operations["secret-scanning/list-alerts-for-org"]; + }; + "/orgs/{org}/security-advisories": { + /** + * List repository security advisories for an organization + * @description Lists repository security advisories for an organization. + * + * 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. + */ + get: operations["security-advisories/list-org-repository-advisories"]; + }; + "/orgs/{org}/security-managers": { + /** + * List security manager teams + * @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)." + * + * 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 `read:org` scope to use this endpoint. + */ + get: operations["orgs/list-security-manager-teams"]; + }; + "/orgs/{org}/security-managers/teams/{team_slug}": { + /** + * Add a security manager team + * @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." + * + * The authenticated user must be an administrator for the organization to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + */ + put: operations["orgs/add-security-manager-team"]; + /** + * Remove a security manager team + * @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." + * + * 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. + */ + delete: operations["orgs/remove-security-manager-team"]; + }; + "/orgs/{org}/settings/billing/actions": { + /** + * Get GitHub Actions billing for an organization + * @description Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint. + */ + get: operations["billing/get-github-actions-billing-org"]; + }; + "/orgs/{org}/settings/billing/packages": { + /** + * Get GitHub Packages billing for an organization + * @description Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint. + */ + get: operations["billing/get-github-packages-billing-org"]; + }; + "/orgs/{org}/settings/billing/shared-storage": { + /** + * Get shared storage billing for an organization + * @description Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint. + */ + get: operations["billing/get-shared-storage-billing-org"]; + }; + "/orgs/{org}/team/{team_slug}/copilot/usage": { + /** + * Get a summary of Copilot usage for a team + * @description **Note**: This endpoint is in beta and is subject to change. + * + * You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE + * for users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. + * See the response schema tab for detailed metrics definitions. + * + * The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day, + * and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + * they must have telemetry enabled in their IDE. + * + * **Note**: This endpoint will only return results for a given day if the team had five or more members on that day. + * + * Copilot Business or Copilot Enterprise organization owners for the organization that contains this team, + * and owners and billing managers of their parent enterprises, can view Copilot usage metrics for a team. + * + * OAuth app tokens and personal access tokens (classic) need the `copilot`, `manage_billing:copilot`, `admin:org`, `admin:enterprise`, or `manage_billing:enterprise` scope to use this endpoint. + */ + get: operations["copilot/usage-metrics-for-team"]; + }; + "/orgs/{org}/teams": { + /** + * List teams + * @description Lists all teams in an organization that are visible to the authenticated user. + */ + get: operations["teams/list"]; + /** + * Create a team + * @description To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://docs.github.com/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + post: operations["teams/create"]; + }; + "/orgs/{org}/teams/{team_slug}": { + /** + * Get a team by name + * @description Gets a team using the team's `slug`. To create the `slug`, GitHub replaces special characters in the `name` string, changes all words to lowercase, and replaces spaces with a `-` separator. For example, `"My TEam Näme"` would become `my-team-name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + get: operations["teams/get-by-name"]; + /** + * Delete a team + * @description To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + delete: operations["teams/delete-in-org"]; + /** + * Update a team + * @description To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + patch: operations["teams/update-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions": { + /** + * List discussions + * @description 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. + */ + get: operations["teams/list-discussions-in-org"]; + /** + * Create a discussion + * @description 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)." + * + * **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. + */ + post: operations["teams/create-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": { + /** + * Get a discussion + * @description 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. + */ + get: operations["teams/get-discussion-in-org"]; + /** + * Delete a discussion + * @description 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. + */ + delete: operations["teams/delete-discussion-in-org"]; + /** + * Update a discussion + * @description 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. + */ + patch: operations["teams/update-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": { + /** + * List discussion comments + * @description 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. + */ + get: operations["teams/list-discussion-comments-in-org"]; + /** + * Create a discussion comment + * @description 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)." + * + * **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. + */ + post: operations["teams/create-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": { + /** + * Get a discussion comment + * @description 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. + */ + get: operations["teams/get-discussion-comment-in-org"]; + /** + * Delete a discussion comment + * @description 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. + */ + delete: operations["teams/delete-discussion-comment-in-org"]; + /** + * Update a discussion comment + * @description 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. + */ + patch: operations["teams/update-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + /** + * 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). + * + * **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. + */ + get: operations["reactions/list-for-team-discussion-comment-in-org"]; + /** + * 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). + * + * 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. + */ + post: operations["reactions/create-for-team-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": { + /** + * Delete team discussion comment reaction + * @description **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). + * + * OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + */ + delete: operations["reactions/delete-for-team-discussion-comment"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": { + /** + * List reactions for a team discussion + * @description 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. + */ + get: operations["reactions/list-for-team-discussion-in-org"]; + /** + * Create reaction for a team discussion + * @description 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. + */ + post: operations["reactions/create-for-team-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": { + /** + * Delete team discussion reaction + * @description **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). + * + * OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + */ + delete: operations["reactions/delete-for-team-discussion"]; + }; + "/orgs/{org}/teams/{team_slug}/invitations": { + /** + * List pending team invitations + * @description The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + get: operations["teams/list-pending-invitations-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/members": { + /** + * List team members + * @description Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + get: operations["teams/list-members-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/memberships/{username}": { + /** + * Get team membership for a user + * @description Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/teams/teams#create-a-team). + */ + get: operations["teams/get-membership-for-user-in-org"]; + /** + * Add or update team membership for a user + * @description Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + put: operations["teams/add-or-update-membership-for-user-in-org"]; + /** + * Remove team membership for a user + * @description To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + delete: operations["teams/remove-membership-for-user-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/projects": { + /** + * List team projects + * @description Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + get: operations["teams/list-projects-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/projects/{project_id}": { + /** + * Check team permissions for a project + * @description Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + get: operations["teams/check-permissions-for-project-in-org"]; + /** + * Add or update team project permissions + * @description Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + put: operations["teams/add-or-update-project-permissions-in-org"]; + /** + * Remove a project from a team + * @description Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + delete: operations["teams/remove-project-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/repos": { + /** + * List team repositories + * @description Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + get: operations["teams/list-repos-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": { + /** + * Check team permissions for a repository + * @description Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked. + * + * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * 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}`. + */ + get: operations["teams/check-permissions-for-repo-in-org"]; + /** + * 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 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}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + put: operations["teams/add-or-update-repo-permissions-in-org"]; + /** + * Remove a repository from a team + * @description If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + delete: operations["teams/remove-repo-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/teams": { + /** + * List child teams + * @description Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + get: operations["teams/list-child-in-org"]; + }; + "/orgs/{org}/{security_product}/{enablement}": { + /** + * Enable or disable a security feature for an organization + * @description 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)." + * + * The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + */ + post: operations["orgs/enable-or-disable-security-product-on-all-org-repos"]; + }; + "/projects/columns/cards/{card_id}": { + /** + * Get a project card + * @description Gets information about a project card. + */ + get: operations["projects/get-card"]; + /** + * Delete a project card + * @description Deletes a project card + */ + delete: operations["projects/delete-card"]; + /** Update an existing project card */ + patch: operations["projects/update-card"]; + }; + "/projects/columns/cards/{card_id}/moves": { + /** Move a project card */ + post: operations["projects/move-card"]; + }; + "/projects/columns/{column_id}": { + /** + * Get a project column + * @description Gets information about a project column. + */ + get: operations["projects/get-column"]; + /** + * Delete a project column + * @description Deletes a project column. + */ + delete: operations["projects/delete-column"]; + /** Update an existing project column */ + patch: operations["projects/update-column"]; + }; + "/projects/columns/{column_id}/cards": { + /** + * List project cards + * @description Lists the project cards in a project. + */ + get: operations["projects/list-cards"]; + /** Create a project card */ + post: operations["projects/create-card"]; + }; + "/projects/columns/{column_id}/moves": { + /** Move a project column */ + post: operations["projects/move-column"]; + }; + "/projects/{project_id}": { + /** + * Get a project + * @description Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + get: operations["projects/get"]; + /** + * Delete a project + * @description Deletes a project board. Returns a `404 Not Found` status if projects are disabled. + */ + delete: operations["projects/delete"]; + /** + * Update a project + * @description Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + patch: operations["projects/update"]; + }; + "/projects/{project_id}/collaborators": { + /** + * List project collaborators + * @description Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. + */ + get: operations["projects/list-collaborators"]; + }; + "/projects/{project_id}/collaborators/{username}": { + /** + * Add project collaborator + * @description Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. + */ + put: operations["projects/add-collaborator"]; + /** + * Remove user as a collaborator + * @description Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. + */ + delete: operations["projects/remove-collaborator"]; + }; + "/projects/{project_id}/collaborators/{username}/permission": { + /** + * Get project permission for a user + * @description Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. + */ + get: operations["projects/get-permission-for-user"]; + }; + "/projects/{project_id}/columns": { + /** + * List project columns + * @description Lists the project columns in a project. + */ + get: operations["projects/list-columns"]; + /** + * Create a project column + * @description Creates a new project column. + */ + post: operations["projects/create-column"]; + }; + "/rate_limit": { + /** + * Get rate limit status for the authenticated user + * @description **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * 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/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)." + * * The `dependency_snapshots` object provides your rate limit status for submitting snapshots to the dependency graph. For more information, see "[Dependency graph](https://docs.github.com/rest/dependency-graph)." + * * The `code_scanning_upload` object provides your rate limit status for uploading SARIF results to code scanning. For more information, see "[Uploading a SARIF file to GitHub](https://docs.github.com/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github)." + * * The `actions_runner_registration` object provides your rate limit status for registering self-hosted runners in GitHub Actions. For more information, see "[Self-hosted runners](https://docs.github.com/rest/actions/self-hosted-runners)." + * * The `source_import` object is no longer in use for any API endpoints, and it will be removed in the next API version. For more information about API versions, see "[API Versions](https://docs.github.com/rest/overview/api-versions)." + * + * **Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. + */ + get: operations["rate-limit/get"]; + }; + "/repos/{owner}/{repo}": { + /** + * Get a repository + * @description The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + get: operations["repos/get"]; + /** + * Delete a repository + * @description 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. + */ + delete: operations["repos/delete"]; + /** + * Update a repository + * @description **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/repos/repos#replace-all-repository-topics) endpoint. + */ + patch: operations["repos/update"]; + }; + "/repos/{owner}/{repo}/actions/artifacts": { + /** + * List artifacts for a repository + * @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. + */ + get: operations["actions/list-artifacts-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}": { + /** + * 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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + get: operations["actions/get-artifact"]; + /** + * Delete an artifact + * @description Deletes an artifact for a workflow run. + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + delete: operations["actions/delete-artifact"]; + }; + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": { + /** + * Download an artifact + * @description Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + get: operations["actions/download-artifact"]; + }; + "/repos/{owner}/{repo}/actions/cache/usage": { + /** + * Get GitHub Actions cache usage for a repository + * @description Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * + * Anyone with read access to the repository can use this endpoint. + * + * If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage"]; + }; + "/repos/{owner}/{repo}/actions/caches": { + /** + * List GitHub Actions caches for a repository + * @description Lists the GitHub Actions caches for a repository. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + get: operations["actions/get-actions-cache-list"]; + /** + * Delete GitHub Actions caches for a repository (using a cache key) + * @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. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + delete: operations["actions/delete-actions-cache-by-key"]; + }; + "/repos/{owner}/{repo}/actions/caches/{cache_id}": { + /** + * Delete a GitHub Actions cache for a repository (using a cache ID) + * @description Deletes a GitHub Actions cache for a repository, using a cache ID. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + delete: operations["actions/delete-actions-cache-by-id"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}": { + /** + * 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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + get: operations["actions/get-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}/logs": { + /** + * 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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + get: operations["actions/download-job-logs-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": { + /** + * Re-run a job from a workflow run + * @description Re-run a job and its dependent jobs in a workflow run. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + post: operations["actions/re-run-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/oidc/customization/sub": { + /** + * Get the customization template for an OIDC subject claim for a repository + * @description Gets the customization template for an OpenID Connect (OIDC) subject claim. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + get: operations["actions/get-custom-oidc-sub-claim-for-repo"]; + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + put: operations["actions/set-custom-oidc-sub-claim-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/organization-secrets": { + /** + * List repository organization secrets + * @description Lists all organization secrets shared with a repository 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. + */ + get: operations["actions/list-repo-organization-secrets"]; + }; + "/repos/{owner}/{repo}/actions/organization-variables": { + /** + * List repository organization variables + * @description Lists all organization variables shared with a repository. + * + * 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. + */ + get: operations["actions/list-repo-organization-variables"]; + }; + "/repos/{owner}/{repo}/actions/permissions": { + /** + * Get GitHub Actions permissions for a repository + * @description Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + get: operations["actions/get-github-actions-permissions-repository"]; + /** + * Set GitHub Actions permissions for a repository + * @description Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + put: operations["actions/set-github-actions-permissions-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/access": { + /** + * Get the level of access for workflows outside of the repository + * @description Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + get: operations["actions/get-workflow-access-to-repository"]; + /** + * Set the level of access for workflows outside of the repository + * @description Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to 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)". + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + put: operations["actions/set-workflow-access-to-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/selected-actions": { + /** + * Get allowed actions and reusable workflows for a repository + * @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)." + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + get: operations["actions/get-allowed-actions-repository"]; + /** + * Set allowed actions and reusable workflows for a repository + * @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)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + put: operations["actions/set-allowed-actions-repository"]; + }; + "/repos/{owner}/{repo}/actions/permissions/workflow": { + /** + * Get default workflow permissions for a repository + * @description Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/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)." + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + get: operations["actions/get-github-actions-default-workflow-permissions-repository"]; + /** + * Set default workflow permissions for a repository + * @description Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/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)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + put: operations["actions/set-github-actions-default-workflow-permissions-repository"]; + }; + "/repos/{owner}/{repo}/actions/runners": { + /** + * List self-hosted runners for a repository + * @description Lists all self-hosted runners configured in a repository. + * + * 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. + */ + get: operations["actions/list-self-hosted-runners-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/downloads": { + /** + * List runner applications for a repository + * @description Lists binaries for the runner application that you can download and run. + * + * 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. + */ + get: operations["actions/list-runner-applications-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/generate-jitconfig": { + /** + * Create configuration for a just-in-time runner for a repository + * @description Generates a configuration that can be passed to the runner application at startup. + * + * 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. + */ + post: operations["actions/generate-runner-jitconfig-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/registration-token": { + /** + * Create a registration token for a repository + * @description Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * 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. + */ + post: operations["actions/create-registration-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/remove-token": { + /** + * Create a remove token for a repository + * @description 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. + * + * 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 repository to use this endpoint. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + post: operations["actions/create-remove-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}": { + /** + * Get a self-hosted runner for a repository + * @description Gets a specific self-hosted runner configured in a repository. + * + * 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. + */ + get: operations["actions/get-self-hosted-runner-for-repo"]; + /** + * Delete a self-hosted runner from a repository + * @description Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * 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. + */ + delete: operations["actions/delete-self-hosted-runner-from-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels": { + /** + * List labels for a self-hosted runner for a repository + * @description Lists all labels for a self-hosted runner configured in a repository. + * + * 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. + */ + get: operations["actions/list-labels-for-self-hosted-runner-for-repo"]; + /** + * Set custom labels for a self-hosted runner for a repository + * @description Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * 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. + */ + put: operations["actions/set-custom-labels-for-self-hosted-runner-for-repo"]; + /** + * Add custom labels to a self-hosted runner for a repository + * @description Adds custom labels to a self-hosted runner configured in a repository. + * + * 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. + */ + post: operations["actions/add-custom-labels-to-self-hosted-runner-for-repo"]; + /** + * Remove all custom labels from a self-hosted runner for a repository + * @description Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * 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. + */ + delete: operations["actions/remove-all-custom-labels-from-self-hosted-runner-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": { + /** + * Remove a custom label from a self-hosted runner for a repository + * @description Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * 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. + */ + delete: operations["actions/remove-custom-label-from-self-hosted-runner-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runs": { + /** + * 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/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. + * + * 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`. + */ + get: operations["actions/list-workflow-runs-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}": { + /** + * Get a workflow run + * @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. + */ + get: operations["actions/get-workflow-run"]; + /** + * Delete a workflow run + * @description 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. + */ + delete: operations["actions/delete-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/approvals": { + /** + * Get the review history for a workflow run + * @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. + */ + get: operations["actions/get-reviews-for-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/approve": { + /** + * Approve a workflow run for a fork pull request + * @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)." + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + post: operations["actions/approve-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": { + /** + * List workflow run artifacts + * @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. + */ + get: operations["actions/list-workflow-run-artifacts"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": { + /** + * Get a workflow run attempt + * @description 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. + */ + get: operations["actions/get-workflow-run-attempt"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": { + /** + * List jobs for a workflow run attempt + * @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. + */ + get: operations["actions/list-jobs-for-workflow-run-attempt"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": { + /** + * 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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + get: operations["actions/download-workflow-run-attempt-logs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { + /** + * Cancel a workflow run + * @description Cancels a workflow run using its `id`. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + post: operations["actions/cancel-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": { + /** + * Review custom deployment protection rules for a workflow run + * @description Approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." + * + * **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). + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + */ + post: operations["actions/review-custom-gates-for-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel": { + /** + * 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. + */ + post: operations["actions/force-cancel-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": { + /** + * List jobs for a workflow run + * @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. + */ + get: operations["actions/list-jobs-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/logs": { + /** + * 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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + get: operations["actions/download-workflow-run-logs"]; + /** + * Delete workflow run logs + * @description Deletes all logs for a workflow run. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + delete: operations["actions/delete-workflow-run-logs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": { + /** + * Get pending deployments for a workflow run + * @description Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. + * + * If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + get: operations["actions/get-pending-deployments-for-run"]; + /** + * Review pending deployments for a workflow run + * @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. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + post: operations["actions/review-pending-deployments-for-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun": { + /** + * Re-run a workflow + * @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. + */ + post: operations["actions/re-run-workflow"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": { + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + post: operations["actions/re-run-workflow-failed-jobs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/timing": { + /** + * Get workflow run usage + * @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. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + */ + get: operations["actions/get-workflow-run-usage"]; + }; + "/repos/{owner}/{repo}/actions/secrets": { + /** + * List repository secrets + * @description Lists all secrets available in a repository 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. + */ + get: operations["actions/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/actions/secrets/public-key": { + /** + * 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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + get: operations["actions/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/actions/secrets/{secret_name}": { + /** + * Get a repository secret + * @description Gets a single repository secret without revealing its encrypted value. + * + * 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. + */ + get: operations["actions/get-repo-secret"]; + /** + * Create or update a repository secret + * @description Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). 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. + */ + put: operations["actions/create-or-update-repo-secret"]; + /** + * Delete a repository secret + * @description Deletes a secret in a repository 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. + */ + delete: operations["actions/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/actions/variables": { + /** + * List repository variables + * @description Lists all repository 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. + */ + get: operations["actions/list-repo-variables"]; + /** + * Create a repository variable + * @description Creates a repository 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. + */ + post: operations["actions/create-repo-variable"]; + }; + "/repos/{owner}/{repo}/actions/variables/{name}": { + /** + * Get a repository variable + * @description Gets a specific variable in a repository. + * + * 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. + */ + get: operations["actions/get-repo-variable"]; + /** + * Delete a repository variable + * @description Deletes a repository 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. + */ + delete: operations["actions/delete-repo-variable"]; + /** + * Update a repository variable + * @description Updates a repository 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. + */ + patch: operations["actions/update-repo-variable"]; + }; + "/repos/{owner}/{repo}/actions/workflows": { + /** + * List repository workflows + * @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. + */ + get: operations["actions/list-repo-workflows"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}": { + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + */ + get: operations["actions/get-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": { + /** + * Disable a workflow + * @description Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + put: operations["actions/disable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": { + /** + * Create a workflow dispatch event + * @description You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + post: operations["actions/create-workflow-dispatch"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": { + /** + * Enable a workflow + * @description Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + put: operations["actions/enable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": { + /** + * 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/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. + */ + get: operations["actions/list-workflow-runs"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": { + /** + * Get workflow usage + * @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. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + */ + get: operations["actions/get-workflow-usage"]; + }; + "/repos/{owner}/{repo}/activity": { + /** + * List repository activities + * @description 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 activity and data for your repository](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository)." + */ + get: operations["repos/list-activities"]; + }; + "/repos/{owner}/{repo}/assignees": { + /** + * List assignees + * @description Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. + */ + get: operations["issues/list-assignees"]; + }; + "/repos/{owner}/{repo}/assignees/{assignee}": { + /** + * Check if a user can be assigned + * @description Checks if a user has permission to be assigned to an issue in this repository. + * + * If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + get: operations["issues/check-user-can-be-assigned"]; + }; + "/repos/{owner}/{repo}/autolinks": { + /** + * Get all autolinks of a repository + * @description Gets all autolinks that are configured for a repository. + * + * Information about autolinks are only available to repository administrators. + */ + get: operations["repos/list-autolinks"]; + /** + * Create an autolink reference for a repository + * @description Users with admin access to the repository can create an autolink. + */ + post: operations["repos/create-autolink"]; + }; + "/repos/{owner}/{repo}/autolinks/{autolink_id}": { + /** + * Get an autolink reference of a repository + * @description This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + get: operations["repos/get-autolink"]; + /** + * Delete an autolink reference from a repository + * @description This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + delete: operations["repos/delete-autolink"]; + }; + "/repos/{owner}/{repo}/automated-security-fixes": { + /** + * Check if automated security fixes are enabled for a repository + * @description Shows whether automated security fixes are enabled, disabled or paused for a repository. The authenticated user must have admin read access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/articles/configuring-automated-security-fixes)". + */ + get: operations["repos/check-automated-security-fixes"]; + /** + * Enable automated security fixes + * @description Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/articles/configuring-automated-security-fixes)". + */ + put: operations["repos/enable-automated-security-fixes"]; + /** + * Disable automated security fixes + * @description Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/articles/configuring-automated-security-fixes)". + */ + delete: operations["repos/disable-automated-security-fixes"]; + }; + "/repos/{owner}/{repo}/branches": { + /** List branches */ + get: operations["repos/list-branches"]; + }; + "/repos/{owner}/{repo}/branches/{branch}": { + /** Get a branch */ + get: operations["repos/get-branch"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection": { + /** + * Get branch protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + get: operations["repos/get-branch-protection"]; + /** + * Update branch protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Protecting a branch requires admin or owner permissions to the repository. + * + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + * + * **Note**: The list of users, apps, and teams in total is limited to 100 items. + */ + put: operations["repos/update-branch-protection"]; + /** + * Delete branch protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + delete: operations["repos/delete-branch-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": { + /** + * Get admin branch protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + get: operations["repos/get-admin-branch-protection"]; + /** + * Set admin branch protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + post: operations["repos/set-admin-branch-protection"]; + /** + * Delete admin branch protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + delete: operations["repos/delete-admin-branch-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": { + /** + * Get pull request review protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + get: operations["repos/get-pull-request-review-protection"]; + /** + * Delete pull request review protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + delete: operations["repos/delete-pull-request-review-protection"]; + /** + * Update pull request review protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + * + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + */ + patch: operations["repos/update-pull-request-review-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": { + /** + * Get commit signature protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + get: operations["repos/get-commit-signature-protection"]; + /** + * Create commit signature protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits. + */ + post: operations["repos/create-commit-signature-protection"]; + /** + * Delete commit signature protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits. + */ + delete: operations["repos/delete-commit-signature-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": { + /** + * Get status checks protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + get: operations["repos/get-status-checks-protection"]; + /** + * Remove status check protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + delete: operations["repos/remove-status-check-protection"]; + /** + * Update status check protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + patch: operations["repos/update-status-check-protection"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": { + /** + * Get all status check contexts + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + get: operations["repos/get-all-status-check-contexts"]; + /** + * Set status check contexts + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + put: operations["repos/set-status-check-contexts"]; + /** + * Add status check contexts + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + post: operations["repos/add-status-check-contexts"]; + /** + * Remove status check contexts + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + delete: operations["repos/remove-status-check-contexts"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions": { + /** + * Get access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + get: operations["repos/get-access-restrictions"]; + /** + * Delete access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + delete: operations["repos/delete-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": { + /** + * Get apps with access to the protected branch + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the 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. + */ + get: operations["repos/get-apps-with-access-to-protected-branch"]; + /** + * Set app access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * 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. + */ + put: operations["repos/set-app-access-restrictions"]; + /** + * Add app access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only 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. + */ + post: operations["repos/add-app-access-restrictions"]; + /** + * Remove app access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * 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. + */ + delete: operations["repos/remove-app-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": { + /** + * Get teams with access to the protected branch + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + get: operations["repos/get-teams-with-access-to-protected-branch"]; + /** + * Set team access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams. + */ + put: operations["repos/set-team-access-restrictions"]; + /** + * Add team access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. You can also give push access to child teams. + */ + post: operations["repos/add-team-access-restrictions"]; + /** + * Remove team access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + */ + delete: operations["repos/remove-team-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": { + /** + * Get users with access to the protected branch + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + get: operations["repos/get-users-with-access-to-protected-branch"]; + /** + * Set user access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people. + * + * | Type | Description | + * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + put: operations["repos/set-user-access-restrictions"]; + /** + * Add user access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified people push access for this branch. + * + * | Type | Description | + * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + post: operations["repos/add-user-access-restrictions"]; + /** + * Remove user access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + delete: operations["repos/remove-user-access-restrictions"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/rename": { + /** + * Rename a branch + * @description Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The 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. + * + * In order to rename the default branch, fine-grained access tokens also need the `administration:write` repository permission. + */ + post: operations["repos/rename-branch"]; + }; + "/repos/{owner}/{repo}/check-runs": { + /** + * Create a check run + * @description **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Creates a new check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to create check runs. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + post: operations["checks/create"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}": { + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. + */ + get: operations["checks/get"]; + /** + * Update a check run + * @description Updates a check run for a specific commit in a 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 apps and personal access tokens (classic) cannot use this endpoint. + */ + patch: operations["checks/update"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": { + /** + * List check run annotations + * @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. + */ + get: operations["checks/list-annotations"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": { + /** + * Rerequest a check run + * @description Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * 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. + */ + post: operations["checks/rerequest-run"]; + }; + "/repos/{owner}/{repo}/check-suites": { + /** + * 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`. + * + * OAuth apps and personal access tokens (classic) cannot use this endpoint. + */ + post: operations["checks/create-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/preferences": { + /** + * 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. + */ + patch: operations["checks/set-suites-preferences"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}": { + /** + * 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`. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. + */ + get: operations["checks/get-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": { + /** + * List check runs in a check suite + * @description Lists check runs for a check suite using its `id`. + * + * **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. + */ + get: operations["checks/list-for-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": { + /** + * Rerequest a check suite + * @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. + * + * OAuth apps and personal access tokens (classic) cannot use this endpoint. + */ + post: operations["checks/rerequest-suite"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts": { + /** + * List code scanning alerts for a repository + * @description Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + get: operations["code-scanning/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": { + /** + * Get a code scanning alert + * @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. + */ + get: operations["code-scanning/get-alert"]; + /** + * Update a code scanning alert + * @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. + */ + patch: operations["code-scanning/update-alert"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": { + /** + * List instances of a code scanning alert + * @description Lists all instances of the specified 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. + */ + get: operations["code-scanning/list-alert-instances"]; + }; + "/repos/{owner}/{repo}/code-scanning/analyses": { + /** + * List code scanning analyses for a repository + * @description Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * **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. + */ + get: operations["code-scanning/list-recent-analyses"]; + }; + "/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": { + /** + * Get a code scanning analysis for a repository + * @description Gets a specified code scanning analysis for a repository. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * 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. + */ + get: operations["code-scanning/get-analysis"]; + /** + * Delete a code scanning analysis from a repository + * @description 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. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `category` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + * + * 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. + */ + delete: operations["code-scanning/delete-analysis"]; + }; + "/repos/{owner}/{repo}/code-scanning/codeql/databases": { + /** + * List CodeQL databases for a repository + * @description Lists the CodeQL databases that are available in 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. + */ + get: operations["code-scanning/list-codeql-databases"]; + }; + "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": { + /** + * Get a CodeQL database for a repository + * @description Gets a CodeQL database for a language in a repository. + * + * By default this endpoint returns JSON metadata about the CodeQL database. To + * download the CodeQL database binary content, set the `Accept` header of the request + * to [`application/zip`](https://docs.github.com/rest/overview/media-types), and make sure + * your HTTP client is configured to follow redirects or use the `Location` header + * to make a second request to get the redirect URL. + * + * 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. + */ + get: operations["code-scanning/get-codeql-database"]; + }; + "/repos/{owner}/{repo}/code-scanning/default-setup": { + /** + * Get a code scanning default setup configuration + * @description Gets a code scanning default setup configuration. + * + * 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. + */ + get: operations["code-scanning/get-default-setup"]; + /** + * Update a code scanning default setup configuration + * @description Updates a code scanning default setup configuration. + * + * 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. + */ + patch: operations["code-scanning/update-default-setup"]; + }; + "/repos/{owner}/{repo}/code-scanning/sarifs": { + /** + * 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. For troubleshooting information, see "[Troubleshooting SARIF uploads](https://docs.github.com/code-security/code-scanning/troubleshooting-sarif)." + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + * + * SARIF upload supports a maximum 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 the most important entries whenever applicable. + * To get the most out of your analysis when it includes data above the supported limits, try to optimize the analysis configuration. For example, for the CodeQL tool, identify and remove the most noisy queries. For more information, see "[SARIF results exceed one or more limits](https://docs.github.com/code-security/code-scanning/troubleshooting-sarif/results-exceed-limit)." + * + * + * | **SARIF data** | **Maximum values** | **Additional limits** | + * |----------------------------------|:------------------:|----------------------------------------------------------------------------------| + * | Runs per file | 20 | | + * | Results per run | 25,000 | Only the top 5,000 results will be included, prioritized by severity. | + * | Rules per run | 25,000 | | + * | Tool extensions per run | 100 | | + * | Thread Flow Locations per result | 10,000 | Only the top 1,000 Thread Flow Locations will be included, using prioritization. | + * | Location per result | 1,000 | Only 100 locations will be included. | + * | Tags per rule | 20 | Only 10 tags will be included. | + * + * + * The `202 Accepted` response includes an `id` value. + * You can use this ID to check the status of the upload by using it in the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/code-scanning/code-scanning#get-information-about-a-sarif-upload)." + * + * 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. + */ + post: operations["code-scanning/upload-sarif"]; + }; + "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": { + /** + * 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)." + * 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. + */ + get: operations["code-scanning/get-sarif"]; + }; + "/repos/{owner}/{repo}/codeowners/errors": { + /** + * List CODEOWNERS errors + * @description List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + get: operations["repos/codeowners-errors"]; + }; + "/repos/{owner}/{repo}/codespaces": { + /** + * List codespaces in a repository for the authenticated user + * @description Lists the codespaces associated to a specified repository and the authenticated user. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + get: operations["codespaces/list-in-repository-for-authenticated-user"]; + /** + * Create a codespace in a repository + * @description Creates a codespace owned by the authenticated user in the specified repository. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + post: operations["codespaces/create-with-repo-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/devcontainers": { + /** + * List devcontainer configurations in a repository for the authenticated user + * @description 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. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + get: operations["codespaces/list-devcontainers-in-repository-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/machines": { + /** + * List available machine types for a repository + * @description List the machine types available for a given repository based on its configuration. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + get: operations["codespaces/repo-machines-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/new": { + /** + * Get default attributes for a codespace + * @description Gets the default attributes for codespaces created by the user with the repository. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + get: operations["codespaces/pre-flight-with-repo-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/codespaces/permissions_check": { + /** + * 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. + */ + get: operations["codespaces/check-permissions-for-devcontainer"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets": { + /** + * List repository secrets + * @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. + */ + get: operations["codespaces/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets/public-key": { + /** + * 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, OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + get: operations["codespaces/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/codespaces/secrets/{secret_name}": { + /** + * Get a repository secret + * @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. + */ + get: operations["codespaces/get-repo-secret"]; + /** + * Create or update a repository secret + * @description 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + put: operations["codespaces/create-or-update-repo-secret"]; + /** + * Delete a repository secret + * @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. + */ + delete: operations["codespaces/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/collaborators": { + /** + * List repository collaborators + * @description For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * + * Team members will include the members of child teams. + * + * 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. + */ + get: operations["repos/list-collaborators"]; + }; + "/repos/{owner}/{repo}/collaborators/{username}": { + /** + * Check if a user is a repository collaborator + * @description For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * + * Team members will include the members of child teams. + * + * 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. + */ + get: operations["repos/check-collaborator"]; + /** + * 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. 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)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP 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). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. + */ + put: operations["repos/add-collaborator"]; + /** + * Remove a repository collaborator + * @description Removes a collaborator from a repository. + * + * To use this endpoint, the authenticated user must either be an administrator of the repository or target themselves for removal. + * + * This endpoint also: + * - Cancels any outstanding invitations + * - Unasigns the user from any issues + * - Removes access to organization projects if the user is not an organization member and is not a collaborator on any other organization repositories. + * - Unstars the repository + * - Updates access permissions to packages + * + * Removing a user as a collaborator has the following effects on forks: + * - If the user had access to a fork through their membership to this repository, the user will also be removed from the fork. + * - If the user had their own fork of the repository, the fork will be deleted. + * - If the user still has read access to the repository, open pull requests by this user from a fork will be denied. + * + * **Note**: A user can still have access to the repository through organization permissions like base repository permissions. + * + * Although the API responds immediately, the additional permission updates might take some extra time to complete in the background. + * + * For more information on fork permissions, see "[About permissions and visibility of forks](https://docs.github.com/pull-requests/collaborating-with-pull-requests/working-with-forks/about-permissions-and-visibility-of-forks)". + */ + delete: operations["repos/remove-collaborator"]; + }; + "/repos/{owner}/{repo}/collaborators/{username}/permission": { + /** + * Get repository permissions for a user + * @description Checks the repository permission of a collaborator. The possible repository + * permissions are `admin`, `write`, `read`, and `none`. + * + * *Note*: The `permission` attribute provides the legacy base roles of `admin`, `write`, `read`, and `none`, where the + * `maintain` role is mapped to `write` and the `triage` role is mapped to `read`. To determine the role assigned to the + * collaborator, see the `role_name` attribute, which will provide the full role name, including custom roles. The + * `permissions` hash can also be used to determine which base level of access the collaborator has to the repository. + */ + get: operations["repos/get-collaborator-permission-level"]; + }; + "/repos/{owner}/{repo}/comments": { + /** + * List commit comments for a repository + * @description Lists the commit comments for a specified repository. 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`. + */ + get: operations["repos/list-commit-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}": { + /** + * Get a commit comment + * @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`. + */ + get: operations["repos/get-commit-comment"]; + /** Delete a commit comment */ + delete: operations["repos/delete-commit-comment"]; + /** + * Update a commit comment + * @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`. + */ + patch: operations["repos/update-commit-comment"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}/reactions": { + /** + * List reactions for a commit comment + * @description List the reactions to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). + */ + get: operations["reactions/list-for-commit-comment"]; + /** + * Create reaction for a commit comment + * @description Create a reaction to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. + */ + post: operations["reactions/create-for-commit-comment"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": { + /** + * Delete a commit comment reaction + * @description **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). + */ + delete: operations["reactions/delete-for-commit-comment"]; + }; + "/repos/{owner}/{repo}/commits": { + /** + * List commits + * @description **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + get: operations["repos/list-commits"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": { + /** + * List branches for HEAD commit + * @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. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + get: operations["repos/list-branches-for-head-commit"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/comments": { + /** + * List commit comments + * @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`. + */ + get: operations["repos/list-comments-for-commit"]; + /** + * Create a commit comment + * @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. 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`. + */ + post: operations["repos/create-commit-comment"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/pulls": { + /** + * List pull requests associated with a commit + * @description Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, will only return open pull requests associated with the commit. + * + * To list the open or merged pull requests associated with a branch, you can set the `commit_sha` parameter to the branch name. + */ + get: operations["repos/list-pull-requests-associated-with-commit"]; + }; + "/repos/{owner}/{repo}/commits/{ref}": { + /** + * Get a commit + * @description Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff 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. + * + * 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. + * + * - **`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** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + get: operations["repos/get-commit"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-runs": { + /** + * List check runs for a Git reference + * @description 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. + * + * 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. + */ + get: operations["checks/list-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-suites": { + /** + * List check suites for a Git reference + * @description Lists check suites 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 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. + */ + get: operations["checks/list-suites-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/status": { + /** + * Get the combined status for a specific reference + * @description Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. + * + * + * Additionally, a combined `state` is returned. The `state` is one of: + * + * * **failure** if any of the contexts report as `error` or `failure` + * * **pending** if there are no statuses or a context is `pending` + * * **success** if the latest status for all contexts is `success` + */ + get: operations["repos/get-combined-status-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/statuses": { + /** + * List commit statuses for a reference + * @description Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one. + * + * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. + */ + get: operations["repos/list-commit-statuses-for-ref"]; + }; + "/repos/{owner}/{repo}/community/profile": { + /** + * Get community profile metrics + * @description Returns all community profile metrics for a repository. The repository cannot be a fork. + * + * The returned metrics include an overall health score, the repository description, the presence of documentation, the + * detected code of conduct, the detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * 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. + */ + get: operations["repos/get-community-profile-metrics"]; + }; + "/repos/{owner}/{repo}/compare/{basehead}": { + /** + * Compare two commits + * @description 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 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. + * + * When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination: + * + * - The list of changed files is only shown on the first page of results, but it includes all changed files for the entire comparison. + * - The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results. + * + * For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)." + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + get: operations["repos/compare-commits-with-basehead"]; + }; + "/repos/{owner}/{repo}/contents/{path}": { + /** + * Get repository content + * @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. + */ + get: operations["repos/get-content"]; + /** + * Create or update file contents + * @description 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. + */ + put: operations["repos/create-or-update-file-contents"]; + /** + * Delete a file + * @description Deletes a file in a repository. + * + * You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author. + * + * The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used. + * + * You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + delete: operations["repos/delete-file"]; + }; + "/repos/{owner}/{repo}/contributors": { + /** + * List repository contributors + * @description Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API caches contributor data to improve performance. + * + * GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information. + */ + get: operations["repos/list-contributors"]; + }; + "/repos/{owner}/{repo}/dependabot/alerts": { + /** + * List Dependabot alerts for a repository + * @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. + */ + get: operations["dependabot/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/dependabot/alerts/{alert_number}": { + /** + * Get a Dependabot alert + * @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. + */ + get: operations["dependabot/get-alert"]; + /** + * Update a Dependabot alert + * @description 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)." + * + * 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. + */ + patch: operations["dependabot/update-alert"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets": { + /** + * List repository secrets + * @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. + */ + get: operations["dependabot/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/public-key": { + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint if the repository is private. + */ + get: operations["dependabot/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/{secret_name}": { + /** + * Get a repository secret + * @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. + */ + get: operations["dependabot/get-repo-secret"]; + /** + * Create or update a repository secret + * @description Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + put: operations["dependabot/create-or-update-repo-secret"]; + /** + * Delete a repository secret + * @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. + */ + delete: operations["dependabot/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/dependency-graph/compare/{basehead}": { + /** + * Get a diff of the dependencies between commits + * @description Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. + */ + get: operations["dependency-graph/diff-range"]; + }; + "/repos/{owner}/{repo}/dependency-graph/sbom": { + /** + * Export a software bill of materials (SBOM) for a repository. + * @description Exports the software bill of materials (SBOM) for a repository in SPDX JSON format. + */ + get: operations["dependency-graph/export-sbom"]; + }; + "/repos/{owner}/{repo}/dependency-graph/snapshots": { + /** + * Create a snapshot of dependencies for a repository + * @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. + */ + post: operations["dependency-graph/create-repository-snapshot"]; + }; + "/repos/{owner}/{repo}/deployments": { + /** + * List deployments + * @description Simple filtering of deployments is available via query parameters: + */ + get: operations["repos/list-deployments"]; + /** + * Create a deployment + * @description Deployments offer a few configurable parameters with certain defaults. + * + * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them + * before we merge a pull request. + * + * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have + * multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter + * makes it easier to track which environments have requested deployments. The default environment is `production`. + * + * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If + * the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, + * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will + * return a failure response. + * + * By default, [commit statuses](https://docs.github.com/rest/commits/statuses) for every submitted context must be in a `success` + * state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to + * specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do + * not require any contexts or create any commit statuses, the deployment will always succeed. + * + * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text + * field that will be passed on when a deployment event is dispatched. + * + * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might + * be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an + * application with debugging enabled. + * + * Merged branch response: + * + * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating + * a deployment. This auto-merge happens when: + * * Auto-merge option is enabled in the repository + * * Topic branch does not include the latest changes on the base branch, which is `master` in the response example + * * There are no merge conflicts + * + * If there are no new commits in the base branch, a new request to create a deployment should give a successful + * response. + * + * Merge conflict response: + * + * This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't + * be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts. + * + * Failed commit status checks: + * + * This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success` + * status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` or `repo_deployment` scope to use this endpoint. + */ + post: operations["repos/create-deployment"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}": { + /** Get a deployment */ + get: operations["repos/get-deployment"]; + /** + * 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. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/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. + */ + delete: operations["repos/delete-deployment"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses": { + /** + * List deployment statuses + * @description Users with pull access can view deployment statuses for a deployment: + */ + get: operations["repos/list-deployment-statuses"]; + /** + * Create a deployment status + * @description Users with `push` access can create deployment statuses for a given deployment. + * + * OAuth app tokens and personal access tokens (classic) need the `repo_deployment` scope to use this endpoint. + */ + post: operations["repos/create-deployment-status"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": { + /** + * Get a deployment status + * @description Users with pull access can view a deployment status for a deployment: + */ + get: operations["repos/get-deployment-status"]; + }; + "/repos/{owner}/{repo}/dispatches": { + /** + * Create a repository dispatch event + * @description You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * 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 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. + */ + post: operations["repos/create-dispatch-event"]; + }; + "/repos/{owner}/{repo}/environments": { + /** + * List environments + * @description Lists the environments 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. + */ + get: operations["repos/get-all-environments"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}": { + /** + * Get an environment + * @description **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * Anyone with read access to the repository can use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + */ + get: operations["repos/get-environment"]; + /** + * Create or update an environment + * @description Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **Note:** To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + put: operations["repos/create-or-update-environment"]; + /** + * Delete an environment + * @description OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + delete: operations["repos/delete-an-environment"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": { + /** + * List deployment branch policies + * @description Lists the deployment branch policies for an environment. + * + * 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. + */ + get: operations["repos/list-deployment-branch-policies"]; + /** + * Create a deployment branch policy + * @description Creates a deployment branch or tag policy for an environment. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + post: operations["repos/create-deployment-branch-policy"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": { + /** + * Get a deployment branch policy + * @description Gets a deployment branch or tag policy for an environment. + * + * 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. + */ + get: operations["repos/get-deployment-branch-policy"]; + /** + * Update a deployment branch policy + * @description Updates a deployment branch or tag policy for an environment. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + put: operations["repos/update-deployment-branch-policy"]; + /** + * Delete a deployment branch policy + * @description Deletes a deployment branch or tag policy for an environment. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + delete: operations["repos/delete-deployment-branch-policy"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules": { + /** + * 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. 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. + */ + get: operations["repos/get-all-deployment-protection-rules"]; + /** + * Create a custom deployment protection rule on an environment + * @description Enable a custom deployment protection rule for an environment. + * + * 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. + */ + post: operations["repos/create-deployment-protection-rule"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps": { + /** + * 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. + * + * 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. + */ + get: operations["repos/list-custom-deployment-rule-integrations"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}": { + /** + * 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. 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. + */ + get: operations["repos/get-custom-deployment-protection-rule"]; + /** + * Disable a custom protection rule for an environment + * @description Disables a custom deployment protection rule for an environment. + * + * 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. + */ + delete: operations["repos/disable-deployment-protection-rule"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/secrets": { + /** + * 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. + */ + get: operations["actions/list-environment-secrets"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key": { + /** + * 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. + */ + get: operations["actions/get-environment-public-key"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}": { + /** + * 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. + */ + get: operations["actions/get-environment-secret"]; + /** + * 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. + */ + put: operations["actions/create-or-update-environment-secret"]; + /** + * 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. + */ + delete: operations["actions/delete-environment-secret"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/variables": { + /** + * 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. + */ + get: operations["actions/list-environment-variables"]; + /** + * 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. + */ + post: operations["actions/create-environment-variable"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}/variables/{name}": { + /** + * 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. + */ + get: operations["actions/get-environment-variable"]; + /** + * 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. + */ + delete: operations["actions/delete-environment-variable"]; + /** + * 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. + */ + patch: operations["actions/update-environment-variable"]; + }; + "/repos/{owner}/{repo}/events": { + /** + * List repository events + * @description **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + */ + get: operations["activity/list-repo-events"]; + }; + "/repos/{owner}/{repo}/forks": { + /** List forks */ + get: operations["repos/list-forks"]; + /** + * Create a fork + * @description Create a fork for the authenticated user. + * + * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * + * **Note**: Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. + */ + post: operations["repos/create-fork"]; + }; + "/repos/{owner}/{repo}/git/blobs": { + /** Create a blob */ + post: operations["git/create-blob"]; + }; + "/repos/{owner}/{repo}/git/blobs/{file_sha}": { + /** + * Get a blob + * @description The `content` in the response will always be Base64 encoded. + * + * 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. + */ + get: operations["git/get-blob"]; + }; + "/repos/{owner}/{repo}/git/commits": { + /** + * Create a commit + * @description Creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects). + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + post: operations["git/create-commit"]; + }; + "/repos/{owner}/{repo}/git/commits/{commit_sha}": { + /** + * Get a commit object + * @description Gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects). + * + * To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)." + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + get: operations["git/get-commit"]; + }; + "/repos/{owner}/{repo}/git/matching-refs/{ref}": { + /** + * List matching references + * @description Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + get: operations["git/list-matching-refs"]; + }; + "/repos/{owner}/{repo}/git/ref/{ref}": { + /** + * Get a reference + * @description Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + get: operations["git/get-ref"]; + }; + "/repos/{owner}/{repo}/git/refs": { + /** + * Create a reference + * @description Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches. + */ + post: operations["git/create-ref"]; + }; + "/repos/{owner}/{repo}/git/refs/{ref}": { + /** + * Delete a reference + * @description Deletes the provided reference. + */ + delete: operations["git/delete-ref"]; + /** + * Update a reference + * @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. + */ + patch: operations["git/update-ref"]; + }; + "/repos/{owner}/{repo}/git/tags": { + /** + * Create a tag object + * @description Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/rest/git/refs#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + post: operations["git/create-tag"]; + }; + "/repos/{owner}/{repo}/git/tags/{tag_sha}": { + /** + * Get a tag + * @description **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + get: operations["git/get-tag"]; + }; + "/repos/{owner}/{repo}/git/trees": { + /** + * Create a tree + * @description The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/git/commits#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/git/refs#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + post: operations["git/create-tree"]; + }; + "/repos/{owner}/{repo}/git/trees/{tree_sha}": { + /** + * Get a tree + * @description Returns a single tree using the SHA1 value or ref name for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + get: operations["git/get-tree"]; + }; + "/repos/{owner}/{repo}/hooks": { + /** + * List repository webhooks + * @description Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. + */ + get: operations["repos/list-webhooks"]; + /** + * Create a repository webhook + * @description Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can + * share the same `config` as long as those webhooks do not have any `events` that overlap. + */ + post: operations["repos/create-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}": { + /** + * Get a repository webhook + * @description Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository)." + */ + get: operations["repos/get-webhook"]; + /** Delete a repository webhook */ + delete: operations["repos/delete-webhook"]; + /** + * Update a repository webhook + * @description Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository)." + */ + patch: operations["repos/update-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/config": { + /** + * 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `read:repo_hook` or `repo` scope to use this endpoint. + */ + get: operations["repos/get-webhook-config-for-repo"]; + /** + * 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `write:repo_hook` or `repo` scope to use this endpoint. + */ + patch: operations["repos/update-webhook-config-for-repo"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries": { + /** + * List deliveries for a repository webhook + * @description Returns a list of webhook deliveries for a webhook configured in a repository. + */ + get: operations["repos/list-webhook-deliveries"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": { + /** + * Get a delivery for a repository webhook + * @description Returns a delivery for a webhook configured in a repository. + */ + get: operations["repos/get-webhook-delivery"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": { + /** + * Redeliver a delivery for a repository webhook + * @description Redeliver a webhook delivery for a webhook configured in a repository. + */ + post: operations["repos/redeliver-webhook-delivery"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/pings": { + /** + * Ping a repository webhook + * @description This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. + */ + post: operations["repos/ping-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/tests": { + /** + * Test the push repository webhook + * @description This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. + * + * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` + */ + post: operations["repos/test-push-webhook"]; + }; + "/repos/{owner}/{repo}/import": { + /** + * Get an import status + * @deprecated + * @description View the progress of an import. + * + * **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** + * + * This section includes details about the possible values of the `status` field of the Import Progress response. + * + * An import that does not have errors will progress through these steps: + * + * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. + * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). + * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. + * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". + * * `complete` - the import is complete, and the repository is ready on GitHub. + * + * If there are problems, you will see one of these in the `status` field: + * + * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/migrations/source-imports#update-an-import) section. + * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. + * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/migrations/source-imports#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/migrations/source-imports#cancel-an-import) and [retry](https://docs.github.com/rest/migrations/source-imports#start-an-import) with the correct URL. + * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/migrations/source-imports#update-an-import) section. + * + * **The project_choices field** + * + * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. + * + * **Git LFS related fields** + * + * This section includes details about Git LFS related fields that may be present in the Import Progress response. + * + * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. + * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. + * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. + * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. + */ + get: operations["migrations/get-import-status"]; + /** + * Start an import + * @deprecated + * @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). + */ + put: operations["migrations/start-import"]; + /** + * Cancel an import + * @deprecated + * @description Stop an import for a repository. + * + * **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). + */ + delete: operations["migrations/cancel-import"]; + /** + * Update an import + * @deprecated + * @description An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API + * request. If no parameters are provided, the import will be restarted. + * + * Some servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress will + * 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:** 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). + */ + patch: operations["migrations/update-import"]; + }; + "/repos/{owner}/{repo}/import/authors": { + /** + * Get commit authors + * @deprecated + * @description Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `. + * + * 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:** 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). + */ + get: operations["migrations/get-commit-authors"]; + }; + "/repos/{owner}/{repo}/import/authors/{author_id}": { + /** + * Map a commit author + * @deprecated + * @description Update an author's identity for the import. Your application can continue updating authors any time before you push + * new commits to the repository. + * + * **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). + */ + patch: operations["migrations/map-commit-author"]; + }; + "/repos/{owner}/{repo}/import/large_files": { + /** + * Get large files + * @deprecated + * @description List files larger than 100MB found during the import + * + * **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). + */ + get: operations["migrations/get-large-files"]; + }; + "/repos/{owner}/{repo}/import/lfs": { + /** + * Update Git LFS preference + * @deprecated + * @description You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability + * is powered by [Git LFS](https://git-lfs.com). + * + * 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:** 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). + */ + patch: operations["migrations/set-lfs-preference"]; + }; + "/repos/{owner}/{repo}/installation": { + /** + * Get a repository installation for the authenticated app + * @description Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-repo-installation"]; + }; + "/repos/{owner}/{repo}/interaction-limits": { + /** + * Get interaction restrictions for a repository + * @description Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. + */ + get: operations["interactions/get-restrictions-for-repo"]; + /** + * Set interaction restrictions for a repository + * @description Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. + */ + put: operations["interactions/set-restrictions-for-repo"]; + /** + * Remove interaction restrictions for a repository + * @description Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. + */ + delete: operations["interactions/remove-restrictions-for-repo"]; + }; + "/repos/{owner}/{repo}/invitations": { + /** + * List repository invitations + * @description When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. + */ + get: operations["repos/list-invitations"]; + }; + "/repos/{owner}/{repo}/invitations/{invitation_id}": { + /** Delete a repository invitation */ + delete: operations["repos/delete-invitation"]; + /** Update a repository invitation */ + patch: operations["repos/update-invitation"]; + }; + "/repos/{owner}/{repo}/issues": { + /** + * List repository issues + * @description List issues in a repository. Only open issues will be listed. + * + * **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`. + */ + get: operations["issues/list-for-repo"]; + /** + * Create an issue + * @description Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. 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`. + */ + post: operations["issues/create"]; + }; + "/repos/{owner}/{repo}/issues/comments": { + /** + * List issue comments for a repository + * @description 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`. + */ + get: operations["issues/list-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}": { + /** + * 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. + * + * 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`. + */ + get: operations["issues/get-comment"]; + /** + * Delete an issue comment + * @description You can use the REST API to delete comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request. + */ + delete: operations["issues/delete-comment"]; + /** + * 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. + * + * 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`. + */ + patch: operations["issues/update-comment"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": { + /** + * List reactions for an issue comment + * @description List the reactions to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). + */ + get: operations["reactions/list-for-issue-comment"]; + /** + * Create reaction for an issue comment + * @description Create a reaction to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. + */ + post: operations["reactions/create-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": { + /** + * Delete an issue comment reaction + * @description **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). + */ + delete: operations["reactions/delete-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/events": { + /** + * List issue events for a repository + * @description Lists events for a repository. + */ + get: operations["issues/list-events-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/events/{event_id}": { + /** + * Get an issue event + * @description Gets a single event by the event id. + */ + get: operations["issues/get-event"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}": { + /** + * Get an issue + * @description 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 + * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe + * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. + * + * **Note**: GitHub's REST API 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`. + */ + get: operations["issues/get"]; + /** + * Update 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`. + */ + patch: operations["issues/update"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/assignees": { + /** + * Add assignees to an issue + * @description Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. + */ + post: operations["issues/add-assignees"]; + /** + * Remove assignees from an issue + * @description Removes one or more assignees from an issue. + */ + delete: operations["issues/remove-assignees"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}": { + /** + * Check if a user can be assigned to a issue + * @description Checks if a user has permission to be assigned to a specific issue. + * + * If the `assignee` can be assigned to this issue, a `204` status code with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + get: operations["issues/check-user-can-be-assigned-to-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/comments": { + /** + * List issue comments + * @description 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`. + */ + get: operations["issues/list-comments"]; + /** + * Create an issue comment + * @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. + * 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`. + */ + post: operations["issues/create-comment"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/events": { + /** + * List issue events + * @description Lists all events for an issue. + */ + get: operations["issues/list-events"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/labels": { + /** + * List labels for an issue + * @description Lists all labels for an issue. + */ + get: operations["issues/list-labels-on-issue"]; + /** + * Set labels for an issue + * @description Removes any previous labels and sets the new labels for an issue. + */ + put: operations["issues/set-labels"]; + /** + * Add labels to an issue + * @description Adds labels to an issue. If you provide an empty array of labels, all labels are removed from the issue. + */ + post: operations["issues/add-labels"]; + /** + * Remove all labels from an issue + * @description Removes all labels from an issue. + */ + delete: operations["issues/remove-all-labels"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": { + /** + * Remove a label from an issue + * @description Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist. + */ + delete: operations["issues/remove-label"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/lock": { + /** + * Lock an issue + * @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 method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." + */ + put: operations["issues/lock"]; + /** + * Unlock an issue + * @description Users with push access can unlock an issue's conversation. + */ + delete: operations["issues/unlock"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/reactions": { + /** + * List reactions for an issue + * @description List the reactions to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). + */ + get: operations["reactions/list-for-issue"]; + /** + * Create reaction for an issue + * @description Create a reaction to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). A response with an HTTP `200` status means that you already added the reaction type to this issue. + */ + post: operations["reactions/create-for-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": { + /** + * Delete an issue reaction + * @description **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). + */ + delete: operations["reactions/delete-for-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/timeline": { + /** + * List timeline events for an issue + * @description List all timeline events for an issue. + */ + get: operations["issues/list-events-for-timeline"]; + }; + "/repos/{owner}/{repo}/keys": { + /** List deploy keys */ + get: operations["repos/list-deploy-keys"]; + /** + * Create a deploy key + * @description You can create a read-only deploy key. + */ + post: operations["repos/create-deploy-key"]; + }; + "/repos/{owner}/{repo}/keys/{key_id}": { + /** Get a deploy key */ + get: operations["repos/get-deploy-key"]; + /** + * Delete a deploy key + * @description Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. + */ + delete: operations["repos/delete-deploy-key"]; + }; + "/repos/{owner}/{repo}/labels": { + /** + * List labels for a repository + * @description Lists all labels for a repository. + */ + get: operations["issues/list-labels-for-repo"]; + /** + * Create a label + * @description Creates a label for the specified repository with the given name and color. The name and color parameters are required. The color must be a valid [hexadecimal color code](http://www.color-hex.com/). + */ + post: operations["issues/create-label"]; + }; + "/repos/{owner}/{repo}/labels/{name}": { + /** + * Get a label + * @description Gets a label using the given name. + */ + get: operations["issues/get-label"]; + /** + * Delete a label + * @description Deletes a label using the given label name. + */ + delete: operations["issues/delete-label"]; + /** + * Update a label + * @description Updates a label using the given label name. + */ + patch: operations["issues/update-label"]; + }; + "/repos/{owner}/{repo}/languages": { + /** + * List repository languages + * @description Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. + */ + get: operations["repos/list-languages"]; + }; + "/repos/{owner}/{repo}/license": { + /** + * Get the license for a repository + * @description This method returns the contents of the repository's license file, if one is detected. + * + * 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). + */ + get: operations["licenses/get-for-repo"]; + }; + "/repos/{owner}/{repo}/merge-upstream": { + /** + * Sync a fork branch with the upstream repository + * @description Sync a branch of a forked repository to keep it up-to-date with the upstream repository. + */ + post: operations["repos/merge-upstream"]; + }; + "/repos/{owner}/{repo}/merges": { + /** Merge a branch */ + post: operations["repos/merge"]; + }; + "/repos/{owner}/{repo}/milestones": { + /** + * List milestones + * @description Lists milestones for a repository. + */ + get: operations["issues/list-milestones"]; + /** + * Create a milestone + * @description Creates a milestone. + */ + post: operations["issues/create-milestone"]; + }; + "/repos/{owner}/{repo}/milestones/{milestone_number}": { + /** + * Get a milestone + * @description Gets a milestone using the given milestone number. + */ + get: operations["issues/get-milestone"]; + /** + * Delete a milestone + * @description Deletes a milestone using the given milestone number. + */ + delete: operations["issues/delete-milestone"]; + /** Update a milestone */ + patch: operations["issues/update-milestone"]; + }; + "/repos/{owner}/{repo}/milestones/{milestone_number}/labels": { + /** + * List labels for issues in a milestone + * @description Lists labels for issues in a milestone. + */ + get: operations["issues/list-labels-for-milestone"]; + }; + "/repos/{owner}/{repo}/notifications": { + /** + * List repository notifications for the authenticated user + * @description Lists all notifications for the current user in the specified repository. + */ + get: operations["activity/list-repo-notifications-for-authenticated-user"]; + /** + * Mark repository notifications as read + * @description Marks all notifications in a repository as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List repository notifications for the authenticated user](https://docs.github.com/rest/activity/notifications#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. + */ + put: operations["activity/mark-repo-notifications-as-read"]; + }; + "/repos/{owner}/{repo}/pages": { + /** + * Get a GitHub Pages site + * @description Gets information about a GitHub Pages site. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + get: operations["repos/get-pages"]; + /** + * Update information about a GitHub Pages site + * @description Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * 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. + */ + put: operations["repos/update-information-about-pages-site"]; + /** + * Create a GitHub Pages site + * @description Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." + * + * 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. + */ + post: operations["repos/create-pages-site"]; + /** + * Delete a GitHub Pages site + * @description Deletes a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * 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. + */ + delete: operations["repos/delete-pages-site"]; + }; + "/repos/{owner}/{repo}/pages/builds": { + /** + * List GitHub Pages builds + * @description Lists builts of a GitHub Pages site. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + get: operations["repos/list-pages-builds"]; + /** + * Request a GitHub Pages build + * @description You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures. + * + * Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes. + */ + post: operations["repos/request-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/latest": { + /** + * Get latest Pages build + * @description Gets information about the single most recent build of a GitHub Pages site. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + get: operations["repos/get-latest-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/{build_id}": { + /** + * Get GitHub Pages build + * @description Gets information about a GitHub Pages build. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + get: operations["repos/get-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/deployments": { + /** + * Create a GitHub Pages deployment + * @description Create a GitHub Pages deployment for a repository. + * + * The authenticated user must have write permission to the repository. + */ + post: operations["repos/create-pages-deployment"]; + }; + "/repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}": { + /** + * 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. + */ + get: operations["repos/get-pages-deployment"]; + }; + "/repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel": { + /** + * Cancel a GitHub Pages deployment + * @description Cancels a GitHub Pages deployment. + * + * The authenticated user must have write permissions for the GitHub Pages site. + */ + post: operations["repos/cancel-pages-deployment"]; + }; + "/repos/{owner}/{repo}/pages/health": { + /** + * Get a DNS health check for GitHub Pages + * @description Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * 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. + */ + get: operations["repos/get-pages-health-check"]; + }; + "/repos/{owner}/{repo}/private-vulnerability-reporting": { + /** + * 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)". + */ + get: operations["repos/check-private-vulnerability-reporting"]; + /** + * Enable private vulnerability reporting for a repository + * @description Enables private vulnerability reporting for a repository. The authenticated user must have admin access to the repository. For more information, see "[Privately reporting a security vulnerability](https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)." + */ + put: operations["repos/enable-private-vulnerability-reporting"]; + /** + * Disable private vulnerability reporting for a repository + * @description Disables private vulnerability reporting for a repository. The authenticated user must have admin access to the repository. For more information, see "[Privately reporting a security vulnerability](https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)". + */ + delete: operations["repos/disable-private-vulnerability-reporting"]; + }; + "/repos/{owner}/{repo}/projects": { + /** + * List repository projects + * @description Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + get: operations["projects/list-for-repo"]; + /** + * Create a repository project + * @description Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + post: operations["projects/create-for-repo"]; + }; + "/repos/{owner}/{repo}/properties/values": { + /** + * 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. + */ + get: operations["repos/get-custom-properties-values"]; + /** + * 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. + */ + patch: operations["repos/create-or-update-custom-properties-values"]; + }; + "/repos/{owner}/{repo}/pulls": { + /** + * List pull requests + * @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`. + */ + get: operations["pulls/list"]; + /** + * Create a pull request + * @description Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. + * + * 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`. + */ + post: operations["pulls/create"]; + }; + "/repos/{owner}/{repo}/pulls/comments": { + /** + * 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. + * + * 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`. + */ + get: operations["pulls/list-review-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}": { + /** + * Get a review comment for a pull request + * @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`. + */ + get: operations["pulls/get-review-comment"]; + /** + * Delete a review comment for a pull request + * @description Deletes a review comment. + */ + delete: operations["pulls/delete-review-comment"]; + /** + * Update a review comment for a pull request + * @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`. + */ + patch: operations["pulls/update-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": { + /** + * List reactions for a pull request review comment + * @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). + */ + get: operations["reactions/list-for-pull-request-review-comment"]; + /** + * Create reaction for a pull request review comment + * @description Create a reaction to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. + */ + post: operations["reactions/create-for-pull-request-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": { + /** + * Delete a pull request comment reaction + * @description **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). + */ + delete: operations["reactions/delete-for-pull-request-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}": { + /** + * Get a pull request + * @description Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/pulls/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/pulls/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. + * + * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: + * + * * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. + * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. + * + * Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * 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. + */ + get: operations["pulls/get"]; + /** + * Update a pull request + * @description Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. + * + * 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`. + */ + patch: operations["pulls/update"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": { + /** + * Create a codespace from a pull request + * @description Creates a codespace owned by the authenticated user for the specified pull request. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + post: operations["codespaces/create-with-pr-for-authenticated-user"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/comments": { + /** + * List review comments on a pull request + * @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`. + */ + get: operations["pulls/list-review-comments"]; + /** + * Create a review comment for a pull request + * @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)." + * + * 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. + * + * 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`. + */ + post: operations["pulls/create-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": { + /** + * Create a reply for a review comment + * @description Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/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`. + */ + post: operations["pulls/create-reply-for-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/commits": { + /** + * 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) + * 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`. + */ + get: operations["pulls/list-commits"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/files": { + /** + * List pull requests files + * @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`. + */ + get: operations["pulls/list-files"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/merge": { + /** + * Check if a pull request has been merged + * @description Checks if a pull request has been merged into the base branch. The HTTP status of the response indicates whether or not the pull request has been merged; the response body is empty. + */ + get: operations["pulls/check-if-merged"]; + /** + * 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. 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)." + */ + put: operations["pulls/merge"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": { + /** + * Get all requested reviewers for a pull request + * @description Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. + */ + get: operations["pulls/list-requested-reviewers"]; + /** + * Request reviewers for a pull request + * @description This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["pulls/request-reviewers"]; + /** + * Remove requested reviewers from a pull request + * @description Removes review requests from a pull request for a given set of users and/or teams. + */ + delete: operations["pulls/remove-requested-reviewers"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews": { + /** + * List reviews for a pull request + * @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`. + */ + get: operations["pulls/list-reviews"]; + /** + * Create a review for a pull request + * @description 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. 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`. + */ + post: operations["pulls/create-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": { + /** + * Get a review for a pull request + * @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`. + */ + get: operations["pulls/get-review"]; + /** + * Update a review for a pull request + * @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`. + */ + put: operations["pulls/update-review"]; + /** + * Delete a pending review for a pull request + * @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`. + */ + delete: operations["pulls/delete-pending-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": { + /** + * List comments for a 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`. + */ + get: operations["pulls/list-comments-for-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": { + /** + * Dismiss a review for a pull request + * @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`. + */ + put: operations["pulls/dismiss-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": { + /** + * 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)." + * + * 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`. + */ + post: operations["pulls/submit-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/update-branch": { + /** + * Update a pull request branch + * @description Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. + */ + put: operations["pulls/update-branch"]; + }; + "/repos/{owner}/{repo}/readme": { + /** + * Get a repository README + * @description Gets the preferred README for a repository. + * + * 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). + */ + get: operations["repos/get-readme"]; + }; + "/repos/{owner}/{repo}/readme/{dir}": { + /** + * Get a repository README for a directory + * @description Gets the README from a repository 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. 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). + */ + get: operations["repos/get-readme-in-directory"]; + }; + "/repos/{owner}/{repo}/releases": { + /** + * List releases + * @description This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/rest/repos/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + get: operations["repos/list-releases"]; + /** + * Create a release + * @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. 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)." + */ + post: operations["repos/create-release"]; + }; + "/repos/{owner}/{repo}/releases/assets/{asset_id}": { + /** + * Get a release asset + * @description To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. + */ + get: operations["repos/get-release-asset"]; + /** Delete a release asset */ + delete: operations["repos/delete-release-asset"]; + /** + * Update a release asset + * @description Users with push access to the repository can edit a release asset. + */ + patch: operations["repos/update-release-asset"]; + }; + "/repos/{owner}/{repo}/releases/generate-notes": { + /** + * Generate release notes content for a release + * @description Generate a name and body describing a [release](https://docs.github.com/rest/releases/releases#get-a-release). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. + */ + post: operations["repos/generate-release-notes"]; + }; + "/repos/{owner}/{repo}/releases/latest": { + /** + * Get the latest release + * @description View the latest published full release for the repository. + * + * The latest release is the most recent non-prerelease, non-draft release, sorted by the `created_at` attribute. The `created_at` attribute is the date of the commit used for the release, and not the date when the release was drafted or published. + */ + get: operations["repos/get-latest-release"]; + }; + "/repos/{owner}/{repo}/releases/tags/{tag}": { + /** + * Get a release by tag name + * @description Get a published release with the specified tag. + */ + get: operations["repos/get-release-by-tag"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}": { + /** + * Get a release + * @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)." + */ + get: operations["repos/get-release"]; + /** + * Delete a release + * @description Users with push access to the repository can delete a release. + */ + delete: operations["repos/delete-release"]; + /** + * Update a release + * @description Users with push access to the repository can edit a release. + */ + patch: operations["repos/update-release"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/assets": { + /** List release assets */ + get: operations["repos/list-release-assets"]; + /** + * Upload a release asset + * @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 + * the response of the [Create a release endpoint](https://docs.github.com/rest/releases/releases#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, + * you'll still need to pass your authentication to be able to upload an asset. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List release assets](https://docs.github.com/rest/releases/assets#list-release-assets)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * To find the `release_id` query the [`GET /repos/{owner}/{repo}/releases/latest` endpoint](https://docs.github.com/rest/releases/releases#get-the-latest-release). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + post: operations["repos/upload-release-asset"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/reactions": { + /** + * List reactions for a release + * @description List the reactions to a [release](https://docs.github.com/rest/releases/releases#get-a-release). + */ + get: operations["reactions/list-for-release"]; + /** + * Create reaction for a release + * @description Create a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release). A response with a `Status: 200 OK` means that you already added the reaction type to this release. + */ + post: operations["reactions/create-for-release"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": { + /** + * Delete a release reaction + * @description **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release). + */ + delete: operations["reactions/delete-for-release"]; + }; + "/repos/{owner}/{repo}/rules/branches/{branch}": { + /** + * Get rules for a branch + * @description Returns all active rules that apply to the specified branch. The branch does not need to exist; rules that would apply + * to a branch with that name will be returned. All active rules that apply will be returned, regardless of the level + * at which they are configured (e.g. repository or organization). Rules in rulesets with "evaluate" or "disabled" + * enforcement statuses are not returned. + */ + get: operations["repos/get-branch-rules"]; + }; + "/repos/{owner}/{repo}/rulesets": { + /** + * Get all repository rulesets + * @description Get all the rulesets for a repository. + */ + get: operations["repos/get-repo-rulesets"]; + /** + * Create a repository ruleset + * @description Create a ruleset for a repository. + */ + post: operations["repos/create-repo-ruleset"]; + }; + "/repos/{owner}/{repo}/rulesets/rule-suites": { + /** + * 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)." + */ + get: operations["repos/get-repo-rule-suites"]; + }; + "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}": { + /** + * 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)." + */ + get: operations["repos/get-repo-rule-suite"]; + }; + "/repos/{owner}/{repo}/rulesets/{ruleset_id}": { + /** + * Get a repository ruleset + * @description Get a ruleset for a repository. + */ + get: operations["repos/get-repo-ruleset"]; + /** + * Update a repository ruleset + * @description Update a ruleset for a repository. + */ + put: operations["repos/update-repo-ruleset"]; + /** + * Delete a repository ruleset + * @description Delete a ruleset for a repository. + */ + delete: operations["repos/delete-repo-ruleset"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts": { + /** + * List secret scanning alerts for a repository + * @description Lists secret scanning alerts for an eligible repository, from newest to oldest. + * + * 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. + */ + get: operations["secret-scanning/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": { + /** + * Get a secret scanning alert + * @description Gets a single secret scanning alert detected in an eligible repository. + * + * 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. + */ + get: operations["secret-scanning/get-alert"]; + /** + * Update a secret scanning alert + * @description Updates the status of a secret scanning alert in an eligible repository. + * + * 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. + */ + patch: operations["secret-scanning/update-alert"]; + }; + "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": { + /** + * List locations for a secret scanning alert + * @description Lists all locations for a given secret scanning alert for an eligible repository. + * + * 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. + */ + get: operations["secret-scanning/list-locations-for-alert"]; + }; + "/repos/{owner}/{repo}/security-advisories": { + /** + * List repository security advisories + * @description Lists security advisories in a repository. + * + * 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. + */ + get: operations["security-advisories/list-repository-advisories"]; + /** + * Create a repository security advisory + * @description Creates a new repository security advisory. + * + * 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. + */ + post: operations["security-advisories/create-repository-advisory"]; + }; + "/repos/{owner}/{repo}/security-advisories/reports": { + /** + * Privately report a security vulnerability + * @description Report a security vulnerability to the maintainers of the repository. + * See "[Privately reporting a security vulnerability](https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)" for more information about private vulnerability reporting. + */ + post: operations["security-advisories/create-private-vulnerability-report"]; + }; + "/repos/{owner}/{repo}/security-advisories/{ghsa_id}": { + /** + * Get a repository security advisory + * @description Get a repository security advisory using its GitHub Security Advisory (GHSA) identifier. + * + * 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. + */ + get: operations["security-advisories/get-repository-advisory"]; + /** + * Update a repository security advisory + * @description Update a repository security advisory using its GitHub Security Advisory (GHSA) identifier. + * + * 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. + */ + patch: operations["security-advisories/update-repository-advisory"]; + }; + "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve": { + /** + * Request a CVE for a repository security advisory + * @description If you want a CVE identification number for the security vulnerability in your project, and don't already have one, you can request a CVE identification number from GitHub. For more information see "[Requesting a CVE identification number](https://docs.github.com/code-security/security-advisories/repository-security-advisories/publishing-a-repository-security-advisory#requesting-a-cve-identification-number-optional)." + * + * You may request a CVE for public repositories, but cannot do so for private repositories. + * + * In order to request a CVE for a 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. + */ + post: operations["security-advisories/create-repository-advisory-cve-request"]; + }; + "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks": { + /** + * 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. + */ + post: operations["security-advisories/create-fork"]; + }; + "/repos/{owner}/{repo}/stargazers": { + /** + * List stargazers + * @description Lists the people that have starred the repository. + * + * 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. + */ + get: operations["activity/list-stargazers-for-repo"]; + }; + "/repos/{owner}/{repo}/stats/code_frequency": { + /** + * Get the weekly commit activity + * @description + * 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. + */ + get: operations["repos/get-code-frequency-stats"]; + }; + "/repos/{owner}/{repo}/stats/commit_activity": { + /** + * Get the last year of commit activity + * @description Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. + */ + get: operations["repos/get-commit-activity-stats"]; + }; + "/repos/{owner}/{repo}/stats/contributors": { + /** + * Get all contributor commit activity + * @description + * 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](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. + */ + get: operations["repos/get-contributors-stats"]; + }; + "/repos/{owner}/{repo}/stats/participation": { + /** + * Get the weekly commit count + * @description Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`. + * + * The array order is oldest week (index 0) to most recent week. + * + * The most recent week is seven days ago at UTC midnight to today at UTC midnight. + */ + get: operations["repos/get-participation-stats"]; + }; + "/repos/{owner}/{repo}/stats/punch_card": { + /** + * Get the hourly commit count for each day + * @description Each array contains the day number, hour number, and number of commits: + * + * * `0-6`: Sunday - Saturday + * * `0-23`: Hour of day + * * Number of commits + * + * For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. + */ + get: operations["repos/get-punch-card-stats"]; + }; + "/repos/{owner}/{repo}/statuses/{sha}": { + /** + * Create a commit status + * @description Users with push access in a repository can create commit statuses for a given SHA. + * + * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. + */ + post: operations["repos/create-commit-status"]; + }; + "/repos/{owner}/{repo}/subscribers": { + /** + * List watchers + * @description Lists the people watching the specified repository. + */ + get: operations["activity/list-watchers-for-repo"]; + }; + "/repos/{owner}/{repo}/subscription": { + /** + * Get a repository subscription + * @description Gets information about whether the authenticated user is subscribed to the repository. + */ + get: operations["activity/get-repo-subscription"]; + /** + * Set a repository subscription + * @description If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/activity/watching#delete-a-repository-subscription) completely. + */ + put: operations["activity/set-repo-subscription"]; + /** + * Delete a repository subscription + * @description This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://docs.github.com/rest/activity/watching#set-a-repository-subscription). + */ + delete: operations["activity/delete-repo-subscription"]; + }; + "/repos/{owner}/{repo}/tags": { + /** List repository tags */ + get: operations["repos/list-tags"]; + }; + "/repos/{owner}/{repo}/tags/protection": { + /** + * List tag protection states for a repository + * @description This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + get: operations["repos/list-tag-protection"]; + /** + * Create a tag protection state for a repository + * @description This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + post: operations["repos/create-tag-protection"]; + }; + "/repos/{owner}/{repo}/tags/protection/{tag_protection_id}": { + /** + * Delete a tag protection state for a repository + * @description This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + delete: operations["repos/delete-tag-protection"]; + }; + "/repos/{owner}/{repo}/tarball/{ref}": { + /** + * Download a repository archive (tar) + * @description Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use + * the `Location` header to make a second `GET` request. + * **Note**: For private repositories, these links are temporary and expire after five minutes. + */ + get: operations["repos/download-tarball-archive"]; + }; + "/repos/{owner}/{repo}/teams": { + /** + * List repository teams + * @description Lists the teams that have access to the specified repository and that are also visible to the authenticated user. + * + * For a public repository, a team is listed only if that team added the public repository explicitly. + * + * 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. + */ + get: operations["repos/list-teams"]; + }; + "/repos/{owner}/{repo}/topics": { + /** Get all repository topics */ + get: operations["repos/get-all-topics"]; + /** Replace all repository topics */ + put: operations["repos/replace-all-topics"]; + }; + "/repos/{owner}/{repo}/traffic/clones": { + /** + * Get repository clones + * @description Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. + */ + get: operations["repos/get-clones"]; + }; + "/repos/{owner}/{repo}/traffic/popular/paths": { + /** + * Get top referral paths + * @description Get the top 10 popular contents over the last 14 days. + */ + get: operations["repos/get-top-paths"]; + }; + "/repos/{owner}/{repo}/traffic/popular/referrers": { + /** + * Get top referral sources + * @description Get the top 10 referrers over the last 14 days. + */ + get: operations["repos/get-top-referrers"]; + }; + "/repos/{owner}/{repo}/traffic/views": { + /** + * Get page views + * @description Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. + */ + get: operations["repos/get-views"]; + }; + "/repos/{owner}/{repo}/transfer": { + /** + * 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/). + */ + post: operations["repos/transfer"]; + }; + "/repos/{owner}/{repo}/vulnerability-alerts": { + /** + * Check if vulnerability alerts are enabled for a repository + * @description Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". + */ + get: operations["repos/check-vulnerability-alerts"]; + /** + * Enable vulnerability alerts + * @description Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". + */ + put: operations["repos/enable-vulnerability-alerts"]; + /** + * Disable vulnerability alerts + * @description Disables dependency alerts and the dependency graph for a repository. + * The authenticated user must have admin access to the repository. For more information, + * see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". + */ + delete: operations["repos/disable-vulnerability-alerts"]; + }; + "/repos/{owner}/{repo}/zipball/{ref}": { + /** + * Download a repository archive (zip) + * @description Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use + * the `Location` header to make a second `GET` request. + * + * **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. + */ + get: operations["repos/download-zipball-archive"]; + }; + "/repos/{template_owner}/{template_repo}/generate": { + /** + * Create a repository using a template + * @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 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. + */ + post: operations["repos/create-using-template"]; + }; + "/repositories": { + /** + * List public repositories + * @description Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of repositories. + */ + get: operations["repos/list-public"]; + }; + "/search/code": { + /** + * 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/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). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * Considerations for code search: + * + * Due to the complexity of searching code, there are a few restrictions on how searches are performed: + * + * * Only the _default branch_ is considered. In most cases, this will be the `master` branch. + * * Only files smaller than 384 KB are searchable. + * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing + * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. + * + * This endpoint requires you to authenticate and limits you to 10 requests per minute. + */ + get: operations["search/code"]; + }; + "/search/commits": { + /** + * 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/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). + * + * For example, if you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + get: operations["search/commits"]; + }; + "/search/issues": { + /** + * 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/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). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + get: operations["search/issues-and-pull-requests"]; + }; + "/search/labels": { + /** + * 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/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). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + get: operations["search/labels"]; + }; + "/search/repositories": { + /** + * Search repositories + * @description 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). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + get: operations["search/repos"]; + }; + "/search/topics": { + /** + * 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/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). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results. + */ + get: operations["search/topics"]; + }; + "/search/users": { + /** + * Search users + * @description 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). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + * + * This endpoint does not accept authentication and will only include publicly visible users. As an alternative, you can use the GraphQL API. The GraphQL API requires authentication and will return private users, including Enterprise Managed Users (EMUs), that you are authorized to view. For more information, see "[GraphQL Queries](https://docs.github.com/graphql/reference/queries#search)." + */ + get: operations["search/users"]; + }; + "/teams/{team_id}": { + /** + * Get a team (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/teams/teams#get-a-team-by-name) endpoint. + */ + get: operations["teams/get-legacy"]; + /** + * Delete a team (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/teams/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + delete: operations["teams/delete-legacy"]; + /** + * Update a team (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/teams/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + patch: operations["teams/update-legacy"]; + }; + "/teams/{team_id}/discussions": { + /** + * List discussions (Legacy) + * @deprecated + * @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 app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. + */ + get: operations["teams/list-discussions-legacy"]; + /** + * Create a discussion (Legacy) + * @deprecated + * @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. + * + * 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + */ + post: operations["teams/create-discussion-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}": { + /** + * Get a discussion (Legacy) + * @deprecated + * @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 app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. + */ + get: operations["teams/get-discussion-legacy"]; + /** + * Delete a discussion (Legacy) + * @deprecated + * @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 app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + */ + delete: operations["teams/delete-discussion-legacy"]; + /** + * Update a discussion (Legacy) + * @deprecated + * @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 app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + */ + patch: operations["teams/update-discussion-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments": { + /** + * List discussion comments (Legacy) + * @deprecated + * @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 app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. + */ + get: operations["teams/list-discussion-comments-legacy"]; + /** + * Create a discussion comment (Legacy) + * @deprecated + * @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. + * + * 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + */ + post: operations["teams/create-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": { + /** + * Get a discussion comment (Legacy) + * @deprecated + * @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 app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. + */ + get: operations["teams/get-discussion-comment-legacy"]; + /** + * Delete a discussion comment (Legacy) + * @deprecated + * @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 app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + */ + delete: operations["teams/delete-discussion-comment-legacy"]; + /** + * Update a discussion comment (Legacy) + * @deprecated + * @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 app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + */ + patch: operations["teams/update-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + /** + * List reactions for a team discussion comment (Legacy) + * @deprecated + * @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 app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. + */ + get: operations["reactions/list-for-team-discussion-comment-legacy"]; + /** + * Create reaction for a team discussion comment (Legacy) + * @deprecated + * @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). + * + * 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. + */ + post: operations["reactions/create-for-team-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/reactions": { + /** + * List reactions for a team discussion (Legacy) + * @deprecated + * @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 app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. + */ + get: operations["reactions/list-for-team-discussion-legacy"]; + /** + * Create reaction for a team discussion (Legacy) + * @deprecated + * @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). + * + * 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. + */ + post: operations["reactions/create-for-team-discussion-legacy"]; + }; + "/teams/{team_id}/invitations": { + /** + * List pending team invitations (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/teams/members#list-pending-team-invitations) endpoint. + * + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + */ + get: operations["teams/list-pending-invitations-legacy"]; + }; + "/teams/{team_id}/members": { + /** + * List team members (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/teams/members#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + get: operations["teams/list-members-legacy"]; + }; + "/teams/{team_id}/members/{username}": { + /** + * Get team member (Legacy) + * @deprecated + * @description The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + get: operations["teams/get-member-legacy"]; + /** + * Add team member (Legacy) + * @deprecated + * @description The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." + */ + put: operations["teams/add-member-legacy"]; + /** + * Remove team member (Legacy) + * @deprecated + * @description The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations["teams/remove-member-legacy"]; + }; + "/teams/{team_id}/memberships/{username}": { + /** + * Get team membership for a user (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint. + * + * Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/teams/teams#create-a-team). + */ + get: operations["teams/get-membership-for-user-legacy"]; + /** + * Add or update team membership for a user (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. + */ + put: operations["teams/add-or-update-membership-for-user-legacy"]; + /** + * Remove team membership for a user (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + delete: operations["teams/remove-membership-for-user-legacy"]; + }; + "/teams/{team_id}/projects": { + /** + * List team projects (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + get: operations["teams/list-projects-legacy"]; + }; + "/teams/{team_id}/projects/{project_id}": { + /** + * Check team permissions for a project (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + get: operations["teams/check-permissions-for-project-legacy"]; + /** + * Add or update team project permissions (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions) endpoint. + * + * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + */ + put: operations["teams/add-or-update-project-permissions-legacy"]; + /** + * Remove a project from a team (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team) endpoint. + * + * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. + */ + delete: operations["teams/remove-project-legacy"]; + }; + "/teams/{team_id}/repos": { + /** + * List team repositories (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/teams/teams#list-team-repositories) endpoint. + */ + get: operations["teams/list-repos-legacy"]; + }; + "/teams/{team_id}/repos/{owner}/{repo}": { + /** + * Check team permissions for a repository (Legacy) + * @deprecated + * @description **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint. + * + * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + get: operations["teams/check-permissions-for-repo-legacy"]; + /** + * Add or update team repository permissions (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions)" endpoint. + * + * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." + */ + put: operations["teams/add-or-update-repo-permissions-legacy"]; + /** + * Remove a repository from a team (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team) endpoint. + * + * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. + */ + delete: operations["teams/remove-repo-legacy"]; + }; + "/teams/{team_id}/teams": { + /** + * List child teams (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/teams/teams#list-child-teams) endpoint. + */ + get: operations["teams/list-child-legacy"]; + }; + "/user": { + /** + * Get the authenticated user + * @description OAuth app tokens and personal access tokens (classic) need the `user` scope in order for the response to include private profile information. + */ + get: operations["users/get-authenticated"]; + /** + * Update the authenticated user + * @description **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. + */ + patch: operations["users/update-authenticated"]; + }; + "/user/blocks": { + /** + * List users blocked by the authenticated user + * @description List the users you've blocked on your personal account. + */ + get: operations["users/list-blocked-by-authenticated-user"]; + }; + "/user/blocks/{username}": { + /** + * Check if a user is blocked by the authenticated user + * @description Returns a 204 if the given user is blocked by the authenticated user. Returns a 404 if the given user is not blocked by the authenticated user, or if the given user account has been identified as spam by GitHub. + */ + get: operations["users/check-blocked"]; + /** + * Block a user + * @description Blocks the given user and returns a 204. If the authenticated user cannot block the given user a 422 is returned. + */ + put: operations["users/block"]; + /** + * Unblock a user + * @description Unblocks the given user and returns a 204. + */ + delete: operations["users/unblock"]; + }; + "/user/codespaces": { + /** + * List codespaces for the authenticated user + * @description Lists the authenticated user's codespaces. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + get: operations["codespaces/list-for-authenticated-user"]; + /** + * Create a codespace for the authenticated user + * @description Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + post: operations["codespaces/create-for-authenticated-user"]; + }; + "/user/codespaces/secrets": { + /** + * List secrets for the authenticated user + * @description Lists all development environment secrets available for a user's codespaces without revealing their + * encrypted values. + * + * 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. + */ + get: operations["codespaces/list-secrets-for-authenticated-user"]; + }; + "/user/codespaces/secrets/public-key": { + /** + * Get public key for the authenticated user + * @description Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * 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. + */ + get: operations["codespaces/get-public-key-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}": { + /** + * Get a secret for the authenticated user + * @description Gets a development environment secret available to a user's codespaces without revealing its encrypted value. + * + * 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. + */ + get: operations["codespaces/get-secret-for-authenticated-user"]; + /** + * Create or update a secret for the authenticated user + * @description 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)." + * + * 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. + */ + put: operations["codespaces/create-or-update-secret-for-authenticated-user"]; + /** + * Delete a secret for the authenticated user + * @description 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. + * + * 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. + */ + delete: operations["codespaces/delete-secret-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}/repositories": { + /** + * List selected repositories for a user secret + * @description List the repositories that have been granted the ability to use 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. + */ + get: operations["codespaces/list-repositories-for-secret-for-authenticated-user"]; + /** + * Set selected repositories for a user secret + * @description Select the repositories that will use 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. + */ + put: operations["codespaces/set-repositories-for-secret-for-authenticated-user"]; + }; + "/user/codespaces/secrets/{secret_name}/repositories/{repository_id}": { + /** + * Add a selected repository to a user secret + * @description 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. + */ + put: operations["codespaces/add-repository-for-secret-for-authenticated-user"]; + /** + * Remove a selected repository from a user secret + * @description 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. + */ + delete: operations["codespaces/remove-repository-for-secret-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}": { + /** + * Get a codespace for the authenticated user + * @description Gets information about a user's codespace. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + get: operations["codespaces/get-for-authenticated-user"]; + /** + * Delete a codespace for the authenticated user + * @description Deletes a user's codespace. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + delete: operations["codespaces/delete-for-authenticated-user"]; + /** + * Update a codespace for the authenticated user + * @description Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + patch: operations["codespaces/update-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/exports": { + /** + * Export a codespace for the authenticated user + * @description Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * If changes cannot be pushed to the codespace's repository, they will be pushed to a new or previously-existing fork instead. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + post: operations["codespaces/export-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/exports/{export_id}": { + /** + * Get details about a codespace export + * @description Gets information about an export of a codespace. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + get: operations["codespaces/get-export-details-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/machines": { + /** + * List machine types for a codespace + * @description List the machine types a codespace can transition to use. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + get: operations["codespaces/codespace-machines-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/publish": { + /** + * Create a repository from an unpublished codespace + * @description Publishes an unpublished codespace, creating a new repository and assigning it to the codespace. + * + * The codespace's token is granted write permissions to the repository, allowing the user to push their changes. + * + * This will fail for a codespace that is already published, meaning it has an associated repository. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + post: operations["codespaces/publish-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/start": { + /** + * Start a codespace for the authenticated user + * @description Starts a user's codespace. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + post: operations["codespaces/start-for-authenticated-user"]; + }; + "/user/codespaces/{codespace_name}/stop": { + /** + * Stop a codespace for the authenticated user + * @description Stops a user's codespace. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + post: operations["codespaces/stop-for-authenticated-user"]; + }; + "/user/docker/conflicts": { + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. + */ + get: operations["packages/list-docker-migration-conflicting-packages-for-authenticated-user"]; + }; + "/user/email/visibility": { + /** + * Set primary email visibility for the authenticated user + * @description Sets the visibility for your primary email addresses. + */ + patch: operations["users/set-primary-email-visibility-for-authenticated-user"]; + }; + "/user/emails": { + /** + * List email addresses for the authenticated user + * @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. + */ + get: operations["users/list-emails-for-authenticated-user"]; + /** + * Add an email address for the authenticated user + * @description OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. + */ + post: operations["users/add-email-for-authenticated-user"]; + /** + * Delete an email address for the authenticated user + * @description OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. + */ + delete: operations["users/delete-email-for-authenticated-user"]; + }; + "/user/followers": { + /** + * List followers of the authenticated user + * @description Lists the people following the authenticated user. + */ + get: operations["users/list-followers-for-authenticated-user"]; + }; + "/user/following": { + /** + * List the people the authenticated user follows + * @description Lists the people who the authenticated user follows. + */ + get: operations["users/list-followed-by-authenticated-user"]; + }; + "/user/following/{username}": { + /** Check if a person is followed by the authenticated user */ + get: operations["users/check-person-is-followed-by-authenticated"]; + /** + * 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/guides/getting-started-with-the-rest-api#http-method)." + * + * OAuth app tokens and personal access tokens (classic) need the `user:follow` scope to use this endpoint. + */ + put: operations["users/follow"]; + /** + * Unfollow a user + * @description OAuth app tokens and personal access tokens (classic) need the `user:follow` scope to use this endpoint. + */ + delete: operations["users/unfollow"]; + }; + "/user/gpg_keys": { + /** + * List GPG keys for the authenticated user + * @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. + */ + get: operations["users/list-gpg-keys-for-authenticated-user"]; + /** + * Create a GPG key for the authenticated user + * @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. + */ + post: operations["users/create-gpg-key-for-authenticated-user"]; + }; + "/user/gpg_keys/{gpg_key_id}": { + /** + * Get a GPG key for the authenticated user + * @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. + */ + get: operations["users/get-gpg-key-for-authenticated-user"]; + /** + * Delete a GPG key for the authenticated user + * @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. + */ + delete: operations["users/delete-gpg-key-for-authenticated-user"]; + }; + "/user/installations": { + /** + * List app installations accessible to the user access token + * @description Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * You can find the permissions for the installation under the `permissions` key. + */ + get: operations["apps/list-installations-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories": { + /** + * List repositories accessible to the user access token + * @description List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * The access the user has to each repository is included in the hash under the `permissions` key. + */ + get: operations["apps/list-installation-repos-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories/{repository_id}": { + /** + * Add a repository to an app installation + * @description Add a single repository to an installation. The authenticated user must have admin access to the repository. + */ + put: operations["apps/add-repo-to-installation-for-authenticated-user"]; + /** + * 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`. + */ + delete: operations["apps/remove-repo-from-installation-for-authenticated-user"]; + }; + "/user/interaction-limits": { + /** + * Get interaction restrictions for your public repositories + * @description Shows which type of GitHub user can interact with your public repositories and when the restriction expires. + */ + get: operations["interactions/get-restrictions-for-authenticated-user"]; + /** + * Set interaction restrictions for your public repositories + * @description Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. + */ + put: operations["interactions/set-restrictions-for-authenticated-user"]; + /** + * Remove interaction restrictions from your public repositories + * @description Removes any interaction restrictions from your public repositories. + */ + delete: operations["interactions/remove-restrictions-for-authenticated-user"]; + }; + "/user/issues": { + /** + * List user account issues assigned to the authenticated user + * @description List issues across owned and member repositories assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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`. + */ + get: operations["issues/list-for-authenticated-user"]; + }; + "/user/keys": { + /** + * List public SSH keys for the authenticated user + * @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. + */ + get: operations["users/list-public-ssh-keys-for-authenticated-user"]; + /** + * Create a public SSH key for the authenticated user + * @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. + */ + post: operations["users/create-public-ssh-key-for-authenticated-user"]; + }; + "/user/keys/{key_id}": { + /** + * Get a public SSH key for the authenticated user + * @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. + */ + get: operations["users/get-public-ssh-key-for-authenticated-user"]; + /** + * Delete a public SSH key for the authenticated user + * @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. + */ + delete: operations["users/delete-public-ssh-key-for-authenticated-user"]; + }; + "/user/marketplace_purchases": { + /** + * List subscriptions for the authenticated user + * @description Lists the active subscriptions for the authenticated user. + */ + get: operations["apps/list-subscriptions-for-authenticated-user"]; + }; + "/user/marketplace_purchases/stubbed": { + /** + * List subscriptions for the authenticated user (stubbed) + * @description Lists the active subscriptions for the authenticated user. + */ + get: operations["apps/list-subscriptions-for-authenticated-user-stubbed"]; + }; + "/user/memberships/orgs": { + /** + * List organization memberships for the authenticated user + * @description Lists all of the authenticated user's organization memberships. + */ + get: operations["orgs/list-memberships-for-authenticated-user"]; + }; + "/user/memberships/orgs/{org}": { + /** + * Get an organization membership for the authenticated user + * @description If the authenticated user is an active or pending member of the organization, this endpoint will return the user's membership. If the authenticated user is not affiliated with the organization, a `404` is returned. This endpoint will return a `403` if the request is made by a GitHub App that is blocked by the organization. + */ + get: operations["orgs/get-membership-for-authenticated-user"]; + /** + * Update an organization membership for the authenticated user + * @description Converts the authenticated user to an active member of the organization, if that user has a pending invitation from the organization. + */ + patch: operations["orgs/update-membership-for-authenticated-user"]; + }; + "/user/migrations": { + /** + * List user migrations + * @description Lists all migrations a user has started. + */ + get: operations["migrations/list-for-authenticated-user"]; + /** + * Start a user migration + * @description Initiates the generation of a user migration archive. + */ + post: operations["migrations/start-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}": { + /** + * Get a user migration status + * @description Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values: + * + * * `pending` - the migration hasn't started yet. + * * `exporting` - the migration is in progress. + * * `exported` - the migration finished successfully. + * * `failed` - the migration failed. + * + * Once the migration has been `exported` you can [download the migration archive](https://docs.github.com/rest/migrations/users#download-a-user-migration-archive). + */ + get: operations["migrations/get-status-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/archive": { + /** + * Download a user migration archive + * @description Fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects: + * + * * attachments + * * bases + * * commit\_comments + * * issue\_comments + * * issue\_events + * * issues + * * milestones + * * organizations + * * projects + * * protected\_branches + * * pull\_request\_reviews + * * pull\_requests + * * releases + * * repositories + * * review\_comments + * * schema + * * users + * + * The archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data. + */ + get: operations["migrations/get-archive-for-authenticated-user"]; + /** + * Delete a user migration archive + * @description Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/migrations/users#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/migrations/users#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. + */ + delete: operations["migrations/delete-archive-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/repos/{repo_name}/lock": { + /** + * Unlock a user repository + * @description Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/migrations/users#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/repos/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. + */ + delete: operations["migrations/unlock-repo-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/repositories": { + /** + * List repositories for a user migration + * @description Lists all the repositories for this user migration. + */ + get: operations["migrations/list-repos-for-authenticated-user"]; + }; + "/user/orgs": { + /** + * List organizations for the authenticated user + * @description List organizations for the authenticated user. + * + * 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. + */ + get: operations["orgs/list-for-authenticated-user"]; + }; + "/user/packages": { + /** + * List packages for the authenticated user's namespace + * @description Lists packages owned by the authenticated user within the user's namespace. + * + * 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)." + */ + get: operations["packages/list-packages-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}": { + /** + * Get a package for the authenticated user + * @description Gets a specific package for a package owned by the authenticated user. + * + * 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)." + */ + get: operations["packages/get-package-for-authenticated-user"]; + /** + * Delete a package for the authenticated user + * @description Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * 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)." + */ + delete: operations["packages/delete-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/restore": { + /** + * Restore a package for the authenticated user + * @description Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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)." + */ + post: operations["packages/restore-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions": { + /** + * List package versions for a package owned by the authenticated user + * @description Lists package versions for a package owned by the authenticated user. + * + * 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)." + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Get a package version for the authenticated user + * @description Gets a specific package version for a package owned by the authenticated user. + * + * 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)." + */ + get: operations["packages/get-package-version-for-authenticated-user"]; + /** + * Delete a package version for the authenticated user + * @description Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * 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)." + */ + delete: operations["packages/delete-package-version-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restore a package version for the authenticated user + * @description Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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)." + */ + post: operations["packages/restore-package-version-for-authenticated-user"]; + }; + "/user/projects": { + /** + * Create a user project + * @description Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + post: operations["projects/create-for-authenticated-user"]; + }; + "/user/public_emails": { + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `user:email` scope to use this endpoint. + */ + get: operations["users/list-public-emails-for-authenticated-user"]; + }; + "/user/repos": { + /** + * List repositories for the authenticated user + * @description Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + */ + get: operations["repos/list-for-authenticated-user"]; + /** + * Create a repository for the authenticated user + * @description Creates a new repository for the authenticated user. + * + * 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. + */ + post: operations["repos/create-for-authenticated-user"]; + }; + "/user/repository_invitations": { + /** + * List repository invitations for the authenticated user + * @description When authenticating as a user, this endpoint will list all currently open repository invitations for that user. + */ + get: operations["repos/list-invitations-for-authenticated-user"]; + }; + "/user/repository_invitations/{invitation_id}": { + /** Decline a repository invitation */ + delete: operations["repos/decline-invitation-for-authenticated-user"]; + /** Accept a repository invitation */ + patch: operations["repos/accept-invitation-for-authenticated-user"]; + }; + "/user/social_accounts": { + /** + * List social accounts for the authenticated user + * @description Lists all of your social accounts. + */ + get: operations["users/list-social-accounts-for-authenticated-user"]; + /** + * Add social accounts for the authenticated user + * @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. + */ + post: operations["users/add-social-account-for-authenticated-user"]; + /** + * Delete social accounts for the authenticated user + * @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. + */ + delete: operations["users/delete-social-account-for-authenticated-user"]; + }; + "/user/ssh_signing_keys": { + /** + * List SSH signing keys for the authenticated user + * @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. + */ + get: operations["users/list-ssh-signing-keys-for-authenticated-user"]; + /** + * Create a SSH signing key for the authenticated user + * @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. + */ + post: operations["users/create-ssh-signing-key-for-authenticated-user"]; + }; + "/user/ssh_signing_keys/{ssh_signing_key_id}": { + /** + * Get an SSH signing key for the authenticated user + * @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. + */ + get: operations["users/get-ssh-signing-key-for-authenticated-user"]; + /** + * Delete an SSH signing key for the authenticated user + * @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. + */ + delete: operations["users/delete-ssh-signing-key-for-authenticated-user"]; + }; + "/user/starred": { + /** + * List repositories starred by the authenticated user + * @description Lists repositories the authenticated user has starred. + * + * 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. + */ + get: operations["activity/list-repos-starred-by-authenticated-user"]; + }; + "/user/starred/{owner}/{repo}": { + /** + * Check if a repository is starred by the authenticated user + * @description Whether the authenticated user has starred the repository. + */ + get: operations["activity/check-repo-is-starred-by-authenticated-user"]; + /** + * 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 method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." + */ + put: operations["activity/star-repo-for-authenticated-user"]; + /** + * Unstar a repository for the authenticated user + * @description Unstar a repository that the authenticated user has previously starred. + */ + delete: operations["activity/unstar-repo-for-authenticated-user"]; + }; + "/user/subscriptions": { + /** + * List repositories watched by the authenticated user + * @description Lists repositories the authenticated user is watching. + */ + get: operations["activity/list-watched-repos-for-authenticated-user"]; + }; + "/user/teams": { + /** + * List teams for the authenticated user + * @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. + */ + get: operations["teams/list-for-authenticated-user"]; + }; + "/users": { + /** + * List users + * @description Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. + * + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of users. + */ + get: operations["users/list"]; + }; + "/users/{username}": { + /** + * Get a user + * @description Provides publicly available information about someone with a GitHub account. + * + * 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)". + */ + get: operations["users/get-by-username"]; + }; + "/users/{username}/docker/conflicts": { + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. + */ + get: operations["packages/list-docker-migration-conflicting-packages-for-user"]; + }; + "/users/{username}/events": { + /** + * List events for the authenticated user + * @description If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. + */ + get: operations["activity/list-events-for-authenticated-user"]; + }; + "/users/{username}/events/orgs/{org}": { + /** + * List organization events for the authenticated user + * @description This is the user's organization dashboard. You must be authenticated as the user to view this. + */ + get: operations["activity/list-org-events-for-authenticated-user"]; + }; + "/users/{username}/events/public": { + /** List public events for a user */ + get: operations["activity/list-public-events-for-user"]; + }; + "/users/{username}/followers": { + /** + * List followers of a user + * @description Lists the people following the specified user. + */ + get: operations["users/list-followers-for-user"]; + }; + "/users/{username}/following": { + /** + * List the people a user follows + * @description Lists the people who the specified user follows. + */ + get: operations["users/list-following-for-user"]; + }; + "/users/{username}/following/{target_user}": { + /** Check if a user follows another user */ + get: operations["users/check-following-for-user"]; + }; + "/users/{username}/gists": { + /** + * List gists for a user + * @description Lists public gists for the specified user: + */ + get: operations["gists/list-for-user"]; + }; + "/users/{username}/gpg_keys": { + /** + * List GPG keys for a user + * @description Lists the GPG keys for a user. This information is accessible by anyone. + */ + get: operations["users/list-gpg-keys-for-user"]; + }; + "/users/{username}/hovercard": { + /** + * Get contextual information for a user + * @description 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, you would use a `subject_type` value of `repository` and a `subject_id` value of `1300192` (the ID of the `Spoon-Knife` repository). + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + get: operations["users/get-context-for-user"]; + }; + "/users/{username}/installation": { + /** + * Get a user installation for the authenticated app + * @description Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-user-installation"]; + }; + "/users/{username}/keys": { + /** + * List public keys for a user + * @description Lists the _verified_ public SSH keys for a user. This is accessible by anyone. + */ + get: operations["users/list-public-keys-for-user"]; + }; + "/users/{username}/orgs": { + /** + * List organizations for a user + * @description List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. + * + * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/orgs/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + get: operations["orgs/list-for-user"]; + }; + "/users/{username}/packages": { + /** + * List packages for a user + * @description Lists all packages in a user's namespace for which the requesting user has access. + * + * 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)." + */ + get: operations["packages/list-packages-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}": { + /** + * Get a package for a user + * @description Gets a specific package metadata for a public package owned by a user. + * + * 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)." + */ + get: operations["packages/get-package-for-user"]; + /** + * Delete a package for a user + * @description Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * 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)." + */ + delete: operations["packages/delete-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/restore": { + /** + * Restore a package for a user + * @description Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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)." + */ + post: operations["packages/restore-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions": { + /** + * List package versions for a package owned by a user + * @description Lists package versions for a public package owned by a specified user. + * + * 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)." + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Get a package version for a user + * @description Gets a specific package version for a public package owned by a specified user. + * + * 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)." + */ + get: operations["packages/get-package-version-for-user"]; + /** + * Delete package version for a user + * @description Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * 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)." + */ + delete: operations["packages/delete-package-version-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restore package version for a user + * @description Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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)." + */ + post: operations["packages/restore-package-version-for-user"]; + }; + "/users/{username}/projects": { + /** + * List user projects + * @description Lists projects for a user. + */ + get: operations["projects/list-for-user"]; + }; + "/users/{username}/received_events": { + /** + * List events received by the authenticated user + * @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. + */ + get: operations["activity/list-received-events-for-user"]; + }; + "/users/{username}/received_events/public": { + /** List public events received by a user */ + get: operations["activity/list-received-public-events-for-user"]; + }; + "/users/{username}/repos": { + /** + * List repositories for a user + * @description Lists public repositories for the specified user. + */ + get: operations["repos/list-for-user"]; + }; + "/users/{username}/settings/billing/actions": { + /** + * Get GitHub Actions billing for a user + * @description Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. + */ + get: operations["billing/get-github-actions-billing-user"]; + }; + "/users/{username}/settings/billing/packages": { + /** + * Get GitHub Packages billing for a user + * @description Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. + */ + get: operations["billing/get-github-packages-billing-user"]; + }; + "/users/{username}/settings/billing/shared-storage": { + /** + * Get shared storage billing for a user + * @description Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. + */ + get: operations["billing/get-shared-storage-billing-user"]; + }; + "/users/{username}/social_accounts": { + /** + * List social accounts for a user + * @description Lists social media accounts for a user. This endpoint is accessible by anyone. + */ + get: operations["users/list-social-accounts-for-user"]; + }; + "/users/{username}/ssh_signing_keys": { + /** + * List SSH signing keys for a user + * @description Lists the SSH signing keys for a user. This operation is accessible by anyone. + */ + get: operations["users/list-ssh-signing-keys-for-user"]; + }; + "/users/{username}/starred": { + /** + * List repositories starred by a user + * @description Lists repositories a user has starred. + * + * 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. + */ + get: operations["activity/list-repos-starred-by-user"]; + }; + "/users/{username}/subscriptions": { + /** + * List repositories watched by a user + * @description Lists repositories a user is watching. + */ + get: operations["activity/list-repos-watched-by-user"]; + }; + "/versions": { + /** + * Get all API versions + * @description Get all supported GitHub API versions. + */ + get: operations["meta/get-all-versions"]; + }; + "/zen": { + /** + * Get the Zen of GitHub + * @description Get a random sentence from the Zen of GitHub + */ + get: operations["meta/get-zen"]; + }; + "/repos/{owner}/{repo}/compare/{base}...{head}": { + /** + * Compare two commits + * @description **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. Both `:base` and `:head` must be branch names in `:repo`. To compare branches across other repositories in the same network as `:repo`, use the format `:branch`. + * + * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + get: operations["repos/compare-commits"]; + }; +} + +export type webhooks = Record; + +export interface components { + schemas: { + root: { + /** Format: uri-template */ + current_user_url: string; + /** Format: uri-template */ + current_user_authorizations_html_url: string; + /** Format: uri-template */ + authorizations_url: string; + /** Format: uri-template */ + code_search_url: string; + /** Format: uri-template */ + commit_search_url: string; + /** Format: uri-template */ + emails_url: string; + /** Format: uri-template */ + emojis_url: string; + /** Format: uri-template */ + events_url: string; + /** Format: uri-template */ + feeds_url: string; + /** Format: uri-template */ + followers_url: string; + /** Format: uri-template */ + following_url: string; + /** Format: uri-template */ + gists_url: string; + /** + * Format: uri-template + * @deprecated + */ + hub_url?: string; + /** Format: uri-template */ + issue_search_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + label_search_url: string; + /** Format: uri-template */ + notifications_url: string; + /** Format: uri-template */ + organization_url: string; + /** Format: uri-template */ + organization_repositories_url: string; + /** Format: uri-template */ + organization_teams_url: string; + /** Format: uri-template */ + public_gists_url: string; + /** Format: uri-template */ + rate_limit_url: string; + /** Format: uri-template */ + repository_url: string; + /** Format: uri-template */ + repository_search_url: string; + /** Format: uri-template */ + current_user_repositories_url: string; + /** Format: uri-template */ + starred_url: string; + /** Format: uri-template */ + starred_gists_url: string; + /** Format: uri-template */ + topic_search_url?: string; + /** Format: uri-template */ + user_url: string; + /** Format: uri-template */ + user_organizations_url: string; + /** Format: uri-template */ + user_repositories_url: string; + /** Format: uri-template */ + user_search_url: string; + }; + /** + * @description The package's language or package management ecosystem. + * @enum {string} + */ + "security-advisory-ecosystems": + | "rubygems" + | "npm" + | "pip" + | "maven" + | "nuget" + | "composer" + | "go" + | "rust" + | "erlang" + | "actions" + | "pub" + | "other" + | "swift"; + /** @description A vulnerability describing the product and its affected versions within a GitHub Security Advisory. */ + vulnerability: { + /** @description The name of the package affected by the vulnerability. */ + package: { + ecosystem: components["schemas"]["security-advisory-ecosystems"]; + /** @description The unique package name within its ecosystem. */ + name: string | null; + } | null; + /** @description The range of the package versions affected by the vulnerability. */ + vulnerable_version_range: string | null; + /** @description The package version that resolves the vulnerability. */ + first_patched_version: string | null; + /** @description The functions in the package that are affected by the vulnerability. */ + vulnerable_functions: readonly string[] | null; + }; + /** + * Simple User + * @description A GitHub user. + */ + "simple-user": { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + }; + /** + * @description The type of credit the user is receiving. + * @enum {string} + */ + "security-advisory-credit-types": + | "analyst" + | "finder" + | "reporter" + | "coordinator" + | "remediation_developer" + | "remediation_reviewer" + | "remediation_verifier" + | "tool" + | "sponsor" + | "other"; + /** @description A GitHub Security Advisory. */ + "global-advisory": { + /** @description The GitHub Security Advisory ID. */ + ghsa_id: string; + /** @description The Common Vulnerabilities and Exposures (CVE) ID. */ + cve_id: string | null; + /** @description The API URL for the advisory. */ + url: string; + /** + * Format: uri + * @description The URL for the advisory. + */ + html_url: string; + /** + * Format: uri + * @description The API URL for the repository advisory. + */ + repository_advisory_url: string | null; + /** @description A short summary of the advisory. */ + summary: string; + /** @description A detailed description of what the advisory entails. */ + description: string | null; + /** + * @description The type of advisory. + * @enum {string} + */ + type: "reviewed" | "unreviewed" | "malware"; + /** + * @description The severity of the advisory. + * @enum {string} + */ + severity: "critical" | "high" | "medium" | "low" | "unknown"; + /** + * Format: uri + * @description The URL of the advisory's source code. + */ + source_code_location: string | null; + identifiers: + | readonly { + /** + * @description The type of identifier. + * @enum {string} + */ + type: "CVE" | "GHSA"; + /** @description The identifier value. */ + value: string; + }[] + | null; + references: string[] | null; + /** + * Format: date-time + * @description The date and time of when the advisory was published, in ISO 8601 format. + */ + published_at: string; + /** + * Format: date-time + * @description The date and time of when the advisory was last updated, in ISO 8601 format. + */ + updated_at: string; + /** + * Format: date-time + * @description The date and time of when the advisory was reviewed by GitHub, in ISO 8601 format. + */ + github_reviewed_at: string | null; + /** + * Format: date-time + * @description The date and time when the advisory was published in the National Vulnerability Database, in ISO 8601 format. + * This field is only populated when the advisory is imported from the National Vulnerability Database. + */ + nvd_published_at: string | null; + /** + * Format: date-time + * @description The date and time of when the advisory was withdrawn, in ISO 8601 format. + */ + withdrawn_at: string | null; + /** @description The products and respective version ranges affected by the advisory. */ + vulnerabilities: components["schemas"]["vulnerability"][] | null; + cvss: { + /** @description The CVSS vector. */ + vector_string: string | null; + /** @description The CVSS score. */ + score: number | null; + } | null; + cwes: + | { + /** @description The Common Weakness Enumeration (CWE) identifier. */ + cwe_id: string; + /** @description The name of the CWE. */ + name: string; + }[] + | null; + /** @description The users who contributed to the advisory. */ + credits: + | readonly { + user: components["schemas"]["simple-user"]; + type: components["schemas"]["security-advisory-credit-types"]; + }[] + | null; + }; + /** + * Basic Error + * @description Basic Error + */ + "basic-error": { + message?: string; + documentation_url?: string; + url?: string; + status?: string; + }; + /** + * Validation Error Simple + * @description Validation Error Simple + */ + "validation-error-simple": { + message: string; + documentation_url: string; + errors?: string[]; + }; + /** + * Simple User + * @description A GitHub user. + */ + "nullable-simple-user": { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + } | null; + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + integration: { + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number; + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string; + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string; + /** @example The description of the app. */ + description: string | null; + /** + * Format: uri + * @example https://example.com + */ + external_url: string; + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string; + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + issues?: string; + checks?: string; + metadata?: string; + contents?: string; + deployments?: string; + [key: string]: string | undefined; + }; + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[]; + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number; + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string; + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string; + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null; + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string; + } | null; + /** + * Format: uri + * @description The URL to which the payloads will be delivered. + * @example https://example.com/webhook + */ + "webhook-config-url": string; + /** + * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + * @example "json" + */ + "webhook-config-content-type": string; + /** + * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers). + * @example "********" + */ + "webhook-config-secret": string; + "webhook-config-insecure-ssl": string | number; + /** + * Webhook Configuration + * @description Configuration object of the webhook + */ + "webhook-config": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * Simple webhook delivery + * @description Delivery made by a webhook, without request and response information. + */ + "hook-delivery-item": { + /** + * @description Unique identifier of the webhook delivery. + * @example 42 + */ + id: number; + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string; + /** + * Format: date-time + * @description Time when the webhook delivery occurred. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string; + /** + * @description Whether the webhook delivery is a redelivery. + * @example false + */ + redelivery: boolean; + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number; + /** + * @description Describes the response returned after attempting the delivery. + * @example failed to connect + */ + status: string; + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number; + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string; + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null; + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null; + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null; + }; + /** + * Scim Error + * @description Scim Error + */ + "scim-error": { + message?: string | null; + documentation_url?: string | null; + detail?: string | null; + status?: number; + scimType?: string | null; + schemas?: string[]; + }; + /** + * Validation Error + * @description Validation Error + */ + "validation-error": { + message: string; + documentation_url: string; + errors?: { + resource?: string; + field?: string; + message?: string; + code: string; + index?: number; + value?: (string | null) | (number | null) | (string[] | null); + }[]; + }; + /** + * Webhook delivery + * @description Delivery made by a webhook. + */ + "hook-delivery": { + /** + * @description Unique identifier of the delivery. + * @example 42 + */ + id: number; + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string; + /** + * Format: date-time + * @description Time when the delivery was delivered. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string; + /** + * @description Whether the delivery is a redelivery. + * @example false + */ + redelivery: boolean; + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number; + /** + * @description Description of the status of the attempted delivery + * @example failed to connect + */ + status: string; + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number; + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string; + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null; + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null; + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null; + /** + * @description The URL target of the delivery. + * @example https://www.example.com + */ + url?: string; + request: { + /** @description The request headers sent with the webhook delivery. */ + headers: { + [key: string]: unknown; + } | null; + /** @description The webhook payload. */ + payload: { + [key: string]: unknown; + } | null; + }; + response: { + /** @description The response headers received when the delivery was made. */ + headers: { + [key: string]: unknown; + } | null; + /** @description The response payload received. */ + payload: string | null; + }; + }; + /** + * Enterprise + * @description An enterprise on GitHub. + */ + enterprise: { + /** @description A short description of the enterprise. */ + description?: string | null; + /** + * Format: uri + * @example https://github.com/enterprises/octo-business + */ + html_url: string; + /** + * Format: uri + * @description The enterprise's website URL. + */ + website_url?: string | null; + /** + * @description Unique identifier of the enterprise + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the enterprise. + * @example Octo Business + */ + name: string; + /** + * @description The slug url identifier for the enterprise. + * @example octo-business + */ + slug: string; + /** + * Format: date-time + * @example 2019-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2019-01-26T19:14:43Z + */ + updated_at: string | null; + /** Format: uri */ + avatar_url: string; + }; + /** + * Integration Installation Request + * @description Request to install an integration on a target + */ + "integration-installation-request": { + /** + * @description Unique identifier of the request installation. + * @example 42 + */ + id: number; + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id?: string; + account: + | components["schemas"]["simple-user"] + | components["schemas"]["enterprise"]; + requester: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @example 2022-07-08T16:18:44-04:00 + */ + created_at: string; + }; + /** + * App Permissions + * @description The permissions granted to the user access token. + * @example { + * "contents": "read", + * "issues": "read", + * "deployments": "write", + * "single_file": "read" + * } + */ + "app-permissions": { + /** + * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. + * @enum {string} + */ + actions?: "read" | "write"; + /** + * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. + * @enum {string} + */ + administration?: "read" | "write"; + /** + * @description The level of permission to grant the access token for checks on code. + * @enum {string} + */ + checks?: "read" | "write"; + /** + * @description The level of permission to grant the access token to create, edit, delete, and list Codespaces. + * @enum {string} + */ + codespaces?: "read" | "write"; + /** + * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. + * @enum {string} + */ + contents?: "read" | "write"; + /** + * @description The leve of permission to grant the access token to manage Dependabot secrets. + * @enum {string} + */ + dependabot_secrets?: "read" | "write"; + /** + * @description The level of permission to grant the access token for deployments and deployment statuses. + * @enum {string} + */ + deployments?: "read" | "write"; + /** + * @description The level of permission to grant the access token for managing repository environments. + * @enum {string} + */ + environments?: "read" | "write"; + /** + * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. + * @enum {string} + */ + issues?: "read" | "write"; + /** + * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. + * @enum {string} + */ + metadata?: "read" | "write"; + /** + * @description The level of permission to grant the access token for packages published to GitHub Packages. + * @enum {string} + */ + packages?: "read" | "write"; + /** + * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. + * @enum {string} + */ + pages?: "read" | "write"; + /** + * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. + * @enum {string} + */ + pull_requests?: "read" | "write"; + /** + * @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 {string} + */ + repository_custom_properties?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. + * @enum {string} + */ + repository_hooks?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage repository projects, columns, and cards. + * @enum {string} + */ + repository_projects?: "read" | "write" | "admin"; + /** + * @description The level of permission to grant the access token to view and manage secret scanning alerts. + * @enum {string} + */ + secret_scanning_alerts?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage repository secrets. + * @enum {string} + */ + secrets?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. + * @enum {string} + */ + security_events?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage just a single file. + * @enum {string} + */ + single_file?: "read" | "write"; + /** + * @description The level of permission to grant the access token for commit statuses. + * @enum {string} + */ + statuses?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage Dependabot alerts. + * @enum {string} + */ + vulnerability_alerts?: "read" | "write"; + /** + * @description The level of permission to grant the access token to update GitHub Actions workflow files. + * @enum {string} + */ + workflows?: "write"; + /** + * @description The level of permission to grant the access token for organization teams and members. + * @enum {string} + */ + members?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage access to an organization. + * @enum {string} + */ + organization_administration?: "read" | "write"; + /** + * @description The level of permission to grant the access token for custom repository roles management. + * @enum {string} + */ + organization_custom_roles?: "read" | "write"; + /** + * @description The level of permission to grant the access token for custom organization roles management. + * @enum {string} + */ + organization_custom_org_roles?: "read" | "write"; + /** + * @description The level of permission to grant the access token for custom property management. + * @enum {string} + */ + organization_custom_properties?: "read" | "write" | "admin"; + /** + * @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 {string} + */ + organization_copilot_seat_management?: "write"; + /** + * @description The level of permission to grant the access token to view and manage announcement banners for an organization. + * @enum {string} + */ + organization_announcement_banners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view events triggered by an activity in an organization. + * @enum {string} + */ + organization_events?: "read"; + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. + * @enum {string} + */ + organization_hooks?: "read" | "write"; + /** + * @description The level of permission to grant the access token for viewing and managing fine-grained personal access token requests to an organization. + * @enum {string} + */ + organization_personal_access_tokens?: "read" | "write"; + /** + * @description The level of permission to grant the access token for viewing and managing fine-grained personal access tokens that have been approved by an organization. + * @enum {string} + */ + organization_personal_access_token_requests?: "read" | "write"; + /** + * @description The level of permission to grant the access token for viewing an organization's plan. + * @enum {string} + */ + organization_plan?: "read"; + /** + * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). + * @enum {string} + */ + organization_projects?: "read" | "write" | "admin"; + /** + * @description The level of permission to grant the access token for organization packages published to GitHub Packages. + * @enum {string} + */ + organization_packages?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage organization secrets. + * @enum {string} + */ + organization_secrets?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. + * @enum {string} + */ + organization_self_hosted_runners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage users blocked by the organization. + * @enum {string} + */ + organization_user_blocking?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage team discussions and related comments. + * @enum {string} + */ + team_discussions?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the email addresses belonging to a user. + * @enum {string} + */ + email_addresses?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the followers belonging to a user. + * @enum {string} + */ + followers?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage git SSH keys. + * @enum {string} + */ + git_ssh_keys?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage GPG keys belonging to a user. + * @enum {string} + */ + gpg_keys?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage interaction limits on a repository. + * @enum {string} + */ + interaction_limits?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the profile settings belonging to a user. + * @enum {string} + */ + profile?: "write"; + /** + * @description The level of permission to grant the access token to list and manage repositories a user is starring. + * @enum {string} + */ + starring?: "read" | "write"; + }; + /** + * Installation + * @description Installation + */ + installation: { + /** + * @description The ID of the installation. + * @example 1 + */ + id: number; + account: + | ( + | components["schemas"]["simple-user"] + | components["schemas"]["enterprise"] + ) + | null; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** + * Format: uri + * @example https://api.github.com/app/installations/1/access_tokens + */ + access_tokens_url: string; + /** + * Format: uri + * @example https://api.github.com/installation/repositories + */ + repositories_url: string; + /** + * Format: uri + * @example https://github.com/organizations/github/settings/installations/1 + */ + html_url: string; + /** @example 1 */ + app_id: number; + /** @description The ID of the user or organization this token is being scoped to. */ + target_id: number; + /** @example Organization */ + target_type: string; + permissions: components["schemas"]["app-permissions"]; + events: string[]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** @example config.yaml */ + single_file_name: string | null; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + /** @example github-actions */ + app_slug: string; + suspended_by: components["schemas"]["nullable-simple-user"]; + /** Format: date-time */ + suspended_at: string | null; + /** @example "test_13f1e99741e3e004@d7e1eb0bc0a1ba12.com" */ + contact_email?: string | null; + }; + /** + * License Simple + * @description License Simple + */ + "nullable-license-simple": { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MIT */ + spdx_id: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** Format: uri */ + html_url?: string; + } | null; + /** + * Repository + * @description A repository on GitHub. + */ + repository: { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @deprecated + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether discussions are enabled. + * @default false + * @example true + */ + has_discussions?: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean; + }; + /** + * Installation Token + * @description Authentication token for a GitHub App installed on a user or org. + */ + "installation-token": { + token: string; + expires_at: string; + permissions?: components["schemas"]["app-permissions"]; + /** @enum {string} */ + repository_selection?: "all" | "selected"; + repositories?: components["schemas"]["repository"][]; + /** @example README.md */ + single_file?: string; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + }; + /** Scoped Installation */ + "nullable-scoped-installation": { + permissions: components["schemas"]["app-permissions"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** @example config.yaml */ + single_file_name: string | null; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repositories_url: string; + account: components["schemas"]["simple-user"]; + } | null; + /** + * Authorization + * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. + */ + authorization: { + id: number; + /** Format: uri */ + url: string; + /** @description A list of scopes that this authorization is in. */ + scopes: string[] | null; + token: string; + token_last_eight: string | null; + hashed_token: string | null; + app: { + client_id: string; + name: string; + /** Format: uri */ + url: string; + }; + note: string | null; + /** Format: uri */ + note_url: string | null; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + created_at: string; + fingerprint: string | null; + user?: components["schemas"]["nullable-simple-user"]; + installation?: components["schemas"]["nullable-scoped-installation"]; + /** Format: date-time */ + expires_at: string | null; + }; + /** + * Simple Classroom Repository + * @description A GitHub repository view for Classroom + */ + "simple-classroom-repository": { + /** + * @description A unique identifier of the repository. + * @example 1296269 + */ + id: number; + /** + * @description The full, globally unique name of the repository. + * @example octocat/Hello-World + */ + full_name: string; + /** + * Format: uri + * @description The URL to view the repository on GitHub.com. + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** + * @description The GraphQL identifier of the repository. + * @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + */ + node_id: string; + /** @description Whether the repository is private. */ + private: boolean; + /** + * @description The default branch for the repository. + * @example main + */ + default_branch: string; + }; + /** + * Organization Simple for Classroom + * @description A GitHub organization. + */ + "simple-classroom-organization": { + /** @example 1 */ + id: number; + /** @example github */ + login: string; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/github + */ + html_url: string; + /** @example Github - Code thigns happen here */ + name: string | null; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + }; + /** + * Classroom + * @description A GitHub Classroom classroom + */ + classroom: { + /** + * @description Unique identifier of the classroom. + * @example 42 + */ + id: number; + /** + * @description The name of the classroom. + * @example Programming Elixir + */ + name: string; + /** + * @description Whether classroom is archived. + * @example false + */ + archived: boolean; + organization: components["schemas"]["simple-classroom-organization"]; + /** + * @description The URL of the classroom on GitHub Classroom. + * @example https://classroom.github.com/classrooms/1-programming-elixir + */ + url: string; + }; + /** + * Classroom Assignment + * @description A GitHub Classroom assignment + */ + "classroom-assignment": { + /** + * @description Unique identifier of the repository. + * @example 42 + */ + id: number; + /** + * @description Whether an accepted assignment creates a public repository. + * @example true + */ + public_repo: boolean; + /** + * @description Assignment title. + * @example Intro to Binaries + */ + title: string; + /** + * @description Whether it's a group assignment or individual assignment. + * @example individual + * @enum {string} + */ + type: "individual" | "group"; + /** + * @description The link that a student can use to accept the assignment. + * @example https://classroom.github.com/a/Lx7jiUgx + */ + invite_link: string; + /** + * @description Whether the invitation link is enabled. Visiting an enabled invitation link will accept the assignment. + * @example true + */ + invitations_enabled: boolean; + /** + * @description Sluggified name of the assignment. + * @example intro-to-binaries + */ + slug: string; + /** + * @description Whether students are admins on created repository when a student accepts the assignment. + * @example true + */ + students_are_repo_admins: boolean; + /** + * @description Whether feedback pull request will be created when a student accepts the assignment. + * @example true + */ + feedback_pull_requests_enabled: boolean; + /** + * @description The maximum allowable teams for the assignment. + * @example 0 + */ + max_teams: number | null; + /** + * @description The maximum allowable members per team. + * @example 0 + */ + max_members: number | null; + /** + * @description The selected editor for the assignment. + * @example codespaces + */ + editor: string; + /** + * @description The number of students that have accepted the assignment. + * @example 25 + */ + accepted: number; + /** + * @description The number of students that have submitted the assignment. + * @example 10 + */ + submitted: number; + /** + * @description The number of students that have passed the assignment. + * @example 10 + */ + passing: number; + /** + * @description The programming language used in the assignment. + * @example elixir + */ + language: string; + /** + * Format: date-time + * @description The time at which the assignment is due. + * @example 2011-01-26T19:06:43Z + */ + deadline: string | null; + starter_code_repository: components["schemas"]["simple-classroom-repository"]; + classroom: components["schemas"]["classroom"]; + }; + /** + * Simple Classroom User + * @description A GitHub user simplified for Classroom. + */ + "simple-classroom-user": { + /** @example 1 */ + id: number; + /** @example octocat */ + login: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + }; + /** + * Simple Classroom + * @description A GitHub Classroom classroom + */ + "simple-classroom": { + /** + * @description Unique identifier of the classroom. + * @example 42 + */ + id: number; + /** + * @description The name of the classroom. + * @example Programming Elixir + */ + name: string; + /** + * @description Returns whether classroom is archived or not. + * @example false + */ + archived: boolean; + /** + * @description The url of the classroom on GitHub Classroom. + * @example https://classroom.github.com/classrooms/1-programming-elixir + */ + url: string; + }; + /** + * Simple Classroom Assignment + * @description A GitHub Classroom assignment + */ + "simple-classroom-assignment": { + /** + * @description Unique identifier of the repository. + * @example 42 + */ + id: number; + /** + * @description Whether an accepted assignment creates a public repository. + * @example true + */ + public_repo: boolean; + /** + * @description Assignment title. + * @example Intro to Binaries + */ + title: string; + /** + * @description Whether it's a Group Assignment or Individual Assignment. + * @example individual + * @enum {string} + */ + type: "individual" | "group"; + /** + * @description The link that a student can use to accept the assignment. + * @example https://classroom.github.com/a/Lx7jiUgx + */ + invite_link: string; + /** + * @description Whether the invitation link is enabled. Visiting an enabled invitation link will accept the assignment. + * @example true + */ + invitations_enabled: boolean; + /** + * @description Sluggified name of the assignment. + * @example intro-to-binaries + */ + slug: string; + /** + * @description Whether students are admins on created repository on accepted assignment. + * @example true + */ + students_are_repo_admins: boolean; + /** + * @description Whether feedback pull request will be created on assignment acceptance. + * @example true + */ + feedback_pull_requests_enabled: boolean; + /** + * @description The maximum allowable teams for the assignment. + * @example 0 + */ + max_teams?: number | null; + /** + * @description The maximum allowable members per team. + * @example 0 + */ + max_members?: number | null; + /** + * @description The selected editor for the assignment. + * @example codespaces + */ + editor: string; + /** + * @description The number of students that have accepted the assignment. + * @example 25 + */ + accepted: number; + /** + * @description The number of students that have submitted the assignment. + * @example 10 + */ + submitted: number; + /** + * @description The number of students that have passed the assignment. + * @example 10 + */ + passing: number; + /** + * @description The programming language used in the assignment. + * @example elixir + */ + language: string; + /** + * Format: date-time + * @description The time at which the assignment is due. + * @example 2011-01-26T19:06:43Z + */ + deadline: string | null; + classroom: components["schemas"]["simple-classroom"]; + }; + /** + * Classroom Accepted Assignment + * @description A GitHub Classroom accepted assignment + */ + "classroom-accepted-assignment": { + /** + * @description Unique identifier of the repository. + * @example 42 + */ + id: number; + /** + * @description Whether an accepted assignment has been submitted. + * @example true + */ + submitted: boolean; + /** + * @description Whether a submission passed. + * @example true + */ + passing: boolean; + /** + * @description Count of student commits. + * @example 5 + */ + commit_count: number; + /** + * @description Most recent grade. + * @example 10/10 + */ + grade: string; + students: components["schemas"]["simple-classroom-user"][]; + repository: components["schemas"]["simple-classroom-repository"]; + assignment: components["schemas"]["simple-classroom-assignment"]; + }; + /** + * Classroom Assignment Grade + * @description Grade for a student or groups GitHub Classroom assignment + */ + "classroom-assignment-grade": { + /** @description Name of the assignment */ + assignment_name: string; + /** @description URL of the assignment */ + assignment_url: string; + /** @description URL of the starter code for the assignment */ + starter_code_url: string; + /** @description GitHub username of the student */ + github_username: string; + /** @description Roster identifier of the student */ + roster_identifier: string; + /** @description Name of the student's assignment repository */ + student_repository_name: string; + /** @description URL of the student's assignment repository */ + student_repository_url: string; + /** @description Timestamp of the student's assignment submission */ + submission_timestamp: string; + /** @description Number of points awarded to the student */ + points_awarded: number; + /** @description Number of points available for the assignment */ + points_available: number; + /** @description If a group assignment, name of the group the student is in */ + group_name?: string; + }; + /** + * Code Of Conduct + * @description Code Of Conduct + */ + "code-of-conduct": { + /** @example contributor_covenant */ + key: string; + /** @example Contributor Covenant */ + name: string; + /** + * Format: uri + * @example https://api.github.com/codes_of_conduct/contributor_covenant + */ + url: string; + /** + * @example # Contributor Covenant Code of Conduct + * + * ## Our Pledge + * + * In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + * + * ## Our Standards + * + * Examples of behavior that contributes to creating a positive environment include: + * + * * Using welcoming and inclusive language + * * Being respectful of differing viewpoints and experiences + * * Gracefully accepting constructive criticism + * * Focusing on what is best for the community + * * Showing empathy towards other community members + * + * Examples of unacceptable behavior by participants include: + * + * * The use of sexualized language or imagery and unwelcome sexual attention or advances + * * Trolling, insulting/derogatory comments, and personal or political attacks + * * Public or private harassment + * * Publishing others' private information, such as a physical or electronic address, without explicit permission + * * Other conduct which could reasonably be considered inappropriate in a professional setting + * + * ## Our Responsibilities + * + * Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response + * to any instances of unacceptable behavior. + * + * Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + * + * ## Scope + * + * This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, + * posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + * + * ## Enforcement + * + * Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [EMAIL]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + * + * Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + * + * ## Attribution + * + * This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.4, available at [http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4/). + */ + body?: string; + /** Format: uri */ + html_url: string | null; + }; + /** + * Copilot Usage Metrics + * @description Summary of Copilot usage. + */ + "copilot-usage-metrics": { + /** + * Format: date + * @description The date for which the usage metrics are reported, in `YYYY-MM-DD` format. + */ + day: string; + /** @description The total number of Copilot code completion suggestions shown to users. */ + total_suggestions_count?: number; + /** @description The total number of Copilot code completion suggestions accepted by users. */ + total_acceptances_count?: number; + /** @description The total number of lines of code completions suggested by Copilot. */ + total_lines_suggested?: number; + /** @description The total number of lines of code completions accepted by users. */ + total_lines_accepted?: number; + /** @description The total number of users who were shown Copilot code completion suggestions during the day specified. */ + total_active_users?: number; + /** @description The total instances of users who accepted code suggested by Copilot Chat in the IDE (panel and inline). */ + total_chat_acceptances?: number; + /** @description The total number of chat turns (prompt and response pairs) sent between users and Copilot Chat in the IDE. */ + total_chat_turns?: number; + /** @description The total number of users who interacted with Copilot Chat in the IDE during the day specified. */ + total_active_chat_users?: number; + /** @description Breakdown of Copilot code completions usage by language and editor */ + breakdown: + | { + /** @description The language in which Copilot suggestions were shown to users in the specified editor. */ + language?: string; + /** @description The editor in which Copilot suggestions were shown to users for the specified language. */ + editor?: string; + /** @description The number of Copilot suggestions shown to users in the editor specified during the day specified. */ + suggestions_count?: number; + /** @description The number of Copilot suggestions accepted by users in the editor specified during the day specified. */ + acceptances_count?: number; + /** @description The number of lines of code suggested by Copilot in the editor specified during the day specified. */ + lines_suggested?: number; + /** @description The number of lines of code accepted by users in the editor specified during the day specified. */ + lines_accepted?: number; + /** @description The number of users who were shown Copilot completion suggestions in the editor specified during the day specified. */ + active_users?: number; + [key: string]: unknown; + }[] + | null; + }; + /** @description The security alert number. */ + readonly "alert-number": number; + /** @description Details for the vulnerable package. */ + readonly "dependabot-alert-package": { + /** @description The package's language or package management ecosystem. */ + readonly ecosystem: string; + /** @description The unique package name within its ecosystem. */ + readonly name: string; + }; + /** @description Details pertaining to one vulnerable version range for the advisory. */ + readonly "dependabot-alert-security-vulnerability": { + readonly package: components["schemas"]["dependabot-alert-package"]; + /** + * @description The severity of the vulnerability. + * @enum {string} + */ + readonly severity: "low" | "medium" | "high" | "critical"; + /** @description Conditions that identify vulnerable versions of this vulnerability's package. */ + readonly vulnerable_version_range: string; + /** @description Details pertaining to the package version that patches this vulnerability. */ + readonly first_patched_version: { + /** @description The package version that patches this vulnerability. */ + readonly identifier: string; + } | null; + }; + /** @description Details for the GitHub Security Advisory. */ + readonly "dependabot-alert-security-advisory": { + /** @description The unique GitHub Security Advisory ID assigned to the advisory. */ + readonly ghsa_id: string; + /** @description The unique CVE ID assigned to the advisory. */ + readonly cve_id: string | null; + /** @description A short, plain text summary of the advisory. */ + readonly summary: string; + /** @description A long-form Markdown-supported description of the advisory. */ + readonly description: string; + /** @description Vulnerable version range information for the advisory. */ + readonly vulnerabilities: readonly components["schemas"]["dependabot-alert-security-vulnerability"][]; + /** + * @description The severity of the advisory. + * @enum {string} + */ + readonly severity: "low" | "medium" | "high" | "critical"; + /** @description Details for the advisory pertaining to the Common Vulnerability Scoring System. */ + readonly cvss: { + /** @description The overall CVSS score of the advisory. */ + readonly score: number; + /** @description The full CVSS vector string for the advisory. */ + readonly vector_string: string | null; + }; + /** @description Details for the advisory pertaining to Common Weakness Enumeration. */ + readonly cwes: readonly { + /** @description The unique CWE ID. */ + readonly cwe_id: string; + /** @description The short, plain text name of the CWE. */ + readonly name: string; + }[]; + /** @description Values that identify this advisory among security information sources. */ + readonly identifiers: readonly { + /** + * @description The type of advisory identifier. + * @enum {string} + */ + readonly type: "CVE" | "GHSA"; + /** @description The value of the advisory identifer. */ + readonly value: string; + }[]; + /** @description Links to additional advisory information. */ + readonly references: readonly { + /** + * Format: uri + * @description The URL of the reference. + */ + readonly url: string; + }[]; + /** + * Format: date-time + * @description The time that the advisory was published in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + readonly published_at: string; + /** + * Format: date-time + * @description The time that the advisory was last modified in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + readonly updated_at: string; + /** + * Format: date-time + * @description The time that the advisory was withdrawn in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + readonly withdrawn_at: string | null; + }; + /** + * Format: uri + * @description The REST API URL of the alert resource. + */ + readonly "alert-url": string; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + readonly "alert-html-url": string; + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + readonly "alert-created-at": string; + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + readonly "alert-updated-at": string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + readonly "alert-dismissed-at": string | null; + /** + * Format: date-time + * @description The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + readonly "alert-fixed-at": string | null; + /** + * Format: date-time + * @description The time that the alert was auto-dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + readonly "alert-auto-dismissed-at": string | null; + /** + * Simple Repository + * @description A GitHub repository. + */ + "simple-repository": { + /** + * @description A unique identifier of the repository. + * @example 1296269 + */ + id: number; + /** + * @description The GraphQL identifier of the repository. + * @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + */ + node_id: string; + /** + * @description The name of the repository. + * @example Hello-World + */ + name: string; + /** + * @description The full, globally unique, name of the repository. + * @example octocat/Hello-World + */ + full_name: string; + owner: components["schemas"]["simple-user"]; + /** @description Whether the repository is private. */ + private: boolean; + /** + * Format: uri + * @description The URL to view the repository on GitHub.com. + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** + * @description The repository description. + * @example This your first repo! + */ + description: string | null; + /** @description Whether the repository is a fork. */ + fork: boolean; + /** + * Format: uri + * @description The URL to get more information about the repository from the GitHub API. + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** + * @description A template for the API URL to download the repository as an archive. + * @example https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + */ + archive_url: string; + /** + * @description A template for the API URL to list the available assignees for issues in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/assignees{/user} + */ + assignees_url: string; + /** + * @description A template for the API URL to create or retrieve a raw Git blob in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + */ + blobs_url: string; + /** + * @description A template for the API URL to get information about branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/branches{/branch} + */ + branches_url: string; + /** + * @description A template for the API URL to get information about collaborators of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + */ + collaborators_url: string; + /** + * @description A template for the API URL to get information about comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/comments{/number} + */ + comments_url: string; + /** + * @description A template for the API URL to get information about commits on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/commits{/sha} + */ + commits_url: string; + /** + * @description A template for the API URL to compare two commits or refs. + * @example https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + */ + compare_url: string; + /** + * @description A template for the API URL to get the contents of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contents/{+path} + */ + contents_url: string; + /** + * Format: uri + * @description A template for the API URL to list the contributors to the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @description The API URL to list the deployments of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @description The API URL to list the downloads on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @description The API URL to list the events of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @description The API URL to list the forks of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** + * @description A template for the API URL to get information about Git commits of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + */ + git_commits_url: string; + /** + * @description A template for the API URL to get information about Git refs of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + */ + git_refs_url: string; + /** + * @description A template for the API URL to get information about Git tags of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + */ + git_tags_url: string; + /** + * @description A template for the API URL to get information about issue comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + */ + issue_comment_url: string; + /** + * @description A template for the API URL to get information about issue events on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/events{/number} + */ + issue_events_url: string; + /** + * @description A template for the API URL to get information about issues on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues{/number} + */ + issues_url: string; + /** + * @description A template for the API URL to get information about deploy keys on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/keys{/key_id} + */ + keys_url: string; + /** + * @description A template for the API URL to get information about labels of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/labels{/name} + */ + labels_url: string; + /** + * Format: uri + * @description The API URL to get information about the languages of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @description The API URL to merge branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** + * @description A template for the API URL to get information about milestones of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/milestones{/number} + */ + milestones_url: string; + /** + * @description A template for the API URL to get information about notifications on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + */ + notifications_url: string; + /** + * @description A template for the API URL to get information about pull requests on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/pulls{/number} + */ + pulls_url: string; + /** + * @description A template for the API URL to get information about releases on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/releases{/id} + */ + releases_url: string; + /** + * Format: uri + * @description The API URL to list the stargazers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** + * @description A template for the API URL to get information about statuses of a commit. + * @example https://api.github.com/repos/octocat/Hello-World/statuses/{sha} + */ + statuses_url: string; + /** + * Format: uri + * @description The API URL to list the subscribers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @description The API URL to subscribe to notifications for this repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @description The API URL to get information about tags on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @description The API URL to list the teams on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** + * @description A template for the API URL to create or retrieve a raw Git tree of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} + */ + trees_url: string; + /** + * Format: uri + * @description The API URL to list the hooks on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + }; + /** @description A Dependabot alert. */ + "dependabot-alert-with-repository": { + number: components["schemas"]["alert-number"]; + /** + * @description The state of the Dependabot alert. + * @enum {string} + */ + state: "auto_dismissed" | "dismissed" | "fixed" | "open"; + /** @description Details for the vulnerable dependency. */ + dependency: { + readonly package?: components["schemas"]["dependabot-alert-package"]; + /** @description The full path to the dependency manifest file, relative to the root of the repository. */ + readonly manifest_path?: string; + /** + * @description The execution scope of the vulnerable dependency. + * @enum {string|null} + */ + readonly scope?: "development" | "runtime" | null; + }; + security_advisory: components["schemas"]["dependabot-alert-security-advisory"]; + security_vulnerability: components["schemas"]["dependabot-alert-security-vulnerability"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at: components["schemas"]["alert-updated-at"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + /** + * @description The reason that the alert was dismissed. + * @enum {string|null} + */ + dismissed_reason: + | "fix_started" + | "inaccurate" + | "no_bandwidth" + | "not_used" + | "tolerable_risk" + | null; + /** @description An optional comment associated with the alert's dismissal. */ + dismissed_comment: string | null; + fixed_at: components["schemas"]["alert-fixed-at"]; + auto_dismissed_at?: components["schemas"]["alert-auto-dismissed-at"]; + repository: components["schemas"]["simple-repository"]; + }; + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + readonly "nullable-alert-updated-at": string | null; + /** + * @description Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. + * @enum {string} + */ + "secret-scanning-alert-state": "open" | "resolved"; + /** + * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. + * @enum {string|null} + */ + "secret-scanning-alert-resolution": + | "false_positive" + | "wont_fix" + | "revoked" + | "used_in_tests" + | null; + "organization-secret-scanning-alert": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["nullable-alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + /** @description The secret that was detected. */ + secret?: string; + repository?: components["schemas"]["simple-repository"]; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + /** @description The comment that was optionally added when this alert was closed */ + resolution_comment?: string | null; + /** + * @description The token status as of the latest validity check. + * @enum {string} + */ + validity?: "active" | "inactive" | "unknown"; + }; + /** + * Actor + * @description Actor + */ + actor: { + id: number; + login: string; + display_login?: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + avatar_url: string; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + "nullable-milestone": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string; + /** @example 1002604 */ + id: number; + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string; + /** + * @description The number of the milestone. + * @example 42 + */ + number: number; + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string; + /** @example Tracking milestone for version 1.0 */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** @example 4 */ + open_issues: number; + /** @example 8 */ + closed_issues: number; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null; + } | null; + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + "nullable-integration": { + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number; + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string; + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string; + /** @example The description of the app. */ + description: string | null; + /** + * Format: uri + * @example https://example.com + */ + external_url: string; + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string; + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + issues?: string; + checks?: string; + metadata?: string; + contents?: string; + deployments?: string; + [key: string]: string | undefined; + }; + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[]; + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number; + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string; + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string; + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null; + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string; + } | null; + /** + * author_association + * @description How the author is associated with the repository. + * @example OWNER + * @enum {string} + */ + "author-association": + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** Reaction Rollup */ + "reaction-rollup": { + /** Format: uri */ + url: string; + total_count: number; + "+1": number; + "-1": number; + laugh: number; + confused: number; + heart: number; + hooray: number; + eyes: number; + rocket: number; + }; + /** + * Issue + * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + */ + issue: { + /** Format: int64 */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue + * @example https://api.github.com/repositories/42/issues/1 + */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** + * @description Number uniquely identifying the issue within its repository + * @example 42 + */ + number: number; + /** + * @description State of the issue; either 'open' or 'closed' + * @example open + */ + state: string; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: "completed" | "reopened" | "not_planned" | null; + /** + * @description Title of the issue + * @example Widget creation fails in Safari on OS X 10.8 + */ + title: string; + /** + * @description Contents of the issue + * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? + */ + body?: string | null; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + * @example [ + * "bug", + * "registration" + * ] + */ + labels: OneOf< + [ + string, + { + /** Format: int64 */ + id?: number; + node_id?: string; + /** Format: uri */ + url?: string; + name?: string; + description?: string | null; + color?: string | null; + default?: boolean; + }, + ] + >[]; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + milestone: components["schemas"]["nullable-milestone"]; + locked: boolean; + active_lock_reason?: string | null; + comments: number; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + /** Format: date-time */ + closed_at: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + draft?: boolean; + closed_by?: components["schemas"]["nullable-simple-user"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Issue Comment + * @description Comments provide a way for people to collaborate on an issue. + */ + "issue-comment": { + /** + * Format: int64 + * @description Unique identifier of the issue comment + * @example 42 + */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue comment + * @example https://api.github.com/repositories/42/issues/comments/1 + */ + url: string; + /** + * @description Contents of the issue comment + * @example What version of Safari were you using when you observed this bug? + */ + body?: string; + body_text?: string; + body_html?: string; + /** Format: uri */ + html_url: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** Format: uri */ + issue_url: string; + author_association: components["schemas"]["author-association"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Event + * @description Event + */ + event: { + id: string; + type: string | null; + actor: components["schemas"]["actor"]; + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + org?: components["schemas"]["actor"]; + payload: { + action?: string; + issue?: components["schemas"]["issue"]; + comment?: components["schemas"]["issue-comment"]; + pages?: { + page_name?: string; + title?: string; + summary?: string | null; + action?: string; + sha?: string; + html_url?: string; + }[]; + }; + public: boolean; + /** Format: date-time */ + created_at: string | null; + }; + /** + * Link With Type + * @description Hypermedia Link with Type + */ + "link-with-type": { + href: string; + type: string; + }; + /** + * Feed + * @description Feed + */ + feed: { + /** @example https://github.com/timeline */ + timeline_url: string; + /** @example https://github.com/{user} */ + user_url: string; + /** @example https://github.com/octocat */ + current_user_public_url?: string; + /** @example https://github.com/octocat.private?token=abc123 */ + current_user_url?: string; + /** @example https://github.com/octocat.private.actor?token=abc123 */ + current_user_actor_url?: string; + /** @example https://github.com/octocat-org */ + current_user_organization_url?: string; + /** + * @example [ + * "https://github.com/organizations/github/octocat.private.atom?token=abc123" + * ] + */ + current_user_organization_urls?: string[]; + /** @example https://github.com/security-advisories */ + security_advisories_url?: string; + /** + * @description A feed of discussions for a given repository. + * @example https://github.com/{user}/{repo}/discussions + */ + repository_discussions_url?: string; + /** + * @description A feed of discussions for a given repository and category. + * @example https://github.com/{user}/{repo}/discussions/categories/{category} + */ + repository_discussions_category_url?: string; + _links: { + timeline: components["schemas"]["link-with-type"]; + user: components["schemas"]["link-with-type"]; + security_advisories?: components["schemas"]["link-with-type"]; + current_user?: components["schemas"]["link-with-type"]; + current_user_public?: components["schemas"]["link-with-type"]; + current_user_actor?: components["schemas"]["link-with-type"]; + current_user_organization?: components["schemas"]["link-with-type"]; + current_user_organizations?: components["schemas"]["link-with-type"][]; + repository_discussions?: components["schemas"]["link-with-type"]; + repository_discussions_category?: components["schemas"]["link-with-type"]; + }; + }; + /** + * Base Gist + * @description Base Gist + */ + "base-gist": { + /** Format: uri */ + url: string; + /** Format: uri */ + forks_url: string; + /** Format: uri */ + commits_url: string; + id: string; + node_id: string; + /** Format: uri */ + git_pull_url: string; + /** Format: uri */ + git_push_url: string; + /** Format: uri */ + html_url: string; + files: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + }; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: string | null; + comments: number; + user: components["schemas"]["nullable-simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + forks?: unknown[]; + history?: unknown[]; + }; + /** + * Public User + * @description Public User + */ + "public-user": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + repos_url: string; + events_url: string; + /** Format: uri */ + received_events_url: string; + type: string; + site_admin: boolean; + name: string | null; + company: string | null; + blog: string | null; + location: string | null; + /** Format: email */ + email: string | null; + hireable: boolean | null; + bio: string | null; + twitter_username?: string | null; + public_repos: number; + public_gists: number; + followers: number; + following: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + }; + /** Format: date-time */ + suspended_at?: string | null; + /** @example 1 */ + private_gists?: number; + /** @example 2 */ + total_private_repos?: number; + /** @example 2 */ + owned_private_repos?: number; + /** @example 1 */ + disk_usage?: number; + /** @example 3 */ + collaborators?: number; + }; + /** + * Gist History + * @description Gist History + */ + "gist-history": { + user?: components["schemas"]["nullable-simple-user"]; + version?: string; + /** Format: date-time */ + committed_at?: string; + change_status?: { + total?: number; + additions?: number; + deletions?: number; + }; + /** Format: uri */ + url?: string; + }; + /** + * Gist Simple + * @description Gist Simple + */ + "gist-simple": { + /** @deprecated */ + forks?: + | { + id?: string; + /** Format: uri */ + url?: string; + user?: components["schemas"]["public-user"]; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }[] + | null; + /** @deprecated */ + history?: components["schemas"]["gist-history"][] | null; + /** + * Gist + * @description Gist + */ + fork_of?: { + /** Format: uri */ + url: string; + /** Format: uri */ + forks_url: string; + /** Format: uri */ + commits_url: string; + id: string; + node_id: string; + /** Format: uri */ + git_pull_url: string; + /** Format: uri */ + git_push_url: string; + /** Format: uri */ + html_url: string; + files: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + }; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: string | null; + comments: number; + user: components["schemas"]["nullable-simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: components["schemas"]["nullable-simple-user"]; + truncated?: boolean; + forks?: unknown[]; + history?: unknown[]; + } | null; + url?: string; + forks_url?: string; + commits_url?: string; + id?: string; + node_id?: string; + git_pull_url?: string; + git_push_url?: string; + html_url?: string; + files?: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + truncated?: boolean; + content?: string; + } | null; + }; + public?: boolean; + created_at?: string; + updated_at?: string; + description?: string | null; + comments?: number; + user?: string | null; + comments_url?: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + }; + /** + * Gist Comment + * @description A comment made to a gist. + */ + "gist-comment": { + /** @example 1 */ + id: number; + /** @example MDExOkdpc3RDb21tZW50MQ== */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/gists/a6db0bec360bb87e9418/comments/1 + */ + url: string; + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + updated_at: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Gist Commit + * @description Gist Commit + */ + "gist-commit": { + /** + * Format: uri + * @example https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f + */ + url: string; + /** @example 57a7f021a713b1c5a6a199b54cc514735d2d462f */ + version: string; + user: components["schemas"]["nullable-simple-user"]; + change_status: { + total?: number; + additions?: number; + deletions?: number; + }; + /** + * Format: date-time + * @example 2010-04-14T02:15:15Z + */ + committed_at: string; + }; + /** + * Gitignore Template + * @description Gitignore Template + */ + "gitignore-template": { + /** @example C */ + name: string; + /** + * @example # Object files + * *.o + * + * # Libraries + * *.lib + * *.a + * + * # Shared objects (inc. Windows DLLs) + * *.dll + * *.so + * *.so.* + * *.dylib + * + * # Executables + * *.exe + * *.out + * *.app + */ + source: string; + }; + /** + * License Simple + * @description License Simple + */ + "license-simple": { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MIT */ + spdx_id: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** Format: uri */ + html_url?: string; + }; + /** + * License + * @description License + */ + license: { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** @example MIT */ + spdx_id: string | null; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** + * Format: uri + * @example http://choosealicense.com/licenses/mit/ + */ + html_url: string; + /** @example A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty. */ + description: string; + /** @example Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders. */ + implementation: string; + /** + * @example [ + * "commercial-use", + * "modifications", + * "distribution", + * "sublicense", + * "private-use" + * ] + */ + permissions: string[]; + /** + * @example [ + * "include-copyright" + * ] + */ + conditions: string[]; + /** + * @example [ + * "no-liability" + * ] + */ + limitations: string[]; + /** + * @example + * + * The MIT License (MIT) + * + * Copyright (c) [year] [fullname] + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + body: string; + /** @example true */ + featured: boolean; + }; + /** + * Marketplace Listing Plan + * @description Marketplace Listing Plan + */ + "marketplace-listing-plan": { + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313/accounts + */ + accounts_url: string; + /** @example 1313 */ + id: number; + /** @example 3 */ + number: number; + /** @example Pro */ + name: string; + /** @example A professional-grade CI solution */ + description: string; + /** @example 1099 */ + monthly_price_in_cents: number; + /** @example 11870 */ + yearly_price_in_cents: number; + /** + * @example FLAT_RATE + * @enum {string} + */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + /** @example true */ + has_free_trial: boolean; + unit_name: string | null; + /** @example published */ + state: string; + /** + * @example [ + * "Up to 25 private repositories", + * "11 concurrent builds" + * ] + */ + bullets: string[]; + }; + /** + * Marketplace Purchase + * @description Marketplace Purchase + */ + "marketplace-purchase": { + url: string; + type: string; + id: number; + login: string; + organization_billing_email?: string; + email?: string | null; + marketplace_pending_change?: { + is_installed?: boolean; + effective_date?: string; + unit_count?: number | null; + id?: number; + plan?: components["schemas"]["marketplace-listing-plan"]; + } | null; + marketplace_purchase: { + billing_cycle?: string; + next_billing_date?: string | null; + is_installed?: boolean; + unit_count?: number | null; + on_free_trial?: boolean; + free_trial_ends_on?: string | null; + updated_at?: string; + plan?: components["schemas"]["marketplace-listing-plan"]; + }; + }; + /** + * Api Overview + * @description Api Overview + */ + "api-overview": { + /** @example true */ + verifiable_password_authentication: boolean; + ssh_key_fingerprints?: { + SHA256_RSA?: string; + SHA256_DSA?: string; + SHA256_ECDSA?: string; + SHA256_ED25519?: string; + }; + /** + * @example [ + * "ssh-ed25519 ABCDEFGHIJKLMNOPQRSTUVWXYZ" + * ] + */ + ssh_keys?: string[]; + /** + * @example [ + * "192.0.2.1" + * ] + */ + hooks?: string[]; + /** + * @example [ + * "192.0.2.1" + * ] + */ + github_enterprise_importer?: string[]; + /** + * @example [ + * "192.0.2.1" + * ] + */ + web?: string[]; + /** + * @example [ + * "192.0.2.1" + * ] + */ + api?: string[]; + /** + * @example [ + * "192.0.2.1" + * ] + */ + git?: string[]; + /** + * @example [ + * "192.0.2.1" + * ] + */ + packages?: string[]; + /** + * @example [ + * "192.0.2.1" + * ] + */ + pages?: string[]; + /** + * @example [ + * "192.0.2.1" + * ] + */ + importer?: string[]; + /** + * @example [ + * "192.0.2.1" + * ] + */ + actions?: string[]; + /** + * @example [ + * "192.0.2.1" + * ] + */ + dependabot?: string[]; + domains?: { + website?: string[]; + codespaces?: string[]; + copilot?: string[]; + packages?: string[]; + actions?: string[]; + }; + }; + "security-and-analysis": { + advanced_security?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + /** @description Enable or disable Dependabot security updates for the repository. */ + dependabot_security_updates?: { + /** + * @description The enablement status of Dependabot security updates for the repository. + * @enum {string} + */ + status?: "enabled" | "disabled"; + }; + secret_scanning?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + secret_scanning_push_protection?: { + /** @enum {string} */ + status?: "enabled" | "disabled"; + }; + } | null; + /** + * Minimal Repository + * @description Minimal Repository + */ + "minimal-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + git_url?: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + ssh_url?: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + clone_url?: string; + mirror_url?: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + svn_url?: string; + homepage?: string | null; + language?: string | null; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + /** @description The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. */ + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + has_discussions?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + /** @example admin */ + role_name?: string; + temp_clone_token?: string; + delete_branch_on_merge?: boolean; + subscribers_count?: number; + network_count?: number; + code_of_conduct?: components["schemas"]["code-of-conduct"]; + license?: { + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } | null; + /** @example 0 */ + forks?: number; + /** @example 0 */ + open_issues?: number; + /** @example 0 */ + watchers?: number; + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + security_and_analysis?: components["schemas"]["security-and-analysis"]; + }; + /** + * Thread + * @description Thread + */ + thread: { + id: string; + repository: components["schemas"]["minimal-repository"]; + subject: { + title: string; + url: string; + latest_comment_url: string; + type: string; + }; + reason: string; + unread: boolean; + updated_at: string; + last_read_at: string | null; + url: string; + /** @example https://api.github.com/notifications/threads/2/subscription */ + subscription_url: string; + }; + /** + * Thread Subscription + * @description Thread Subscription + */ + "thread-subscription": { + /** @example true */ + subscribed: boolean; + ignored: boolean; + reason: string | null; + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string | null; + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1/subscription + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1 + */ + thread_url?: string; + /** + * Format: uri + * @example https://api.github.com/repos/1 + */ + repository_url?: string; + }; + /** + * Organization Simple + * @description A GitHub organization. + */ + "organization-simple": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + }; + /** + * Organization Full + * @description Organization Full + */ + "organization-full": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + /** @example github */ + name?: string; + /** @example GitHub */ + company?: string; + /** + * Format: uri + * @example https://github.com/blog + */ + blog?: string; + /** @example San Francisco */ + location?: string; + /** + * Format: email + * @example octocat@github.com + */ + email?: string; + /** @example github */ + twitter_username?: string | null; + /** @example true */ + is_verified?: boolean; + /** @example true */ + has_organization_projects: boolean; + /** @example true */ + has_repository_projects: boolean; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** @example Organization */ + type: string; + /** @example 100 */ + total_private_repos?: number; + /** @example 100 */ + owned_private_repos?: number; + /** @example 81 */ + private_gists?: number | null; + /** @example 10000 */ + disk_usage?: number | null; + /** @example 8 */ + collaborators?: number | null; + /** + * Format: email + * @example org@example.com + */ + billing_email?: string | null; + plan?: { + name: string; + space: number; + private_repos: number; + filled_seats?: number; + seats?: number; + }; + default_repository_permission?: string | null; + /** @example true */ + members_can_create_repositories?: boolean | null; + /** @example true */ + two_factor_requirement_enabled?: boolean | null; + /** @example all */ + members_allowed_repository_creation_type?: string; + /** @example true */ + members_can_create_public_repositories?: boolean; + /** @example true */ + members_can_create_private_repositories?: boolean; + /** @example true */ + members_can_create_internal_repositories?: boolean; + /** @example true */ + members_can_create_pages?: boolean; + /** @example true */ + members_can_create_public_pages?: boolean; + /** @example true */ + members_can_create_private_pages?: boolean; + /** @example false */ + members_can_fork_private_repositories?: boolean | null; + /** @example false */ + web_commit_signoff_required?: boolean; + /** + * @description Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + advanced_security_enabled_for_new_repositories?: boolean; + /** + * @description Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to + * this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependabot_alerts_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependabot security updates are automatically enabled for new repositories and repositories transferred + * to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependabot_security_updates_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependency graph is automatically enabled for new repositories and repositories transferred to this + * organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + dependency_graph_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning is automatically enabled for new repositories and repositories transferred to this + * organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + secret_scanning_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning push protection is automatically enabled for new repositories and repositories + * transferred to this organization. + * + * This field is only visible to organization owners or members of a team with the security manager role. + * @example false + */ + secret_scanning_push_protection_enabled_for_new_repositories?: boolean; + /** + * @description Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. + * @example false + */ + secret_scanning_push_protection_custom_link_enabled?: boolean; + /** + * @description An optional URL string to display to contributors who are blocked from pushing a secret. + * @example https://github.com/test-org/test-repo/blob/main/README.md + */ + secret_scanning_push_protection_custom_link?: string | null; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + archived_at: string | null; + }; + "actions-cache-usage-org-enterprise": { + /** @description The count of active caches across all repositories of an enterprise or an organization. */ + total_active_caches_count: number; + /** @description The total size in bytes of all active cache items across all repositories of an enterprise or an organization. */ + total_active_caches_size_in_bytes: number; + }; + /** + * Actions Cache Usage by repository + * @description GitHub Actions Cache Usage by repository. + */ + "actions-cache-usage-by-repository": { + /** + * @description The repository owner and name for the cache usage being shown. + * @example octo-org/Hello-World + */ + full_name: string; + /** + * @description The sum of the size in bytes of all the active cache items in the repository. + * @example 2322142 + */ + active_caches_size_in_bytes: number; + /** + * @description The number of active caches in the repository. + * @example 3 + */ + active_caches_count: number; + }; + /** + * Actions OIDC Subject customization + * @description Actions OIDC Subject customization + */ + "oidc-custom-sub": { + /** @description Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. */ + include_claim_keys: string[]; + }; + /** + * Empty Object + * @description An object without any properties. + */ + "empty-object": Record; + /** + * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. + * @enum {string} + */ + "enabled-repositories": "all" | "none" | "selected"; + /** + * @description The permissions policy that controls the actions and reusable workflows that are allowed to run. + * @enum {string} + */ + "allowed-actions": "all" | "local_only" | "selected"; + /** @description The API URL to use to get or set the actions and reusable workflows that are allowed to run, when `allowed_actions` is set to `selected`. */ + "selected-actions-url": string; + "actions-organization-permissions": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + /** @description The API URL to use to get or set the selected repositories that are allowed to run GitHub Actions, when `enabled_repositories` is set to `selected`. */ + selected_repositories_url?: string; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + "selected-actions": { + /** @description Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ + github_owned_allowed?: boolean; + /** @description Whether actions from GitHub Marketplace verified creators are allowed. Set to `true` to allow all actions by GitHub Marketplace verified creators. */ + verified_allowed?: boolean; + /** + * @description Specifies a list of string-matching patterns to allow specific action(s) and reusable workflow(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`. + * + * **Note**: The `patterns_allowed` setting only applies to public repositories. + */ + patterns_allowed?: string[]; + }; + /** + * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows. + * @enum {string} + */ + "actions-default-workflow-permissions": "read" | "write"; + /** @description Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. */ + "actions-can-approve-pull-request-reviews": boolean; + "actions-get-default-workflow-permissions": { + default_workflow_permissions: components["schemas"]["actions-default-workflow-permissions"]; + can_approve_pull_request_reviews: components["schemas"]["actions-can-approve-pull-request-reviews"]; + }; + "actions-set-default-workflow-permissions": { + default_workflow_permissions?: components["schemas"]["actions-default-workflow-permissions"]; + can_approve_pull_request_reviews?: components["schemas"]["actions-can-approve-pull-request-reviews"]; + }; + /** + * Self hosted runner label + * @description A label for a self hosted runner + */ + "runner-label": { + /** @description Unique identifier of the label. */ + id?: number; + /** @description Name of the label. */ + name: string; + /** + * @description The type of label. Read-only labels are applied automatically when the runner is configured. + * @enum {string} + */ + type?: "read-only" | "custom"; + }; + /** + * Self hosted runners + * @description A self hosted runner + */ + runner: { + /** + * @description The id of the runner. + * @example 5 + */ + id: number; + /** + * @description The id of the runner group. + * @example 1 + */ + runner_group_id?: number; + /** + * @description The name of the runner. + * @example iMac + */ + name: string; + /** + * @description The Operating System of the runner. + * @example macos + */ + os: string; + /** + * @description The status of the runner. + * @example online + */ + status: string; + busy: boolean; + labels: components["schemas"]["runner-label"][]; + }; + /** + * Runner Application + * @description Runner Application + */ + "runner-application": { + os: string; + architecture: string; + download_url: string; + filename: string; + /** @description A short lived bearer token used to download the runner, if needed. */ + temp_download_token?: string; + sha256_checksum?: string; + }; + /** + * Authentication Token + * @description Authentication Token + */ + "authentication-token": { + /** + * @description The token used for authentication + * @example v1.1f699f1069f60xxx + */ + token: string; + /** + * Format: date-time + * @description The time this token expires + * @example 2016-07-11T22:14:10Z + */ + expires_at: string; + /** + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions?: Record; + /** @description The repositories this token has access to */ + repositories?: components["schemas"]["repository"][]; + /** @example config.yaml */ + single_file?: string | null; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection?: "all" | "selected"; + }; + /** + * Actions Secret for an Organization + * @description Secrets for GitHub Actions for an organization. + */ + "organization-actions-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/secrets/my_secret/repositories + */ + selected_repositories_url?: string; + }; + /** + * ActionsPublicKey + * @description The public key used for setting Actions Secrets. + */ + "actions-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + /** @example 2 */ + id?: number; + /** @example https://api.github.com/user/keys/2 */ + url?: string; + /** @example ssh-rsa AAAAB3NzaC1yc2EAAA */ + title?: string; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + }; + /** + * Actions Variable for an Organization + * @description Organization variable for GitHub Actions. + */ + "organization-actions-variable": { + /** + * @description The name of the variable. + * @example USERNAME + */ + name: string; + /** + * @description The value of the variable. + * @example octocat + */ + value: string; + /** + * Format: date-time + * @description The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + updated_at: string; + /** + * @description Visibility of a variable + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/variables/USERNAME/repositories + */ + selected_repositories_url?: string; + }; + /** @description The name of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-name": string; + /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ + "code-scanning-analysis-tool-guid": string | null; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + "code-scanning-alert-state-query": + | "open" + | "closed" + | "dismissed" + | "fixed"; + /** + * @description Severity of a code scanning alert. + * @enum {string} + */ + "code-scanning-alert-severity": + | "critical" + | "high" + | "medium" + | "low" + | "warning" + | "note" + | "error"; + /** + * Format: uri + * @description The REST API URL for fetching the list of instances for an alert. + */ + readonly "alert-instances-url": string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + "code-scanning-alert-state": "open" | "dismissed" | "fixed"; + /** + * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. + * @enum {string|null} + */ + "code-scanning-alert-dismissed-reason": + | null + | "false positive" + | "won't fix" + | "used in tests"; + /** @description The dismissal comment associated with the dismissal of the alert. */ + "code-scanning-alert-dismissed-comment": string | null; + "code-scanning-alert-rule-summary": { + /** @description A unique identifier for the rule used to detect the alert. */ + id?: string | null; + /** @description The name of the rule used to detect the alert. */ + name?: string; + /** @description A set of tags applicable for the rule. */ + tags?: string[] | null; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: "none" | "note" | "warning" | "error" | null; + /** + * @description The security severity of the alert. + * @enum {string|null} + */ + security_severity_level?: "low" | "medium" | "high" | "critical" | null; + /** @description A short description of the rule used to detect the alert. */ + description?: string; + }; + /** @description The version of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-version": string | null; + "code-scanning-analysis-tool": { + name?: components["schemas"]["code-scanning-analysis-tool-name"]; + version?: components["schemas"]["code-scanning-analysis-tool-version"]; + guid?: components["schemas"]["code-scanning-analysis-tool-guid"]; + }; + /** + * @description The Git reference, formatted as `refs/pull//merge`, `refs/pull//head`, + * `refs/heads/` or simply ``. + */ + "code-scanning-ref": string; + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + "code-scanning-analysis-analysis-key": string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + "code-scanning-alert-environment": string; + /** @description Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code. */ + "code-scanning-analysis-category": string; + /** @description Describe a region within a file for the alert. */ + "code-scanning-alert-location": { + path?: string; + start_line?: number; + end_line?: number; + start_column?: number; + end_column?: number; + }; + /** + * @description A classification of the file. For example to identify it as generated. + * @enum {string|null} + */ + "code-scanning-alert-classification": + | "source" + | "generated" + | "test" + | "library" + | null; + "code-scanning-alert-instance": { + ref?: components["schemas"]["code-scanning-ref"]; + analysis_key?: components["schemas"]["code-scanning-analysis-analysis-key"]; + environment?: components["schemas"]["code-scanning-alert-environment"]; + category?: components["schemas"]["code-scanning-analysis-category"]; + state?: components["schemas"]["code-scanning-alert-state"]; + commit_sha?: string; + message?: { + text?: string; + }; + location?: components["schemas"]["code-scanning-alert-location"]; + html_url?: string; + /** + * @description Classifications that have been applied to the file that triggered the alert. + * For example identifying it as documentation, or a generated file. + */ + classifications?: components["schemas"]["code-scanning-alert-classification"][]; + }; + "code-scanning-organization-alert-items": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule-summary"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + repository: components["schemas"]["simple-repository"]; + }; + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + "nullable-codespace-machine": { + /** + * @description The name of the machine. + * @example standardLinux + */ + name: string; + /** + * @description The display name of the machine includes cores, memory, and storage. + * @example 4 cores, 16 GB RAM, 64 GB storage + */ + display_name: string; + /** + * @description The operating system of the machine. + * @example linux + */ + operating_system: string; + /** + * @description How much storage is available to the codespace. + * @example 68719476736 + */ + storage_in_bytes: number; + /** + * @description How much memory is available to the codespace. + * @example 17179869184 + */ + memory_in_bytes: number; + /** + * @description How many cores are available to the codespace. + * @example 4 + */ + cpus: number; + /** + * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. + * @example ready + * @enum {string|null} + */ + prebuild_availability: "none" | "ready" | "in_progress" | null; + } | null; + /** + * Codespace + * @description A codespace. + */ + codespace: { + /** @example 1 */ + id: number; + /** + * @description Automatically generated name of this codespace. + * @example monalisa-octocat-hello-world-g4wpq6h95q + */ + name: string; + /** + * @description Display name for this codespace. + * @example bookish space pancake + */ + display_name?: string | null; + /** + * @description UUID identifying this codespace's environment. + * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 + */ + environment_id: string | null; + owner: components["schemas"]["simple-user"]; + billable_owner: components["schemas"]["simple-user"]; + repository: components["schemas"]["minimal-repository"]; + machine: components["schemas"]["nullable-codespace-machine"]; + /** + * @description Path to devcontainer.json from repo root used to create Codespace. + * @example .devcontainer/example/devcontainer.json + */ + devcontainer_path?: string | null; + /** + * @description Whether the codespace was created from a prebuild. + * @example false + */ + prebuild: boolean | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @description Last known time this codespace was started. + * @example 2011-01-26T19:01:12Z + */ + last_used_at: string; + /** + * @description State of this codespace. + * @example Available + * @enum {string} + */ + state: + | "Unknown" + | "Created" + | "Queued" + | "Provisioning" + | "Available" + | "Awaiting" + | "Unavailable" + | "Deleted" + | "Moved" + | "Shutdown" + | "Archived" + | "Starting" + | "ShuttingDown" + | "Failed" + | "Exporting" + | "Updating" + | "Rebuilding"; + /** + * Format: uri + * @description API URL for this codespace. + */ + url: string; + /** @description Details about the codespace's git repository. */ + git_status: { + /** + * @description The number of commits the local repository is ahead of the remote. + * @example 0 + */ + ahead?: number; + /** + * @description The number of commits the local repository is behind the remote. + * @example 0 + */ + behind?: number; + /** @description Whether the local repository has unpushed changes. */ + has_unpushed_changes?: boolean; + /** @description Whether the local repository has uncommitted changes. */ + has_uncommitted_changes?: boolean; + /** + * @description The current branch (or SHA if in detached HEAD state) of the local repository. + * @example main + */ + ref?: string; + }; + /** + * @description The initally assigned location of a new codespace. + * @example WestUs2 + * @enum {string} + */ + location: "EastUs" | "SouthEastAsia" | "WestEurope" | "WestUs2"; + /** + * @description The number of minutes of inactivity after which this codespace will be automatically stopped. + * @example 60 + */ + idle_timeout_minutes: number | null; + /** + * Format: uri + * @description URL to access this codespace on the web. + */ + web_url: string; + /** + * Format: uri + * @description API URL to access available alternate machine types for this codespace. + */ + machines_url: string; + /** + * Format: uri + * @description API URL to start this codespace. + */ + start_url: string; + /** + * Format: uri + * @description API URL to stop this codespace. + */ + stop_url: string; + /** + * Format: uri + * @description API URL to publish this codespace to a new repository. + */ + publish_url?: string | null; + /** + * Format: uri + * @description API URL for the Pull Request associated with this codespace, if any. + */ + pulls_url: string | null; + recent_folders: string[]; + runtime_constraints?: { + /** @description The privacy settings a user can select from when forwarding a port. */ + allowed_port_privacy_settings?: string[] | null; + }; + /** @description Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. */ + pending_operation?: boolean | null; + /** @description Text to show user when codespace is disabled by a pending operation */ + pending_operation_disabled_reason?: string | null; + /** @description Text to show user when codespace idle timeout minutes has been overriden by an organization policy */ + idle_timeout_notice?: string | null; + /** + * @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + * @example 60 + */ + retention_period_minutes?: number | null; + /** + * Format: date-time + * @description When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" + * @example 2011-01-26T20:01:12Z + */ + retention_expires_at?: string | null; + /** + * @description The text to display to a user when a codespace has been stopped for a potentially actionable reason. + * @example you've used 100% of your spending limit for Codespaces + */ + last_known_stop_notice?: string | null; + }; + /** + * Codespaces Secret + * @description Secrets for a GitHub Codespace. + */ + "codespaces-org-secret": { + /** + * @description The name of the secret + * @example SECRET_NAME + */ + name: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * @description The type of repositories in the organization that the secret is visible to + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @description The API URL at which the list of repositories this secret is visible to can be retrieved + * @example https://api.github.com/orgs/ORGANIZATION/codespaces/secrets/SECRET_NAME/repositories + */ + selected_repositories_url?: string; + }; + /** + * CodespacesPublicKey + * @description The public key used for setting Codespaces secrets. + */ + "codespaces-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + /** @example 2 */ + id?: number; + /** @example https://api.github.com/user/keys/2 */ + url?: string; + /** @example ssh-rsa AAAAB3NzaC1yc2EAAA */ + title?: string; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + }; + /** + * Copilot Business Seat Breakdown + * @description The breakdown of Copilot Business seats for the organization. + */ + "copilot-seat-breakdown": { + /** @description The total number of seats being billed for the organization as of the current billing cycle. */ + total?: number; + /** @description Seats added during the current billing cycle. */ + added_this_cycle?: number; + /** @description The number of seats that are pending cancellation at the end of the current billing cycle. */ + pending_cancellation?: number; + /** @description The number of seats that have been assigned to users that have not yet accepted an invitation to this organization. */ + pending_invitation?: number; + /** @description The number of seats that have used Copilot during the current billing cycle. */ + active_this_cycle?: number; + /** @description The number of seats that have not used Copilot during the current billing cycle. */ + inactive_this_cycle?: number; + }; + /** + * Copilot Business Organization Details + * @description Information about the seat breakdown and policies set for an organization with a Copilot Business subscription. + */ + "copilot-organization-details": { + seat_breakdown: components["schemas"]["copilot-seat-breakdown"]; + /** + * @description The organization policy for allowing or disallowing Copilot to make suggestions that match public code. + * @enum {string} + */ + public_code_suggestions: "allow" | "block" | "unconfigured" | "unknown"; + /** + * @description The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor. + * @enum {string} + */ + ide_chat?: "enabled" | "disabled" | "unconfigured"; + /** + * @description The organization policy for allowing or disallowing organization members to use Copilot features within github.com. + * @enum {string} + */ + platform_chat?: "enabled" | "disabled" | "unconfigured"; + /** + * @description The organization policy for allowing or disallowing organization members to use Copilot within their CLI. + * @enum {string} + */ + cli?: "enabled" | "disabled" | "unconfigured"; + /** + * @description The mode of assigning new seats. + * @enum {string} + */ + seat_management_setting: + | "assign_all" + | "assign_selected" + | "disabled" + | "unconfigured"; + [key: string]: unknown; + }; + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + "nullable-team-simple": { + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * @description Name of the team + * @example Justice League + */ + name: string; + /** + * @description Description of the team + * @example A great team. + */ + description: string | null; + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string; + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string; + /** + * @description The notification setting the team has set + * @example notifications_enabled + */ + notification_setting?: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + /** @example justice-league */ + slug: string; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + } | null; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + id: number; + node_id: string; + name: string; + slug: string; + description: string | null; + privacy?: string; + notification_setting?: string; + permission: string; + permissions?: { + pull: boolean; + triage: boolean; + push: boolean; + maintain: boolean; + admin: boolean; + }; + /** Format: uri */ + url: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + members_url: string; + /** Format: uri */ + repositories_url: string; + parent: components["schemas"]["nullable-team-simple"]; + }; + /** + * Organization + * @description GitHub account for managing multiple users, teams, and repositories + */ + organization: { + /** + * @description Unique login name of the organization + * @example new-org + */ + login: string; + /** + * Format: uri + * @description URL for the organization + * @example https://api.github.com/orgs/github + */ + url: string; + id: number; + node_id: string; + /** Format: uri */ + repos_url: string; + /** Format: uri */ + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string | null; + /** + * Format: uri + * @description Display blog url for the organization + * @example blog.example-org.com + */ + blog?: string; + /** Format: uri */ + html_url: string; + /** + * @description Display name for the organization + * @example New Org + */ + name?: string; + /** + * @description Display company name for the organization + * @example Acme corporation + */ + company?: string; + /** + * @description Display location for the organization + * @example Berlin, Germany + */ + location?: string; + /** + * Format: email + * @description Display email for the organization + * @example org@example.com + */ + email?: string; + /** @description Specifies if organization projects are enabled for this org */ + has_organization_projects: boolean; + /** @description Specifies if repository projects are enabled for repositories that belong to this org */ + has_repository_projects: boolean; + is_verified?: boolean; + public_repos: number; + public_gists: number; + followers: number; + following: number; + type: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + plan?: { + name?: string; + space?: number; + private_repos?: number; + filled_seats?: number; + seats?: number; + }; + }; + /** + * Copilot Business Seat Detail + * @description Information about a Copilot Business seat assignment for a user, team, or organization. + */ + "copilot-seat-details": { + /** @description The assignee that has been granted access to GitHub Copilot. */ + assignee: { + [key: string]: unknown; + } & ( + | components["schemas"]["simple-user"] + | components["schemas"]["team"] + | components["schemas"]["organization"] + ); + /** @description The team that granted access to GitHub Copilot to the assignee. This will be null if the user was assigned a seat individually. */ + assigning_team?: components["schemas"]["team"] | null; + /** + * Format: date + * @description The pending cancellation date for the seat, in `YYYY-MM-DD` format. This will be null unless the assignee's Copilot access has been canceled during the current billing cycle. If the seat has been cancelled, this corresponds to the start of the organization's next billing cycle. + */ + pending_cancellation_date?: string | null; + /** + * Format: date-time + * @description Timestamp of user's last GitHub Copilot activity, in ISO 8601 format. + */ + last_activity_at?: string | null; + /** @description Last editor that was used by the user for a GitHub Copilot completion. */ + last_activity_editor?: string | null; + /** + * Format: date-time + * @description Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format. + */ + created_at: string; + /** + * Format: date-time + * @description Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. + */ + updated_at?: string; + }; + /** + * Dependabot Secret for an Organization + * @description Secrets for GitHub Dependabot for an organization. + */ + "organization-dependabot-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/dependabot/secrets/my_secret/repositories + */ + selected_repositories_url?: string; + }; + /** + * DependabotPublicKey + * @description The public key used for setting Dependabot Secrets. + */ + "dependabot-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + }; + /** + * Minimal Repository + * @description Minimal Repository + */ + "nullable-minimal-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + git_url?: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + ssh_url?: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + clone_url?: string; + mirror_url?: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + svn_url?: string; + homepage?: string | null; + language?: string | null; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + /** @description The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. */ + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + has_discussions?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + /** @example admin */ + role_name?: string; + temp_clone_token?: string; + delete_branch_on_merge?: boolean; + subscribers_count?: number; + network_count?: number; + code_of_conduct?: components["schemas"]["code-of-conduct"]; + license?: { + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } | null; + /** @example 0 */ + forks?: number; + /** @example 0 */ + open_issues?: number; + /** @example 0 */ + watchers?: number; + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + security_and_analysis?: components["schemas"]["security-and-analysis"]; + } | null; + /** + * Package + * @description A software package + */ + package: { + /** + * @description Unique identifier of the package. + * @example 1 + */ + id: number; + /** + * @description The name of the package. + * @example super-linter + */ + name: string; + /** + * @example docker + * @enum {string} + */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** @example https://api.github.com/orgs/github/packages/container/super-linter */ + url: string; + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + html_url: string; + /** + * @description The number of versions of the package. + * @example 1 + */ + version_count: number; + /** + * @example private + * @enum {string} + */ + visibility: "private" | "public"; + owner?: components["schemas"]["nullable-simple-user"]; + repository?: components["schemas"]["nullable-minimal-repository"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Organization Invitation + * @description Organization Invitation + */ + "organization-invitation": { + id: number; + login: string | null; + email: string | null; + role: string; + created_at: string; + failed_at?: string | null; + failed_reason?: string | null; + inviter: components["schemas"]["simple-user"]; + team_count: number; + /** @example "MDIyOk9yZ2FuaXphdGlvbkludml0YXRpb24x" */ + node_id: string; + /** @example "https://api.github.com/organizations/16/invitations/1/teams" */ + invitation_teams_url: string; + /** @example "member" */ + invitation_source?: string; + }; + /** + * Org Hook + * @description Org Hook + */ + "org-hook": { + /** @example 1 */ + id: number; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/pings + */ + ping_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/deliveries + */ + deliveries_url?: string; + /** @example web */ + name: string; + /** + * @example [ + * "push", + * "pull_request" + * ] + */ + events: string[]; + /** @example true */ + active: boolean; + config: { + /** @example "http://example.com/2" */ + url?: string; + /** @example "0" */ + insecure_ssl?: string; + /** @example "form" */ + content_type?: string; + /** @example "********" */ + secret?: string; + }; + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string; + type: string; + }; + /** + * @description The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. + * @example collaborators_only + * @enum {string} + */ + "interaction-group": + | "existing_users" + | "contributors_only" + | "collaborators_only"; + /** + * Interaction Limits + * @description Interaction limit settings. + */ + "interaction-limit-response": { + limit: components["schemas"]["interaction-group"]; + /** @example repository */ + origin: string; + /** + * Format: date-time + * @example 2018-08-17T04:18:39Z + */ + expires_at: string; + }; + /** + * @description The duration of the interaction restriction. Default: `one_day`. + * @example one_month + * @enum {string} + */ + "interaction-expiry": + | "one_day" + | "three_days" + | "one_week" + | "one_month" + | "six_months"; + /** + * Interaction Restrictions + * @description Limit interactions to a specific type of user for a specified duration + */ + "interaction-limit": { + limit: components["schemas"]["interaction-group"]; + expiry?: components["schemas"]["interaction-expiry"]; + }; + /** + * Org Membership + * @description Org Membership + */ + "org-membership": { + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/memberships/defunkt + */ + url: string; + /** + * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. + * @example active + * @enum {string} + */ + state: "active" | "pending"; + /** + * @description The user's membership type in the organization. + * @example admin + * @enum {string} + */ + role: "admin" | "member" | "billing_manager"; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat + */ + organization_url: string; + organization: components["schemas"]["organization-simple"]; + user: components["schemas"]["nullable-simple-user"]; + permissions?: { + can_create_repository: boolean; + }; + }; + /** + * Migration + * @description A migration. + */ + migration: { + /** @example 79 */ + id: number; + owner: components["schemas"]["nullable-simple-user"]; + /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ + guid: string; + /** @example pending */ + state: string; + /** @example true */ + lock_repositories: boolean; + exclude_metadata: boolean; + exclude_git_data: boolean; + exclude_attachments: boolean; + exclude_releases: boolean; + exclude_owner_projects: boolean; + org_metadata_only: boolean; + /** @description The repositories included in the migration. Only returned for export migrations. */ + repositories: components["schemas"]["repository"][]; + /** + * Format: uri + * @example https://api.github.com/orgs/octo-org/migrations/79 + */ + url: string; + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + updated_at: string; + node_id: string; + /** Format: uri */ + archive_url?: string; + /** @description Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. */ + exclude?: string[]; + }; + /** + * Organization Fine-Grained Permission + * @description A fine-grained permission that protects organization resources. + */ + "organization-fine-grained-permission": { + name: string; + description: string; + }; + /** + * Organization Role + * @description Organization roles + */ + "organization-role": { + /** @description The unique identifier of the role. */ + id: number; + /** @description The name of the role. */ + name: string; + /** @description A short description about who this role is for or what permissions it grants. */ + description?: string | null; + /** @description A list of permissions included in this role. */ + permissions: string[]; + organization: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The date and time the role was created. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time the role was last updated. + */ + updated_at: string; + }; + /** + * Package Version + * @description A version of a software package + */ + "package-version": { + /** + * @description Unique identifier of the package version. + * @example 1 + */ + id: number; + /** + * @description The name of the package version. + * @example latest + */ + name: string; + /** @example https://api.github.com/orgs/github/packages/container/super-linter/versions/786068 */ + url: string; + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + package_html_url: string; + /** @example https://github.com/orgs/github/packages/container/super-linter/786068 */ + html_url?: string; + /** @example MIT */ + license?: string; + description?: string; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + deleted_at?: string; + /** Package Version Metadata */ + metadata?: { + /** + * @example docker + * @enum {string} + */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** Container Metadata */ + container?: { + tags: string[]; + }; + /** Docker Metadata */ + docker?: { + tag?: string[]; + }; + }; + }; + /** + * Simple Organization Programmatic Access Grant Request + * @description Minimal representation of an organization programmatic access grant request for enumerations + */ + "organization-programmatic-access-grant-request": { + /** @description Unique identifier of the request for access via fine-grained personal access token. The `pat_request_id` used to review PAT requests. */ + id: number; + /** @description Reason for requesting access. */ + reason: string | null; + owner: components["schemas"]["simple-user"]; + /** + * @description Type of repository selection requested. + * @enum {string} + */ + repository_selection: "none" | "all" | "subset"; + /** @description URL to the list of repositories requested to be accessed via fine-grained personal access token. Should only be followed when `repository_selection` is `subset`. */ + repositories_url: string; + /** @description Permissions requested, categorized by type of permission. */ + permissions: { + organization?: { + [key: string]: string; + }; + repository?: { + [key: string]: string; + }; + other?: { + [key: string]: string; + }; + }; + /** @description Date and time when the request for access was created. */ + created_at: string; + /** @description Whether the associated fine-grained personal access token has expired. */ + token_expired: boolean; + /** @description Date and time when the associated fine-grained personal access token expires. */ + token_expires_at: string | null; + /** @description Date and time when the associated fine-grained personal access token was last used for authentication. */ + token_last_used_at: string | null; + }; + /** + * Organization Programmatic Access Grant + * @description Minimal representation of an organization programmatic access grant for enumerations + */ + "organization-programmatic-access-grant": { + /** @description Unique identifier of the fine-grained personal access token. The `pat_id` used to get details about an approved fine-grained personal access token. */ + id: number; + owner: components["schemas"]["simple-user"]; + /** + * @description Type of repository selection requested. + * @enum {string} + */ + repository_selection: "none" | "all" | "subset"; + /** @description URL to the list of repositories the fine-grained personal access token can access. Only follow when `repository_selection` is `subset`. */ + repositories_url: string; + /** @description Permissions requested, categorized by type of permission. */ + permissions: { + organization?: { + [key: string]: string; + }; + repository?: { + [key: string]: string; + }; + other?: { + [key: string]: string; + }; + }; + /** @description Date and time when the fine-grained personal access token was approved to access the organization. */ + access_granted_at: string; + /** @description Whether the associated fine-grained personal access token has expired. */ + token_expired: boolean; + /** @description Date and time when the associated fine-grained personal access token expires. */ + token_expires_at: string | null; + /** @description Date and time when the associated fine-grained personal access token was last used for authentication. */ + token_last_used_at: string | null; + }; + /** + * Project + * @description Projects are a way to organize columns and cards of work. + */ + project: { + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test + */ + owner_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/1002604 + */ + url: string; + /** + * Format: uri + * @example https://github.com/api-playground/projects-test/projects/12 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/1002604/columns + */ + columns_url: string; + /** @example 1002604 */ + id: number; + /** @example MDc6UHJvamVjdDEwMDI2MDQ= */ + node_id: string; + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body: string | null; + /** @example 1 */ + number: number; + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state: string; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * @description The baseline permission that all organization members have on this project. Only present if owner is an organization. + * @enum {string} + */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** @description Whether or not this project can be seen by everyone. Only present if owner is an organization. */ + private?: boolean; + }; + /** + * Organization Custom Property + * @description Custom property defined on an organization + */ + "org-custom-property": { + /** @description The name of the property */ + property_name: string; + /** + * @description The type of the value for the property + * @example single_select + * @enum {string} + */ + value_type: "string" | "single_select"; + /** @description Whether the property is required. */ + required?: boolean; + /** @description Default value of the property */ + default_value?: string | string[] | null; + /** @description Short description of the property */ + description?: string | null; + /** + * @description An ordered list of the allowed values of the property. + * The property can have up to 200 allowed values. + */ + allowed_values?: string[] | null; + /** + * @description Who can edit the values of the property + * @example org_actors + * @enum {string|null} + */ + values_editable_by?: "org_actors" | "org_and_repo_actors" | null; + }; + /** + * Custom Property Value + * @description Custom property name and associated value + */ + "custom-property-value": { + /** @description The name of the property */ + property_name: string; + /** @description The value assigned to the property */ + value: string | string[] | null; + }; + /** + * Organization Repository Custom Property Values + * @description List of custom property values for a repository + */ + "org-repo-custom-property-values": { + /** @example 1296269 */ + repository_id: number; + /** @example Hello-World */ + repository_name: string; + /** @example octocat/Hello-World */ + repository_full_name: string; + /** @description List of custom property names and associated values */ + properties: components["schemas"]["custom-property-value"][]; + }; + /** + * Repository + * @description A repository on GitHub. + */ + "nullable-repository": { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @deprecated + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether discussions are enabled. + * @default false + * @example true + */ + has_discussions?: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean; + } | null; + /** + * Code Of Conduct Simple + * @description Code of Conduct Simple + */ + "code-of-conduct-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/github/docs/community/code_of_conduct + */ + url: string; + /** @example citizen_code_of_conduct */ + key: string; + /** @example Citizen Code of Conduct */ + name: string; + /** + * Format: uri + * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md + */ + html_url: string | null; + }; + /** + * Full Repository + * @description Full Repository + */ + "full-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** @example master */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** @example true */ + is_template?: boolean; + /** + * @example [ + * "octocat", + * "atom", + * "electron", + * "API" + * ] + */ + topics?: string[]; + /** @example true */ + has_issues: boolean; + /** @example true */ + has_projects: boolean; + /** @example true */ + has_wiki: boolean; + has_pages: boolean; + /** @example true */ + has_downloads?: boolean; + /** @example true */ + has_discussions: boolean; + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @example public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + /** @example true */ + allow_rebase_merge?: boolean; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string | null; + /** @example true */ + allow_squash_merge?: boolean; + /** @example false */ + allow_auto_merge?: boolean; + /** @example false */ + delete_branch_on_merge?: boolean; + /** @example true */ + allow_merge_commit?: boolean; + /** @example true */ + allow_update_branch?: boolean; + /** @example false */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @example PR_TITLE + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @example PR_TITLE + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @example true */ + allow_forking?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + /** @example 42 */ + subscribers_count: number; + /** @example 0 */ + network_count: number; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + parent?: components["schemas"]["repository"]; + source?: components["schemas"]["repository"]; + forks: number; + master_branch?: string; + open_issues: number; + watchers: number; + /** + * @description Whether anonymous git access is allowed. + * @default true + */ + anonymous_access_enabled?: boolean; + code_of_conduct?: components["schemas"]["code-of-conduct-simple"]; + security_and_analysis?: components["schemas"]["security-and-analysis"]; + /** @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. */ + custom_properties?: { + [key: string]: unknown; + }; + }; + /** + * @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 {string} + */ + "repository-rule-enforcement": "disabled" | "active" | "evaluate"; + /** + * Repository Ruleset Bypass Actor + * @description An actor that can bypass rules in a ruleset + */ + "repository-ruleset-bypass-actor": { + /** @description The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`. If `actor_type` is `DeployKey`, this should be null. `OrganizationAdmin` is not applicable for personal repositories. */ + actor_id?: number | null; + /** + * @description The type of actor that can bypass a ruleset. + * + * @enum {string} + */ + actor_type: + | "Integration" + | "OrganizationAdmin" + | "RepositoryRole" + | "Team" + | "DeployKey"; + /** + * @description When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. + * + * @enum {string} + */ + bypass_mode: "always" | "pull_request"; + }; + /** + * Repository ruleset conditions for ref names + * @description Parameters for a repository ruleset ref name condition + */ + "repository-ruleset-conditions": { + ref_name?: { + /** @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. */ + include?: string[]; + /** @description Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. */ + exclude?: string[]; + }; + }; + /** + * Repository ruleset conditions for repository names + * @description Parameters for a repository name condition + */ + "repository-ruleset-conditions-repository-name-target": { + repository_name: { + /** @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. */ + include?: string[]; + /** @description Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match. */ + exclude?: string[]; + /** @description Whether renaming of target repositories is prevented. */ + protected?: boolean; + }; + }; + /** + * Repository ruleset conditions for repository IDs + * @description Parameters for a repository ID condition + */ + "repository-ruleset-conditions-repository-id-target": { + repository_id: { + /** @description The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. */ + repository_ids?: number[]; + }; + }; + /** + * Repository ruleset property targeting definition + * @description Parameters for a targeting a repository property + */ + "repository-ruleset-conditions-repository-property-spec": { + /** @description The name of the repository property to target */ + name: string; + /** @description The values to match for the repository property */ + property_values: string[]; + }; + /** + * Repository ruleset conditions for repository properties + * @description Parameters for a repository property condition + */ + "repository-ruleset-conditions-repository-property-target": { + repository_property: { + /** @description The repository properties and values to include. All of these properties must match for the condition to pass. */ + include?: components["schemas"]["repository-ruleset-conditions-repository-property-spec"][]; + /** @description The repository properties and values to exclude. The condition will not pass if any of these properties match. */ + exclude?: components["schemas"]["repository-ruleset-conditions-repository-property-spec"][]; + }; + }; + /** + * Organization ruleset conditions + * @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. + */ + "org-ruleset-conditions": + | (components["schemas"]["repository-ruleset-conditions"] & + components["schemas"]["repository-ruleset-conditions-repository-name-target"]) + | (components["schemas"]["repository-ruleset-conditions"] & + components["schemas"]["repository-ruleset-conditions-repository-id-target"]) + | (components["schemas"]["repository-ruleset-conditions"] & + components["schemas"]["repository-ruleset-conditions-repository-property-target"]); + /** + * creation + * @description Only allow users with bypass permission to create matching refs. + */ + "repository-rule-creation": { + /** @enum {string} */ + type: "creation"; + }; + /** + * update + * @description Only allow users with bypass permission to update matching refs. + */ + "repository-rule-update": { + /** @enum {string} */ + type: "update"; + parameters?: { + /** @description Branch can pull changes from its upstream repository */ + update_allows_fetch_and_merge: boolean; + }; + }; + /** + * deletion + * @description Only allow users with bypass permissions to delete matching refs. + */ + "repository-rule-deletion": { + /** @enum {string} */ + type: "deletion"; + }; + /** + * required_linear_history + * @description Prevent merge commits from being pushed to matching refs. + */ + "repository-rule-required-linear-history": { + /** @enum {string} */ + type: "required_linear_history"; + }; + /** + * required_deployments + * @description Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule. + */ + "repository-rule-required-deployments": { + /** @enum {string} */ + type: "required_deployments"; + parameters?: { + /** @description The environments that must be successfully deployed to before branches can be merged. */ + required_deployment_environments: string[]; + }; + }; + /** + * required_signatures + * @description Commits pushed to matching refs must have verified signatures. + */ + "repository-rule-required-signatures": { + /** @enum {string} */ + type: "required_signatures"; + }; + /** + * pull_request + * @description Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. + */ + "repository-rule-pull-request": { + /** @enum {string} */ + type: "pull_request"; + parameters?: { + /** @description New, reviewable commits pushed will dismiss previous pull request review approvals. */ + dismiss_stale_reviews_on_push: boolean; + /** @description Require an approving review in pull requests that modify files that have a designated code owner. */ + require_code_owner_review: boolean; + /** @description Whether the most recent reviewable push must be approved by someone other than the person who pushed it. */ + require_last_push_approval: boolean; + /** @description The number of approving reviews that are required before a pull request can be merged. */ + required_approving_review_count: number; + /** @description All conversations on code must be resolved before a pull request can be merged. */ + required_review_thread_resolution: boolean; + }; + }; + /** + * StatusCheckConfiguration + * @description Required status check + */ + "repository-rule-params-status-check-configuration": { + /** @description The status check context name that must be present on the commit. */ + context: string; + /** @description The optional integration ID that this status check must originate from. */ + integration_id?: number; + }; + /** + * 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. + */ + "repository-rule-required-status-checks": { + /** @enum {string} */ + type: "required_status_checks"; + parameters?: { + /** @description Status checks that are required. */ + required_status_checks: components["schemas"]["repository-rule-params-status-check-configuration"][]; + /** @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. */ + strict_required_status_checks_policy: boolean; + }; + }; + /** + * non_fast_forward + * @description Prevent users with push access from force pushing to refs. + */ + "repository-rule-non-fast-forward": { + /** @enum {string} */ + type: "non_fast_forward"; + }; + /** + * commit_message_pattern + * @description Parameters to be used for the commit_message_pattern rule + */ + "repository-rule-commit-message-pattern": { + /** @enum {string} */ + type: "commit_message_pattern"; + parameters?: { + /** @description How this rule will appear to users. */ + name?: string; + /** @description If true, the rule will fail if the pattern matches. */ + negate?: boolean; + /** + * @description The operator to use for matching. + * @enum {string} + */ + operator: "starts_with" | "ends_with" | "contains" | "regex"; + /** @description The pattern to match with. */ + pattern: string; + }; + }; + /** + * commit_author_email_pattern + * @description Parameters to be used for the commit_author_email_pattern rule + */ + "repository-rule-commit-author-email-pattern": { + /** @enum {string} */ + type: "commit_author_email_pattern"; + parameters?: { + /** @description How this rule will appear to users. */ + name?: string; + /** @description If true, the rule will fail if the pattern matches. */ + negate?: boolean; + /** + * @description The operator to use for matching. + * @enum {string} + */ + operator: "starts_with" | "ends_with" | "contains" | "regex"; + /** @description The pattern to match with. */ + pattern: string; + }; + }; + /** + * committer_email_pattern + * @description Parameters to be used for the committer_email_pattern rule + */ + "repository-rule-committer-email-pattern": { + /** @enum {string} */ + type: "committer_email_pattern"; + parameters?: { + /** @description How this rule will appear to users. */ + name?: string; + /** @description If true, the rule will fail if the pattern matches. */ + negate?: boolean; + /** + * @description The operator to use for matching. + * @enum {string} + */ + operator: "starts_with" | "ends_with" | "contains" | "regex"; + /** @description The pattern to match with. */ + pattern: string; + }; + }; + /** + * branch_name_pattern + * @description Parameters to be used for the branch_name_pattern rule + */ + "repository-rule-branch-name-pattern": { + /** @enum {string} */ + type: "branch_name_pattern"; + parameters?: { + /** @description How this rule will appear to users. */ + name?: string; + /** @description If true, the rule will fail if the pattern matches. */ + negate?: boolean; + /** + * @description The operator to use for matching. + * @enum {string} + */ + operator: "starts_with" | "ends_with" | "contains" | "regex"; + /** @description The pattern to match with. */ + pattern: string; + }; + }; + /** + * tag_name_pattern + * @description Parameters to be used for the tag_name_pattern rule + */ + "repository-rule-tag-name-pattern": { + /** @enum {string} */ + type: "tag_name_pattern"; + parameters?: { + /** @description How this rule will appear to users. */ + name?: string; + /** @description If true, the rule will fail if the pattern matches. */ + negate?: boolean; + /** + * @description The operator to use for matching. + * @enum {string} + */ + operator: "starts_with" | "ends_with" | "contains" | "regex"; + /** @description The pattern to match with. */ + pattern: string; + }; + }; + /** + * RestrictedCommits + * @description Restricted commit + */ + "repository-rule-params-restricted-commits": { + /** @description Full or abbreviated commit hash to reject */ + oid: string; + /** @description Reason for restriction */ + reason?: string; + }; + /** + * WorkflowFileReference + * @description A workflow that must run for this rule to pass + */ + "repository-rule-params-workflow-file-reference": { + /** @description The path to the workflow file */ + path: string; + /** @description The ref (branch or tag) of the workflow file to use */ + ref?: string; + /** @description The ID of the repository where the workflow is defined */ + repository_id: number; + /** @description The commit SHA of the workflow file to use */ + sha?: string; + }; + /** + * workflows + * @description Require all changes made to a targeted branch to pass the specified workflows before they can be merged. + */ + "repository-rule-workflows": { + /** @enum {string} */ + type: "workflows"; + parameters?: { + /** @description Workflows that must pass for this rule to pass. */ + workflows: components["schemas"]["repository-rule-params-workflow-file-reference"][]; + }; + }; + /** + * CodeScanningTool + * @description A tool that must provide code scanning results for this rule to pass. + */ + "repository-rule-params-code-scanning-tool": { + /** + * @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 {string} + */ + alerts_threshold: "none" | "errors" | "errors_and_warnings" | "all"; + /** + * @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 {string} + */ + security_alerts_threshold: + | "none" + | "critical" + | "high_or_higher" + | "medium_or_higher" + | "all"; + /** @description The name of a code scanning tool */ + tool: string; + }; + /** + * Repository Rule + * @description A repository rule. + */ + "repository-rule": + | components["schemas"]["repository-rule-creation"] + | components["schemas"]["repository-rule-update"] + | components["schemas"]["repository-rule-deletion"] + | components["schemas"]["repository-rule-required-linear-history"] + | components["schemas"]["repository-rule-required-deployments"] + | components["schemas"]["repository-rule-required-signatures"] + | components["schemas"]["repository-rule-pull-request"] + | components["schemas"]["repository-rule-required-status-checks"] + | components["schemas"]["repository-rule-non-fast-forward"] + | components["schemas"]["repository-rule-commit-message-pattern"] + | components["schemas"]["repository-rule-commit-author-email-pattern"] + | components["schemas"]["repository-rule-committer-email-pattern"] + | components["schemas"]["repository-rule-branch-name-pattern"] + | components["schemas"]["repository-rule-tag-name-pattern"] + | { + /** @enum {string} */ + type: "file_path_restriction"; + parameters?: { + /** @description The file paths that are restricted from being pushed to the commit graph. */ + restricted_file_paths: string[]; + }; + } + | { + /** @enum {string} */ + type: "max_file_path_length"; + parameters?: { + /** @description The maximum amount of characters allowed in file paths */ + max_file_path_length: number; + }; + } + | { + /** @enum {string} */ + type: "file_extension_restriction"; + parameters?: { + /** @description The file extensions that are restricted from being pushed to the commit graph. */ + restricted_file_extensions: string[]; + }; + } + | { + /** @enum {string} */ + type: "max_file_size"; + parameters?: { + /** @description The maximum file size allowed in megabytes. This limit does not apply to Git Large File Storage (Git LFS). */ + max_file_size: number; + }; + } + | components["schemas"]["repository-rule-workflows"]; + /** + * Repository ruleset + * @description A set of rules to apply when specified conditions are met. + */ + "repository-ruleset": { + /** @description The ID of the ruleset */ + id: number; + /** @description The name of the ruleset */ + name: string; + /** + * @description The target of the ruleset + * + * **Note**: The `push` target is in beta and is subject to change. + * @enum {string} + */ + target?: "branch" | "tag" | "push"; + /** + * @description The type of the source of the ruleset + * @enum {string} + */ + source_type?: "Repository" | "Organization"; + /** @description The name of the source */ + source: string; + enforcement: components["schemas"]["repository-rule-enforcement"]; + /** @description The actors that can bypass the rules in this ruleset */ + bypass_actors?: components["schemas"]["repository-ruleset-bypass-actor"][]; + /** + * @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 {string} + */ + current_user_can_bypass?: "always" | "pull_requests_only" | "never"; + node_id?: string; + _links?: { + self?: { + /** @description The URL of the ruleset */ + href?: string; + }; + html?: { + /** @description The html URL of the ruleset */ + href?: string; + }; + }; + conditions?: + | ( + | components["schemas"]["repository-ruleset-conditions"] + | components["schemas"]["org-ruleset-conditions"] + ) + | null; + rules?: components["schemas"]["repository-rule"][]; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }; + /** + * Rule Suites + * @description Response + */ + "rule-suites": { + /** @description The unique identifier of the rule insight. */ + id?: number; + /** @description The number that identifies the user. */ + actor_id?: number; + /** @description The handle for the GitHub user account. */ + actor_name?: string; + /** @description The first commit sha before the push evaluation. */ + before_sha?: string; + /** @description The last commit sha in the push evaluation. */ + after_sha?: string; + /** @description The ref name that the evaluation ran on. */ + ref?: string; + /** @description The ID of the repository associated with the rule evaluation. */ + repository_id?: number; + /** @description The name of the repository without the `.git` extension. */ + repository_name?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string; + /** + * @description The result of the rule evaluations for rules with the `active` enforcement status. + * @enum {string} + */ + result?: "pass" | "fail" | "bypass"; + /** + * @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`. + * @enum {string} + */ + evaluation_result?: "pass" | "fail"; + }[]; + /** + * Rule Suite + * @description Response + */ + "rule-suite": { + /** @description The unique identifier of the rule insight. */ + id?: number; + /** @description The number that identifies the user. */ + actor_id?: number | null; + /** @description The handle for the GitHub user account. */ + actor_name?: string | null; + /** @description The first commit sha before the push evaluation. */ + before_sha?: string; + /** @description The last commit sha in the push evaluation. */ + after_sha?: string; + /** @description The ref name that the evaluation ran on. */ + ref?: string; + /** @description The ID of the repository associated with the rule evaluation. */ + repository_id?: number; + /** @description The name of the repository without the `.git` extension. */ + repository_name?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string; + /** + * @description The result of the rule evaluations for rules with the `active` enforcement status. + * @enum {string} + */ + result?: "pass" | "fail" | "bypass"; + /** + * @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`. + * @enum {string} + */ + evaluation_result?: "pass" | "fail"; + /** @description Details on the evaluated rules. */ + rule_evaluations?: { + rule_source?: { + /** @description The type of rule source. */ + type?: string; + /** @description The ID of the rule source. */ + id?: number | null; + /** @description The name of the rule source. */ + name?: string | null; + }; + /** + * @description The enforcement level of this rule source. + * @enum {string} + */ + enforcement?: "active" | "evaluate" | "deleted ruleset"; + /** + * @description The result of the evaluation of the individual rule. + * @enum {string} + */ + result?: "pass" | "fail"; + /** @description The type of rule. */ + rule_type?: string; + /** @description Any associated details with the rule evaluation. */ + details?: string; + }[]; + }; + /** @description A product affected by the vulnerability detailed in a repository security advisory. */ + "repository-advisory-vulnerability": { + /** @description The name of the package affected by the vulnerability. */ + package: { + ecosystem: components["schemas"]["security-advisory-ecosystems"]; + /** @description The unique package name within its ecosystem. */ + name: string | null; + } | null; + /** @description The range of the package versions affected by the vulnerability. */ + vulnerable_version_range: string | null; + /** @description The package version(s) that resolve the vulnerability. */ + patched_versions: string | null; + /** @description The functions in the package that are affected. */ + vulnerable_functions: string[] | null; + }; + /** @description A credit given to a user for a repository security advisory. */ + "repository-advisory-credit": { + user: components["schemas"]["simple-user"]; + type: components["schemas"]["security-advisory-credit-types"]; + /** + * @description The state of the user's acceptance of the credit. + * @enum {string} + */ + state: "accepted" | "declined" | "pending"; + }; + /** @description A repository security advisory. */ + "repository-advisory": { + /** @description The GitHub Security Advisory ID. */ + ghsa_id: string; + /** @description The Common Vulnerabilities and Exposures (CVE) ID. */ + cve_id: string | null; + /** + * Format: uri + * @description The API URL for the advisory. + */ + url: string; + /** + * Format: uri + * @description The URL for the advisory. + */ + html_url: string; + /** @description A short summary of the advisory. */ + summary: string; + /** @description A detailed description of what the advisory entails. */ + description: string | null; + /** + * @description The severity of the advisory. + * @enum {string|null} + */ + severity: "critical" | "high" | "medium" | "low" | null; + /** @description The author of the advisory. */ + author: components["schemas"]["simple-user"] | null; + /** @description The publisher of the advisory. */ + publisher: components["schemas"]["simple-user"] | null; + identifiers: readonly { + /** + * @description The type of identifier. + * @enum {string} + */ + type: "CVE" | "GHSA"; + /** @description The identifier value. */ + value: string; + }[]; + /** + * @description The state of the advisory. + * @enum {string} + */ + state: "published" | "closed" | "withdrawn" | "draft" | "triage"; + /** + * Format: date-time + * @description The date and time of when the advisory was created, in ISO 8601 format. + */ + created_at: string | null; + /** + * Format: date-time + * @description The date and time of when the advisory was last updated, in ISO 8601 format. + */ + updated_at: string | null; + /** + * Format: date-time + * @description The date and time of when the advisory was published, in ISO 8601 format. + */ + published_at: string | null; + /** + * Format: date-time + * @description The date and time of when the advisory was closed, in ISO 8601 format. + */ + closed_at: string | null; + /** + * Format: date-time + * @description The date and time of when the advisory was withdrawn, in ISO 8601 format. + */ + withdrawn_at: string | null; + submission: { + /** @description Whether a private vulnerability report was accepted by the repository's administrators. */ + readonly accepted: boolean; + } | null; + vulnerabilities: + | components["schemas"]["repository-advisory-vulnerability"][] + | null; + cvss: { + /** @description The CVSS vector. */ + vector_string: string | null; + /** @description The CVSS score. */ + score: number | null; + } | null; + cwes: + | readonly { + /** @description The Common Weakness Enumeration (CWE) identifier. */ + cwe_id: string; + /** @description The name of the CWE. */ + name: string; + }[] + | null; + /** @description A list of only the CWE IDs. */ + cwe_ids: string[] | null; + credits: + | { + /** @description The username of the user credited. */ + login?: string; + type?: components["schemas"]["security-advisory-credit-types"]; + }[] + | null; + credits_detailed: + | readonly components["schemas"]["repository-advisory-credit"][] + | null; + /** @description A list of users that collaborate on the advisory. */ + collaborating_users: components["schemas"]["simple-user"][] | null; + /** @description A list of teams that collaborate on the advisory. */ + collaborating_teams: components["schemas"]["team"][] | null; + /** @description A temporary private fork of the advisory's repository for collaborating on a fix. */ + private_fork: components["schemas"]["simple-repository"] | null; + }; + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-simple": { + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * @description Name of the team + * @example Justice League + */ + name: string; + /** + * @description Description of the team + * @example A great team. + */ + description: string | null; + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string; + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string; + /** + * @description The notification setting the team has set + * @example notifications_enabled + */ + notification_setting?: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + /** @example justice-league */ + slug: string; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + }; + "actions-billing-usage": { + /** @description The sum of the free and paid GitHub Actions minutes used. */ + total_minutes_used: number; + /** @description The total paid GitHub Actions minutes used. */ + total_paid_minutes_used: number; + /** @description The amount of free GitHub Actions minutes available. */ + included_minutes: number; + minutes_used_breakdown: { + /** @description Total minutes used on Ubuntu runner machines. */ + UBUNTU?: number; + /** @description Total minutes used on macOS runner machines. */ + MACOS?: number; + /** @description Total minutes used on Windows runner machines. */ + WINDOWS?: number; + /** @description Total minutes used on Ubuntu 4 core runner machines. */ + ubuntu_4_core?: number; + /** @description Total minutes used on Ubuntu 8 core runner machines. */ + ubuntu_8_core?: number; + /** @description Total minutes used on Ubuntu 16 core runner machines. */ + ubuntu_16_core?: number; + /** @description Total minutes used on Ubuntu 32 core runner machines. */ + ubuntu_32_core?: number; + /** @description Total minutes used on Ubuntu 64 core runner machines. */ + ubuntu_64_core?: number; + /** @description Total minutes used on Windows 4 core runner machines. */ + windows_4_core?: number; + /** @description Total minutes used on Windows 8 core runner machines. */ + windows_8_core?: number; + /** @description Total minutes used on Windows 16 core runner machines. */ + windows_16_core?: number; + /** @description Total minutes used on Windows 32 core runner machines. */ + windows_32_core?: number; + /** @description Total minutes used on Windows 64 core runner machines. */ + windows_64_core?: number; + /** @description Total minutes used on macOS 12 core runner machines. */ + macos_12_core?: number; + /** @description Total minutes used on all runner machines. */ + total?: number; + }; + }; + "packages-billing-usage": { + /** @description Sum of the free and paid storage space (GB) for GitHuub Packages. */ + total_gigabytes_bandwidth_used: number; + /** @description Total paid storage space (GB) for GitHuub Packages. */ + total_paid_gigabytes_bandwidth_used: number; + /** @description Free storage space (GB) for GitHub Packages. */ + included_gigabytes_bandwidth: number; + }; + "combined-billing-usage": { + /** @description Numbers of days left in billing cycle. */ + days_left_in_billing_cycle: number; + /** @description Estimated storage space (GB) used in billing cycle. */ + estimated_paid_storage_for_month: number; + /** @description Estimated sum of free and paid storage space (GB) used in billing cycle. */ + estimated_storage_for_month: number; + }; + /** + * Team Organization + * @description Team Organization + */ + "team-organization": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + /** @example github */ + name?: string; + /** @example GitHub */ + company?: string; + /** + * Format: uri + * @example https://github.com/blog + */ + blog?: string; + /** @example San Francisco */ + location?: string; + /** + * Format: email + * @example octocat@github.com + */ + email?: string; + /** @example github */ + twitter_username?: string | null; + /** @example true */ + is_verified?: boolean; + /** @example true */ + has_organization_projects: boolean; + /** @example true */ + has_repository_projects: boolean; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** @example Organization */ + type: string; + /** @example 100 */ + total_private_repos?: number; + /** @example 100 */ + owned_private_repos?: number; + /** @example 81 */ + private_gists?: number | null; + /** @example 10000 */ + disk_usage?: number | null; + /** @example 8 */ + collaborators?: number | null; + /** + * Format: email + * @example org@example.com + */ + billing_email?: string | null; + plan?: { + name: string; + space: number; + private_repos: number; + filled_seats?: number; + seats?: number; + }; + default_repository_permission?: string | null; + /** @example true */ + members_can_create_repositories?: boolean | null; + /** @example true */ + two_factor_requirement_enabled?: boolean | null; + /** @example all */ + members_allowed_repository_creation_type?: string; + /** @example true */ + members_can_create_public_repositories?: boolean; + /** @example true */ + members_can_create_private_repositories?: boolean; + /** @example true */ + members_can_create_internal_repositories?: boolean; + /** @example true */ + members_can_create_pages?: boolean; + /** @example true */ + members_can_create_public_pages?: boolean; + /** @example true */ + members_can_create_private_pages?: boolean; + /** @example false */ + members_can_fork_private_repositories?: boolean | null; + /** @example false */ + web_commit_signoff_required?: boolean; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + archived_at: string | null; + }; + /** + * Full Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-full": { + /** + * @description Unique identifier of the team + * @example 42 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * @description Name of the team + * @example Developers + */ + name: string; + /** @example justice-league */ + slug: string; + /** @example A great team. */ + description: string | null; + /** + * @description The level of privacy this team should have + * @example closed + * @enum {string} + */ + privacy?: "closed" | "secret"; + /** + * @description The notification setting the team has set + * @example notifications_enabled + * @enum {string} + */ + notification_setting?: "notifications_enabled" | "notifications_disabled"; + /** + * @description Permission that the team will have for its repositories + * @example push + */ + permission: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + parent?: components["schemas"]["nullable-team-simple"]; + /** @example 3 */ + members_count: number; + /** @example 10 */ + repos_count: number; + /** + * Format: date-time + * @example 2017-07-14T16:53:42Z + */ + created_at: string; + /** + * Format: date-time + * @example 2017-08-17T12:37:15Z + */ + updated_at: string; + organization: components["schemas"]["team-organization"]; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + }; + /** + * Team Discussion + * @description A team discussion is a persistent record of a free-form conversation within a team. + */ + "team-discussion": { + author: components["schemas"]["nullable-simple-user"]; + /** + * @description The main text of the discussion. + * @example Please suggest improvements to our workflow in comments. + */ + body: string; + /** @example

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

*/ + body_html: string; + /** + * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + * @example 0307116bbf7ced493b8d8a346c650b71 + */ + body_version: string; + /** @example 0 */ + comments_count: number; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027/discussions/1/comments + */ + comments_url: string; + /** + * Format: date-time + * @example 2018-01-25T18:56:31Z + */ + created_at: string; + /** Format: date-time */ + last_edited_at: string | null; + /** + * Format: uri + * @example https://github.com/orgs/github/teams/justice-league/discussions/1 + */ + html_url: string; + /** @example MDE0OlRlYW1EaXNjdXNzaW9uMQ== */ + node_id: string; + /** + * @description The unique sequence number of a team discussion. + * @example 42 + */ + number: number; + /** + * @description Whether or not this discussion should be pinned for easy retrieval. + * @example true + */ + pinned: boolean; + /** + * @description Whether or not this discussion should be restricted to team members and organization owners. + * @example true + */ + private: boolean; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027 + */ + team_url: string; + /** + * @description The title of the discussion. + * @example How can we improve our workflow? + */ + title: string; + /** + * Format: date-time + * @example 2018-01-25T18:56:31Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2343027/discussions/1 + */ + url: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Team Discussion Comment + * @description A reply to a discussion within a team. + */ + "team-discussion-comment": { + author: components["schemas"]["nullable-simple-user"]; + /** + * @description The main text of the comment. + * @example I agree with this suggestion. + */ + body: string; + /** @example

Do you like apples?

*/ + body_html: string; + /** + * @description The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + * @example 0307116bbf7ced493b8d8a346c650b71 + */ + body_version: string; + /** + * Format: date-time + * @example 2018-01-15T23:53:58Z + */ + created_at: string; + /** Format: date-time */ + last_edited_at: string | null; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2403582/discussions/1 + */ + discussion_url: string; + /** + * Format: uri + * @example https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1 + */ + html_url: string; + /** @example MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE= */ + node_id: string; + /** + * @description The unique sequence number of a team discussion comment. + * @example 42 + */ + number: number; + /** + * Format: date-time + * @example 2018-01-15T23:53:58Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1 + */ + url: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Reaction + * @description Reactions to conversations provide a way to help people express their feelings more simply and effectively. + */ + reaction: { + /** @example 1 */ + id: number; + /** @example MDg6UmVhY3Rpb24x */ + node_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description The reaction to use + * @example heart + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Format: date-time + * @example 2016-05-20T20:09:31Z + */ + created_at: string; + }; + /** + * Team Membership + * @description Team Membership + */ + "team-membership": { + /** Format: uri */ + url: string; + /** + * @description The role of the user in the team. + * @default member + * @example member + * @enum {string} + */ + role: "member" | "maintainer"; + /** + * @description The state of the user's membership in the team. + * @enum {string} + */ + state: "active" | "pending"; + }; + /** + * Team Project + * @description A team's access to a project. + */ + "team-project": { + owner_url: string; + url: string; + html_url: string; + columns_url: string; + id: number; + node_id: string; + name: string; + body: string | null; + number: number; + state: string; + creator: components["schemas"]["simple-user"]; + created_at: string; + updated_at: string; + /** @description The organization permission for this project. Only present when owner is an organization. */ + organization_permission?: string; + /** @description Whether the project is private or not. Only present when owner is an organization. */ + private?: boolean; + permissions: { + read: boolean; + write: boolean; + admin: boolean; + }; + }; + /** + * Team Repository + * @description A team's access to a repository. + */ + "team-repository": { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + /** @example admin */ + role_name?: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** @example 108 */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow forking this repo + * @default false + * @example false + */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + * @example false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + }; + /** + * Project Card + * @description Project cards represent a scope of work. + */ + "project-card": { + /** + * Format: uri + * @example https://api.github.com/projects/columns/cards/1478 + */ + url: string; + /** + * @description The project card's ID + * @example 42 + */ + id: number; + /** @example MDExOlByb2plY3RDYXJkMTQ3OA== */ + node_id: string; + /** @example Add payload for delete Project column */ + note: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2016-09-05T14:21:06Z + */ + created_at: string; + /** + * Format: date-time + * @example 2016-09-05T14:20:22Z + */ + updated_at: string; + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean; + column_name?: string; + project_id?: string; + /** + * Format: uri + * @example https://api.github.com/projects/columns/367 + */ + column_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test/issues/3 + */ + content_url?: string; + /** + * Format: uri + * @example https://api.github.com/projects/120 + */ + project_url: string; + }; + /** + * Project Column + * @description Project columns contain cards of work. + */ + "project-column": { + /** + * Format: uri + * @example https://api.github.com/projects/columns/367 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/projects/120 + */ + project_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/columns/367/cards + */ + cards_url: string; + /** + * @description The unique identifier of the project column + * @example 42 + */ + id: number; + /** @example MDEzOlByb2plY3RDb2x1bW4zNjc= */ + node_id: string; + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + /** + * Format: date-time + * @example 2016-09-05T14:18:44Z + */ + created_at: string; + /** + * Format: date-time + * @example 2016-09-05T14:22:28Z + */ + updated_at: string; + }; + /** + * Project Collaborator Permission + * @description Project Collaborator Permission + */ + "project-collaborator-permission": { + permission: string; + user: components["schemas"]["nullable-simple-user"]; + }; + /** Rate Limit */ + "rate-limit": { + limit: number; + remaining: number; + reset: number; + used: number; + }; + /** + * Rate Limit Overview + * @description Rate Limit Overview + */ + "rate-limit-overview": { + resources: { + core: components["schemas"]["rate-limit"]; + graphql?: components["schemas"]["rate-limit"]; + search: components["schemas"]["rate-limit"]; + code_search?: components["schemas"]["rate-limit"]; + source_import?: components["schemas"]["rate-limit"]; + integration_manifest?: components["schemas"]["rate-limit"]; + code_scanning_upload?: components["schemas"]["rate-limit"]; + actions_runner_registration?: components["schemas"]["rate-limit"]; + scim?: components["schemas"]["rate-limit"]; + dependency_snapshots?: components["schemas"]["rate-limit"]; + }; + rate: components["schemas"]["rate-limit"]; + }; + /** + * Artifact + * @description An artifact + */ + artifact: { + /** @example 5 */ + id: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** + * @description The name of the artifact. + * @example AdventureWorks.Framework + */ + name: string; + /** + * @description The size in bytes of the artifact. + * @example 12345 + */ + size_in_bytes: number; + /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5 */ + url: string; + /** @example https://api.github.com/repos/github/hello-world/actions/artifacts/5/zip */ + archive_download_url: string; + /** @description Whether or not the artifact has expired. */ + expired: boolean; + /** Format: date-time */ + created_at: string | null; + /** Format: date-time */ + expires_at: string | null; + /** Format: date-time */ + updated_at: string | null; + workflow_run?: { + /** @example 10 */ + id?: number; + /** @example 42 */ + repository_id?: number; + /** @example 42 */ + head_repository_id?: number; + /** @example main */ + head_branch?: string; + /** @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d */ + head_sha?: string; + } | null; + }; + /** + * Repository actions caches + * @description Repository actions caches + */ + "actions-cache-list": { + /** + * @description Total number of caches + * @example 2 + */ + total_count: number; + /** @description Array of caches */ + actions_caches: { + /** @example 2 */ + id?: number; + /** @example refs/heads/main */ + ref?: string; + /** @example Linux-node-958aff96db2d75d67787d1e634ae70b659de937b */ + key?: string; + /** @example 73885106f58cc52a7df9ec4d4a5622a5614813162cb516c759a30af6bf56e6f0 */ + version?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + last_accessed_at?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + created_at?: string; + /** @example 1024 */ + size_in_bytes?: number; + }[]; + }; + /** + * Job + * @description Information of a job execution in a workflow run + */ + job: { + /** + * @description The id of the job. + * @example 21 + */ + id: number; + /** + * @description The id of the associated workflow run. + * @example 5 + */ + run_id: number; + /** @example https://api.github.com/repos/github/hello-world/actions/runs/5 */ + run_url: string; + /** + * @description Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run. + * @example 1 + */ + run_attempt?: number; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + /** + * @description The SHA of the commit that is being run. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example https://api.github.com/repos/github/hello-world/actions/jobs/21 */ + url: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string | null; + /** + * @description The phase of the lifecycle that the job is currently in. + * @example queued + * @enum {string} + */ + status: + | "queued" + | "in_progress" + | "completed" + | "waiting" + | "requested" + | "pending"; + /** + * @description The outcome of the job. + * @example success + * @enum {string|null} + */ + conclusion: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + | null; + /** + * Format: date-time + * @description The time that the job created, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + created_at: string; + /** + * Format: date-time + * @description The time that the job started, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + started_at: string; + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + completed_at: string | null; + /** + * @description The name of the job. + * @example test-coverage + */ + name: string; + /** @description Steps in this job. */ + steps?: { + /** + * @description The phase of the lifecycle that the job is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** + * @description The outcome of the job. + * @example success + */ + conclusion: string | null; + /** + * @description The name of the job. + * @example test-coverage + */ + name: string; + /** @example 1 */ + number: number; + /** + * Format: date-time + * @description The time that the step started, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + started_at?: string | null; + /** + * Format: date-time + * @description The time that the job finished, in ISO 8601 format. + * @example 2019-08-08T08:00:00-07:00 + */ + completed_at?: string | null; + }[]; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + check_run_url: string; + /** + * @description Labels for the workflow job. Specified by the "runs_on" attribute in the action's workflow file. + * @example [ + * "self-hosted", + * "foo", + * "bar" + * ] + */ + labels: string[]; + /** + * @description The ID of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example 1 + */ + runner_id: number | null; + /** + * @description The name of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example my runner + */ + runner_name: string | null; + /** + * @description The ID of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example 2 + */ + runner_group_id: number | null; + /** + * @description The name of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + * @example my runner group + */ + runner_group_name: string | null; + /** + * @description The name of the workflow. + * @example Build + */ + workflow_name: string | null; + /** + * @description The name of the current branch. + * @example main + */ + head_branch: string | null; + }; + /** + * Actions OIDC subject customization for a repository + * @description Actions OIDC subject customization for a repository + */ + "oidc-custom-sub-repo": { + /** @description Whether to use the default template or not. If `true`, the `include_claim_keys` field is ignored. */ + use_default: boolean; + /** @description Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. */ + include_claim_keys?: string[]; + }; + /** + * Actions Secret + * @description Set secrets for GitHub Actions. + */ + "actions-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** Actions Variable */ + "actions-variable": { + /** + * @description The name of the variable. + * @example USERNAME + */ + name: string; + /** + * @description The value of the variable. + * @example octocat + */ + value: string; + /** + * Format: date-time + * @description The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + * @example 2019-01-24T22:45:36.000Z + */ + updated_at: string; + }; + /** @description Whether GitHub Actions is enabled on the repository. */ + "actions-enabled": boolean; + "actions-repository-permissions": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + }; + "actions-workflow-access-to-repository": { + /** + * @description Defines the level of access that workflows outside of the repository have to actions and reusable workflows within the + * repository. + * + * `none` means 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 {string} + */ + access_level: "none" | "user" | "organization"; + }; + /** + * Referenced workflow + * @description A workflow referenced/reused by the initial caller workflow + */ + "referenced-workflow": { + path: string; + sha: string; + ref?: string; + }; + /** Pull Request Minimal */ + "pull-request-minimal": { + id: number; + number: number; + url: string; + head: { + ref: string; + sha: string; + repo: { + id: number; + url: string; + name: string; + }; + }; + base: { + ref: string; + sha: string; + repo: { + id: number; + url: string; + name: string; + }; + }; + }; + /** + * Simple Commit + * @description A commit. + */ + "nullable-simple-commit": { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + id: string; + /** @description SHA for the commit's tree */ + tree_id: string; + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string; + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + timestamp: string; + /** @description Information about the Git author */ + author: { + /** + * @description Name of the commit's author + * @example Monalisa Octocat + */ + name: string; + /** + * Format: email + * @description Git email address of the commit's author + * @example monalisa.octocat@example.com + */ + email: string; + } | null; + /** @description Information about the Git committer */ + committer: { + /** + * @description Name of the commit's committer + * @example Monalisa Octocat + */ + name: string; + /** + * Format: email + * @description Git email address of the commit's committer + * @example monalisa.octocat@example.com + */ + email: string; + } | null; + } | null; + /** + * Workflow Run + * @description An invocation of a workflow + */ + "workflow-run": { + /** + * @description The ID of the workflow run. + * @example 5 + */ + id: number; + /** + * @description The name of the workflow run. + * @example Build + */ + name?: string | null; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** + * @description The ID of the associated check suite. + * @example 42 + */ + check_suite_id?: number; + /** + * @description The node ID of the associated check suite. + * @example MDEwOkNoZWNrU3VpdGU0Mg== + */ + check_suite_node_id?: string; + /** @example master */ + head_branch: string | null; + /** + * @description The SHA of the head commit that points to the version of the workflow being run. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** + * @description The full path of the workflow + * @example octocat/octo-repo/.github/workflows/ci.yml@main + */ + path: string; + /** + * @description The auto incrementing run number for the workflow run. + * @example 106 + */ + run_number: number; + /** + * @description Attempt number of the run, 1 for first attempt and higher if the workflow was re-run. + * @example 1 + */ + run_attempt?: number; + referenced_workflows?: + | components["schemas"]["referenced-workflow"][] + | null; + /** @example push */ + event: string; + /** @example completed */ + status: string | null; + /** @example neutral */ + conclusion: string | null; + /** + * @description The ID of the parent workflow. + * @example 5 + */ + workflow_id: number; + /** + * @description The URL to the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5 + */ + url: string; + /** @example https://github.com/github/hello-world/suites/4 */ + html_url: string; + /** @description Pull requests that are open with a `head_sha` or `head_branch` that matches the workflow run. The returned pull requests do not necessarily indicate pull requests that triggered the run. */ + pull_requests: components["schemas"]["pull-request-minimal"][] | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + actor?: components["schemas"]["simple-user"]; + triggering_actor?: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @description The start time of the latest run. Resets on re-run. + */ + run_started_at?: string; + /** + * @description The URL to the jobs for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/jobs + */ + jobs_url: string; + /** + * @description The URL to download the logs for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/logs + */ + logs_url: string; + /** + * @description The URL to the associated check suite. + * @example https://api.github.com/repos/github/hello-world/check-suites/12 + */ + check_suite_url: string; + /** + * @description The URL to the artifacts for the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun/artifacts + */ + artifacts_url: string; + /** + * @description The URL to cancel the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/cancel + */ + cancel_url: string; + /** + * @description The URL to rerun the workflow run. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/rerun + */ + rerun_url: string; + /** + * @description The URL to the previous attempted run of this workflow, if one exists. + * @example https://api.github.com/repos/github/hello-world/actions/runs/5/attempts/3 + */ + previous_attempt_url?: string | null; + /** + * @description The URL to the workflow. + * @example https://api.github.com/repos/github/hello-world/actions/workflows/main.yaml + */ + workflow_url: string; + head_commit: components["schemas"]["nullable-simple-commit"]; + repository: components["schemas"]["minimal-repository"]; + head_repository: components["schemas"]["minimal-repository"]; + /** @example 5 */ + head_repository_id?: number; + /** + * @description The event-specific title associated with the run or the run-name if set, or the value of `run-name` if it is set in the workflow. + * @example Simple Workflow + */ + display_title: string; + }; + /** + * Environment Approval + * @description An entry in the reviews log for environment deployments + */ + "environment-approvals": { + /** @description The list of environments that were approved or rejected */ + environments: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id?: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id?: string; + /** + * @description The name of the environment. + * @example staging + */ + name?: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url?: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url?: string; + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + created_at?: string; + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + updated_at?: string; + }[]; + /** + * @description Whether deployment to the environment(s) was approved or rejected or pending (with comments) + * @example approved + * @enum {string} + */ + state: "approved" | "rejected" | "pending"; + user: components["schemas"]["simple-user"]; + /** + * @description The comment submitted with the deployment review + * @example Ship it! + */ + comment: string; + }; + "review-custom-gates-comment-required": { + /** @description The name of the environment to approve or reject. */ + environment_name: string; + /** @description Comment associated with the pending deployment protection rule. **Required when state is not provided.** */ + comment: string; + }; + "review-custom-gates-state-required": { + /** @description The name of the environment to approve or reject. */ + environment_name: string; + /** + * @description Whether to approve or reject deployment to the specified environments. + * @enum {string} + */ + state: "approved" | "rejected"; + /** @description Optional comment to include with the review. */ + comment?: string; + }; + /** + * @description The type of reviewer. + * @example User + * @enum {string} + */ + "deployment-reviewer-type": "User" | "Team"; + /** + * Pending Deployment + * @description Details of a deployment that is waiting for protection rules to pass + */ + "pending-deployment": { + environment: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id?: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id?: string; + /** + * @description The name of the environment. + * @example staging + */ + name?: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url?: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url?: string; + }; + /** + * @description The set duration of the wait timer + * @example 30 + */ + wait_timer: number; + /** + * Format: date-time + * @description The time that the wait timer began. + * @example 2020-11-23T22:00:40Z + */ + wait_timer_started_at: string | null; + /** + * @description Whether the currently authenticated user can approve the deployment + * @example true + */ + current_user_can_approve: boolean; + /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers: { + type?: components["schemas"]["deployment-reviewer-type"]; + reviewer?: + | components["schemas"]["simple-user"] + | components["schemas"]["team"]; + }[]; + }; + /** + * Deployment + * @description A request for a specific ref(branch,sha,tag) to be deployed + */ + deployment: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1 + */ + url: string; + /** + * @description Unique identifier of the deployment + * @example 42 + */ + id: number; + /** @example MDEwOkRlcGxveW1lbnQx */ + node_id: string; + /** @example a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d */ + sha: string; + /** + * @description The ref to deploy. This can be a branch, tag, or sha. + * @example topic-branch + */ + ref: string; + /** + * @description Parameter to specify a task to execute + * @example deploy + */ + task: string; + payload: OneOf< + [ + { + [key: string]: unknown; + }, + string, + ] + >; + /** @example staging */ + original_environment?: string; + /** + * @description Name for the target deployment environment. + * @example production + */ + environment: string; + /** @example Deploy request from hubot */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1/statuses + */ + statuses_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. + * @example true + */ + transient_environment?: boolean; + /** + * @description Specifies if the given environment is one that end-users directly interact with. Default: false. + * @example true + */ + production_environment?: boolean; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * Workflow Run Usage + * @description Workflow Run Usage + */ + "workflow-run-usage": { + billable: { + UBUNTU?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + MACOS?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + WINDOWS?: { + total_ms: number; + jobs: number; + job_runs?: { + job_id: number; + duration_ms: number; + }[]; + }; + }; + run_duration_ms?: number; + }; + /** + * Workflow + * @description A GitHub Actions workflow + */ + workflow: { + /** @example 5 */ + id: number; + /** @example MDg6V29ya2Zsb3cxMg== */ + node_id: string; + /** @example CI */ + name: string; + /** @example ruby.yaml */ + path: string; + /** + * @example active + * @enum {string} + */ + state: + | "active" + | "deleted" + | "disabled_fork" + | "disabled_inactivity" + | "disabled_manually"; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + created_at: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + updated_at: string; + /** @example https://api.github.com/repos/actions/setup-ruby/workflows/5 */ + url: string; + /** @example https://github.com/actions/setup-ruby/blob/master/.github/workflows/ruby.yaml */ + html_url: string; + /** @example https://github.com/actions/setup-ruby/workflows/CI/badge.svg */ + badge_url: string; + /** + * Format: date-time + * @example 2019-12-06T14:20:20.000Z + */ + deleted_at?: string; + }; + /** + * Workflow Usage + * @description Workflow Usage + */ + "workflow-usage": { + billable: { + UBUNTU?: { + total_ms?: number; + }; + MACOS?: { + total_ms?: number; + }; + WINDOWS?: { + total_ms?: number; + }; + }; + }; + /** + * Activity + * @description Activity + */ + activity: { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The SHA of the commit before the activity. + * @example 6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + before: string; + /** + * @description The SHA of the commit after the activity. + * @example 827efc6d56897b048c772eb4087f854f46256132 + */ + after: string; + /** + * @description The full Git reference, formatted as `refs/heads/`. + * @example refs/heads/main + */ + ref: string; + /** + * Format: date-time + * @description The time when the activity occurred. + * @example 2011-01-26T19:06:43Z + */ + timestamp: string; + /** + * @description The type of the activity that was performed. + * @example force_push + * @enum {string} + */ + activity_type: + | "push" + | "force_push" + | "branch_deletion" + | "branch_creation" + | "pr_merge" + | "merge_queue_merge"; + actor: components["schemas"]["nullable-simple-user"]; + }; + /** + * Autolink reference + * @description An autolink reference. + */ + autolink: { + /** @example 3 */ + id: number; + /** + * @description The prefix of a key that is linkified. + * @example TICKET- + */ + key_prefix: string; + /** + * @description A template for the target URL that is generated if a key was found. + * @example https://example.com/TICKET?query= + */ + url_template: string; + /** + * @description Whether this autolink reference matches alphanumeric characters. If false, this autolink reference only matches numeric characters. + * @example true + */ + is_alphanumeric: boolean; + }; + /** + * Check Automated Security Fixes + * @description Check Automated Security Fixes + */ + "check-automated-security-fixes": { + /** + * @description Whether automated security fixes are enabled for the repository. + * @example true + */ + enabled: boolean; + /** + * @description Whether automated security fixes are paused for the repository. + * @example false + */ + paused: boolean; + }; + /** + * Protected Branch Required Status Check + * @description Protected Branch Required Status Check + */ + "protected-branch-required-status-check": { + url?: string; + enforcement_level?: string; + contexts: string[]; + checks: { + context: string; + app_id: number | null; + }[]; + contexts_url?: string; + strict?: boolean; + }; + /** + * Protected Branch Admin Enforced + * @description Protected Branch Admin Enforced + */ + "protected-branch-admin-enforced": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins + */ + url: string; + /** @example true */ + enabled: boolean; + }; + /** + * Protected Branch Pull Request Review + * @description Protected Branch Pull Request Review + */ + "protected-branch-pull-request-review": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions + */ + url?: string; + dismissal_restrictions?: { + /** @description The list of users with review dismissal access. */ + users?: components["schemas"]["simple-user"][]; + /** @description The list of teams with review dismissal access. */ + teams?: components["schemas"]["team"][]; + /** @description The list of apps with review dismissal access. */ + apps?: components["schemas"]["integration"][]; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions" */ + url?: string; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/users" */ + users_url?: string; + /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/teams" */ + teams_url?: string; + }; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of users allowed to bypass pull request requirements. */ + users?: components["schemas"]["simple-user"][]; + /** @description The list of teams allowed to bypass pull request requirements. */ + teams?: components["schemas"]["team"][]; + /** @description The list of apps allowed to bypass pull request requirements. */ + apps?: components["schemas"]["integration"][]; + }; + /** @example true */ + dismiss_stale_reviews: boolean; + /** @example true */ + require_code_owner_reviews: boolean; + /** @example 2 */ + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. + * @default false + * @example true + */ + require_last_push_approval?: boolean; + }; + /** + * Branch Restriction Policy + * @description Branch Restriction Policy + */ + "branch-restriction-policy": { + /** Format: uri */ + url: string; + /** Format: uri */ + users_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri */ + apps_url: string; + users: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }[]; + teams: { + id?: number; + node_id?: string; + url?: string; + html_url?: string; + name?: string; + slug?: string; + description?: string | null; + privacy?: string; + notification_setting?: string; + permission?: string; + members_url?: string; + repositories_url?: string; + parent?: string | null; + }[]; + apps: { + id?: number; + slug?: string; + node_id?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + url?: string; + repos_url?: string; + events_url?: string; + hooks_url?: string; + issues_url?: string; + members_url?: string; + public_members_url?: string; + avatar_url?: string; + description?: string; + /** @example "" */ + gravatar_id?: string; + /** @example "https://github.com/testorg-ea8ec76d71c3af4b" */ + html_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/followers" */ + followers_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/following{/other_user}" */ + following_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/gists{/gist_id}" */ + gists_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/starred{/owner}{/repo}" */ + starred_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/subscriptions" */ + subscriptions_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/orgs" */ + organizations_url?: string; + /** @example "https://api.github.com/users/testorg-ea8ec76d71c3af4b/received_events" */ + received_events_url?: string; + /** @example "Organization" */ + type?: string; + /** @example false */ + site_admin?: boolean; + }; + name?: string; + description?: string; + external_url?: string; + html_url?: string; + created_at?: string; + updated_at?: string; + permissions?: { + metadata?: string; + contents?: string; + issues?: string; + single_file?: string; + }; + events?: string[]; + }[]; + }; + /** + * Branch Protection + * @description Branch Protection + */ + "branch-protection": { + url?: string; + enabled?: boolean; + required_status_checks?: components["schemas"]["protected-branch-required-status-check"]; + enforce_admins?: components["schemas"]["protected-branch-admin-enforced"]; + required_pull_request_reviews?: components["schemas"]["protected-branch-pull-request-review"]; + restrictions?: components["schemas"]["branch-restriction-policy"]; + required_linear_history?: { + enabled?: boolean; + }; + allow_force_pushes?: { + enabled?: boolean; + }; + allow_deletions?: { + enabled?: boolean; + }; + block_creations?: { + enabled?: boolean; + }; + required_conversation_resolution?: { + enabled?: boolean; + }; + /** @example "branch/with/protection" */ + name?: string; + /** @example "https://api.github.com/repos/owner-79e94e2d36b3fd06a32bb213/AAA_Public_Repo/branches/branch/with/protection/protection" */ + protection_url?: string; + required_signatures?: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures + */ + url: string; + /** @example true */ + enabled: boolean; + }; + /** @description Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. */ + lock_branch?: { + /** @default false */ + enabled?: boolean; + }; + /** @description Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. */ + allow_fork_syncing?: { + /** @default false */ + enabled?: boolean; + }; + }; + /** + * Short Branch + * @description Short Branch + */ + "short-branch": { + name: string; + commit: { + sha: string; + /** Format: uri */ + url: string; + }; + protected: boolean; + protection?: components["schemas"]["branch-protection"]; + /** Format: uri */ + protection_url?: string; + }; + /** + * Git User + * @description Metaproperties for Git author/committer information. + */ + "nullable-git-user": { + /** @example "Chris Wanstrath" */ + name?: string; + /** @example "chris@ozmm.org" */ + email?: string; + /** @example "2007-10-29T02:42:39.000-07:00" */ + date?: string; + } | null; + /** Verification */ + verification: { + verified: boolean; + reason: string; + payload: string | null; + signature: string | null; + }; + /** + * Diff Entry + * @description Diff Entry + */ + "diff-entry": { + /** @example bbcd538c8e72b8c175046e27cc8f907076331401 */ + sha: string; + /** @example file1.txt */ + filename: string; + /** + * @example added + * @enum {string} + */ + status: + | "added" + | "removed" + | "modified" + | "renamed" + | "copied" + | "changed" + | "unchanged"; + /** @example 103 */ + additions: number; + /** @example 21 */ + deletions: number; + /** @example 124 */ + changes: number; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt + */ + blob_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt + */ + raw_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + contents_url: string; + /** @example @@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test */ + patch?: string; + /** @example file.txt */ + previous_filename?: string; + }; + /** + * Commit + * @description Commit + */ + commit: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + url: string; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + sha: string; + /** @example MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments + */ + comments_url: string; + commit: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + url: string; + author: components["schemas"]["nullable-git-user"]; + committer: components["schemas"]["nullable-git-user"]; + /** @example Fix all the bugs */ + message: string; + /** @example 0 */ + comment_count: number; + tree: { + /** @example 827efc6d56897b048c772eb4087f854f46256132 */ + sha: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/tree/827efc6d56897b048c772eb4087f854f46256132 + */ + url: string; + }; + verification?: components["schemas"]["verification"]; + }; + author: components["schemas"]["nullable-simple-user"]; + committer: components["schemas"]["nullable-simple-user"]; + parents: { + /** @example 7638417db6d59f3c431d3e1f261cc637155684cd */ + sha: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/commits/7638417db6d59f3c431d3e1f261cc637155684cd + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd + */ + html_url?: string; + }[]; + stats?: { + additions?: number; + deletions?: number; + total?: number; + }; + files?: components["schemas"]["diff-entry"][]; + }; + /** + * Branch With Protection + * @description Branch With Protection + */ + "branch-with-protection": { + name: string; + commit: components["schemas"]["commit"]; + _links: { + html: string; + /** Format: uri */ + self: string; + }; + protected: boolean; + protection: components["schemas"]["branch-protection"]; + /** Format: uri */ + protection_url: string; + /** @example "mas*" */ + pattern?: string; + /** @example 1 */ + required_approving_review_count?: number; + }; + /** + * Status Check Policy + * @description Status Check Policy + */ + "status-check-policy": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks + */ + url: string; + /** @example true */ + strict: boolean; + /** + * @example [ + * "continuous-integration/travis-ci" + * ] + */ + contexts: string[]; + checks: { + /** @example continuous-integration/travis-ci */ + context: string; + app_id: number | null; + }[]; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts + */ + contexts_url: string; + }; + /** + * Protected Branch + * @description Branch protections protect branches + */ + "protected-branch": { + /** Format: uri */ + url: string; + required_status_checks?: components["schemas"]["status-check-policy"]; + required_pull_request_reviews?: { + /** Format: uri */ + url: string; + dismiss_stale_reviews?: boolean; + require_code_owner_reviews?: boolean; + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. + * @default false + */ + require_last_push_approval?: boolean; + dismissal_restrictions?: { + /** Format: uri */ + url: string; + /** Format: uri */ + users_url: string; + /** Format: uri */ + teams_url: string; + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + apps?: components["schemas"]["integration"][]; + }; + bypass_pull_request_allowances?: { + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + apps?: components["schemas"]["integration"][]; + }; + }; + required_signatures?: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures + */ + url: string; + /** @example true */ + enabled: boolean; + }; + enforce_admins?: { + /** Format: uri */ + url: string; + enabled: boolean; + }; + required_linear_history?: { + enabled: boolean; + }; + allow_force_pushes?: { + enabled: boolean; + }; + allow_deletions?: { + enabled: boolean; + }; + restrictions?: components["schemas"]["branch-restriction-policy"]; + required_conversation_resolution?: { + enabled?: boolean; + }; + block_creations?: { + enabled: boolean; + }; + /** @description Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. */ + lock_branch?: { + /** @default false */ + enabled?: boolean; + }; + /** @description Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. */ + allow_fork_syncing?: { + /** @default false */ + enabled?: boolean; + }; + }; + /** + * Deployment + * @description A deployment created as the result of an Actions check run from a workflow that references an environment + */ + "deployment-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1 + */ + url: string; + /** + * @description Unique identifier of the deployment + * @example 42 + */ + id: number; + /** @example MDEwOkRlcGxveW1lbnQx */ + node_id: string; + /** + * @description Parameter to specify a task to execute + * @example deploy + */ + task: string; + /** @example staging */ + original_environment?: string; + /** + * @description Name for the target deployment environment. + * @example production + */ + environment: string; + /** @example Deploy request from hubot */ + description: string | null; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/1/statuses + */ + statuses_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * @description Specifies if the given environment is will no longer exist at some point in the future. Default: false. + * @example true + */ + transient_environment?: boolean; + /** + * @description Specifies if the given environment is one that end-users directly interact with. Default: false. + * @example true + */ + production_environment?: boolean; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * CheckRun + * @description A check performed on the code of a given code change + */ + "check-run": { + /** + * @description The id of the check. + * @example 21 + */ + id: number; + /** + * @description The SHA of the commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + /** @example 42 */ + external_id: string | null; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + url: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string | null; + /** @example https://example.com */ + details_url: string | null; + /** + * @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 + * @enum {string} + */ + status: + | "queued" + | "in_progress" + | "completed" + | "waiting" + | "requested" + | "pending"; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + | null; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + started_at: string | null; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + completed_at: string | null; + output: { + title: string | null; + summary: string | null; + text: string | null; + annotations_count: number; + /** Format: uri */ + annotations_url: string; + }; + /** + * @description The name of the check. + * @example test-coverage + */ + name: string; + check_suite: { + id: number; + } | null; + app: components["schemas"]["nullable-integration"]; + /** @description Pull requests that are open with a `head_sha` or `head_branch` that matches the check. The returned pull requests do not necessarily indicate pull requests that triggered the check. */ + pull_requests: components["schemas"]["pull-request-minimal"][]; + deployment?: components["schemas"]["deployment-simple"]; + }; + /** + * Check Annotation + * @description Check Annotation + */ + "check-annotation": { + /** @example README.md */ + path: string; + /** @example 2 */ + start_line: number; + /** @example 2 */ + end_line: number; + /** @example 5 */ + start_column: number | null; + /** @example 10 */ + end_column: number | null; + /** @example warning */ + annotation_level: string | null; + /** @example Spell Checker */ + title: string | null; + /** @example Check your spelling for 'banaas'. */ + message: string | null; + /** @example Do you mean 'bananas' or 'banana'? */ + raw_details: string | null; + blob_href: string; + }; + /** + * Simple Commit + * @description A commit. + */ + "simple-commit": { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + id: string; + /** @description SHA for the commit's tree */ + tree_id: string; + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string; + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + timestamp: string; + /** @description Information about the Git author */ + author: { + /** + * @description Name of the commit's author + * @example Monalisa Octocat + */ + name: string; + /** + * Format: email + * @description Git email address of the commit's author + * @example monalisa.octocat@example.com + */ + email: string; + } | null; + /** @description Information about the Git committer */ + committer: { + /** + * @description Name of the commit's committer + * @example Monalisa Octocat + */ + name: string; + /** + * Format: email + * @description Git email address of the commit's committer + * @example monalisa.octocat@example.com + */ + email: string; + } | null; + }; + /** + * CheckSuite + * @description A suite of checks performed on the code of a given code change + */ + "check-suite": { + /** @example 5 */ + id: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id: string; + /** @example master */ + head_branch: string | null; + /** + * @description The SHA of the head commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: 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 {string|null} + */ + status: + | "queued" + | "in_progress" + | "completed" + | "waiting" + | "requested" + | "pending" + | null; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + | "startup_failure" + | "stale" + | null; + /** @example https://api.github.com/repos/github/hello-world/check-suites/5 */ + url: string | null; + /** @example 146e867f55c26428e5f9fade55a9bbf5e95a7912 */ + before: string | null; + /** @example d6fde92930d4715a2b49857d24b940956b26d2d3 */ + after: string | null; + pull_requests: components["schemas"]["pull-request-minimal"][] | null; + app: components["schemas"]["nullable-integration"]; + repository: components["schemas"]["minimal-repository"]; + /** Format: date-time */ + created_at: string | null; + /** Format: date-time */ + updated_at: string | null; + head_commit: components["schemas"]["simple-commit"]; + latest_check_runs_count: number; + check_runs_url: string; + rerequestable?: boolean; + runs_rerequestable?: boolean; + }; + /** + * Check Suite Preference + * @description Check suite configuration preferences for a repository. + */ + "check-suite-preference": { + preferences: { + auto_trigger_checks?: { + app_id: number; + setting: boolean; + }[]; + }; + repository: components["schemas"]["minimal-repository"]; + }; + "code-scanning-alert-items": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule-summary"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + }; + "code-scanning-alert-rule": { + /** @description A unique identifier for the rule used to detect the alert. */ + id?: string | null; + /** @description The name of the rule used to detect the alert. */ + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: "none" | "note" | "warning" | "error" | null; + /** + * @description The security severity of the alert. + * @enum {string|null} + */ + security_severity_level?: "low" | "medium" | "high" | "critical" | null; + /** @description A short description of the rule used to detect the alert. */ + description?: string; + /** @description description of the rule used to detect the alert. */ + full_description?: string; + /** @description A set of tags applicable for the rule. */ + tags?: string[] | null; + /** @description Detailed documentation for the rule as GitHub Flavored Markdown. */ + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + }; + "code-scanning-alert": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["alert-updated-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + fixed_at?: components["schemas"]["alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + rule: components["schemas"]["code-scanning-alert-rule"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + }; + /** + * @description Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. + * @enum {string} + */ + "code-scanning-alert-set-state": "open" | "dismissed"; + /** + * @description An identifier for the upload. + * @example 6c81cd8e-b078-4ac3-a3be-1dad7dbd0b53 + */ + "code-scanning-analysis-sarif-id": string; + /** @description The SHA of the commit to which the analysis you are uploading relates. */ + "code-scanning-analysis-commit-sha": string; + /** @description Identifies the variable values associated with the environment in which this analysis was performed. */ + "code-scanning-analysis-environment": string; + /** + * Format: date-time + * @description The time that the analysis was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + readonly "code-scanning-analysis-created-at": string; + /** + * Format: uri + * @description The REST API URL of the analysis resource. + */ + readonly "code-scanning-analysis-url": string; + "code-scanning-analysis": { + ref: components["schemas"]["code-scanning-ref"]; + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + analysis_key: components["schemas"]["code-scanning-analysis-analysis-key"]; + environment: components["schemas"]["code-scanning-analysis-environment"]; + category?: components["schemas"]["code-scanning-analysis-category"]; + /** @example error reading field xyz */ + error: string; + created_at: components["schemas"]["code-scanning-analysis-created-at"]; + /** @description The total number of results in the analysis. */ + results_count: number; + /** @description The total number of rules used in the analysis. */ + rules_count: number; + /** @description Unique identifier for this analysis. */ + id: number; + url: components["schemas"]["code-scanning-analysis-url"]; + sarif_id: components["schemas"]["code-scanning-analysis-sarif-id"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + deletable: boolean; + /** + * @description Warning generated when processing the analysis + * @example 123 results were ignored + */ + warning: string; + }; + /** + * Analysis deletion + * @description Successful deletion of a code scanning analysis + */ + "code-scanning-analysis-deletion": { + /** + * Format: uri + * @description Next deletable analysis in chain, without last analysis deletion confirmation + */ + next_analysis_url: string | null; + /** + * Format: uri + * @description Next deletable analysis in chain, with last analysis deletion confirmation + */ + confirm_delete_url: string | null; + }; + /** + * CodeQL Database + * @description A CodeQL database. + */ + "code-scanning-codeql-database": { + /** @description The ID of the CodeQL database. */ + id: number; + /** @description The name of the CodeQL database. */ + name: string; + /** @description The language of the CodeQL database. */ + language: string; + uploader: components["schemas"]["simple-user"]; + /** @description The MIME type of the CodeQL database file. */ + content_type: string; + /** @description The size of the CodeQL database file in bytes. */ + size: number; + /** + * Format: date-time + * @description The date and time at which the CodeQL database was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the CodeQL database was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * 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. + */ + url: string; + /** @description The commit SHA of the repository at the time the CodeQL database was created. */ + commit_oid?: string | null; + }; + /** @description Configuration for code scanning default setup. */ + "code-scanning-default-setup": { + /** + * @description Code scanning default setup has been configured or not. + * @enum {string} + */ + state?: "configured" | "not-configured"; + /** @description Languages to be analyzed. */ + languages?: ( + | "c-cpp" + | "csharp" + | "go" + | "java-kotlin" + | "javascript-typescript" + | "javascript" + | "python" + | "ruby" + | "typescript" + | "swift" + )[]; + /** + * @description CodeQL query suite to be used. + * @enum {string} + */ + query_suite?: "default" | "extended"; + /** + * Format: date-time + * @description Timestamp of latest configuration update. + * @example 2023-12-06T14:20:20.000Z + */ + updated_at?: string | null; + /** + * @description The frequency of the periodic analysis. + * @enum {string|null} + */ + schedule?: "weekly" | null; + }; + /** @description Configuration for code scanning default setup. */ + "code-scanning-default-setup-update": { + /** + * @description The desired state of code scanning default setup. + * @enum {string} + */ + state?: "configured" | "not-configured"; + /** + * @description CodeQL query suite to be used. + * @enum {string} + */ + query_suite?: "default" | "extended"; + /** @description CodeQL languages to be analyzed. */ + languages?: ( + | "c-cpp" + | "csharp" + | "go" + | "java-kotlin" + | "javascript-typescript" + | "python" + | "ruby" + | "swift" + )[]; + }; + /** + * @description You can use `run_url` to track the status of the run. This includes a property status and conclusion. + * You should not rely on this always being an actions workflow run object. + */ + "code-scanning-default-setup-update-response": { + /** @description ID of the corresponding run. */ + run_id?: number; + /** @description URL of the corresponding run. */ + run_url?: string; + }; + /** + * @description The full Git reference, formatted as `refs/heads/`, + * `refs/tags/`, `refs/pull//merge`, or `refs/pull//head`. + * @example refs/heads/main + */ + "code-scanning-ref-full": string; + /** @description A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/code-security/secure-coding/sarif-support-for-code-scanning)." */ + "code-scanning-analysis-sarif-file": string; + "code-scanning-sarifs-receipt": { + id?: components["schemas"]["code-scanning-analysis-sarif-id"]; + /** + * Format: uri + * @description The REST API URL for checking the status of the upload. + */ + url?: string; + }; + "code-scanning-sarifs-status": { + /** + * @description `pending` files have not yet been processed, while `complete` means results from the SARIF have been stored. `failed` files have either not been processed at all, or could only be partially processed. + * @enum {string} + */ + processing_status?: "pending" | "complete" | "failed"; + /** + * Format: uri + * @description The REST API URL for getting the analyses associated with the upload. + */ + analyses_url?: string | null; + /** @description Any errors that ocurred during processing of the delivery. */ + errors?: readonly string[] | null; + }; + /** + * CODEOWNERS errors + * @description A list of errors found in a repo's CODEOWNERS file + */ + "codeowners-errors": { + errors: { + /** + * @description The line number where this errors occurs. + * @example 7 + */ + line: number; + /** + * @description The column number where this errors occurs. + * @example 3 + */ + column: number; + /** + * @description The contents of the line where the error occurs. + * @example * user + */ + source?: string; + /** + * @description The type of error. + * @example Invalid owner + */ + kind: string; + /** + * @description Suggested action to fix the error. This will usually be `null`, but is provided for some common errors. + * @example The pattern `/` will never match anything, did you mean `*` instead? + */ + suggestion?: string | null; + /** + * @description A human-readable description of the error, combining information from multiple fields, laid out for display in a monospaced typeface (for example, a command-line setting). + * @example Invalid owner on line 7: + * + * * user + * ^ + */ + message: string; + /** + * @description The path of the file where the error occured. + * @example .github/CODEOWNERS + */ + path: string; + }[]; + }; + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + "codespace-machine": { + /** + * @description The name of the machine. + * @example standardLinux + */ + name: string; + /** + * @description The display name of the machine includes cores, memory, and storage. + * @example 4 cores, 16 GB RAM, 64 GB storage + */ + display_name: string; + /** + * @description The operating system of the machine. + * @example linux + */ + operating_system: string; + /** + * @description How much storage is available to the codespace. + * @example 68719476736 + */ + storage_in_bytes: number; + /** + * @description How much memory is available to the codespace. + * @example 17179869184 + */ + memory_in_bytes: number; + /** + * @description How many cores are available to the codespace. + * @example 4 + */ + cpus: number; + /** + * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. + * @example ready + * @enum {string|null} + */ + prebuild_availability: "none" | "ready" | "in_progress" | null; + }; + /** + * Codespaces Permissions Check + * @description Permission check result for a given devcontainer config. + */ + "codespaces-permissions-check-for-devcontainer": { + /** + * @description Whether the user has accepted the permissions defined by the devcontainer config + * @example true + */ + accepted: boolean; + }; + /** + * Codespaces Secret + * @description Set repository secrets for GitHub Codespaces. + */ + "repo-codespaces-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Collaborator + * @description Collaborator + */ + collaborator: { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + email?: string | null; + name?: string | null; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + permissions?: { + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + admin: boolean; + }; + /** @example admin */ + role_name: string; + }; + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + "repository-invitation": { + /** + * @description Unique identifier of the repository invitation. + * @example 42 + */ + id: number; + repository: components["schemas"]["minimal-repository"]; + invitee: components["schemas"]["nullable-simple-user"]; + inviter: components["schemas"]["nullable-simple-user"]; + /** + * @description The permission associated with the invitation. + * @example read + * @enum {string} + */ + permissions: "read" | "write" | "admin" | "triage" | "maintain"; + /** + * Format: date-time + * @example 2016-06-13T14:52:50-05:00 + */ + created_at: string; + /** @description Whether or not the invitation has expired */ + expired?: boolean; + /** + * @description URL for the repository invitation + * @example https://api.github.com/user/repository-invitations/1 + */ + url: string; + /** @example https://github.com/octocat/Hello-World/invitations */ + html_url: string; + node_id: string; + }; + /** + * Collaborator + * @description Collaborator + */ + "nullable-collaborator": { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + email?: string | null; + name?: string | null; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + permissions?: { + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + admin: boolean; + }; + /** @example admin */ + role_name: string; + } | null; + /** + * Repository Collaborator Permission + * @description Repository Collaborator Permission + */ + "repository-collaborator-permission": { + permission: string; + /** @example admin */ + role_name: string; + user: components["schemas"]["nullable-collaborator"]; + }; + /** + * Commit Comment + * @description Commit Comment + */ + "commit-comment": { + /** Format: uri */ + html_url: string; + /** Format: uri */ + url: string; + id: number; + node_id: string; + body: string; + path: string | null; + position: number | null; + line: number | null; + commit_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Branch Short + * @description Branch Short + */ + "branch-short": { + name: string; + commit: { + sha: string; + url: string; + }; + protected: boolean; + }; + /** + * Link + * @description Hypermedia Link + */ + link: { + href: string; + }; + /** + * Auto merge + * @description The status of auto merging a pull request. + */ + "auto-merge": { + enabled_by: components["schemas"]["simple-user"]; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + /** @description Title for the merge commit message. */ + commit_title: string; + /** @description Commit message for the merge commit. */ + commit_message: string; + } | null; + /** + * Pull Request Simple + * @description Pull Request Simple + */ + "pull-request-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347 + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.patch + */ + patch_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + */ + commits_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + */ + review_comments_url: string; + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ + review_comment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + */ + comments_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + statuses_url: string; + /** @example 1347 */ + number: number; + /** @example open */ + state: string; + /** @example true */ + locked: boolean; + /** @example new-feature */ + title: string; + user: components["schemas"]["nullable-simple-user"]; + /** @example Please pull these awesome changes */ + body: string | null; + labels: { + /** Format: int64 */ + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }[]; + milestone: components["schemas"]["nullable-milestone"]; + /** @example too heated */ + active_lock_reason?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + merged_at: string | null; + /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ + merge_commit_sha: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + requested_reviewers?: components["schemas"]["simple-user"][] | null; + requested_teams?: components["schemas"]["team"][] | null; + head: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: components["schemas"]["nullable-simple-user"]; + }; + base: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: components["schemas"]["nullable-simple-user"]; + }; + _links: { + comments: components["schemas"]["link"]; + commits: components["schemas"]["link"]; + statuses: components["schemas"]["link"]; + html: components["schemas"]["link"]; + issue: components["schemas"]["link"]; + review_comments: components["schemas"]["link"]; + review_comment: components["schemas"]["link"]; + self: components["schemas"]["link"]; + }; + author_association: components["schemas"]["author-association"]; + auto_merge: components["schemas"]["auto-merge"]; + /** + * @description Indicates whether or not the pull request is a draft. + * @example false + */ + draft?: boolean; + }; + /** Simple Commit Status */ + "simple-commit-status": { + description: string | null; + id: number; + node_id: string; + state: string; + context: string; + /** Format: uri */ + target_url: string | null; + required?: boolean | null; + /** Format: uri */ + avatar_url: string | null; + /** Format: uri */ + url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Combined Commit Status + * @description Combined Commit Status + */ + "combined-commit-status": { + state: string; + statuses: components["schemas"]["simple-commit-status"][]; + sha: string; + total_count: number; + repository: components["schemas"]["minimal-repository"]; + /** Format: uri */ + commit_url: string; + /** Format: uri */ + url: string; + }; + /** + * Status + * @description The status of a commit. + */ + status: { + url: string; + avatar_url: string | null; + id: number; + node_id: string; + state: string; + description: string | null; + target_url: string | null; + context: string; + created_at: string; + updated_at: string; + creator: components["schemas"]["nullable-simple-user"]; + }; + /** + * Code Of Conduct Simple + * @description Code of Conduct Simple + */ + "nullable-code-of-conduct-simple": { + /** + * Format: uri + * @example https://api.github.com/repos/github/docs/community/code_of_conduct + */ + url: string; + /** @example citizen_code_of_conduct */ + key: string; + /** @example Citizen Code of Conduct */ + name: string; + /** + * Format: uri + * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md + */ + html_url: string | null; + } | null; + /** Community Health File */ + "nullable-community-health-file": { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + } | null; + /** + * Community Profile + * @description Community Profile + */ + "community-profile": { + /** @example 100 */ + health_percentage: number; + /** @example My first repository on GitHub! */ + description: string | null; + /** @example example.com */ + documentation: string | null; + files: { + code_of_conduct: components["schemas"]["nullable-code-of-conduct-simple"]; + code_of_conduct_file: components["schemas"]["nullable-community-health-file"]; + license: components["schemas"]["nullable-license-simple"]; + contributing: components["schemas"]["nullable-community-health-file"]; + readme: components["schemas"]["nullable-community-health-file"]; + issue_template: components["schemas"]["nullable-community-health-file"]; + pull_request_template: components["schemas"]["nullable-community-health-file"]; + }; + /** + * Format: date-time + * @example 2017-02-28T19:09:29Z + */ + updated_at: string | null; + /** @example true */ + content_reports_enabled?: boolean; + }; + /** + * Commit Comparison + * @description Commit Comparison + */ + "commit-comparison": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/compare/master...topic + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17 + */ + permalink_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/compare/master...topic.patch + */ + patch_url: string; + base_commit: components["schemas"]["commit"]; + merge_base_commit: components["schemas"]["commit"]; + /** + * @example ahead + * @enum {string} + */ + status: "diverged" | "ahead" | "behind" | "identical"; + /** @example 4 */ + ahead_by: number; + /** @example 5 */ + behind_by: number; + /** @example 6 */ + total_commits: number; + commits: components["schemas"]["commit"][]; + files?: components["schemas"]["diff-entry"][]; + }; + /** + * Content Tree + * @description Content Tree + */ + "content-tree": { + type: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + entries?: { + type: string; + size: number; + name: string; + path: string; + content?: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }[]; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }; + /** + * Content Directory + * @description A list of directory items + */ + "content-directory": { + /** @enum {string} */ + type: "dir" | "file" | "submodule" | "symlink"; + size: number; + name: string; + path: string; + content?: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }[]; + /** + * Content File + * @description Content File + */ + "content-file": { + /** @enum {string} */ + type: "file"; + encoding: string; + size: number; + name: string; + path: string; + content: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + /** @example "actual/actual.md" */ + target?: string; + /** @example "git://example.com/defunkt/dotjs.git" */ + submodule_git_url?: string; + }; + /** + * Symlink Content + * @description An object describing a symlink + */ + "content-symlink": { + /** @enum {string} */ + type: "symlink"; + target: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }; + /** + * Submodule Content + * @description An object describing a submodule + */ + "content-submodule": { + /** @enum {string} */ + type: "submodule"; + /** Format: uri */ + submodule_git_url: string; + size: number; + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + download_url: string | null; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + }; + /** + * File Commit + * @description File Commit + */ + "file-commit": { + content: { + name?: string; + path?: string; + sha?: string; + size?: number; + url?: string; + html_url?: string; + git_url?: string; + download_url?: string; + type?: string; + _links?: { + self?: string; + git?: string; + html?: string; + }; + } | null; + commit: { + sha?: string; + node_id?: string; + url?: string; + html_url?: string; + author?: { + date?: string; + name?: string; + email?: string; + }; + committer?: { + date?: string; + name?: string; + email?: string; + }; + message?: string; + tree?: { + url?: string; + sha?: string; + }; + parents?: { + url?: string; + html_url?: string; + sha?: string; + }[]; + verification?: { + verified?: boolean; + reason?: string; + signature?: string | null; + payload?: string | null; + }; + }; + }; + /** + * Contributor + * @description Contributor + */ + contributor: { + login?: string; + id?: number; + node_id?: string; + /** Format: uri */ + avatar_url?: string; + gravatar_id?: string | null; + /** Format: uri */ + url?: string; + /** Format: uri */ + html_url?: string; + /** Format: uri */ + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + repos_url?: string; + events_url?: string; + /** Format: uri */ + received_events_url?: string; + type: string; + site_admin?: boolean; + contributions: number; + email?: string; + name?: string; + }; + /** @description A Dependabot alert. */ + "dependabot-alert": { + number: components["schemas"]["alert-number"]; + /** + * @description The state of the Dependabot alert. + * @enum {string} + */ + state: "auto_dismissed" | "dismissed" | "fixed" | "open"; + /** @description Details for the vulnerable dependency. */ + dependency: { + readonly package?: components["schemas"]["dependabot-alert-package"]; + /** @description The full path to the dependency manifest file, relative to the root of the repository. */ + readonly manifest_path?: string; + /** + * @description The execution scope of the vulnerable dependency. + * @enum {string|null} + */ + readonly scope?: "development" | "runtime" | null; + }; + security_advisory: components["schemas"]["dependabot-alert-security-advisory"]; + security_vulnerability: components["schemas"]["dependabot-alert-security-vulnerability"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + created_at: components["schemas"]["alert-created-at"]; + updated_at: components["schemas"]["alert-updated-at"]; + dismissed_at: components["schemas"]["alert-dismissed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + /** + * @description The reason that the alert was dismissed. + * @enum {string|null} + */ + dismissed_reason: + | "fix_started" + | "inaccurate" + | "no_bandwidth" + | "not_used" + | "tolerable_risk" + | null; + /** @description An optional comment associated with the alert's dismissal. */ + dismissed_comment: string | null; + fixed_at: components["schemas"]["alert-fixed-at"]; + auto_dismissed_at?: components["schemas"]["alert-auto-dismissed-at"]; + }; + /** + * Dependabot Secret + * @description Set secrets for Dependabot. + */ + "dependabot-secret": { + /** + * @description The name of the secret. + * @example MY_ARTIFACTORY_PASSWORD + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Dependency Graph Diff + * @description A diff of the dependencies between two commits. + */ + "dependency-graph-diff": { + /** @enum {string} */ + change_type: "added" | "removed"; + /** @example path/to/package-lock.json */ + manifest: string; + /** @example npm */ + ecosystem: string; + /** @example @actions/core */ + name: string; + /** @example 1.0.0 */ + version: string; + /** @example pkg:/npm/%40actions/core@1.1.0 */ + package_url: string | null; + /** @example MIT */ + license: string | null; + /** @example https://github.com/github/actions */ + source_repository_url: string | null; + vulnerabilities: { + /** @example critical */ + severity: string; + /** @example GHSA-rf4j-j272-fj86 */ + advisory_ghsa_id: string; + /** @example A summary of the advisory. */ + advisory_summary: string; + /** @example https://github.com/advisories/GHSA-rf4j-j272-fj86 */ + advisory_url: string; + }[]; + /** + * @description Where the dependency is utilized. `development` means that the dependency is only utilized in the development environment. `runtime` means that the dependency is utilized at runtime and in the development environment. + * @enum {string} + */ + scope: "unknown" | "runtime" | "development"; + }[]; + /** + * Dependency Graph SPDX SBOM + * @description A schema for the SPDX JSON format returned by the Dependency Graph. + */ + "dependency-graph-spdx-sbom": { + sbom: { + /** + * @description The SPDX identifier for the SPDX document. + * @example SPDXRef-DOCUMENT + */ + SPDXID: string; + /** + * @description The version of the SPDX specification that this document conforms to. + * @example SPDX-2.3 + */ + spdxVersion: string; + creationInfo: { + /** + * @description The date and time the SPDX document was created. + * @example 2021-11-03T00:00:00Z + */ + created: string; + /** @description The tools that were used to generate the SPDX document. */ + creators: string[]; + }; + /** + * @description The name of the SPDX document. + * @example github/github + */ + name: string; + /** + * @description The license under which the SPDX document is licensed. + * @example CC0-1.0 + */ + dataLicense: string; + /** @description The name of the repository that the SPDX document describes. */ + documentDescribes: string[]; + /** + * @description The namespace for the SPDX document. + * @example https://github.com/example/dependency_graph/sbom-123 + */ + documentNamespace: string; + packages: { + /** + * @description A unique SPDX identifier for the package. + * @example SPDXRef-Package + */ + SPDXID?: string; + /** + * @description The name of the package. + * @example rubygems:github/github + */ + name?: string; + /** + * @description The version of the package. If the package does not have an exact version specified, + * a version range is given. + * @example 1.0.0 + */ + versionInfo?: string; + /** + * @description The location where the package can be downloaded, + * or NOASSERTION if this has not been determined. + * @example NOASSERTION + */ + downloadLocation?: string; + /** + * @description Whether the package's file content has been subjected to + * analysis during the creation of the SPDX document. + * @example false + */ + filesAnalyzed?: boolean; + /** + * @description The license of the package as determined while creating the SPDX document. + * @example MIT + */ + licenseConcluded?: string; + /** + * @description The license of the package as declared by its author, or NOASSERTION if this information + * was not available when the SPDX document was created. + * @example NOASSERTION + */ + licenseDeclared?: string; + /** + * @description The distribution source of this package, or NOASSERTION if this was not determined. + * @example NOASSERTION + */ + supplier?: string; + externalRefs?: { + /** + * @description The category of reference to an external resource this reference refers to. + * @example PACKAGE-MANAGER + */ + referenceCategory: string; + /** + * @description A locator for the particular external resource this reference refers to. + * @example pkg:gem/rails@6.0.1 + */ + referenceLocator: string; + /** + * @description The category of reference to an external resource this reference refers to. + * @example purl + */ + referenceType: string; + }[]; + }[]; + }; + }; + /** + * metadata + * @description User-defined metadata to store domain-specific information limited to 8 keys with scalar values. + */ + metadata: { + [key: string]: (string | number | boolean) | null; + }; + dependency: { + /** + * @description Package-url (PURL) of dependency. See https://github.com/package-url/purl-spec for more details. + * @example pkg:/npm/%40actions/http-client@1.0.11 + */ + package_url?: string; + metadata?: components["schemas"]["metadata"]; + /** + * @description A notation of whether a dependency is requested directly by this manifest or is a dependency of another dependency. + * @example direct + * @enum {string} + */ + relationship?: "direct" | "indirect"; + /** + * @description A notation of whether the dependency is required for the primary build artifact (runtime) or is only used for development. Future versions of this specification may allow for more granular scopes. + * @example runtime + * @enum {string} + */ + scope?: "runtime" | "development"; + /** + * @description Array of package-url (PURLs) of direct child dependencies. + * @example @actions/http-client + */ + dependencies?: string[]; + }; + manifest: { + /** + * @description The name of the manifest. + * @example package-lock.json + */ + name: string; + file?: { + /** + * @description The path of the manifest file relative to the root of the Git repository. + * @example /src/build/package-lock.json + */ + source_location?: string; + }; + metadata?: components["schemas"]["metadata"]; + /** @description A collection of resolved package dependencies. */ + resolved?: { + [key: string]: components["schemas"]["dependency"]; + }; + }; + /** + * snapshot + * @description Create a new snapshot of a repository's dependencies. + */ + snapshot: { + /** @description The version of the repository snapshot submission. */ + version: number; + job: { + /** + * @description The external ID of the job. + * @example 5622a2b0-63f6-4732-8c34-a1ab27e102a11 + */ + id: string; + /** + * @description Correlator provides a key that is used to group snapshots submitted over time. Only the "latest" submitted snapshot for a given combination of `job.correlator` and `detector.name` will be considered when calculating a repository's current dependencies. Correlator should be as unique as it takes to distinguish all detection runs for a given "wave" of CI workflow you run. If you're using GitHub Actions, a good default value for this could be the environment variables GITHUB_WORKFLOW and GITHUB_JOB concatenated together. If you're using a build matrix, then you'll also need to add additional key(s) to distinguish between each submission inside a matrix variation. + * @example yourworkflowname_yourjobname + */ + correlator: string; + /** + * @description The url for the job. + * @example http://example.com/build + */ + html_url?: string; + }; + /** + * @description The commit SHA associated with this dependency snapshot. Maximum length: 40 characters. + * @example ddc951f4b1293222421f2c8df679786153acf689 + */ + sha: string; + /** + * @description The repository branch that triggered this snapshot. + * @example refs/heads/main + */ + ref: string; + /** @description A description of the detector used. */ + detector: { + /** + * @description The name of the detector used. + * @example docker buildtime detector + */ + name: string; + /** + * @description The version of the detector used. + * @example 1.0.0 + */ + version: string; + /** + * @description The url of the detector used. + * @example http://example.com/docker-buildtimer-detector + */ + url: string; + }; + metadata?: components["schemas"]["metadata"]; + /** @description A collection of package manifests, which are a collection of related dependencies declared in a file or representing a logical group of dependencies. */ + manifests?: { + [key: string]: components["schemas"]["manifest"]; + }; + /** + * Format: date-time + * @description The time at which the snapshot was scanned. + * @example 2020-06-13T14:52:50-05:00 + */ + scanned: string; + }; + /** + * Deployment Status + * @description The status of a deployment. + */ + "deployment-status": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/42/statuses/1 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDE2OkRlcGxveW1lbnRTdGF0dXMx */ + node_id: string; + /** + * @description The state of the status. + * @example success + * @enum {string} + */ + state: + | "error" + | "failure" + | "inactive" + | "pending" + | "success" + | "queued" + | "in_progress"; + creator: components["schemas"]["nullable-simple-user"]; + /** + * @description A short description of the status. + * @default + * @example Deployment finished successfully. + */ + description: string; + /** + * @description The environment of the deployment that the status is for. + * @default + * @example production + */ + environment?: string; + /** + * Format: uri + * @description Deprecated: the URL to associate with this status. + * @default + * @example https://example.com/deployment/42/output + */ + target_url: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + created_at: string; + /** + * Format: date-time + * @example 2012-07-20T01:19:13Z + */ + updated_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/deployments/42 + */ + deployment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + /** + * Format: uri + * @description The URL for accessing your environment. + * @default + * @example https://staging.example.com/ + */ + environment_url?: string; + /** + * Format: uri + * @description The URL to associate with this status. + * @default + * @example https://example.com/deployment/42/output + */ + log_url?: string; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * @description The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). + * @example 30 + */ + "wait-timer": number; + /** @description The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. */ + "deployment-branch-policy-settings": { + /** @description Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`. */ + protected_branches: boolean; + /** @description Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`. */ + custom_branch_policies: boolean; + } | null; + /** + * Environment + * @description Details of a deployment environment + */ + environment: { + /** + * @description The id of the environment. + * @example 56780428 + */ + id: number; + /** @example MDExOkVudmlyb25tZW50NTY3ODA0Mjg= */ + node_id: string; + /** + * @description The name of the environment. + * @example staging + */ + name: string; + /** @example https://api.github.com/repos/github/hello-world/environments/staging */ + url: string; + /** @example https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging */ + html_url: string; + /** + * Format: date-time + * @description The time that the environment was created, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + created_at: string; + /** + * Format: date-time + * @description The time that the environment was last updated, in ISO 8601 format. + * @example 2020-11-23T22:00:40Z + */ + updated_at: string; + /** @description Built-in deployment protection rules for the environment. */ + protection_rules?: ( + | { + /** @example 3515 */ + id: number; + /** @example MDQ6R2F0ZTM1MTU= */ + node_id: string; + /** @example wait_timer */ + type: string; + wait_timer?: components["schemas"]["wait-timer"]; + } + | { + /** @example 3755 */ + id: number; + /** @example MDQ6R2F0ZTM3NTU= */ + node_id: string; + /** + * @description Whether deployments to this environment can be approved by the user who created the deployment. + * @example false + */ + prevent_self_review?: boolean; + /** @example required_reviewers */ + type: string; + /** @description The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: { + type?: components["schemas"]["deployment-reviewer-type"]; + reviewer?: + | components["schemas"]["simple-user"] + | components["schemas"]["team"]; + }[]; + } + | { + /** @example 3515 */ + id: number; + /** @example MDQ6R2F0ZTM1MTU= */ + node_id: string; + /** @example branch_policy */ + type: string; + } + )[]; + deployment_branch_policy?: components["schemas"]["deployment-branch-policy-settings"]; + }; + /** + * @description Whether or not a user who created the job is prevented from approving their own job. + * @example false + */ + "prevent-self-review": boolean; + /** + * Deployment branch policy + * @description Details of a deployment branch or tag policy. + */ + "deployment-branch-policy": { + /** + * @description The unique identifier of the branch or tag policy. + * @example 361471 + */ + id?: number; + /** @example MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjE0NzE= */ + node_id?: string; + /** + * @description The name pattern that branches or tags must match in order to deploy to the environment. + * @example release/* + */ + name?: string; + /** + * @description Whether this rule targets a branch or tag. + * @example branch + * @enum {string} + */ + type?: "branch" | "tag"; + }; + /** Deployment branch and tag policy name pattern */ + "deployment-branch-policy-name-pattern-with-type": { + /** + * @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). + * @example release/* + */ + name: string; + /** + * @description Whether this rule targets a branch or tag + * @example branch + * @enum {string} + */ + type?: "branch" | "tag"; + }; + /** Deployment branch policy name pattern */ + "deployment-branch-policy-name-pattern": { + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * + * Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*\/*`. + * For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). + * @example release/* + */ + name: string; + }; + /** + * Custom deployment protection rule app + * @description A GitHub App that is providing a custom deployment protection rule. + */ + "custom-deployment-rule-app": { + /** + * @description The unique identifier of the deployment protection rule integration. + * @example 3515 + */ + id: number; + /** + * @description The slugified name of the deployment protection rule integration. + * @example my-custom-app + */ + slug: string; + /** + * @description The URL for the endpoint to get details about the app. + * @example https://api.github.com/apps/custom-app-slug + */ + integration_url: string; + /** + * @description The node ID for the deployment protection rule integration. + * @example MDQ6R2F0ZTM1MTU= + */ + node_id: string; + }; + /** + * Deployment protection rule + * @description Deployment protection rule + */ + "deployment-protection-rule": { + /** + * @description The unique identifier for the deployment protection rule. + * @example 3515 + */ + id: number; + /** + * @description The node ID for the deployment protection rule. + * @example MDQ6R2F0ZTM1MTU= + */ + node_id: string; + /** + * @description Whether the deployment protection rule is enabled for the environment. + * @example true + */ + enabled: boolean; + app: components["schemas"]["custom-deployment-rule-app"]; + }; + /** + * Short Blob + * @description Short Blob + */ + "short-blob": { + url: string; + sha: string; + }; + /** + * Blob + * @description Blob + */ + blob: { + content: string; + encoding: string; + /** Format: uri */ + url: string; + sha: string; + size: number | null; + node_id: string; + highlighted_content?: string; + }; + /** + * Git Commit + * @description Low-level Git commit operations within a repository + */ + "git-commit": { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + node_id: string; + /** Format: uri */ + url: string; + /** @description Identifying information for the git-user */ + author: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string; + tree: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + parents: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + }[]; + verification: { + verified: boolean; + reason: string; + signature: string | null; + payload: string | null; + }; + /** Format: uri */ + html_url: string; + }; + /** + * Git Reference + * @description Git references within a repository + */ + "git-ref": { + ref: string; + node_id: string; + /** Format: uri */ + url: string; + object: { + type: string; + /** + * @description SHA for the reference + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + }; + /** + * Git Tag + * @description Metadata for a Git tag + */ + "git-tag": { + /** @example MDM6VGFnOTQwYmQzMzYyNDhlZmFlMGY5ZWU1YmM3YjJkNWM5ODU4ODdiMTZhYw== */ + node_id: string; + /** + * @description Name of the tag + * @example v0.0.1 + */ + tag: string; + /** @example 940bd336248efae0f9ee5bc7b2d5c985887b16ac */ + sha: string; + /** + * Format: uri + * @description URL for the tag + * @example https://api.github.com/repositories/42/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac + */ + url: string; + /** + * @description Message describing the purpose of the tag + * @example Initial public release + */ + message: string; + tagger: { + date: string; + email: string; + name: string; + }; + object: { + sha: string; + type: string; + /** Format: uri */ + url: string; + }; + verification?: components["schemas"]["verification"]; + }; + /** + * Git Tree + * @description The hierarchy between files in a Git repository. + */ + "git-tree": { + sha: string; + /** Format: uri */ + url: string; + truncated: boolean; + /** + * @description Objects specifying a tree structure + * @example [ + * { + * "path": "file.rb", + * "mode": "100644", + * "type": "blob", + * "size": 30, + * "sha": "44b4fc6d56897b048c772eb4087f854f46256132", + * "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132", + * "properties": { + * "path": { + * "type": "string" + * }, + * "mode": { + * "type": "string" + * }, + * "type": { + * "type": "string" + * }, + * "size": { + * "type": "integer" + * }, + * "sha": { + * "type": "string" + * }, + * "url": { + * "type": "string" + * } + * }, + * "required": [ + * "path", + * "mode", + * "type", + * "sha", + * "url", + * "size" + * ] + * } + * ] + */ + tree: { + /** @example test/file.rb */ + path?: string; + /** @example 040000 */ + mode?: string; + /** @example tree */ + type?: string; + /** @example 23f6827669e43831def8a7ad935069c8bd418261 */ + sha?: string; + /** @example 12 */ + size?: number; + /** @example https://api.github.com/repos/owner-482f3203ecf01f67e9deb18e/BBB_Private_Repo/git/blobs/23f6827669e43831def8a7ad935069c8bd418261 */ + url?: string; + }[]; + }; + /** Hook Response */ + "hook-response": { + code: number | null; + status: string | null; + message: string | null; + }; + /** + * Webhook + * @description Webhooks for repositories. + */ + hook: { + type: string; + /** + * @description Unique identifier of the webhook. + * @example 42 + */ + id: number; + /** + * @description The name of a valid service, use 'web' for a webhook. + * @example web + */ + name: string; + /** + * @description Determines whether the hook is actually triggered on pushes. + * @example true + */ + active: boolean; + /** + * @description Determines what events the hook is triggered for. Default: ['push']. + * @example [ + * "push", + * "pull_request" + * ] + */ + events: string[]; + config: components["schemas"]["webhook-config"]; + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/test + */ + test_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/pings + */ + ping_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/hooks/1/deliveries + */ + deliveries_url?: string; + last_response: components["schemas"]["hook-response"]; + }; + /** + * Import + * @description A repository import from an external source. + */ + import: { + vcs: string | null; + use_lfs?: boolean; + /** @description The URL of the originating repository. */ + vcs_url: string; + svc_root?: string; + tfvc_project?: string; + /** @enum {string} */ + status: + | "auth" + | "error" + | "none" + | "detecting" + | "choose" + | "auth_failed" + | "importing" + | "mapping" + | "waiting_to_push" + | "pushing" + | "complete" + | "setup" + | "unknown" + | "detection_found_multiple" + | "detection_found_nothing" + | "detection_needs_auth"; + status_text?: string | null; + failed_step?: string | null; + error_message?: string | null; + import_percent?: number | null; + commit_count?: number | null; + push_percent?: number | null; + has_large_files?: boolean; + large_files_size?: number; + large_files_count?: number; + project_choices?: { + vcs?: string; + tfvc_project?: string; + human_name?: string; + }[]; + message?: string; + authors_count?: number | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + authors_url: string; + /** Format: uri */ + repository_url: string; + svn_root?: string; + }; + /** + * Porter Author + * @description Porter Author + */ + "porter-author": { + id: number; + remote_id: string; + remote_name: string; + email: string; + name: string; + /** Format: uri */ + url: string; + /** Format: uri */ + import_url: string; + }; + /** + * Porter Large File + * @description Porter Large File + */ + "porter-large-file": { + ref_name: string; + path: string; + oid: string; + size: number; + }; + /** + * Issue + * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + */ + "nullable-issue": { + /** Format: int64 */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue + * @example https://api.github.com/repositories/42/issues/1 + */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** + * @description Number uniquely identifying the issue within its repository + * @example 42 + */ + number: number; + /** + * @description State of the issue; either 'open' or 'closed' + * @example open + */ + state: string; + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: "completed" | "reopened" | "not_planned" | null; + /** + * @description Title of the issue + * @example Widget creation fails in Safari on OS X 10.8 + */ + title: string; + /** + * @description Contents of the issue + * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? + */ + body?: string | null; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + * @example [ + * "bug", + * "registration" + * ] + */ + labels: OneOf< + [ + string, + { + /** Format: int64 */ + id?: number; + node_id?: string; + /** Format: uri */ + url?: string; + name?: string; + description?: string | null; + color?: string | null; + default?: boolean; + }, + ] + >[]; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + milestone: components["schemas"]["nullable-milestone"]; + locked: boolean; + active_lock_reason?: string | null; + comments: number; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + /** Format: date-time */ + closed_at: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + draft?: boolean; + closed_by?: components["schemas"]["nullable-simple-user"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + } | null; + /** + * Issue Event Label + * @description Issue Event Label + */ + "issue-event-label": { + name: string | null; + color: string | null; + }; + /** Issue Event Dismissed Review */ + "issue-event-dismissed-review": { + state: string; + review_id: number; + dismissal_message: string | null; + dismissal_commit_id?: string | null; + }; + /** + * Issue Event Milestone + * @description Issue Event Milestone + */ + "issue-event-milestone": { + title: string; + }; + /** + * Issue Event Project Card + * @description Issue Event Project Card + */ + "issue-event-project-card": { + /** Format: uri */ + url: string; + id: number; + /** Format: uri */ + project_url: string; + project_id: number; + column_name: string; + previous_column_name?: string; + }; + /** + * Issue Event Rename + * @description Issue Event Rename + */ + "issue-event-rename": { + from: string; + to: string; + }; + /** + * Issue Event + * @description Issue Event + */ + "issue-event": { + /** + * Format: int64 + * @example 1 + */ + id: number; + /** @example MDEwOklzc3VlRXZlbnQx */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/events/1 + */ + url: string; + actor: components["schemas"]["nullable-simple-user"]; + /** @example closed */ + event: string; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_id: string | null; + /** @example https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_url: string | null; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + issue?: components["schemas"]["nullable-issue"]; + label?: components["schemas"]["issue-event-label"]; + assignee?: components["schemas"]["nullable-simple-user"]; + assigner?: components["schemas"]["nullable-simple-user"]; + review_requester?: components["schemas"]["nullable-simple-user"]; + requested_reviewer?: components["schemas"]["nullable-simple-user"]; + requested_team?: components["schemas"]["team"]; + dismissed_review?: components["schemas"]["issue-event-dismissed-review"]; + milestone?: components["schemas"]["issue-event-milestone"]; + project_card?: components["schemas"]["issue-event-project-card"]; + rename?: components["schemas"]["issue-event-rename"]; + author_association?: components["schemas"]["author-association"]; + lock_reason?: string | null; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + }; + /** + * Labeled Issue Event + * @description Labeled Issue Event + */ + "labeled-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + label: { + name: string; + color: string; + }; + }; + /** + * Unlabeled Issue Event + * @description Unlabeled Issue Event + */ + "unlabeled-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + label: { + name: string; + color: string; + }; + }; + /** + * Assigned Issue Event + * @description Assigned Issue Event + */ + "assigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["integration"]; + assignee: components["schemas"]["simple-user"]; + assigner: components["schemas"]["simple-user"]; + }; + /** + * Unassigned Issue Event + * @description Unassigned Issue Event + */ + "unassigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + assigner: components["schemas"]["simple-user"]; + }; + /** + * Milestoned Issue Event + * @description Milestoned Issue Event + */ + "milestoned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + milestone: { + title: string; + }; + }; + /** + * Demilestoned Issue Event + * @description Demilestoned Issue Event + */ + "demilestoned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + milestone: { + title: string; + }; + }; + /** + * Renamed Issue Event + * @description Renamed Issue Event + */ + "renamed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + rename: { + from: string; + to: string; + }; + }; + /** + * Review Requested Issue Event + * @description Review Requested Issue Event + */ + "review-requested-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + review_requester: components["schemas"]["simple-user"]; + requested_team?: components["schemas"]["team"]; + requested_reviewer?: components["schemas"]["simple-user"]; + }; + /** + * Review Request Removed Issue Event + * @description Review Request Removed Issue Event + */ + "review-request-removed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + review_requester: components["schemas"]["simple-user"]; + requested_team?: components["schemas"]["team"]; + requested_reviewer?: components["schemas"]["simple-user"]; + }; + /** + * Review Dismissed Issue Event + * @description Review Dismissed Issue Event + */ + "review-dismissed-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + dismissed_review: { + state: string; + review_id: number; + dismissal_message: string | null; + dismissal_commit_id?: string; + }; + }; + /** + * Locked Issue Event + * @description Locked Issue Event + */ + "locked-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** @example "off-topic" */ + lock_reason: string | null; + }; + /** + * Added to Project Issue Event + * @description Added to Project Issue Event + */ + "added-to-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Moved Column in Project Issue Event + * @description Moved Column in Project Issue Event + */ + "moved-column-in-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Removed from Project Issue Event + * @description Removed from Project Issue Event + */ + "removed-from-project-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Converted Note to Issue Issue Event + * @description Converted Note to Issue Issue Event + */ + "converted-note-to-issue-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["integration"]; + project_card?: { + id: number; + /** Format: uri */ + url: string; + project_id: number; + /** Format: uri */ + project_url: string; + column_name: string; + previous_column_name?: string; + }; + }; + /** + * Issue Event for Issue + * @description Issue Event for Issue + */ + "issue-event-for-issue": + | components["schemas"]["labeled-issue-event"] + | components["schemas"]["unlabeled-issue-event"] + | components["schemas"]["assigned-issue-event"] + | components["schemas"]["unassigned-issue-event"] + | components["schemas"]["milestoned-issue-event"] + | components["schemas"]["demilestoned-issue-event"] + | components["schemas"]["renamed-issue-event"] + | components["schemas"]["review-requested-issue-event"] + | components["schemas"]["review-request-removed-issue-event"] + | components["schemas"]["review-dismissed-issue-event"] + | components["schemas"]["locked-issue-event"] + | components["schemas"]["added-to-project-issue-event"] + | components["schemas"]["moved-column-in-project-issue-event"] + | components["schemas"]["removed-from-project-issue-event"] + | components["schemas"]["converted-note-to-issue-issue-event"]; + /** + * Label + * @description Color-coded labels help you categorize and filter your issues (just like labels in Gmail). + */ + label: { + /** + * Format: int64 + * @example 208045946 + */ + id: number; + /** @example MDU6TGFiZWwyMDgwNDU5NDY= */ + node_id: string; + /** + * Format: uri + * @description URL for the label + * @example https://api.github.com/repositories/42/labels/bug + */ + url: string; + /** + * @description The name of the label. + * @example bug + */ + name: string; + /** @example Something isn't working */ + description: string | null; + /** + * @description 6-character hex code, without the leading #, identifying the color + * @example FFFFFF + */ + color: string; + /** @example true */ + default: boolean; + }; + /** + * Timeline Comment Event + * @description Timeline Comment Event + */ + "timeline-comment-event": { + event: string; + actor: components["schemas"]["simple-user"]; + /** + * @description Unique identifier of the issue comment + * @example 42 + */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue comment + * @example https://api.github.com/repositories/42/issues/comments/1 + */ + url: string; + /** + * @description Contents of the issue comment + * @example What version of Safari were you using when you observed this bug? + */ + body?: string; + body_text?: string; + body_html?: string; + /** Format: uri */ + html_url: string; + user: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** Format: uri */ + issue_url: string; + author_association: components["schemas"]["author-association"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Timeline Cross Referenced Event + * @description Timeline Cross Referenced Event + */ + "timeline-cross-referenced-event": { + event: string; + actor?: components["schemas"]["simple-user"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + source: { + type?: string; + issue?: components["schemas"]["issue"]; + }; + }; + /** + * Timeline Committed Event + * @description Timeline Committed Event + */ + "timeline-committed-event": { + event?: string; + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + node_id: string; + /** Format: uri */ + url: string; + /** @description Identifying information for the git-user */ + author: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** @description Identifying information for the git-user */ + committer: { + /** + * Format: date-time + * @description Timestamp of the commit + * @example 2014-08-09T08:02:04+12:00 + */ + date: string; + /** + * @description Git email address of the user + * @example monalisa.octocat@example.com + */ + email: string; + /** + * @description Name of the git user + * @example Monalisa Octocat + */ + name: string; + }; + /** + * @description Message describing the purpose of the commit + * @example Fix #42 + */ + message: string; + tree: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + }; + parents: { + /** + * @description SHA for the commit + * @example 7638417db6d59f3c431d3e1f261cc637155684cd + */ + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + }[]; + verification: { + verified: boolean; + reason: string; + signature: string | null; + payload: string | null; + }; + /** Format: uri */ + html_url: string; + }; + /** + * Timeline Reviewed Event + * @description Timeline Reviewed Event + */ + "timeline-reviewed-event": { + event: string; + /** + * @description Unique identifier of the review + * @example 42 + */ + id: number; + /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ + node_id: string; + user: components["schemas"]["simple-user"]; + /** + * @description The text of the review. + * @example This looks great. + */ + body: string | null; + /** @example CHANGES_REQUESTED */ + state: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 + */ + pull_request_url: string; + _links: { + html: { + href: string; + }; + pull_request: { + href: string; + }; + }; + /** Format: date-time */ + submitted_at?: string; + /** + * @description A commit SHA for the review. + * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 + */ + commit_id: string; + body_html?: string; + body_text?: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Pull Request Review Comment + * @description Pull Request Review Comments are comments on a portion of the Pull Request's diff. + */ + "pull-request-review-comment": { + /** + * @description URL for the pull request review comment + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + url: string; + /** + * @description The ID of the pull request review to which the comment belongs. + * @example 42 + */ + pull_request_review_id: number | null; + /** + * @description The ID of the pull request review comment. + * @example 1 + */ + id: number; + /** + * @description The node ID of the pull request review comment. + * @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw + */ + node_id: string; + /** + * @description The diff of the line that the comment refers to. + * @example @@ -16,33 +16,40 @@ public class Connection : IConnection... + */ + diff_hunk: string; + /** + * @description The relative path of the file to which the comment applies. + * @example config/database.yaml + */ + path: string; + /** + * @description The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. + * @example 1 + */ + position?: number; + /** + * @description The index of the original line in the diff to which the comment applies. This field is deprecated; use `original_line` instead. + * @example 4 + */ + original_position?: number; + /** + * @description The SHA of the commit to which the comment applies. + * @example 6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + commit_id: string; + /** + * @description The SHA of the original commit to which the comment applies. + * @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 + */ + original_commit_id: string; + /** + * @description The comment ID to reply to. + * @example 8 + */ + in_reply_to_id?: number; + user: components["schemas"]["simple-user"]; + /** + * @description The text of the comment. + * @example We should probably include a check for null values here. + */ + body: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + html_url: string; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + pull_request_url: string; + author_association: components["schemas"]["author-association"]; + _links: { + self: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + href: string; + }; + html: { + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + href: string; + }; + pull_request: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + href: string; + }; + }; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + start_line?: number | null; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + original_start_line?: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side?: "LEFT" | "RIGHT" | null; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + line?: number; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + original_line?: number; + /** + * @description The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment + * @default RIGHT + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** + * @description The level at which the comment is targeted, can be a diff line or a file. + * @enum {string} + */ + subject_type?: "line" | "file"; + reactions?: components["schemas"]["reaction-rollup"]; + /** @example "

comment body

" */ + body_html?: string; + /** @example "comment body" */ + body_text?: string; + }; + /** + * Timeline Line Commented Event + * @description Timeline Line Commented Event + */ + "timeline-line-commented-event": { + event?: string; + node_id?: string; + comments?: components["schemas"]["pull-request-review-comment"][]; + }; + /** + * Timeline Commit Commented Event + * @description Timeline Commit Commented Event + */ + "timeline-commit-commented-event": { + event?: string; + node_id?: string; + commit_id?: string; + comments?: components["schemas"]["commit-comment"][]; + }; + /** + * Timeline Assigned Issue Event + * @description Timeline Assigned Issue Event + */ + "timeline-assigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + }; + /** + * Timeline Unassigned Issue Event + * @description Timeline Unassigned Issue Event + */ + "timeline-unassigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + }; + /** + * State Change Issue Event + * @description State Change Issue Event + */ + "state-change-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + state_reason?: string | null; + }; + /** + * Timeline Event + * @description Timeline Event + */ + "timeline-issue-events": + | components["schemas"]["labeled-issue-event"] + | components["schemas"]["unlabeled-issue-event"] + | components["schemas"]["milestoned-issue-event"] + | components["schemas"]["demilestoned-issue-event"] + | components["schemas"]["renamed-issue-event"] + | components["schemas"]["review-requested-issue-event"] + | components["schemas"]["review-request-removed-issue-event"] + | components["schemas"]["review-dismissed-issue-event"] + | components["schemas"]["locked-issue-event"] + | components["schemas"]["added-to-project-issue-event"] + | components["schemas"]["moved-column-in-project-issue-event"] + | components["schemas"]["removed-from-project-issue-event"] + | components["schemas"]["converted-note-to-issue-issue-event"] + | components["schemas"]["timeline-comment-event"] + | components["schemas"]["timeline-cross-referenced-event"] + | components["schemas"]["timeline-committed-event"] + | components["schemas"]["timeline-reviewed-event"] + | components["schemas"]["timeline-line-commented-event"] + | components["schemas"]["timeline-commit-commented-event"] + | components["schemas"]["timeline-assigned-issue-event"] + | components["schemas"]["timeline-unassigned-issue-event"] + | components["schemas"]["state-change-issue-event"]; + /** + * Deploy Key + * @description An SSH key granting access to a single repository. + */ + "deploy-key": { + id: number; + key: string; + url: string; + title: string; + verified: boolean; + created_at: string; + read_only: boolean; + added_by?: string | null; + last_used?: string | null; + }; + /** + * Language + * @description Language + */ + language: { + [key: string]: number; + }; + /** + * License Content + * @description License Content + */ + "license-content": { + name: string; + path: string; + sha: string; + size: number; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + download_url: string | null; + type: string; + content: string; + encoding: string; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + license: components["schemas"]["nullable-license-simple"]; + }; + /** + * Merged upstream + * @description Results of a successful merge upstream request + */ + "merged-upstream": { + message?: string; + /** @enum {string} */ + merge_type?: "merge" | "fast-forward" | "none"; + base_branch?: string; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string; + /** @example 1002604 */ + id: number; + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string; + /** + * @description The number of the milestone. + * @example 42 + */ + number: number; + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string; + /** @example Tracking milestone for version 1.0 */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** @example 4 */ + open_issues: number; + /** @example 8 */ + closed_issues: number; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null; + }; + /** Pages Source Hash */ + "pages-source-hash": { + branch: string; + path: string; + }; + /** Pages Https Certificate */ + "pages-https-certificate": { + /** + * @example approved + * @enum {string} + */ + state: + | "new" + | "authorization_created" + | "authorization_pending" + | "authorized" + | "authorization_revoked" + | "issued" + | "uploaded" + | "approved" + | "errored" + | "bad_authz" + | "destroy_pending" + | "dns_changed"; + /** @example Certificate is approved */ + description: string; + /** + * @description Array of the domain set and its alternate name (if it is configured) + * @example [ + * "example.com", + * "www.example.com" + * ] + */ + domains: string[]; + /** Format: date */ + expires_at?: string; + }; + /** + * GitHub Pages + * @description The configuration for GitHub Pages for a repository. + */ + page: { + /** + * Format: uri + * @description The API address for accessing this Page resource. + * @example https://api.github.com/repos/github/hello-world/pages + */ + url: string; + /** + * @description The status of the most recent build of the Page. + * @example built + * @enum {string|null} + */ + status: "built" | "building" | "errored" | null; + /** + * @description The Pages site's custom domain + * @example example.com + */ + cname: string | null; + /** + * @description The state if the domain is verified + * @example pending + * @enum {string|null} + */ + protected_domain_state?: "pending" | "verified" | "unverified" | null; + /** + * Format: date-time + * @description The timestamp when a pending domain becomes unverified. + */ + pending_domain_unverified_at?: string | null; + /** + * @description Whether the Page has a custom 404 page. + * @default false + * @example false + */ + custom_404: boolean; + /** + * Format: uri + * @description The web address the Page can be accessed from. + * @example https://example.com + */ + html_url?: string; + /** + * @description The process in which the Page will be built. + * @example legacy + * @enum {string|null} + */ + build_type?: "legacy" | "workflow" | null; + source?: components["schemas"]["pages-source-hash"]; + /** + * @description Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. + * @example true + */ + public: boolean; + https_certificate?: components["schemas"]["pages-https-certificate"]; + /** + * @description Whether https is enabled on the domain + * @example true + */ + https_enforced?: boolean; + }; + /** + * Page Build + * @description Page Build + */ + "page-build": { + /** Format: uri */ + url: string; + status: string; + error: { + message: string | null; + }; + pusher: components["schemas"]["nullable-simple-user"]; + commit: string; + duration: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Page Build Status + * @description Page Build Status + */ + "page-build-status": { + /** + * Format: uri + * @example https://api.github.com/repos/github/hello-world/pages/builds/latest + */ + url: string; + /** @example queued */ + status: string; + }; + /** + * GitHub Pages + * @description The GitHub Pages deployment status. + */ + "page-deployment": { + /** @description The ID of the GitHub Pages deployment. This is the Git SHA of the deployed commit. */ + id: number | string; + /** + * Format: uri + * @description The URI to monitor GitHub Pages deployment status. + * @example https://api.github.com/repos/github/hello-world/pages/deployments/4fd754f7e594640989b406850d0bc8f06a121251 + */ + status_url: string; + /** + * Format: uri + * @description The URI to the deployed GitHub Pages. + * @example hello-world.github.io + */ + page_url: string; + /** + * Format: uri + * @description The URI to the deployed GitHub Pages preview. + * @example monalisa-1231a2312sa32-23sda74.drafts.github.io + */ + preview_url?: string; + }; + /** GitHub Pages deployment status */ + "pages-deployment-status": { + /** + * @description The current status of the deployment. + * @enum {string} + */ + 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"; + }; + /** + * Pages Health Check Status + * @description Pages Health Check Status + */ + "pages-health-check": { + domain?: { + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: boolean | null; + is_cloudflare_ip?: boolean | null; + is_fastly_ip?: boolean | null; + is_old_ip_address?: boolean | null; + is_a_record?: boolean | null; + has_cname_record?: boolean | null; + has_mx_records_present?: boolean | null; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: boolean | null; + is_cname_to_github_user_domain?: boolean | null; + is_cname_to_pages_dot_github_dot_com?: boolean | null; + is_cname_to_fastly?: boolean | null; + is_pointed_to_github_pages_ip?: boolean | null; + is_non_github_pages_ip_present?: boolean | null; + is_pages_domain?: boolean; + is_served_by_pages?: boolean | null; + is_valid?: boolean; + reason?: string | null; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: string | null; + is_https_eligible?: boolean | null; + caa_error?: string | null; + }; + alt_domain?: { + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: boolean | null; + is_cloudflare_ip?: boolean | null; + is_fastly_ip?: boolean | null; + is_old_ip_address?: boolean | null; + is_a_record?: boolean | null; + has_cname_record?: boolean | null; + has_mx_records_present?: boolean | null; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: boolean | null; + is_cname_to_github_user_domain?: boolean | null; + is_cname_to_pages_dot_github_dot_com?: boolean | null; + is_cname_to_fastly?: boolean | null; + is_pointed_to_github_pages_ip?: boolean | null; + is_non_github_pages_ip_present?: boolean | null; + is_pages_domain?: boolean; + is_served_by_pages?: boolean | null; + is_valid?: boolean; + reason?: string | null; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: string | null; + is_https_eligible?: boolean | null; + caa_error?: string | null; + } | null; + }; + /** + * Pull Request + * @description Pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary. + */ + "pull-request": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347 + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.patch + */ + patch_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + */ + commits_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + */ + review_comments_url: string; + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ + review_comment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + */ + comments_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + statuses_url: string; + /** + * @description Number uniquely identifying the pull request within its repository. + * @example 42 + */ + number: number; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** @example true */ + locked: boolean; + /** + * @description The title of the pull request. + * @example Amazing new feature + */ + title: string; + user: components["schemas"]["simple-user"]; + /** @example Please pull these awesome changes */ + body: string | null; + labels: { + /** Format: int64 */ + id: number; + node_id: string; + url: string; + name: string; + description: string | null; + color: string; + default: boolean; + }[]; + milestone: components["schemas"]["nullable-milestone"]; + /** @example too heated */ + active_lock_reason?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + merged_at: string | null; + /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ + merge_commit_sha: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + requested_reviewers?: components["schemas"]["simple-user"][] | null; + requested_teams?: components["schemas"]["team-simple"][] | null; + head: { + label: string; + ref: string; + repo: { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + private: boolean; + pulls_url: string; + releases_url: string; + /** Format: uri */ + stargazers_url: string; + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + trees_url: string; + /** Format: uri */ + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_discussions: boolean; + /** Format: uri */ + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: { + key: string; + name: string; + /** Format: uri */ + url: string | null; + spdx_id: string | null; + node_id: string; + } | null; + /** Format: date-time */ + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + /** Format: uri */ + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + allow_forking?: boolean; + is_template?: boolean; + web_commit_signoff_required?: boolean; + } | null; + sha: string; + user: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + }; + base: { + label: string; + ref: string; + repo: { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + id: number; + is_template?: boolean; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + private: boolean; + pulls_url: string; + releases_url: string; + /** Format: uri */ + stargazers_url: string; + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + trees_url: string; + /** Format: uri */ + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_discussions: boolean; + /** Format: uri */ + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: components["schemas"]["nullable-license-simple"]; + /** Format: date-time */ + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + /** Format: uri */ + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + allow_forking?: boolean; + web_commit_signoff_required?: boolean; + }; + sha: string; + user: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + }; + _links: { + comments: components["schemas"]["link"]; + commits: components["schemas"]["link"]; + statuses: components["schemas"]["link"]; + html: components["schemas"]["link"]; + issue: components["schemas"]["link"]; + review_comments: components["schemas"]["link"]; + review_comment: components["schemas"]["link"]; + self: components["schemas"]["link"]; + }; + author_association: components["schemas"]["author-association"]; + auto_merge: components["schemas"]["auto-merge"]; + /** + * @description Indicates whether or not the pull request is a draft. + * @example false + */ + draft?: boolean; + merged: boolean; + /** @example true */ + mergeable: boolean | null; + /** @example true */ + rebaseable?: boolean | null; + /** @example clean */ + mergeable_state: string; + merged_by: components["schemas"]["nullable-simple-user"]; + /** @example 10 */ + comments: number; + /** @example 0 */ + review_comments: number; + /** + * @description Indicates whether maintainers can modify the pull request. + * @example true + */ + maintainer_can_modify: boolean; + /** @example 3 */ + commits: number; + /** @example 100 */ + additions: number; + /** @example 3 */ + deletions: number; + /** @example 5 */ + changed_files: number; + }; + /** + * Pull Request Merge Result + * @description Pull Request Merge Result + */ + "pull-request-merge-result": { + sha: string; + merged: boolean; + message: string; + }; + /** + * Pull Request Review Request + * @description Pull Request Review Request + */ + "pull-request-review-request": { + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + }; + /** + * Pull Request Review + * @description Pull Request Reviews are reviews on pull requests. + */ + "pull-request-review": { + /** + * @description Unique identifier of the review + * @example 42 + */ + id: number; + /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ + node_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description The text of the review. + * @example This looks great. + */ + body: string; + /** @example CHANGES_REQUESTED */ + state: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 + */ + pull_request_url: string; + _links: { + html: { + href: string; + }; + pull_request: { + href: string; + }; + }; + /** Format: date-time */ + submitted_at?: string; + /** + * @description A commit SHA for the review. If the commit object was garbage collected or forcibly deleted, then it no longer exists in Git and this value will be `null`. + * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 + */ + commit_id: string | null; + body_html?: string; + body_text?: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Legacy Review Comment + * @description Legacy Review Comment + */ + "review-comment": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + url: string; + /** @example 42 */ + pull_request_review_id: number | null; + /** @example 10 */ + id: number; + /** @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw */ + node_id: string; + /** @example @@ -16,33 +16,40 @@ public class Connection : IConnection... */ + diff_hunk: string; + /** @example file1.txt */ + path: string; + /** @example 1 */ + position: number | null; + /** @example 4 */ + original_position: number; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_id: string; + /** @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 */ + original_commit_id: string; + /** @example 8 */ + in_reply_to_id?: number; + user: components["schemas"]["nullable-simple-user"]; + /** @example Great stuff */ + body: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + pull_request_url: string; + author_association: components["schemas"]["author-association"]; + _links: { + self: components["schemas"]["link"]; + html: components["schemas"]["link"]; + pull_request: components["schemas"]["link"]; + }; + body_text?: string; + body_html?: string; + reactions?: components["schemas"]["reaction-rollup"]; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side?: "LEFT" | "RIGHT" | null; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + line?: number; + /** + * @description The original line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + original_line?: number; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + start_line?: number | null; + /** + * @description The original first line of the range for a multi-line comment. + * @example 2 + */ + original_start_line?: number | null; + }; + /** + * Release Asset + * @description Data related to a release. + */ + "release-asset": { + /** Format: uri */ + url: string; + /** Format: uri */ + browser_download_url: string; + id: number; + node_id: string; + /** + * @description The file name of the asset. + * @example Team Environment + */ + name: string; + label: string | null; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded" | "open"; + content_type: string; + size: number; + download_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + uploader: components["schemas"]["nullable-simple-user"]; + }; + /** + * Release + * @description A release. + */ + release: { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + assets_url: string; + upload_url: string; + /** Format: uri */ + tarball_url: string | null; + /** Format: uri */ + zipball_url: string | null; + id: number; + node_id: string; + /** + * @description The name of the tag. + * @example v1.0.0 + */ + tag_name: string; + /** + * @description Specifies the commitish value that determines where the Git tag is created from. + * @example master + */ + target_commitish: string; + name: string | null; + body?: string | null; + /** + * @description true to create a draft (unpublished) release, false to create a published one. + * @example false + */ + draft: boolean; + /** + * @description Whether to identify the release as a prerelease or a full release. + * @example false + */ + prerelease: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + published_at: string | null; + author: components["schemas"]["simple-user"]; + assets: components["schemas"]["release-asset"][]; + body_html?: string; + body_text?: string; + mentions_count?: number; + /** + * Format: uri + * @description The URL of the release discussion. + */ + discussion_url?: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Generated Release Notes Content + * @description Generated name and body describing a release + */ + "release-notes-content": { + /** + * @description The generated name of the release + * @example Release v1.0.0 is now available! + */ + name: string; + /** @description The generated body describing the contents of the release supporting markdown formatting */ + body: string; + }; + /** + * repository ruleset data for rule + * @description User-defined metadata to store domain-specific information limited to 8 keys with scalar values. + */ + "repository-rule-ruleset-info": { + /** + * @description The type of source for the ruleset that includes this rule. + * @enum {string} + */ + ruleset_source_type?: "Repository" | "Organization"; + /** @description The name of the source of the ruleset that includes this rule. */ + ruleset_source?: string; + /** @description The ID of the ruleset that includes this rule. */ + ruleset_id?: number; + }; + /** + * Repository Rule + * @description A repository rule with ruleset details. + */ + "repository-rule-detailed": + | (components["schemas"]["repository-rule-creation"] & + components["schemas"]["repository-rule-ruleset-info"]) + | (components["schemas"]["repository-rule-update"] & + components["schemas"]["repository-rule-ruleset-info"]) + | (components["schemas"]["repository-rule-deletion"] & + components["schemas"]["repository-rule-ruleset-info"]) + | (components["schemas"]["repository-rule-required-linear-history"] & + components["schemas"]["repository-rule-ruleset-info"]) + | (components["schemas"]["repository-rule-required-deployments"] & + components["schemas"]["repository-rule-ruleset-info"]) + | (components["schemas"]["repository-rule-required-signatures"] & + components["schemas"]["repository-rule-ruleset-info"]) + | (components["schemas"]["repository-rule-pull-request"] & + components["schemas"]["repository-rule-ruleset-info"]) + | (components["schemas"]["repository-rule-required-status-checks"] & + components["schemas"]["repository-rule-ruleset-info"]) + | (components["schemas"]["repository-rule-non-fast-forward"] & + components["schemas"]["repository-rule-ruleset-info"]) + | (components["schemas"]["repository-rule-commit-message-pattern"] & + components["schemas"]["repository-rule-ruleset-info"]) + | (components["schemas"]["repository-rule-commit-author-email-pattern"] & + components["schemas"]["repository-rule-ruleset-info"]) + | (components["schemas"]["repository-rule-committer-email-pattern"] & + components["schemas"]["repository-rule-ruleset-info"]) + | (components["schemas"]["repository-rule-branch-name-pattern"] & + components["schemas"]["repository-rule-ruleset-info"]) + | (components["schemas"]["repository-rule-tag-name-pattern"] & + components["schemas"]["repository-rule-ruleset-info"]) + | (components["schemas"]["repository-rule-workflows"] & + components["schemas"]["repository-rule-ruleset-info"]); + "secret-scanning-alert": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["nullable-alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description An optional comment to resolve an alert. */ + resolution_comment?: string | null; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + /** @description The secret that was detected. */ + secret?: string; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + /** + * @description The token status as of the latest validity check. + * @enum {string} + */ + validity?: "active" | "inactive" | "unknown"; + }; + /** @description An optional comment when closing an alert. Cannot be updated or deleted. Must be `null` when changing `state` to `open`. */ + "secret-scanning-alert-resolution-comment": string | null; + /** @description Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. */ + "secret-scanning-location-commit": { + /** + * @description The file path in the repository + * @example /example/secrets.txt + */ + path: string; + /** @description Line number at which the secret starts in the file */ + start_line: number; + /** @description Line number at which the secret ends in the file */ + end_line: number; + /** @description The column at which the secret starts within the start line when the file is interpreted as 8BIT ASCII */ + start_column: number; + /** @description The column at which the secret ends within the end line when the file is interpreted as 8BIT ASCII */ + end_column: number; + /** + * @description SHA-1 hash ID of the associated blob + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + blob_sha: string; + /** @description The API URL to get the associated blob resource */ + blob_url: string; + /** + * @description SHA-1 hash ID of the associated commit + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + commit_sha: string; + /** @description The API URL to get the associated commit resource */ + commit_url: string; + }; + /** @description Represents a 'wiki_commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository wiki. */ + "secret-scanning-location-wiki-commit": { + /** + * @description The file path of the wiki page + * @example /example/Home.md + */ + path: string; + /** @description Line number at which the secret starts in the file */ + start_line: number; + /** @description Line number at which the secret ends in the file */ + end_line: number; + /** @description The column at which the secret starts within the start line when the file is interpreted as 8-bit ASCII. */ + start_column: number; + /** @description The column at which the secret ends within the end line when the file is interpreted as 8-bit ASCII. */ + end_column: number; + /** + * @description SHA-1 hash ID of the associated blob + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + blob_sha: string; + /** + * @description The GitHub URL to get the associated wiki page + * @example https://github.com/octocat/Hello-World/wiki/Home/302c0b7e200761c9dd9b57e57db540ee0b4293a5 + */ + page_url: string; + /** + * @description SHA-1 hash ID of the associated commit + * @example 302c0b7e200761c9dd9b57e57db540ee0b4293a5 + */ + commit_sha: string; + /** + * @description The GitHub URL to get the associated wiki commit + * @example https://github.com/octocat/Hello-World/wiki/_compare/302c0b7e200761c9dd9b57e57db540ee0b4293a5 + */ + commit_url: string; + }; + /** @description Represents an 'issue_title' secret scanning location type. This location type shows that a secret was detected in the title of an issue. */ + "secret-scanning-location-issue-title": { + /** + * Format: uri + * @description The API URL to get the issue where the secret was detected. + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_title_url: string; + }; + /** @description Represents an 'issue_body' secret scanning location type. This location type shows that a secret was detected in the body of an issue. */ + "secret-scanning-location-issue-body": { + /** + * Format: uri + * @description The API URL to get the issue where the secret was detected. + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_body_url: string; + }; + /** @description Represents an 'issue_comment' secret scanning location type. This location type shows that a secret was detected in a comment on an issue. */ + "secret-scanning-location-issue-comment": { + /** + * Format: uri + * @description The API URL to get the issue comment where the secret was detected. + * @example https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451 + */ + issue_comment_url: string; + }; + /** @description Represents a 'discussion_title' secret scanning location type. This location type shows that a secret was detected in the title of a discussion. */ + "secret-scanning-location-discussion-title": { + /** + * Format: uri + * @description The URL to the discussion where the secret was detected. + * @example https://github.com/community/community/discussions/39082 + */ + discussion_title_url: string; + }; + /** @description Represents a 'discussion_body' secret scanning location type. This location type shows that a secret was detected in the body of a discussion. */ + "secret-scanning-location-discussion-body": { + /** + * Format: uri + * @description The URL to the discussion where the secret was detected. + * @example https://github.com/community/community/discussions/39082#discussion-4566270 + */ + discussion_body_url: string; + }; + /** @description Represents a 'discussion_comment' secret scanning location type. This location type shows that a secret was detected in a comment on a discussion. */ + "secret-scanning-location-discussion-comment": { + /** + * 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 + */ + discussion_comment_url: string; + }; + /** @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. */ + "secret-scanning-location-pull-request-title": { + /** + * 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 + */ + pull_request_title_url: string; + }; + /** @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. */ + "secret-scanning-location-pull-request-body": { + /** + * 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 + */ + pull_request_body_url: string; + }; + /** @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. */ + "secret-scanning-location-pull-request-comment": { + /** + * 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 + */ + pull_request_comment_url: string; + }; + /** @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. */ + "secret-scanning-location-pull-request-review": { + /** + * 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 + */ + pull_request_review_url: string; + }; + /** @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. */ + "secret-scanning-location-pull-request-review-comment": { + /** + * 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 + */ + pull_request_review_comment_url: string; + }; + "secret-scanning-location": { + /** + * @description The location type. Because secrets may be found in different types of resources (ie. code, comments, issues, pull requests, discussions), this field identifies the type of resource where the secret was found. + * @example commit + * @enum {string} + */ + 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"; + details?: + | components["schemas"]["secret-scanning-location-commit"] + | components["schemas"]["secret-scanning-location-wiki-commit"] + | components["schemas"]["secret-scanning-location-issue-title"] + | components["schemas"]["secret-scanning-location-issue-body"] + | components["schemas"]["secret-scanning-location-issue-comment"] + | components["schemas"]["secret-scanning-location-discussion-title"] + | components["schemas"]["secret-scanning-location-discussion-body"] + | components["schemas"]["secret-scanning-location-discussion-comment"] + | components["schemas"]["secret-scanning-location-pull-request-title"] + | components["schemas"]["secret-scanning-location-pull-request-body"] + | components["schemas"]["secret-scanning-location-pull-request-comment"] + | components["schemas"]["secret-scanning-location-pull-request-review"] + | components["schemas"]["secret-scanning-location-pull-request-review-comment"]; + }; + "repository-advisory-create": { + /** @description A short summary of the advisory. */ + summary: string; + /** @description A detailed description of what the advisory impacts. */ + description: string; + /** @description The Common Vulnerabilities and Exposures (CVE) ID. */ + cve_id?: string | null; + /** @description A product affected by the vulnerability detailed in a repository security advisory. */ + vulnerabilities: { + /** @description The name of the package affected by the vulnerability. */ + package: { + ecosystem: components["schemas"]["security-advisory-ecosystems"]; + /** @description The unique package name within its ecosystem. */ + name?: string | null; + }; + /** @description The range of the package versions affected by the vulnerability. */ + vulnerable_version_range?: string | null; + /** @description The package version(s) that resolve the vulnerability. */ + patched_versions?: string | null; + /** @description The functions in the package that are affected. */ + vulnerable_functions?: string[] | null; + }[]; + /** @description A list of Common Weakness Enumeration (CWE) IDs. */ + cwe_ids?: string[] | null; + /** @description A list of users receiving credit for their participation in the security advisory. */ + credits?: + | { + /** @description The username of the user credited. */ + login: string; + type: components["schemas"]["security-advisory-credit-types"]; + }[] + | null; + /** + * @description The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. + * @enum {string|null} + */ + severity?: "critical" | "high" | "medium" | "low" | null; + /** @description The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`. */ + cvss_vector_string?: string | null; + /** + * @description Whether to create a temporary private fork of the repository to collaborate on a fix. + * @default false + */ + start_private_fork?: boolean; + }; + "private-vulnerability-report-create": { + /** @description A short summary of the advisory. */ + summary: string; + /** @description A detailed description of what the advisory impacts. */ + description: string; + /** @description An array of products affected by the vulnerability detailed in a repository security advisory. */ + vulnerabilities?: + | { + /** @description The name of the package affected by the vulnerability. */ + package: { + ecosystem: components["schemas"]["security-advisory-ecosystems"]; + /** @description The unique package name within its ecosystem. */ + name?: string | null; + }; + /** @description The range of the package versions affected by the vulnerability. */ + vulnerable_version_range?: string | null; + /** @description The package version(s) that resolve the vulnerability. */ + patched_versions?: string | null; + /** @description The functions in the package that are affected. */ + vulnerable_functions?: string[] | null; + }[] + | null; + /** @description A list of Common Weakness Enumeration (CWE) IDs. */ + cwe_ids?: string[] | null; + /** + * @description The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. + * @enum {string|null} + */ + severity?: "critical" | "high" | "medium" | "low" | null; + /** @description The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`. */ + cvss_vector_string?: string | null; + /** + * @description Whether to create a temporary private fork of the repository to collaborate on a fix. + * @default false + */ + start_private_fork?: boolean; + }; + "repository-advisory-update": { + /** @description A short summary of the advisory. */ + summary?: string; + /** @description A detailed description of what the advisory impacts. */ + description?: string; + /** @description The Common Vulnerabilities and Exposures (CVE) ID. */ + cve_id?: string | null; + /** @description A product affected by the vulnerability detailed in a repository security advisory. */ + vulnerabilities?: { + /** @description The name of the package affected by the vulnerability. */ + package: { + ecosystem: components["schemas"]["security-advisory-ecosystems"]; + /** @description The unique package name within its ecosystem. */ + name?: string | null; + }; + /** @description The range of the package versions affected by the vulnerability. */ + vulnerable_version_range?: string | null; + /** @description The package version(s) that resolve the vulnerability. */ + patched_versions?: string | null; + /** @description The functions in the package that are affected. */ + vulnerable_functions?: string[] | null; + }[]; + /** @description A list of Common Weakness Enumeration (CWE) IDs. */ + cwe_ids?: string[] | null; + /** @description A list of users receiving credit for their participation in the security advisory. */ + credits?: + | { + /** @description The username of the user credited. */ + login: string; + type: components["schemas"]["security-advisory-credit-types"]; + }[] + | null; + /** + * @description The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. + * @enum {string|null} + */ + severity?: "critical" | "high" | "medium" | "low" | null; + /** @description The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`. */ + cvss_vector_string?: string | null; + /** + * @description The state of the advisory. + * @enum {string} + */ + state?: "published" | "closed" | "draft"; + /** @description A list of usernames who have been granted write access to the advisory. */ + collaborating_users?: string[] | null; + /** @description A list of team slugs which have been granted write access to the advisory. */ + collaborating_teams?: string[] | null; + }; + /** + * Stargazer + * @description Stargazer + */ + stargazer: { + /** Format: date-time */ + starred_at: string; + user: components["schemas"]["nullable-simple-user"]; + }; + /** + * Code Frequency Stat + * @description Code Frequency Stat + */ + "code-frequency-stat": number[]; + /** + * Commit Activity + * @description Commit Activity + */ + "commit-activity": { + /** + * @example [ + * 0, + * 3, + * 26, + * 20, + * 39, + * 1, + * 0 + * ] + */ + days: number[]; + /** @example 89 */ + total: number; + /** @example 1336280400 */ + week: number; + }; + /** + * Contributor Activity + * @description Contributor Activity + */ + "contributor-activity": { + author: components["schemas"]["nullable-simple-user"]; + /** @example 135 */ + total: number; + /** + * @example [ + * { + * "w": "1367712000", + * "a": 6898, + * "d": 77, + * "c": 10 + * } + * ] + */ + weeks: { + w?: number; + a?: number; + d?: number; + c?: number; + }[]; + }; + /** Participation Stats */ + "participation-stats": { + all: number[]; + owner: number[]; + }; + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + "repository-subscription": { + /** + * @description Determines if notifications should be received from this repository. + * @example true + */ + subscribed: boolean; + /** @description Determines if all notifications should be blocked from this repository. */ + ignored: boolean; + reason: string | null; + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/subscription + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + }; + /** + * Tag + * @description Tag + */ + tag: { + /** @example v0.1 */ + name: string; + commit: { + sha: string; + /** Format: uri */ + url: string; + }; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/zipball/v0.1 + */ + zipball_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/tarball/v0.1 + */ + tarball_url: string; + node_id: string; + }; + /** + * Tag protection + * @description Tag protection + */ + "tag-protection": { + /** @example 2 */ + id?: number; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + /** @example 2011-01-26T19:01:12Z */ + updated_at?: string; + /** @example true */ + enabled?: boolean; + /** @example v1.* */ + pattern: string; + }; + /** + * Topic + * @description A topic aggregates entities that are related to a subject. + */ + topic: { + names: string[]; + }; + /** Traffic */ + traffic: { + /** Format: date-time */ + timestamp: string; + uniques: number; + count: number; + }; + /** + * Clone Traffic + * @description Clone Traffic + */ + "clone-traffic": { + /** @example 173 */ + count: number; + /** @example 128 */ + uniques: number; + clones: components["schemas"]["traffic"][]; + }; + /** + * Content Traffic + * @description Content Traffic + */ + "content-traffic": { + /** @example /github/hubot */ + path: string; + /** @example github/hubot: A customizable life embetterment robot. */ + title: string; + /** @example 3542 */ + count: number; + /** @example 2225 */ + uniques: number; + }; + /** + * Referrer Traffic + * @description Referrer Traffic + */ + "referrer-traffic": { + /** @example Google */ + referrer: string; + /** @example 4 */ + count: number; + /** @example 3 */ + uniques: number; + }; + /** + * View Traffic + * @description View Traffic + */ + "view-traffic": { + /** @example 14850 */ + count: number; + /** @example 3782 */ + uniques: number; + views: components["schemas"]["traffic"][]; + }; + /** Search Result Text Matches */ + "search-result-text-matches": { + object_url?: string; + object_type?: string | null; + property?: string; + fragment?: string; + matches?: { + text?: string; + indices?: number[]; + }[]; + }[]; + /** + * Code Search Result Item + * @description Code Search Result Item + */ + "code-search-result-item": { + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string; + /** Format: uri */ + html_url: string; + repository: components["schemas"]["minimal-repository"]; + score: number; + file_size?: number; + language?: string | null; + /** Format: date-time */ + last_modified_at?: string; + /** + * @example [ + * "73..77", + * "77..78" + * ] + */ + line_numbers?: string[]; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Commit Search Result Item + * @description Commit Search Result Item + */ + "commit-search-result-item": { + /** Format: uri */ + url: string; + sha: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + comments_url: string; + commit: { + author: { + name: string; + email: string; + /** Format: date-time */ + date: string; + }; + committer: components["schemas"]["nullable-git-user"]; + comment_count: number; + message: string; + tree: { + sha: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + url: string; + verification?: components["schemas"]["verification"]; + }; + author: components["schemas"]["nullable-simple-user"]; + committer: components["schemas"]["nullable-git-user"]; + parents: { + url?: string; + html_url?: string; + sha?: string; + }[]; + repository: components["schemas"]["minimal-repository"]; + score: number; + node_id: string; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Issue Search Result Item + * @description Issue Search Result Item + */ + "issue-search-result-item": { + /** Format: uri */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** Format: int64 */ + id: number; + node_id: string; + number: number; + title: string; + locked: boolean; + active_lock_reason?: string | null; + assignees?: components["schemas"]["simple-user"][] | null; + user: components["schemas"]["nullable-simple-user"]; + labels: { + /** Format: int64 */ + id?: number; + node_id?: string; + url?: string; + name?: string; + color?: string; + default?: boolean; + description?: string | null; + }[]; + state: string; + state_reason?: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + milestone: components["schemas"]["nullable-milestone"]; + comments: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + closed_at: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + body?: string; + score: number; + author_association: components["schemas"]["author-association"]; + draft?: boolean; + repository?: components["schemas"]["repository"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Label Search Result Item + * @description Label Search Result Item + */ + "label-search-result-item": { + id: number; + node_id: string; + /** Format: uri */ + url: string; + name: string; + color: string; + default: boolean; + description: string | null; + score: number; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Repo Search Result Item + * @description Repo Search Result Item + */ + "repo-search-result-item": { + id: number; + node_id: string; + name: string; + full_name: string; + owner: components["schemas"]["nullable-simple-user"]; + private: boolean; + /** Format: uri */ + html_url: string; + description: string | null; + fork: boolean; + /** Format: uri */ + url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + pushed_at: string; + /** Format: uri */ + homepage: string | null; + size: number; + stargazers_count: number; + watchers_count: number; + language: string | null; + forks_count: number; + open_issues_count: number; + master_branch?: string; + default_branch: string; + score: number; + /** Format: uri */ + forks_url: string; + keys_url: string; + collaborators_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri */ + hooks_url: string; + issue_events_url: string; + /** Format: uri */ + events_url: string; + assignees_url: string; + branches_url: string; + /** Format: uri */ + tags_url: string; + blobs_url: string; + git_tags_url: string; + git_refs_url: string; + trees_url: string; + statuses_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + commits_url: string; + git_commits_url: string; + comments_url: string; + issue_comment_url: string; + contents_url: string; + compare_url: string; + /** Format: uri */ + merges_url: string; + archive_url: string; + /** Format: uri */ + downloads_url: string; + issues_url: string; + pulls_url: string; + milestones_url: string; + notifications_url: string; + labels_url: string; + releases_url: string; + /** Format: uri */ + deployments_url: string; + git_url: string; + ssh_url: string; + clone_url: string; + /** Format: uri */ + svn_url: string; + forks: number; + open_issues: number; + watchers: number; + topics?: string[]; + /** Format: uri */ + mirror_url: string | null; + has_issues: boolean; + has_projects: boolean; + has_pages: boolean; + has_wiki: boolean; + has_downloads: boolean; + has_discussions?: boolean; + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + license: components["schemas"]["nullable-license-simple"]; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + text_matches?: components["schemas"]["search-result-text-matches"]; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_forking?: boolean; + is_template?: boolean; + /** @example false */ + web_commit_signoff_required?: boolean; + }; + /** + * Topic Search Result Item + * @description Topic Search Result Item + */ + "topic-search-result-item": { + name: string; + display_name: string | null; + short_description: string | null; + description: string | null; + created_by: string | null; + released: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + featured: boolean; + curated: boolean; + score: number; + repository_count?: number | null; + /** Format: uri */ + logo_url?: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + related?: + | { + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + }; + }[] + | null; + aliases?: + | { + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + }; + }[] + | null; + }; + /** + * User Search Result Item + * @description User Search Result Item + */ + "user-search-result-item": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + followers_url: string; + /** Format: uri */ + subscriptions_url: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + repos_url: string; + /** Format: uri */ + received_events_url: string; + type: string; + score: number; + following_url: string; + gists_url: string; + starred_url: string; + events_url: string; + public_repos?: number; + public_gists?: number; + followers?: number; + following?: number; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + name?: string | null; + bio?: string | null; + /** Format: email */ + email?: string | null; + location?: string | null; + site_admin: boolean; + hireable?: boolean | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + blog?: string | null; + company?: string | null; + /** Format: date-time */ + suspended_at?: string | null; + }; + /** + * Private User + * @description Private User + */ + "private-user": { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example monalisa octocat */ + name: string | null; + /** @example GitHub */ + company: string | null; + /** @example https://github.com/blog */ + blog: string | null; + /** @example San Francisco */ + location: string | null; + /** + * Format: email + * @example octocat@github.com + */ + email: string | null; + hireable: boolean | null; + /** @example There once was... */ + bio: string | null; + /** @example monalisa */ + twitter_username?: string | null; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + updated_at: string; + /** @example 81 */ + private_gists: number; + /** @example 100 */ + total_private_repos: number; + /** @example 100 */ + owned_private_repos: number; + /** @example 10000 */ + disk_usage: number; + /** @example 8 */ + collaborators: number; + /** @example true */ + two_factor_authentication: boolean; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + }; + /** Format: date-time */ + suspended_at?: string | null; + business_plus?: boolean; + ldap_dn?: string; + }; + /** + * Codespaces Secret + * @description Secrets for a GitHub Codespace. + */ + "codespaces-secret": { + /** + * @description The name of the secret + * @example SECRET_NAME + */ + name: string; + /** + * Format: date-time + * @description The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + created_at: string; + /** + * Format: date-time + * @description The date and time at which the secret was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + */ + updated_at: string; + /** + * @description The type of repositories in the organization that the secret is visible to + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @description The API URL at which the list of repositories this secret is visible to can be retrieved + * @example https://api.github.com/user/secrets/SECRET_NAME/repositories + */ + selected_repositories_url: string; + }; + /** + * CodespacesUserPublicKey + * @description The public key used for setting user Codespaces' Secrets. + */ + "codespaces-user-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + }; + /** + * Fetches information about an export of a codespace. + * @description An export of a codespace. Also, latest export details for a codespace can be fetched with id = latest + */ + "codespace-export-details": { + /** + * @description State of the latest export + * @example succeeded | failed | in_progress + */ + state?: string | null; + /** + * Format: date-time + * @description Completion time of the last export operation + * @example 2021-01-01T19:01:12Z + */ + completed_at?: string | null; + /** + * @description Name of the exported branch + * @example codespace-monalisa-octocat-hello-world-g4wpq6h95q + */ + branch?: string | null; + /** + * @description Git commit SHA of the exported branch + * @example fd95a81ca01e48ede9f39c799ecbcef817b8a3b2 + */ + sha?: string | null; + /** + * @description Id for the export details + * @example latest + */ + id?: string; + /** + * @description Url for fetching export details + * @example https://api.github.com/user/codespaces/:name/exports/latest + */ + export_url?: string; + /** + * @description Web url for the exported branch + * @example https://github.com/octocat/hello-world/tree/:branch + */ + html_url?: string | null; + }; + /** + * Codespace + * @description A codespace. + */ + "codespace-with-full-repository": { + /** @example 1 */ + id: number; + /** + * @description Automatically generated name of this codespace. + * @example monalisa-octocat-hello-world-g4wpq6h95q + */ + name: string; + /** + * @description Display name for this codespace. + * @example bookish space pancake + */ + display_name?: string | null; + /** + * @description UUID identifying this codespace's environment. + * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 + */ + environment_id: string | null; + owner: components["schemas"]["simple-user"]; + billable_owner: components["schemas"]["simple-user"]; + repository: components["schemas"]["full-repository"]; + machine: components["schemas"]["nullable-codespace-machine"]; + /** + * @description Path to devcontainer.json from repo root used to create Codespace. + * @example .devcontainer/example/devcontainer.json + */ + devcontainer_path?: string | null; + /** + * @description Whether the codespace was created from a prebuild. + * @example false + */ + prebuild: boolean | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @description Last known time this codespace was started. + * @example 2011-01-26T19:01:12Z + */ + last_used_at: string; + /** + * @description State of this codespace. + * @example Available + * @enum {string} + */ + state: + | "Unknown" + | "Created" + | "Queued" + | "Provisioning" + | "Available" + | "Awaiting" + | "Unavailable" + | "Deleted" + | "Moved" + | "Shutdown" + | "Archived" + | "Starting" + | "ShuttingDown" + | "Failed" + | "Exporting" + | "Updating" + | "Rebuilding"; + /** + * Format: uri + * @description API URL for this codespace. + */ + url: string; + /** @description Details about the codespace's git repository. */ + git_status: { + /** + * @description The number of commits the local repository is ahead of the remote. + * @example 0 + */ + ahead?: number; + /** + * @description The number of commits the local repository is behind the remote. + * @example 0 + */ + behind?: number; + /** @description Whether the local repository has unpushed changes. */ + has_unpushed_changes?: boolean; + /** @description Whether the local repository has uncommitted changes. */ + has_uncommitted_changes?: boolean; + /** + * @description The current branch (or SHA if in detached HEAD state) of the local repository. + * @example main + */ + ref?: string; + }; + /** + * @description The initally assigned location of a new codespace. + * @example WestUs2 + * @enum {string} + */ + location: "EastUs" | "SouthEastAsia" | "WestEurope" | "WestUs2"; + /** + * @description The number of minutes of inactivity after which this codespace will be automatically stopped. + * @example 60 + */ + idle_timeout_minutes: number | null; + /** + * Format: uri + * @description URL to access this codespace on the web. + */ + web_url: string; + /** + * Format: uri + * @description API URL to access available alternate machine types for this codespace. + */ + machines_url: string; + /** + * Format: uri + * @description API URL to start this codespace. + */ + start_url: string; + /** + * Format: uri + * @description API URL to stop this codespace. + */ + stop_url: string; + /** + * Format: uri + * @description API URL to publish this codespace to a new repository. + */ + publish_url?: string | null; + /** + * Format: uri + * @description API URL for the Pull Request associated with this codespace, if any. + */ + pulls_url: string | null; + recent_folders: string[]; + runtime_constraints?: { + /** @description The privacy settings a user can select from when forwarding a port. */ + allowed_port_privacy_settings?: string[] | null; + }; + /** @description Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. */ + pending_operation?: boolean | null; + /** @description Text to show user when codespace is disabled by a pending operation */ + pending_operation_disabled_reason?: string | null; + /** @description Text to show user when codespace idle timeout minutes has been overriden by an organization policy */ + idle_timeout_notice?: string | null; + /** + * @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + * @example 60 + */ + retention_period_minutes?: number | null; + /** + * Format: date-time + * @description When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" + * @example 2011-01-26T20:01:12Z + */ + retention_expires_at?: string | null; + }; + /** + * Email + * @description Email + */ + email: { + /** + * Format: email + * @example octocat@github.com + */ + email: string; + /** @example true */ + primary: boolean; + /** @example true */ + verified: boolean; + /** @example public */ + visibility: string | null; + }; + /** + * GPG Key + * @description A unique encryption key + */ + "gpg-key": { + /** @example 3 */ + id: number; + /** @example Octocat's GPG Key */ + name?: string | null; + primary_key_id: number | null; + /** @example 3262EFF25BA0D270 */ + key_id: string; + /** @example xsBNBFayYZ... */ + public_key: string; + /** + * @example [ + * { + * "email": "octocat@users.noreply.github.com", + * "verified": true + * } + * ] + */ + emails: { + email?: string; + verified?: boolean; + }[]; + /** + * @example [ + * { + * "id": 4, + * "primary_key_id": 3, + * "key_id": "4A595D4C72EE49C7", + * "public_key": "zsBNBFayYZ...", + * "emails": [], + * "can_sign": false, + * "can_encrypt_comms": true, + * "can_encrypt_storage": true, + * "can_certify": false, + * "created_at": "2016-03-24T11:31:04-06:00", + * "expires_at": null, + * "revoked": false + * } + * ] + */ + subkeys: { + id?: number; + primary_key_id?: number; + key_id?: string; + public_key?: string; + emails?: { + email?: string; + verified?: boolean; + }[]; + subkeys?: unknown[]; + can_sign?: boolean; + can_encrypt_comms?: boolean; + can_encrypt_storage?: boolean; + can_certify?: boolean; + created_at?: string; + expires_at?: string | null; + raw_key?: string | null; + revoked?: boolean; + }[]; + /** @example true */ + can_sign: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + /** @example true */ + can_certify: boolean; + /** + * Format: date-time + * @example 2016-03-24T11:31:04-06:00 + */ + created_at: string; + /** Format: date-time */ + expires_at: string | null; + /** @example true */ + revoked: boolean; + raw_key: string | null; + }; + /** + * Key + * @description Key + */ + key: { + key: string; + id: number; + url: string; + title: string; + /** Format: date-time */ + created_at: string; + verified: boolean; + read_only: boolean; + }; + /** Marketplace Account */ + "marketplace-account": { + /** Format: uri */ + url: string; + id: number; + type: string; + node_id?: string; + login: string; + /** Format: email */ + email?: string | null; + /** Format: email */ + organization_billing_email?: string | null; + }; + /** + * User Marketplace Purchase + * @description User Marketplace Purchase + */ + "user-marketplace-purchase": { + /** @example monthly */ + billing_cycle: string; + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + next_billing_date: string | null; + unit_count: number | null; + /** @example true */ + on_free_trial: boolean; + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + free_trial_ends_on: string | null; + /** + * Format: date-time + * @example 2017-11-02T01:12:12Z + */ + updated_at: string | null; + account: components["schemas"]["marketplace-account"]; + plan: components["schemas"]["marketplace-listing-plan"]; + }; + /** + * Social account + * @description Social media account + */ + "social-account": { + /** @example linkedin */ + provider: string; + /** @example https://www.linkedin.com/company/github/ */ + url: string; + }; + /** + * SSH Signing Key + * @description A public SSH key used to sign Git commits + */ + "ssh-signing-key": { + key: string; + id: number; + title: string; + /** Format: date-time */ + created_at: string; + }; + /** + * Starred Repository + * @description Starred Repository + */ + "starred-repository": { + /** Format: date-time */ + starred_at: string; + repo: components["schemas"]["repository"]; + }; + /** + * Hovercard + * @description Hovercard + */ + hovercard: { + contexts: { + message: string; + octicon: string; + }[]; + }; + /** + * Key Simple + * @description Key Simple + */ + "key-simple": { + id: number; + key: string; + }; + /** + * Enterprise + * @description An enterprise on GitHub. Webhook payloads contain the `enterprise` property when the webhook is configured + * on an enterprise account or an organization that's part of an enterprise account. For more information, + * see "[About enterprise accounts](https://docs.github.com/admin/overview/about-enterprise-accounts)." + */ + "enterprise-webhooks": { + /** @description A short description of the enterprise. */ + description?: string | null; + /** + * Format: uri + * @example https://github.com/enterprises/octo-business + */ + html_url: string; + /** + * Format: uri + * @description The enterprise's website URL. + */ + website_url?: string | null; + /** + * @description Unique identifier of the enterprise + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the enterprise. + * @example Octo Business + */ + name: string; + /** + * @description The slug url identifier for the enterprise. + * @example octo-business + */ + slug: string; + /** + * Format: date-time + * @example 2019-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2019-01-26T19:14:43Z + */ + updated_at: string | null; + /** Format: uri */ + avatar_url: string; + }; + /** + * Simple Installation + * @description The GitHub App installation. Webhook payloads contain the `installation` property when the event is configured + * for and sent to a GitHub App. For more information, + * see "[Using webhooks with GitHub Apps](https://docs.github.com/apps/creating-github-apps/registering-a-github-app/using-webhooks-with-github-apps)." + */ + "simple-installation": { + /** + * @description The ID of the installation. + * @example 1 + */ + id: number; + /** + * @description The global node ID of the installation. + * @example MDQ6VXNlcjU4MzIzMQ== + */ + node_id: string; + }; + /** + * Organization Simple + * @description A GitHub organization. Webhook payloads contain the `organization` property when the webhook is configured for an + * organization, or when the event occurs from activity in a repository owned by an organization. + */ + "organization-simple-webhooks": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + }; + /** + * Repository + * @description The repository on GitHub where the event occurred. Webhook payloads contain the `repository` property + * when the event occurs from activity in a repository. + */ + "repository-webhooks": { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** @description 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. */ + custom_properties?: { + [key: string]: unknown; + }; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether discussions are enabled. + * @default false + * @example true + */ + has_discussions?: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: { + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + private?: boolean; + html_url?: string; + description?: string; + fork?: boolean; + url?: string; + archive_url?: string; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + deployments_url?: string; + downloads_url?: string; + events_url?: string; + forks_url?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + languages_url?: string; + merges_url?: string; + milestones_url?: string; + notifications_url?: string; + pulls_url?: string; + releases_url?: string; + ssh_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + clone_url?: string; + mirror_url?: string; + hooks_url?: string; + svn_url?: string; + homepage?: string; + language?: string; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + pushed_at?: string; + created_at?: string; + updated_at?: string; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + allow_rebase_merge?: boolean; + temp_clone_token?: string; + allow_squash_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_update_branch?: boolean; + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } | null; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean; + }; + /** + * Simple User + * @description The GitHub user that triggered the event. This property is included in every webhook payload. + */ + "simple-user-webhooks": { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + }; + /** + * branch protection rule + * @description The branch protection rule. Includes a `name` and all the [branch protection settings](https://docs.github.com/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings) applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of `off`, `non_admins`, or `everyone`. Actor and build lists are arrays of strings. + */ + webhooks_rule: { + admin_enforced: boolean; + /** @enum {string} */ + allow_deletions_enforcement_level: "off" | "non_admins" | "everyone"; + /** @enum {string} */ + allow_force_pushes_enforcement_level: "off" | "non_admins" | "everyone"; + authorized_actor_names: string[]; + authorized_actors_only: boolean; + authorized_dismissal_actors_only: boolean; + create_protected?: boolean; + /** Format: date-time */ + created_at: string; + dismiss_stale_reviews_on_push: boolean; + id: number; + ignore_approvals_from_contributors: boolean; + /** @enum {string} */ + linear_history_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + merge_queue_enforcement_level: "off" | "non_admins" | "everyone"; + name: string; + /** @enum {string} */ + pull_request_reviews_enforcement_level: "off" | "non_admins" | "everyone"; + repository_id: number; + require_code_owner_review: boolean; + /** @description Whether the most recent push must be approved by someone other than the person who pushed it */ + require_last_push_approval?: boolean; + required_approving_review_count: number; + /** @enum {string} */ + required_conversation_resolution_level: "off" | "non_admins" | "everyone"; + /** @enum {string} */ + required_deployments_enforcement_level: "off" | "non_admins" | "everyone"; + required_status_checks: string[]; + /** @enum {string} */ + required_status_checks_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + /** @enum {string} */ + signature_requirement_enforcement_level: + | "off" + | "non_admins" + | "everyone"; + strict_required_status_checks_policy: boolean; + /** Format: date-time */ + updated_at: string; + }; + /** @description A suite of checks performed on the code of a given code change */ + "simple-check-suite": { + /** @example d6fde92930d4715a2b49857d24b940956b26d2d3 */ + after?: string | null; + app?: components["schemas"]["integration"]; + /** @example 146e867f55c26428e5f9fade55a9bbf5e95a7912 */ + before?: string | null; + /** + * @example neutral + * @enum {string|null} + */ + conclusion?: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + | "stale" + | "startup_failure" + | null; + /** Format: date-time */ + created_at?: string; + /** @example master */ + head_branch?: string | null; + /** + * @description The SHA of the head commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha?: string; + /** @example 5 */ + id?: number; + /** @example MDEwOkNoZWNrU3VpdGU1 */ + node_id?: string; + pull_requests?: components["schemas"]["pull-request-minimal"][]; + repository?: components["schemas"]["minimal-repository"]; + /** + * @example completed + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed" | "pending" | "waiting"; + /** Format: date-time */ + updated_at?: string; + /** @example https://api.github.com/repos/github/hello-world/check-suites/5 */ + url?: string; + }; + /** + * CheckRun + * @description A check performed on the code of a given code change + */ + "check-run-with-simple-check-suite": { + app: components["schemas"]["nullable-integration"]; + check_suite: components["schemas"]["simple-check-suite"]; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + completed_at: string | null; + /** + * @example neutral + * @enum {string|null} + */ + conclusion: + | "waiting" + | "pending" + | "startup_failure" + | "stale" + | "success" + | "failure" + | "neutral" + | "cancelled" + | "skipped" + | "timed_out" + | "action_required" + | null; + deployment?: components["schemas"]["deployment-simple"]; + /** @example https://example.com */ + details_url: string; + /** @example 42 */ + external_id: string; + /** + * @description The SHA of the commit that is being checked. + * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d + */ + head_sha: string; + /** @example https://github.com/github/hello-world/runs/4 */ + html_url: string; + /** + * @description The id of the check. + * @example 21 + */ + id: number; + /** + * @description The name of the check. + * @example test-coverage + */ + name: string; + /** @example MDg6Q2hlY2tSdW40 */ + node_id: string; + output: { + annotations_count: number; + /** Format: uri */ + annotations_url: string; + summary: string | null; + text: string | null; + title: string | null; + }; + pull_requests: components["schemas"]["pull-request-minimal"][]; + /** + * Format: date-time + * @example 2018-05-04T01:14:52Z + */ + started_at: string; + /** + * @description The phase of the lifecycle that the check is currently in. + * @example queued + * @enum {string} + */ + status: "queued" | "in_progress" | "completed" | "pending"; + /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */ + url: string; + }; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + webhooks_code_scanning_commit_oid: string; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + webhooks_code_scanning_ref: string; + /** @description The pusher type for the event. Can be either `user` or a deploy key. */ + webhooks_deploy_pusher_type: string; + /** @description The [`git ref`](https://docs.github.com/rest/git/refs#get-a-reference) resource. */ + webhooks_ref_0: string; + /** @description The [`deploy key`](https://docs.github.com/rest/deploy-keys/deploy-keys#get-a-deploy-key) resource. */ + webhooks_deploy_key: { + added_by?: string | null; + created_at: string; + id: number; + key: string; + last_used?: string | null; + read_only: boolean; + title: string; + /** Format: uri */ + url: string; + verified: boolean; + }; + /** Workflow */ + webhooks_workflow: { + /** Format: uri */ + badge_url: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + node_id: string; + path: string; + state: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + webhooks_approver: { + 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; + }; + webhooks_reviewers: { + /** User */ + reviewer?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @enum {string} */ + type?: "User"; + }[]; + webhooks_workflow_job_run: { + conclusion: unknown; + created_at: string; + environment: string; + html_url: string; + id: number; + name: unknown; + status: string; + updated_at: string; + }; + /** User */ + webhooks_user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + webhooks_answer: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + /** Format: date-time */ + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: unknown; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** + * Discussion + * @description A Discussion in a repository. + */ + discussion: { + active_lock_reason: string | null; + answer_chosen_at: string | null; + /** User */ + answer_chosen_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + answer_html_url: string | null; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + category: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + comments: number; + /** Format: date-time */ + created_at: string; + html_url: string; + id: number; + locked: boolean; + node_id: string; + number: number; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + /** + * @description The current state of the discussion. + * `converting` means that the discussion is being converted from an issue. + * `transferring` means that the discussion is being transferred from another repository. + * @enum {string} + */ + state: "open" | "closed" | "locked" | "converting" | "transferring"; + /** + * @description The reason for the current state + * @example resolved + * @enum {string|null} + */ + state_reason: "resolved" | "outdated" | "duplicate" | "reopened" | null; + timeline_url?: string; + title: string; + /** Format: date-time */ + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + webhooks_comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + body: string; + child_comment_count: number; + created_at: string; + discussion_id: number; + html_url: string; + id: number; + node_id: string; + parent_id: number | null; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + repository_url: string; + updated_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Label */ + webhooks_label: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }; + /** @description An array of repository objects that the installation can access. */ + webhooks_repositories: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + /** @description An array of repository objects, which were added to the installation. */ + webhooks_repositories_added: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + webhooks_repository_selection: "all" | "selected"; + /** + * issue comment + * @description The [comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment) itself. + */ + webhooks_issue_comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue comment */ + body: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + /** + * Format: int64 + * @description Unique identifier of the issue comment + */ + id: number; + /** Format: uri */ + issue_url: string; + node_id: string; + performed_via_github_app: components["schemas"]["integration"]; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + /** @description The changes to the comment. */ + webhooks_changes: { + body?: { + /** @description The previous version of the body. */ + from: string; + }; + }; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/issues/issues#get-an-issue) itself. + */ + webhooks_issue: { + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** Format: int64 */ + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + webhooks_milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/issues/issues#get-an-issue) itself. + */ + webhooks_issue_2: { + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** Format: int64 */ + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** User */ + webhooks_user_mannequin: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** Marketplace Purchase */ + webhooks_marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date: string | null; + on_free_trial: boolean; + plan: { + bullets: (string | null)[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + /** Marketplace Purchase */ + webhooks_previous_marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + webhooks_team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** + * @description Whether team members will receive notifications when their team is @mentioned + * @enum {string} + */ + notification_setting: + | "notifications_enabled" + | "notifications_disabled"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** @enum {string} */ + notification_setting?: "notifications_enabled" | "notifications_disabled"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + /** + * Merge Group + * @description A group of pull requests that the merge queue has grouped together to be merged. + */ + "merge-group": { + /** @description The SHA of the merge group. */ + head_sha: string; + /** @description The full ref of the merge group. */ + head_ref: string; + /** @description The SHA of the merge group's parent commit. */ + base_sha: string; + /** @description The full ref of the branch the merge group will be merged into. */ + base_ref: string; + head_commit: components["schemas"]["simple-commit"]; + }; + /** + * Repository + * @description The repository on GitHub where the event occurred. Webhook payloads contain the `repository` property + * when the event occurs from activity in a repository. + */ + "nullable-repository-webhooks": { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** + * @description The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** @description 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. */ + custom_properties?: { + [key: string]: unknown; + }; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether discussions are enabled. + * @default false + * @example true + */ + has_discussions?: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: { + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + private?: boolean; + html_url?: string; + description?: string; + fork?: boolean; + url?: string; + archive_url?: string; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + deployments_url?: string; + downloads_url?: string; + events_url?: string; + forks_url?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + languages_url?: string; + merges_url?: string; + milestones_url?: string; + notifications_url?: string; + pulls_url?: string; + releases_url?: string; + ssh_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + clone_url?: string; + mirror_url?: string; + hooks_url?: string; + svn_url?: string; + homepage?: string; + language?: string; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + pushed_at?: string; + created_at?: string; + updated_at?: string; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + allow_rebase_merge?: boolean; + temp_clone_token?: string; + allow_squash_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_update_branch?: boolean; + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } | null; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + webhooks_milestone_3: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + /** + * Membership + * @description The membership between the user and the organization. Not present when the action is `member_invited`. + */ + webhooks_membership: { + /** Format: uri */ + organization_url: string; + role: string; + state: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** + * Personal Access Token Request + * @description Details of a Personal Access Token Request. + */ + "personal-access-token-request": { + /** @description Unique identifier of the request for access via fine-grained personal access token. Used as the `pat_request_id` parameter in the list and review API calls. */ + id: number; + owner: components["schemas"]["simple-user"]; + /** @description New requested permissions, categorized by type of permission. */ + permissions_added: { + organization?: { + [key: string]: string; + }; + repository?: { + [key: string]: string; + }; + other?: { + [key: string]: string; + }; + }; + /** @description Requested permissions that elevate access for a previously approved request for access, categorized by type of permission. */ + permissions_upgraded: { + organization?: { + [key: string]: string; + }; + repository?: { + [key: string]: string; + }; + other?: { + [key: string]: string; + }; + }; + /** @description Permissions requested, categorized by type of permission. This field incorporates `permissions_added` and `permissions_upgraded`. */ + permissions_result: { + organization?: { + [key: string]: string; + }; + repository?: { + [key: string]: string; + }; + other?: { + [key: string]: string; + }; + }; + /** + * @description Type of repository selection requested. + * @enum {string} + */ + repository_selection: "none" | "all" | "subset"; + /** @description The number of repositories the token is requesting access to. This field is only populated when `repository_selection` is `subset`. */ + repository_count: number | null; + /** @description An array of repository objects the token is requesting access to. This field is only populated when `repository_selection` is `subset`. */ + repositories: + | { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[] + | null; + /** @description Date and time when the request for access was created. */ + created_at: string; + /** @description Whether the associated fine-grained personal access token has expired. */ + token_expired: boolean; + /** @description Date and time when the associated fine-grained personal access token expires. */ + token_expires_at: string | null; + /** @description Date and time when the associated fine-grained personal access token was last used for authentication. */ + token_last_used_at: string | null; + }; + /** Project Card */ + webhooks_project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + /** Project */ + webhooks_project: { + /** @description Body of the project */ + body: string | null; + /** Format: uri */ + columns_url: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + id: number; + /** @description Name of the project */ + name: string; + node_id: string; + number: number; + /** Format: uri */ + owner_url: string; + /** + * @description State of the project; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + /** Project Column */ + webhooks_project_column: { + after_id?: number | null; + /** Format: uri */ + cards_url: string; + /** Format: date-time */ + created_at: string; + /** @description The unique identifier of the project column */ + id: number; + /** @description Name of the project column */ + name: string; + node_id: string; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + /** + * Projects v2 Project + * @description A projects v2 project + */ + "projects-v2": { + id: number; + node_id: string; + owner: components["schemas"]["simple-user"]; + creator: components["schemas"]["simple-user"]; + title: string; + description: string | null; + public: boolean; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + created_at: string; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + updated_at: string; + number: number; + short_description: string | null; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + deleted_at: string | null; + deleted_by: components["schemas"]["nullable-simple-user"]; + }; + webhooks_project_changes: { + archived_at?: { + /** Format: date-time */ + from?: string | null; + /** Format: date-time */ + to?: string | null; + }; + }; + /** + * Projects v2 Item Content Type + * @description The type of content tracked in a project item + * @enum {string} + */ + "projects-v2-item-content-type": "Issue" | "PullRequest" | "DraftIssue"; + /** + * Projects v2 Item + * @description An item belonging to a project + */ + "projects-v2-item": { + id: number; + node_id?: string; + project_node_id?: string; + content_node_id: string; + content_type: components["schemas"]["projects-v2-item-content-type"]; + creator?: components["schemas"]["simple-user"]; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + created_at: string; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2022-04-28T12:00:00Z + */ + archived_at: string | null; + }; + /** @description The pull request number. */ + webhooks_number: number; + "pull-request-webhook": components["schemas"]["pull-request"] & { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow updating the pull request's branch. */ + allow_update_branch?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged. + * @default false + */ + delete_branch_on_merge?: boolean; + /** + * @description The default value for a merge commit message. + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., "Merge pull request #123 from branch-name"). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a squash merge commit message: + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead.** + * @default false + */ + use_squash_pr_title_as_default?: boolean; + }; + /** Pull Request */ + webhooks_pull_request_5: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + /** + * Pull Request Review Comment + * @description The [comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request) itself. + */ + webhooks_review_comment: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: "LEFT" | "RIGHT" | null; + /** + * @description The level at which the comment is targeted, can be a diff line or a file. + * @enum {string} + */ + subject_type?: "line" | "file"; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** @description The review that was affected. */ + webhooks_review: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the review. */ + body: string | null; + /** @description A commit SHA for the review. */ + commit_id: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the review */ + id: number; + node_id: string; + /** Format: uri */ + pull_request_url: string; + state: string; + /** Format: date-time */ + submitted_at: string | null; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + webhooks_nullable_string: string | null; + /** + * Release + * @description The [release](https://docs.github.com/rest/releases/releases/#get-a-release) object. + */ + webhooks_release: { + assets: { + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + }[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + /** + * Release + * @description The [release](https://docs.github.com/rest/releases/releases/#get-a-release) object. + */ + webhooks_release_1: { + assets: ({ + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + } | null)[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** @description Whether the release is identified as a prerelease or a full release. */ + prerelease: boolean; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + /** + * Repository Vulnerability Alert Alert + * @description The security alert of the vulnerable dependency. + */ + webhooks_alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "open"; + }; + /** + * @description The reason for resolving the alert. + * @enum {string|null} + */ + "secret-scanning-alert-resolution-webhook": + | "false_positive" + | "wont_fix" + | "revoked" + | "used_in_tests" + | "pattern_deleted" + | "pattern_edited" + | null; + "secret-scanning-alert-webhook": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["nullable-alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + resolution?: components["schemas"]["secret-scanning-alert-resolution-webhook"]; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description An optional comment to resolve an alert. */ + resolution_comment?: string | null; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description The token status as of the latest validity check. + * @enum {string} + */ + validity?: "active" | "inactive" | "unknown"; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + }; + /** @description The details of the security advisory, including summary, description, and severity. */ + webhooks_security_advisory: { + cvss: { + score: number; + vector_string: string | null; + }; + cwes: { + cwe_id: string; + name: string; + }[]; + description: string; + ghsa_id: string; + identifiers: { + type: string; + value: string; + }[]; + published_at: string; + references: { + /** Format: uri */ + url: string; + }[]; + severity: string; + summary: string; + updated_at: string; + vulnerabilities: { + first_patched_version: { + identifier: string; + } | null; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + }[]; + withdrawn_at: string | null; + }; + webhooks_sponsorship: { + created_at: string; + maintainer?: { + 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; + }; + node_id: string; + privacy_level: string; + /** User */ + sponsor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** User */ + sponsorable: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + tier: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + /** @description The `pending_cancellation` and `pending_tier_change` event types will include the date the cancellation or tier change will take effect. */ + webhooks_effective_date: string; + webhooks_changes_8: { + tier: { + /** + * Sponsorship Tier + * @description The `tier_changed` and `pending_tier_change` will include the original tier before the change or pending change. For more information, see the pending tier change payload. + */ + from: { + created_at: string; + description: string; + is_custom_ammount?: boolean; + is_custom_amount?: boolean; + is_one_time: boolean; + monthly_price_in_cents: number; + monthly_price_in_dollars: number; + name: string; + node_id: string; + }; + }; + }; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + webhooks_team_1: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** + * @description Whether team members will receive notifications when their team is @mentioned + * @enum {string} + */ + notification_setting: + | "notifications_enabled" + | "notifications_disabled"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** + * @description Whether team members will receive notifications when their team is @mentioned + * @enum {string} + */ + notification_setting?: "notifications_enabled" | "notifications_disabled"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + /** branch protection configuration disabled event */ + "webhook-branch-protection-configuration-disabled": { + /** @enum {string} */ + action: "disabled"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** branch protection configuration enabled event */ + "webhook-branch-protection-configuration-enabled": { + /** @enum {string} */ + action: "enabled"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** branch protection rule created event */ + "webhook-branch-protection-rule-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + rule: components["schemas"]["webhooks_rule"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** branch protection rule deleted event */ + "webhook-branch-protection-rule-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + rule: components["schemas"]["webhooks_rule"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** branch protection rule edited event */ + "webhook-branch-protection-rule-edited": { + /** @enum {string} */ + action: "edited"; + /** @description If the action was `edited`, the changes to the rule. */ + changes?: { + admin_enforced?: { + from: boolean | null; + }; + authorized_actor_names?: { + from: string[]; + }; + authorized_actors_only?: { + from: boolean | null; + }; + authorized_dismissal_actors_only?: { + from: boolean | null; + }; + linear_history_requirement_enforcement_level?: { + /** @enum {string} */ + from: "off" | "non_admins" | "everyone"; + }; + required_status_checks?: { + from: string[]; + }; + required_status_checks_enforcement_level?: { + /** @enum {string} */ + from: "off" | "non_admins" | "everyone"; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + rule: components["schemas"]["webhooks_rule"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** Check Run Completed Event */ + "webhook-check-run-completed": { + /** @enum {string} */ + action?: "completed"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** + * Check Run Completed Event + * @description The check_run.completed webhook encoded with URL encoding + */ + "webhook-check-run-completed-form-encoded": { + /** @description A URL-encoded string of the check_run.completed JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** Check Run Created Event */ + "webhook-check-run-created": { + /** @enum {string} */ + action?: "created"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** + * Check Run Created Event + * @description The check_run.created webhook encoded with URL encoding + */ + "webhook-check-run-created-form-encoded": { + /** @description A URL-encoded string of the check_run.created JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** Check Run Requested Action Event */ + "webhook-check-run-requested-action": { + /** @enum {string} */ + action: "requested_action"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + /** @description The action requested by the user. */ + requested_action?: { + /** @description The integrator reference of the action requested by the user. */ + identifier?: string; + }; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** + * Check Run Requested Action Event + * @description The check_run.requested_action webhook encoded with URL encoding + */ + "webhook-check-run-requested-action-form-encoded": { + /** @description A URL-encoded string of the check_run.requested_action JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** Check Run Re-Requested Event */ + "webhook-check-run-rerequested": { + /** @enum {string} */ + action?: "rerequested"; + check_run: components["schemas"]["check-run-with-simple-check-suite"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** + * Check Run Re-Requested Event + * @description The check_run.rerequested webhook encoded with URL encoding + */ + "webhook-check-run-rerequested-form-encoded": { + /** @description A URL-encoded string of the check_run.rerequested JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** check_suite completed event */ + "webhook-check-suite-completed": { + /** @enum {string} */ + action: "completed"; + /** @description The [check_suite](https://docs.github.com/rest/checks/suites#get-a-check-suite). */ + check_suite: { + after: string | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + app: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "merge_group" + | "pull_request_review_thread" + | "workflow_job" + | "merge_queue_entry" + | "security_and_analysis" + | "projects_v2_item" + | "secret_scanning_alert_location" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + }; + before: string | null; + /** Format: uri */ + check_runs_url: string; + /** + * @description The summary conclusion for all check runs that are part of the check suite. This value will be `null` until the check run has `completed`. + * @enum {string|null} + */ + conclusion: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + | "startup_failure"; + /** Format: date-time */ + created_at: string; + /** @description The head branch name the changes are on. */ + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** @description The SHA of the head commit that is being checked. */ + head_sha: string; + id: number; + latest_check_runs_count: number; + node_id: string; + /** @description An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty. */ + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + rerequestable?: boolean; + runs_rerequestable?: boolean; + /** + * @description The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`. + * @enum {string|null} + */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | null + | "pending"; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL that points to the check suite API resource. + */ + url: string; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** check_suite requested event */ + "webhook-check-suite-requested": { + /** @enum {string} */ + action: "requested"; + /** @description The [check_suite](https://docs.github.com/rest/checks/suites#get-a-check-suite). */ + check_suite: { + after: string | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + app: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "workflow_job" + | "merge_queue_entry" + | "security_and_analysis" + | "secret_scanning_alert_location" + | "projects_v2_item" + | "merge_group" + | "repository_import" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + }; + before: string | null; + /** Format: uri */ + check_runs_url: string; + /** + * @description The summary conclusion for all check runs that are part of the check suite. This value will be `null` until the check run has completed. + * @enum {string|null} + */ + conclusion: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped"; + /** Format: date-time */ + created_at: string; + /** @description The head branch name the changes are on. */ + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** @description The SHA of the head commit that is being checked. */ + head_sha: string; + id: number; + latest_check_runs_count: number; + node_id: string; + /** @description An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty. */ + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + rerequestable?: boolean; + runs_rerequestable?: boolean; + /** + * @description The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`. + * @enum {string|null} + */ + status: "requested" | "in_progress" | "completed" | "queued" | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL that points to the check suite API resource. + */ + url: string; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** check_suite rerequested event */ + "webhook-check-suite-rerequested": { + /** @enum {string} */ + action: "rerequested"; + /** @description The [check_suite](https://docs.github.com/rest/checks/suites#get-a-check-suite). */ + check_suite: { + after: string | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + app: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "merge_queue_entry" + | "workflow_job" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + }; + before: string | null; + /** Format: uri */ + check_runs_url: string; + /** + * @description The summary conclusion for all check runs that are part of the check suite. This value will be `null` until the check run has completed. + * @enum {string|null} + */ + conclusion: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null; + /** Format: date-time */ + created_at: string; + /** @description The head branch name the changes are on. */ + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** @description The SHA of the head commit that is being checked. */ + head_sha: string; + id: number; + latest_check_runs_count: number; + node_id: string; + /** @description An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty. */ + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + rerequestable?: boolean; + runs_rerequestable?: boolean; + /** + * @description The summary status for all check runs that are part of the check suite. Can be `requested`, `in_progress`, or `completed`. + * @enum {string|null} + */ + status: "requested" | "in_progress" | "completed" | "queued" | null; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL that points to the check suite API resource. + */ + url: string; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** code_scanning_alert appeared_in_branch event */ + "webhook-code-scanning-alert-appeared-in-branch": { + /** @enum {string} */ + action: "appeared_in_branch"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + dismissed_at: string | null; + /** User */ + dismissed_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The reason for dismissing or closing the alert. + * @enum {string|null} + */ + dismissed_reason: + | "false positive" + | "won't fix" + | "used in tests" + | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + /** @description Identifies the configuration under which the analysis was executed. */ + category?: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: "none" | "note" | "warning" | "error" | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + tool: { + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + commit_oid: components["schemas"]["webhooks_code_scanning_commit_oid"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + ref: components["schemas"]["webhooks_code_scanning_ref"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** code_scanning_alert closed_by_user event */ + "webhook-code-scanning-alert-closed-by-user": { + /** @enum {string} */ + action: "closed_by_user"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + dismissed_at: string; + /** User */ + dismissed_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The reason for dismissing or closing the alert. + * @enum {string|null} + */ + dismissed_reason: + | "false positive" + | "won't fix" + | "used in tests" + | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + /** @description Identifies the configuration under which the analysis was executed. */ + category?: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: "none" | "note" | "warning" | "error" | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "dismissed" | "fixed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + commit_oid: components["schemas"]["webhooks_code_scanning_commit_oid"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + ref: components["schemas"]["webhooks_code_scanning_ref"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** code_scanning_alert created event */ + "webhook-code-scanning-alert-created": { + /** @enum {string} */ + action: "created"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string | null; + /** @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + dismissed_at: unknown; + dismissed_by: unknown; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + /** @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. */ + dismissed_reason: unknown; + fixed_at?: unknown; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + instances_url?: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + /** @description Identifies the configuration under which the analysis was executed. */ + category?: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: "none" | "note" | "warning" | "error" | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + } | null; + updated_at?: string | null; + /** Format: uri */ + url: string; + }; + commit_oid: components["schemas"]["webhooks_code_scanning_commit_oid"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + ref: components["schemas"]["webhooks_code_scanning_ref"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** code_scanning_alert fixed event */ + "webhook-code-scanning-alert-fixed": { + /** @enum {string} */ + action: "fixed"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + dismissed_at: string | null; + /** User */ + dismissed_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The reason for dismissing or closing the alert. + * @enum {string|null} + */ + dismissed_reason: + | "false positive" + | "won't fix" + | "used in tests" + | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Format: uri */ + instances_url?: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + /** @description Identifies the configuration under which the analysis was executed. */ + category?: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: "none" | "note" | "warning" | "error" | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "fixed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + commit_oid: components["schemas"]["webhooks_code_scanning_commit_oid"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + ref: components["schemas"]["webhooks_code_scanning_ref"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** code_scanning_alert reopened event */ + "webhook-code-scanning-alert-reopened": { + /** @enum {string} */ + action: "reopened"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + dismissed_at: string | null; + dismissed_by: Record | null; + /** @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. */ + dismissed_reason: string | null; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + /** @description Identifies the configuration under which the analysis was executed. */ + category?: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + full_description?: string; + help?: string | null; + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: "none" | "note" | "warning" | "error" | null; + tags?: string[] | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + tool: { + guid?: string | null; + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + } | null; + /** @description The commit SHA of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + commit_oid: string | null; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** @description The Git reference of the code scanning alert. When the action is `reopened_by_user` or `closed_by_user`, the event was triggered by the `sender` and this value will be empty. */ + ref: string | null; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** code_scanning_alert reopened_by_user event */ + "webhook-code-scanning-alert-reopened-by-user": { + /** @enum {string} */ + action: "reopened_by_user"; + /** @description The code scanning alert involved in the event. */ + alert: { + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ.` + */ + created_at: string; + /** @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + dismissed_at: unknown; + dismissed_by: unknown; + /** @description The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. */ + dismissed_reason: unknown; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + html_url: string; + /** Alert Instance */ + most_recent_instance?: { + /** @description Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ + analysis_key: string; + /** @description Identifies the configuration under which the analysis was executed. */ + category?: string; + classifications?: string[]; + commit_sha?: string; + /** @description Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed. */ + environment: string; + location?: { + end_column?: number; + end_line?: number; + path?: string; + start_column?: number; + start_line?: number; + }; + message?: { + text?: string; + }; + /** @description The full Git reference, formatted as `refs/heads/`. */ + ref: string; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "dismissed" | "fixed"; + } | null; + /** @description The code scanning alert number. */ + number: number; + rule: { + /** @description A short description of the rule used to detect the alert. */ + description: string; + /** @description A unique identifier for the rule used to detect the alert. */ + id: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity: "none" | "note" | "warning" | "error" | null; + }; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + state: "open" | "fixed"; + tool: { + /** @description The name of the tool used to generate the code scanning analysis alert. */ + name: string; + /** @description The version of the tool used to detect the alert. */ + version: string | null; + }; + /** Format: uri */ + url: string; + }; + commit_oid: components["schemas"]["webhooks_code_scanning_commit_oid"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + ref: components["schemas"]["webhooks_code_scanning_ref"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** commit_comment created event */ + "webhook-commit-comment-created": { + /** + * @description The action performed. Can be `created`. + * @enum {string} + */ + action: "created"; + /** @description The [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment) resource. */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + created_at: string; + /** Format: uri */ + html_url: string; + /** @description The ID of the commit comment. */ + id: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the commit comment. */ + node_id: string; + /** @description The relative path of the file to which the comment applies. */ + path: string | null; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** create event */ + "webhook-create": { + /** @description The repository's current description. */ + description: string | null; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The name of the repository's default branch (usually `main`). */ + master_branch: string; + organization?: components["schemas"]["organization-simple-webhooks"]; + pusher_type: components["schemas"]["webhooks_deploy_pusher_type"]; + ref: components["schemas"]["webhooks_ref_0"]; + /** + * @description The type of Git ref object created in the repository. + * @enum {string} + */ + ref_type: "tag" | "branch"; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** custom property created event */ + "webhook-custom-property-created": { + /** @enum {string} */ + action: "created"; + definition: components["schemas"]["org-custom-property"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** custom property deleted event */ + "webhook-custom-property-deleted": { + /** @enum {string} */ + action: "deleted"; + definition: { + /** @description The name of the property that was deleted. */ + property_name: string; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** custom property updated event */ + "webhook-custom-property-updated": { + /** @enum {string} */ + action: "updated"; + definition: components["schemas"]["org-custom-property"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** Custom property values updated event */ + "webhook-custom-property-values-updated": { + /** @enum {string} */ + action: "updated"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + repository: components["schemas"]["repository-webhooks"]; + organization: components["schemas"]["organization-simple-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + /** @description The new custom property values for the repository. */ + new_property_values: components["schemas"]["custom-property-value"][]; + /** @description The old custom property values for the repository. */ + old_property_values: components["schemas"]["custom-property-value"][]; + }; + /** delete event */ + "webhook-delete": { + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + pusher_type: components["schemas"]["webhooks_deploy_pusher_type"]; + ref: components["schemas"]["webhooks_ref_0"]; + /** + * @description The type of Git ref object deleted in the repository. + * @enum {string} + */ + ref_type: "tag" | "branch"; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** Dependabot alert auto-dismissed event */ + "webhook-dependabot-alert-auto-dismissed": { + /** @enum {string} */ + action: "auto_dismissed"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** Dependabot alert auto-reopened event */ + "webhook-dependabot-alert-auto-reopened": { + /** @enum {string} */ + action: "auto_reopened"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** Dependabot alert created event */ + "webhook-dependabot-alert-created": { + /** @enum {string} */ + action: "created"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** Dependabot alert dismissed event */ + "webhook-dependabot-alert-dismissed": { + /** @enum {string} */ + action: "dismissed"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** Dependabot alert fixed event */ + "webhook-dependabot-alert-fixed": { + /** @enum {string} */ + action: "fixed"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** Dependabot alert reintroduced event */ + "webhook-dependabot-alert-reintroduced": { + /** @enum {string} */ + action: "reintroduced"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** Dependabot alert reopened event */ + "webhook-dependabot-alert-reopened": { + /** @enum {string} */ + action: "reopened"; + alert: components["schemas"]["dependabot-alert"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** deploy_key created event */ + "webhook-deploy-key-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + key: components["schemas"]["webhooks_deploy_key"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** deploy_key deleted event */ + "webhook-deploy-key-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + key: components["schemas"]["webhooks_deploy_key"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** deployment created event */ + "webhook-deployment-created": { + /** @enum {string} */ + action: "created"; + /** + * Deployment + * @description The [deployment](https://docs.github.com/rest/deployments/deployments#list-deployments). + */ + deployment: { + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + environment: string; + id: number; + node_id: string; + original_environment: string; + payload: Record | string; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "workflow_job" + | "pull_request_review_thread" + | "merge_queue_entry" + | "secret_scanning_alert_location" + | "merge_group" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + production_environment?: boolean; + ref: string; + /** Format: uri */ + repository_url: string; + sha: string; + /** Format: uri */ + statuses_url: string; + task: string; + transient_environment?: boolean; + updated_at: string; + /** Format: uri */ + url: string; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + workflow: components["schemas"]["webhooks_workflow"]; + /** Deployment Workflow Run */ + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + artifacts_url?: string; + cancel_url?: string; + check_suite_id: number; + check_suite_node_id: string; + check_suite_url?: string; + /** @enum {string|null} */ + conclusion: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null; + /** Format: date-time */ + created_at: string; + display_title: string; + event: string; + head_branch: string; + head_commit?: unknown; + head_repository?: { + archive_url?: string; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + deployments_url?: string; + description?: unknown; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + languages_url?: string; + merges_url?: string; + milestones_url?: string; + name?: string; + node_id?: string; + notifications_url?: string; + 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; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + jobs_url?: string; + logs_url?: string; + name: string; + node_id: string; + path: string; + previous_attempt_url?: unknown; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + archive_url?: string; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + deployments_url?: string; + description?: unknown; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + languages_url?: string; + merges_url?: string; + milestones_url?: string; + name?: string; + node_id?: string; + notifications_url?: string; + 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; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "waiting" + | "pending"; + /** User */ + triggering_actor?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + workflow_url?: string; + } | null; + }; + /** deployment protection rule requested event */ + "webhook-deployment-protection-rule-requested": { + /** @enum {string} */ + action?: "requested"; + /** @description The name of the environment that has the deployment protection rule. */ + environment?: string; + /** @description The event that triggered the deployment protection rule. */ + event?: string; + /** + * Format: uri + * @description The URL to review the deployment protection rule. + */ + deployment_callback_url?: string; + deployment?: components["schemas"]["deployment"]; + pull_requests?: components["schemas"]["pull-request"][]; + repository?: components["schemas"]["repository-webhooks"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + "webhook-deployment-review-approved": { + /** @enum {string} */ + action: "approved"; + approver?: components["schemas"]["webhooks_approver"]; + comment?: string; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + reviewers?: components["schemas"]["webhooks_reviewers"]; + sender: components["schemas"]["simple-user-webhooks"]; + since: string; + workflow_job_run?: components["schemas"]["webhooks_workflow_job_run"]; + workflow_job_runs?: { + conclusion?: unknown; + created_at?: string; + environment?: string; + html_url?: string; + id?: number; + name?: string | null; + status?: string; + updated_at?: string; + }[]; + /** Deployment Workflow Run */ + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + artifacts_url?: string; + cancel_url?: string; + check_suite_id: number; + check_suite_node_id: string; + check_suite_url?: string; + /** @enum {string|null} */ + conclusion: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null; + /** Format: date-time */ + created_at: string; + display_title: string; + event: string; + head_branch: string; + head_commit?: Record | null; + head_repository?: { + archive_url?: string; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + deployments_url?: string; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + languages_url?: string; + merges_url?: string; + milestones_url?: string; + name?: string; + node_id?: string; + notifications_url?: string; + 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; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + jobs_url?: string; + logs_url?: string; + name: string; + node_id: string; + path: string; + previous_attempt_url?: string | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + archive_url?: string; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + deployments_url?: string; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + languages_url?: string; + merges_url?: string; + milestones_url?: string; + name?: string; + node_id?: string; + notifications_url?: string; + 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; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "waiting" + | "pending"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + workflow_url?: string; + } | null; + }; + "webhook-deployment-review-rejected": { + /** @enum {string} */ + action: "rejected"; + approver?: components["schemas"]["webhooks_approver"]; + comment?: string; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + reviewers?: components["schemas"]["webhooks_reviewers"]; + sender: components["schemas"]["simple-user-webhooks"]; + since: string; + workflow_job_run?: components["schemas"]["webhooks_workflow_job_run"]; + workflow_job_runs?: { + conclusion?: string | null; + created_at?: string; + environment?: string; + html_url?: string; + id?: number; + name?: string | null; + status?: string; + updated_at?: string; + }[]; + /** Deployment Workflow Run */ + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + artifacts_url?: string; + cancel_url?: string; + check_suite_id: number; + check_suite_node_id: string; + check_suite_url?: string; + /** @enum {string|null} */ + conclusion: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: string; + head_commit?: Record | null; + head_repository?: { + archive_url?: string; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + deployments_url?: string; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + languages_url?: string; + merges_url?: string; + milestones_url?: string; + name?: string; + node_id?: string; + notifications_url?: string; + 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; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + jobs_url?: string; + logs_url?: string; + name: string; + node_id: string; + path: string; + previous_attempt_url?: string | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + archive_url?: string; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + deployments_url?: string; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + languages_url?: string; + merges_url?: string; + milestones_url?: string; + name?: string; + node_id?: string; + notifications_url?: string; + 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; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "waiting"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + workflow_url?: string; + display_title: string; + } | null; + }; + "webhook-deployment-review-requested": { + /** @enum {string} */ + action: "requested"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + environment: string; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + requestor: components["schemas"]["webhooks_user"]; + reviewers: { + /** User */ + reviewer?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login?: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @enum {string} */ + type?: "User" | "Team"; + }[]; + sender: components["schemas"]["simple-user-webhooks"]; + since: string; + workflow_job_run: { + conclusion: unknown; + created_at: string; + environment: string; + html_url: string; + id: number; + name: string | null; + status: string; + updated_at: string; + }; + /** Deployment Workflow Run */ + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + artifacts_url?: string; + cancel_url?: string; + check_suite_id: number; + check_suite_node_id: string; + check_suite_url?: string; + /** @enum {string|null} */ + conclusion: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: string; + head_commit?: Record | null; + head_repository?: { + archive_url?: string; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + deployments_url?: string; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + languages_url?: string; + merges_url?: string; + milestones_url?: string; + name?: string; + node_id?: string; + notifications_url?: string; + 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; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + jobs_url?: string; + logs_url?: string; + name: string; + node_id: string; + path: string; + previous_attempt_url?: string | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + archive_url?: string; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + deployments_url?: string; + description?: string | null; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + languages_url?: string; + merges_url?: string; + milestones_url?: string; + name?: string; + node_id?: string; + notifications_url?: string; + 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; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "waiting" + | "pending"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + workflow_url?: string; + display_title: string; + } | null; + }; + /** deployment_status created event */ + "webhook-deployment-status-created": { + /** @enum {string} */ + action: "created"; + check_run?: { + /** Format: date-time */ + completed_at: string | null; + /** + * @description The result of the completed check run. This value will be `null` until the check run has completed. + * @enum {string|null} + */ + conclusion: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | "skipped" + | null; + /** Format: uri */ + details_url: string; + external_id: string; + /** @description The SHA of the commit that is being checked. */ + head_sha: string; + /** Format: uri */ + html_url: string; + /** @description The id of the check. */ + id: number; + /** @description The name of the check run. */ + name: string; + node_id: string; + /** Format: date-time */ + started_at: string; + /** + * @description The current status of the check run. Can be `queued`, `in_progress`, or `completed`. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed" | "waiting" | "pending"; + /** Format: uri */ + url: string; + } | null; + /** + * Deployment + * @description The [deployment](https://docs.github.com/rest/deployments/deployments#list-deployments). + */ + deployment: { + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + environment: string; + id: number; + node_id: string; + original_environment: string; + payload: string | Record | null; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "merge_queue_entry" + | "workflow_job" + | "pull_request_review_thread" + | "secret_scanning_alert_location" + | "merge_group" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + production_environment?: boolean; + ref: string; + /** Format: uri */ + repository_url: string; + sha: string; + /** Format: uri */ + statuses_url: string; + task: string; + transient_environment?: boolean; + updated_at: string; + /** Format: uri */ + url: string; + }; + /** @description The [deployment status](https://docs.github.com/rest/deployments/statuses#list-deployment-statuses). */ + deployment_status: { + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + deployment_url: string; + /** @description The optional human-readable description added to the status. */ + description: string; + environment: string; + /** Format: uri */ + environment_url?: string; + id: number; + /** Format: uri */ + log_url?: string; + node_id: string; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "merge_queue_entry" + | "workflow_job" + | "merge_group" + | "secret_scanning_alert_location" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + /** Format: uri */ + repository_url: string; + /** @description The new state. Can be `pending`, `success`, `failure`, or `error`. */ + state: string; + /** @description The optional link added to the status. */ + target_url: string; + updated_at: string; + /** Format: uri */ + url: string; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + workflow?: components["schemas"]["webhooks_workflow"]; + /** Deployment Workflow Run */ + workflow_run?: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + artifacts_url?: string; + cancel_url?: string; + check_suite_id: number; + check_suite_node_id: string; + check_suite_url?: string; + /** @enum {string|null} */ + conclusion: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "startup_failure"; + /** Format: date-time */ + created_at: string; + display_title: string; + event: string; + head_branch: string; + head_commit?: unknown; + head_repository?: { + archive_url?: string; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + deployments_url?: string; + description?: unknown; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + languages_url?: string; + merges_url?: string; + milestones_url?: string; + name?: string; + node_id?: string; + notifications_url?: string; + 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; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + jobs_url?: string; + logs_url?: string; + name: string; + node_id: string; + path: string; + previous_attempt_url?: unknown; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + repository?: { + archive_url?: string; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + deployments_url?: string; + description?: unknown; + downloads_url?: string; + events_url?: string; + fork?: boolean; + forks_url?: string; + full_name?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + hooks_url?: string; + html_url?: string; + id?: number; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + languages_url?: string; + merges_url?: string; + milestones_url?: string; + name?: string; + node_id?: string; + notifications_url?: string; + 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; + }; + private?: boolean; + pulls_url?: string; + releases_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + url?: string; + }; + rerun_url?: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "waiting" + | "pending"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + workflow_url?: string; + } | null; + }; + /** discussion answered event */ + "webhook-discussion-answered": { + /** @enum {string} */ + action: "answered"; + answer: components["schemas"]["webhooks_answer"]; + discussion: components["schemas"]["discussion"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** discussion category changed event */ + "webhook-discussion-category-changed": { + /** @enum {string} */ + action: "category_changed"; + changes: { + category: { + from: { + /** Format: date-time */ + created_at: string; + description: string; + emoji: string; + id: number; + is_answerable: boolean; + name: string; + node_id?: string; + repository_id: number; + slug: string; + updated_at: string; + }; + }; + }; + discussion: components["schemas"]["discussion"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** discussion closed event */ + "webhook-discussion-closed": { + /** @enum {string} */ + action: "closed"; + discussion: components["schemas"]["discussion"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** discussion_comment created event */ + "webhook-discussion-comment-created": { + /** @enum {string} */ + action: "created"; + comment: components["schemas"]["webhooks_comment"]; + discussion: components["schemas"]["discussion"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** discussion_comment deleted event */ + "webhook-discussion-comment-deleted": { + /** @enum {string} */ + action: "deleted"; + comment: components["schemas"]["webhooks_comment"]; + discussion: components["schemas"]["discussion"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** discussion_comment edited event */ + "webhook-discussion-comment-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + body: { + from: string; + }; + }; + comment: components["schemas"]["webhooks_comment"]; + discussion: components["schemas"]["discussion"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** discussion created event */ + "webhook-discussion-created": { + /** @enum {string} */ + action: "created"; + discussion: components["schemas"]["discussion"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** discussion deleted event */ + "webhook-discussion-deleted": { + /** @enum {string} */ + action: "deleted"; + discussion: components["schemas"]["discussion"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** discussion edited event */ + "webhook-discussion-edited": { + /** @enum {string} */ + action: "edited"; + changes?: { + body?: { + from: string; + }; + title?: { + from: string; + }; + }; + discussion: components["schemas"]["discussion"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** discussion labeled event */ + "webhook-discussion-labeled": { + /** @enum {string} */ + action: "labeled"; + discussion: components["schemas"]["discussion"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + label: components["schemas"]["webhooks_label"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** discussion locked event */ + "webhook-discussion-locked": { + /** @enum {string} */ + action: "locked"; + discussion: components["schemas"]["discussion"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** discussion pinned event */ + "webhook-discussion-pinned": { + /** @enum {string} */ + action: "pinned"; + discussion: components["schemas"]["discussion"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** discussion reopened event */ + "webhook-discussion-reopened": { + /** @enum {string} */ + action: "reopened"; + discussion: components["schemas"]["discussion"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** discussion transferred event */ + "webhook-discussion-transferred": { + /** @enum {string} */ + action: "transferred"; + changes: { + new_discussion: components["schemas"]["discussion"]; + new_repository: components["schemas"]["repository-webhooks"]; + }; + discussion: components["schemas"]["discussion"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** discussion unanswered event */ + "webhook-discussion-unanswered": { + /** @enum {string} */ + action: "unanswered"; + discussion: components["schemas"]["discussion"]; + old_answer: components["schemas"]["webhooks_answer"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** discussion unlabeled event */ + "webhook-discussion-unlabeled": { + /** @enum {string} */ + action: "unlabeled"; + discussion: components["schemas"]["discussion"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + label: components["schemas"]["webhooks_label"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** discussion unlocked event */ + "webhook-discussion-unlocked": { + /** @enum {string} */ + action: "unlocked"; + discussion: components["schemas"]["discussion"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** discussion unpinned event */ + "webhook-discussion-unpinned": { + /** @enum {string} */ + action: "unpinned"; + discussion: components["schemas"]["discussion"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** + * fork event + * @description A user forks a repository. + */ + "webhook-fork": { + enterprise?: components["schemas"]["enterprise-webhooks"]; + /** @description The created [`repository`](https://docs.github.com/rest/repos/repos#get-a-repository) resource. */ + forkee: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @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. */ + custom_properties?: { + [key: string]: unknown; + }; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } & { + allow_forking?: 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; + deployments_url?: string; + description?: string | null; + disabled?: boolean; + downloads_url?: string; + events_url?: string; + /** @enum {boolean} */ + fork?: true; + forks?: number; + 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 | null; + 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?: unknown; + languages_url?: string; + license?: Record | null; + merges_url?: string; + milestones_url?: string; + mirror_url?: unknown; + name?: string; + node_id?: string; + notifications_url?: string; + open_issues?: number; + 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; + }; + private?: boolean; + public?: boolean; + pulls_url?: string; + pushed_at?: string; + releases_url?: string; + size?: number; + ssh_url?: string; + stargazers_count?: number; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + svn_url?: string; + tags_url?: string; + teams_url?: string; + topics?: unknown[]; + trees_url?: string; + updated_at?: string; + url?: string; + visibility?: string; + watchers?: number; + watchers_count?: number; + }; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** github_app_authorization revoked event */ + "webhook-github-app-authorization-revoked": { + /** @enum {string} */ + action: "revoked"; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** gollum event */ + "webhook-gollum": { + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** @description The pages that were updated. */ + pages: { + /** + * @description The action that was performed on the page. Can be `created` or `edited`. + * @enum {string} + */ + action: "created" | "edited"; + /** + * Format: uri + * @description Points to the HTML wiki page. + */ + html_url: string; + /** @description The name of the page. */ + page_name: string; + /** @description The latest commit SHA of the page. */ + sha: string; + summary: string | null; + /** @description The current page title. */ + title: string; + }[]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** installation created event */ + "webhook-installation-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repositories?: components["schemas"]["webhooks_repositories"]; + repository?: components["schemas"]["repository-webhooks"]; + requester?: components["schemas"]["webhooks_user"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** installation deleted event */ + "webhook-installation-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repositories?: components["schemas"]["webhooks_repositories"]; + repository?: components["schemas"]["repository-webhooks"]; + requester?: unknown; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** installation new_permissions_accepted event */ + "webhook-installation-new-permissions-accepted": { + /** @enum {string} */ + action: "new_permissions_accepted"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repositories?: components["schemas"]["webhooks_repositories"]; + repository?: components["schemas"]["repository-webhooks"]; + requester?: unknown; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** installation_repositories added event */ + "webhook-installation-repositories-added": { + /** @enum {string} */ + action: "added"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repositories_added: components["schemas"]["webhooks_repositories_added"]; + /** @description An array of repository objects, which were removed from the installation. */ + repositories_removed: { + full_name?: string; + /** @description Unique identifier of the repository */ + id?: number; + /** @description The name of the repository. */ + name?: string; + node_id?: string; + /** @description Whether the repository is private or public. */ + private?: boolean; + }[]; + repository?: components["schemas"]["repository-webhooks"]; + repository_selection: components["schemas"]["webhooks_repository_selection"]; + requester: components["schemas"]["webhooks_user"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** installation_repositories removed event */ + "webhook-installation-repositories-removed": { + /** @enum {string} */ + action: "removed"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repositories_added: components["schemas"]["webhooks_repositories_added"]; + /** @description An array of repository objects, which were removed from the installation. */ + repositories_removed: { + full_name: string; + /** @description Unique identifier of the repository */ + id: number; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** @description Whether the repository is private or public. */ + private: boolean; + }[]; + repository?: components["schemas"]["repository-webhooks"]; + repository_selection: components["schemas"]["webhooks_repository_selection"]; + requester: components["schemas"]["webhooks_user"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** installation suspend event */ + "webhook-installation-suspend": { + /** @enum {string} */ + action: "suspend"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repositories?: components["schemas"]["webhooks_repositories"]; + repository?: components["schemas"]["repository-webhooks"]; + requester?: unknown; + sender: components["schemas"]["simple-user-webhooks"]; + }; + "webhook-installation-target-renamed": { + account: { + archived_at?: string | null; + avatar_url: string; + created_at?: string; + description?: unknown; + events_url?: string; + followers?: number; + followers_url?: string; + following?: number; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + has_organization_projects?: boolean; + has_repository_projects?: boolean; + hooks_url?: string; + html_url: string; + id: number; + is_verified?: boolean; + issues_url?: string; + login?: string; + members_url?: string; + name?: string; + node_id: string; + organizations_url?: string; + public_gists?: number; + public_members_url?: string; + public_repos?: number; + received_events_url?: string; + repos_url?: string; + site_admin?: boolean; + slug?: string; + starred_url?: string; + subscriptions_url?: string; + type?: string; + updated_at?: string; + url?: string; + website_url?: unknown; + }; + /** @enum {string} */ + action: "renamed"; + changes: { + login?: { + from: string; + }; + slug?: { + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + target_type: string; + }; + /** installation unsuspend event */ + "webhook-installation-unsuspend": { + /** @enum {string} */ + action: "unsuspend"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation: components["schemas"]["installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repositories?: components["schemas"]["webhooks_repositories"]; + repository?: components["schemas"]["repository-webhooks"]; + requester?: unknown; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** issue_comment created event */ + "webhook-issue-comment-created": { + /** @enum {string} */ + action: "created"; + /** + * issue comment + * @description The [comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment) itself. + */ + comment: { + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue comment */ + body: string; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + html_url: string; + /** + * Format: int64 + * @description Unique identifier of the issue comment + */ + id: number; + /** Format: uri */ + issue_url: string; + node_id: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/issues/issues#get-an-issue) the comment belongs to. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** Format: int64 */ + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees?: (Record | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + labels_url?: string; + locked: boolean; + milestone?: Record | null; + node_id?: string; + number?: number; + performed_via_github_app?: Record | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + 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; + }; + }; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** issue_comment deleted event */ + "webhook-issue-comment-deleted": { + /** @enum {string} */ + action: "deleted"; + comment: components["schemas"]["webhooks_issue_comment"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/issues/issues#get-an-issue) the comment belongs to. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** Format: int64 */ + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees?: (Record | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + labels_url?: string; + locked: boolean; + milestone?: Record | null; + node_id?: string; + number?: number; + performed_via_github_app?: Record | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + 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; + }; + }; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** issue_comment edited event */ + "webhook-issue-comment-edited": { + /** @enum {string} */ + action: "edited"; + changes: components["schemas"]["webhooks_changes"]; + comment: components["schemas"]["webhooks_issue_comment"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/issues/issues#get-an-issue) the comment belongs to. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** Format: int64 */ + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees?: (Record | null)[]; + author_association?: string; + body?: string | null; + closed_at?: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + labels_url?: string; + locked: boolean; + milestone?: Record | null; + node_id?: string; + number?: number; + performed_via_github_app?: Record | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + 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; + }; + }; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** issues assigned event */ + "webhook-issues-assigned": { + /** + * @description The action that was performed. + * @enum {string} + */ + action: "assigned"; + assignee?: components["schemas"]["webhooks_user"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + issue: components["schemas"]["webhooks_issue"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** issues closed event */ + "webhook-issues-closed": { + /** + * @description The action that was performed. + * @enum {string} + */ + action: "closed"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The [issue](https://docs.github.com/rest/issues/issues#get-an-issue) itself. */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** Format: int64 */ + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "security_and_analysis" + | "reminder" + | "pull_request_review_thread" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + } & { + active_lock_reason?: string | null; + assignee?: Record | null; + assignees?: (Record | null)[]; + author_association?: string; + body?: string | null; + closed_at: string | null; + comments?: number; + comments_url?: string; + created_at?: string; + events_url?: string; + html_url?: string; + id?: number; + labels?: (Record | null)[]; + labels_url?: string; + locked?: boolean; + milestone?: Record | null; + node_id?: string; + number?: number; + performed_via_github_app?: Record | null; + reactions?: { + "+1"?: number; + "-1"?: number; + confused?: number; + eyes?: number; + heart?: number; + hooray?: number; + laugh?: number; + rocket?: number; + total_count?: number; + url?: string; + }; + repository_url?: string; + /** @enum {string} */ + state: "closed" | "open"; + timeline_url?: string; + title?: string; + updated_at?: string; + url?: string; + user?: { + 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; + }; + }; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** issues deleted event */ + "webhook-issues-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/issues/issues#get-an-issue) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** Format: int64 */ + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** issues demilestoned event */ + "webhook-issues-demilestoned": { + /** @enum {string} */ + action: "demilestoned"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/issues/issues#get-an-issue) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** Format: int64 */ + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + } | null)[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + milestone?: components["schemas"]["webhooks_milestone"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** issues edited event */ + "webhook-issues-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the issue. */ + changes: { + body?: { + /** @description The previous version of the body. */ + from: string; + }; + title?: { + /** @description The previous version of the title. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/issues/issues#get-an-issue) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** Format: int64 */ + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "security_and_analysis" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + label?: components["schemas"]["webhooks_label"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** issues labeled event */ + "webhook-issues-labeled": { + /** @enum {string} */ + action: "labeled"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/issues/issues#get-an-issue) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** Format: int64 */ + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + label?: components["schemas"]["webhooks_label"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** issues locked event */ + "webhook-issues-locked": { + /** @enum {string} */ + action: "locked"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/issues/issues#get-an-issue) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** Format: int64 */ + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + } | null)[]; + /** Format: uri-template */ + labels_url: string; + /** @enum {boolean} */ + locked: true; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + | "security_and_analysis" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** issues milestoned event */ + "webhook-issues-milestoned": { + /** @enum {string} */ + action: "milestoned"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/issues/issues#get-an-issue) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** Format: int64 */ + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + } | null)[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + milestone: components["schemas"]["webhooks_milestone"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** issues opened event */ + "webhook-issues-opened": { + /** @enum {string} */ + action: "opened"; + changes?: { + /** + * Issue + * @description The [issue](https://docs.github.com/rest/issues/issues#get-an-issue) itself. + */ + old_issue: { + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** Format: int64 */ + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + } | null; + /** + * Repository + * @description A git repository + */ + old_repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @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. */ + custom_properties?: { + [key: string]: unknown; + }; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** @description Whether the repository has discussions enabled. */ + has_discussions?: boolean; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require commit signoff. */ + web_commit_signoff_required?: boolean; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/issues/issues#get-an-issue) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** Format: int64 */ + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "security_and_analysis" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** issues pinned event */ + "webhook-issues-pinned": { + /** @enum {string} */ + action: "pinned"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + issue: components["schemas"]["webhooks_issue_2"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** issues reopened event */ + "webhook-issues-reopened": { + /** @enum {string} */ + action: "reopened"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/issues/issues#get-an-issue) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** Format: int64 */ + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + } | null)[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + | "pull_request_review_thread" + | "reminder" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write" | "admin"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** issues transferred event */ + "webhook-issues-transferred": { + /** @enum {string} */ + action: "transferred"; + changes: { + /** + * Issue + * @description The [issue](https://docs.github.com/rest/issues/issues#get-an-issue) itself. + */ + new_issue: { + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** Format: int64 */ + id: number; + labels?: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + /** Format: uri-template */ + labels_url: string; + locked?: boolean; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** + * Repository + * @description A git repository + */ + new_repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @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. */ + custom_properties?: { + [key: string]: unknown; + }; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + issue: components["schemas"]["webhooks_issue_2"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** issues unassigned event */ + "webhook-issues-unassigned": { + /** + * @description The action that was performed. + * @enum {string} + */ + action: "unassigned"; + assignee?: components["schemas"]["webhooks_user_mannequin"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + issue: components["schemas"]["webhooks_issue"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** issues unlabeled event */ + "webhook-issues-unlabeled": { + /** @enum {string} */ + action: "unlabeled"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + issue: components["schemas"]["webhooks_issue"]; + label?: components["schemas"]["webhooks_label"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** issues unlocked event */ + "webhook-issues-unlocked": { + /** @enum {string} */ + action: "unlocked"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + /** + * Issue + * @description The [issue](https://docs.github.com/rest/issues/issues#get-an-issue) itself. + */ + issue: { + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description Contents of the issue */ + body: string | null; + /** Format: date-time */ + closed_at: string | null; + comments: number; + /** Format: uri */ + comments_url: string; + /** Format: date-time */ + created_at: string; + draft?: boolean; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** Format: int64 */ + id: number; + labels?: ({ + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + } | null)[]; + /** Format: uri-template */ + labels_url: string; + /** @enum {boolean} */ + locked: false; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** + * App + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + performed_via_github_app?: { + /** Format: date-time */ + created_at: string | null; + description: string | null; + /** @description The list of events for the GitHub app */ + events?: ( + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "content_reference" + | "create" + | "delete" + | "deployment" + | "deployment_review" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "milestone" + | "organization" + | "org_block" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_dispatch" + | "secret_scanning_alert" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_dispatch" + | "workflow_run" + )[]; + /** Format: uri */ + external_url: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the GitHub app */ + id: number | null; + /** @description The name of the GitHub app */ + name: string; + node_id: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description The set of permissions for the GitHub app */ + permissions?: { + /** @enum {string} */ + actions?: "read" | "write"; + /** @enum {string} */ + administration?: "read" | "write"; + /** @enum {string} */ + checks?: "read" | "write"; + /** @enum {string} */ + content_references?: "read" | "write"; + /** @enum {string} */ + contents?: "read" | "write"; + /** @enum {string} */ + deployments?: "read" | "write"; + /** @enum {string} */ + discussions?: "read" | "write"; + /** @enum {string} */ + emails?: "read" | "write"; + /** @enum {string} */ + environments?: "read" | "write"; + /** @enum {string} */ + issues?: "read" | "write"; + /** @enum {string} */ + keys?: "read" | "write"; + /** @enum {string} */ + members?: "read" | "write"; + /** @enum {string} */ + metadata?: "read" | "write"; + /** @enum {string} */ + organization_administration?: "read" | "write"; + /** @enum {string} */ + organization_hooks?: "read" | "write"; + /** @enum {string} */ + organization_packages?: "read" | "write"; + /** @enum {string} */ + organization_plan?: "read" | "write"; + /** @enum {string} */ + organization_projects?: "read" | "write"; + /** @enum {string} */ + organization_secrets?: "read" | "write"; + /** @enum {string} */ + organization_self_hosted_runners?: "read" | "write"; + /** @enum {string} */ + organization_user_blocking?: "read" | "write"; + /** @enum {string} */ + packages?: "read" | "write"; + /** @enum {string} */ + pages?: "read" | "write"; + /** @enum {string} */ + pull_requests?: "read" | "write"; + /** @enum {string} */ + repository_hooks?: "read" | "write"; + /** @enum {string} */ + repository_projects?: "read" | "write"; + /** @enum {string} */ + secret_scanning_alerts?: "read" | "write"; + /** @enum {string} */ + secrets?: "read" | "write"; + /** @enum {string} */ + security_events?: "read" | "write"; + /** @enum {string} */ + security_scanning_alert?: "read" | "write"; + /** @enum {string} */ + single_file?: "read" | "write"; + /** @enum {string} */ + statuses?: "read" | "write"; + /** @enum {string} */ + team_discussions?: "read" | "write"; + /** @enum {string} */ + vulnerability_alerts?: "read" | "write"; + /** @enum {string} */ + workflows?: "read" | "write"; + }; + /** @description The slug name of the GitHub app */ + slug?: string; + /** Format: date-time */ + updated_at: string | null; + } | null; + pull_request?: { + /** Format: uri */ + diff_url?: string; + /** Format: uri */ + html_url?: string; + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + patch_url?: string; + /** Format: uri */ + url?: string; + }; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + repository_url: string; + /** + * @description State of the issue; either 'open' or 'closed' + * @enum {string} + */ + state?: "open" | "closed"; + state_reason?: string | null; + /** Format: uri */ + timeline_url?: string; + /** @description Title of the issue */ + title: string; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the issue + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** issues unpinned event */ + "webhook-issues-unpinned": { + /** @enum {string} */ + action: "unpinned"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + issue: components["schemas"]["webhooks_issue_2"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** label created event */ + "webhook-label-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + label: components["schemas"]["webhooks_label"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** label deleted event */ + "webhook-label-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + label: components["schemas"]["webhooks_label"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** label edited event */ + "webhook-label-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the label if the action was `edited`. */ + changes?: { + color?: { + /** @description The previous version of the color if the action was `edited`. */ + from: string; + }; + description?: { + /** @description The previous version of the description if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The previous version of the name if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + label: components["schemas"]["webhooks_label"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** marketplace_purchase cancelled event */ + "webhook-marketplace-purchase-cancelled": { + /** @enum {string} */ + action: "cancelled"; + effective_date: string; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: components["schemas"]["webhooks_marketplace_purchase"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + previous_marketplace_purchase?: components["schemas"]["webhooks_previous_marketplace_purchase"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** marketplace_purchase changed event */ + "webhook-marketplace-purchase-changed": { + /** @enum {string} */ + action: "changed"; + effective_date: string; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: components["schemas"]["webhooks_marketplace_purchase"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean | null; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** marketplace_purchase pending_change event */ + "webhook-marketplace-purchase-pending-change": { + /** @enum {string} */ + action: "pending_change"; + effective_date: string; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: components["schemas"]["webhooks_marketplace_purchase"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Marketplace Purchase */ + previous_marketplace_purchase?: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: string | null; + next_billing_date?: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** marketplace_purchase pending_change_cancelled event */ + "webhook-marketplace-purchase-pending-change-cancelled": { + /** @enum {string} */ + action: "pending_change_cancelled"; + effective_date: string; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + /** Marketplace Purchase */ + marketplace_purchase: { + account: { + id: number; + login: string; + node_id: string; + organization_billing_email: string | null; + type: string; + }; + billing_cycle: string; + free_trial_ends_on: unknown; + next_billing_date: string | null; + on_free_trial: boolean; + plan: { + bullets: string[]; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + /** @enum {string} */ + price_model: "FREE" | "FLAT_RATE" | "PER_UNIT"; + unit_name: string | null; + yearly_price_in_cents: number; + }; + unit_count: number; + }; + organization?: components["schemas"]["organization-simple-webhooks"]; + previous_marketplace_purchase?: components["schemas"]["webhooks_previous_marketplace_purchase"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** marketplace_purchase purchased event */ + "webhook-marketplace-purchase-purchased": { + /** @enum {string} */ + action: "purchased"; + effective_date: string; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + marketplace_purchase: components["schemas"]["webhooks_marketplace_purchase"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + previous_marketplace_purchase?: components["schemas"]["webhooks_previous_marketplace_purchase"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** member added event */ + "webhook-member-added": { + /** @enum {string} */ + action: "added"; + changes?: { + /** + * @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. + */ + permission?: { + /** @enum {string} */ + to: "write" | "admin" | "read"; + }; + /** @description The role assigned to the collaborator. */ + role_name?: { + to: string; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + member: components["schemas"]["webhooks_user"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** member edited event */ + "webhook-member-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the collaborator permissions */ + changes: { + old_permission?: { + /** @description The previous permissions of the collaborator if the action was edited. */ + from: string; + }; + permission?: { + from?: string | null; + to?: string | null; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + member: components["schemas"]["webhooks_user"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** member removed event */ + "webhook-member-removed": { + /** @enum {string} */ + action: "removed"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + member: components["schemas"]["webhooks_user"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** membership added event */ + "webhook-membership-added": { + /** @enum {string} */ + action: "added"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + member: components["schemas"]["webhooks_user"]; + organization: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + /** + * @description The scope of the membership. Currently, can only be `team`. + * @enum {string} + */ + scope: "team"; + /** User */ + sender: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + team: components["schemas"]["webhooks_team"]; + }; + /** membership removed event */ + "webhook-membership-removed": { + /** @enum {string} */ + action: "removed"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + member: components["schemas"]["webhooks_user"]; + organization: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + /** + * @description The scope of the membership. Currently, can only be `team`. + * @enum {string} + */ + scope: "team" | "organization"; + /** User */ + sender: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + team: components["schemas"]["webhooks_team"]; + }; + "webhook-merge-group-checks-requested": { + /** @enum {string} */ + action: "checks_requested"; + installation?: components["schemas"]["simple-installation"]; + merge_group: components["schemas"]["merge-group"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + "webhook-merge-group-destroyed": { + /** @enum {string} */ + action: "destroyed"; + /** + * @description Explains why the merge group is being destroyed. The group could have been merged, removed from the queue (dequeued), or invalidated by an earlier queue entry being dequeued (invalidated). + * @enum {string} + */ + reason?: "merged" | "invalidated" | "dequeued"; + installation?: components["schemas"]["simple-installation"]; + merge_group: components["schemas"]["merge-group"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** meta deleted event */ + "webhook-meta-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + /** @description The modified webhook. This will contain different keys based on the type of webhook it is: repository, organization, business, app, or GitHub Marketplace. */ + hook: { + active: boolean; + config: { + /** @enum {string} */ + content_type: "json" | "form"; + insecure_ssl: string; + secret?: string; + /** Format: uri */ + url: string; + }; + created_at: string; + events: ( + | "*" + | "branch_protection_rule" + | "check_run" + | "check_suite" + | "code_scanning_alert" + | "commit_comment" + | "create" + | "delete" + | "deployment" + | "deployment_status" + | "deploy_key" + | "discussion" + | "discussion_comment" + | "fork" + | "gollum" + | "issues" + | "issue_comment" + | "label" + | "member" + | "membership" + | "meta" + | "milestone" + | "organization" + | "org_block" + | "package" + | "page_build" + | "project" + | "project_card" + | "project_column" + | "public" + | "pull_request" + | "pull_request_review" + | "pull_request_review_comment" + | "pull_request_review_thread" + | "push" + | "registry_package" + | "release" + | "repository" + | "repository_import" + | "repository_vulnerability_alert" + | "secret_scanning_alert" + | "secret_scanning_alert_location" + | "security_and_analysis" + | "star" + | "status" + | "team" + | "team_add" + | "watch" + | "workflow_job" + | "workflow_run" + | "repository_dispatch" + | "projects_v2_item" + )[]; + id: number; + name: string; + type: string; + updated_at: string; + }; + /** @description The id of the modified webhook. */ + hook_id: number; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["nullable-repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** milestone closed event */ + "webhook-milestone-closed": { + /** @enum {string} */ + action: "closed"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + milestone: components["schemas"]["webhooks_milestone"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** milestone created event */ + "webhook-milestone-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + milestone: components["schemas"]["webhooks_milestone_3"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** milestone deleted event */ + "webhook-milestone-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + milestone: components["schemas"]["webhooks_milestone"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** milestone edited event */ + "webhook-milestone-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the milestone if the action was `edited`. */ + changes: { + description?: { + /** @description The previous version of the description if the action was `edited`. */ + from: string; + }; + due_on?: { + /** @description The previous version of the due date if the action was `edited`. */ + from: string; + }; + title?: { + /** @description The previous version of the title if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + milestone: components["schemas"]["webhooks_milestone"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** milestone opened event */ + "webhook-milestone-opened": { + /** @enum {string} */ + action: "opened"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + milestone: components["schemas"]["webhooks_milestone_3"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** org_block blocked event */ + "webhook-org-block-blocked": { + /** @enum {string} */ + action: "blocked"; + blocked_user: components["schemas"]["webhooks_user"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** org_block unblocked event */ + "webhook-org-block-unblocked": { + /** @enum {string} */ + action: "unblocked"; + blocked_user: components["schemas"]["webhooks_user"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** organization deleted event */ + "webhook-organization-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + membership?: components["schemas"]["webhooks_membership"]; + organization: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** organization member_added event */ + "webhook-organization-member-added": { + /** @enum {string} */ + action: "member_added"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + membership: components["schemas"]["webhooks_membership"]; + organization: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** organization member_invited event */ + "webhook-organization-member-invited": { + /** @enum {string} */ + action: "member_invited"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The invitation for the user or email if the action is `member_invited`. */ + invitation: { + /** Format: date-time */ + created_at: string; + email: string | null; + /** Format: date-time */ + failed_at: string | null; + failed_reason: string | null; + id: number; + /** Format: uri */ + invitation_teams_url: string; + /** User */ + inviter: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + login: string | null; + node_id: string; + role: string; + team_count: number; + invitation_source?: string; + }; + organization: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + user?: components["schemas"]["webhooks_user"]; + }; + /** organization member_removed event */ + "webhook-organization-member-removed": { + /** @enum {string} */ + action: "member_removed"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + membership: components["schemas"]["webhooks_membership"]; + organization: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** organization renamed event */ + "webhook-organization-renamed": { + /** @enum {string} */ + action: "renamed"; + changes?: { + login?: { + from?: string; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + membership?: components["schemas"]["webhooks_membership"]; + organization: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** Ruby Gems metadata */ + "webhook-rubygems-metadata": { + name?: string; + description?: string; + readme?: string; + homepage?: string; + version_info?: { + version?: string; + }; + platform?: string; + metadata?: { + [key: string]: string; + }; + repo?: string; + dependencies?: { + [key: string]: string; + }[]; + commit_oid?: string; + }; + /** package published event */ + "webhook-package-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** @description Information about the package. */ + package: { + created_at: string | null; + description: string | null; + ecosystem: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + namespace: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + package_type: string; + package_version: { + /** User */ + author?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body?: string | Record; + body_html?: string; + container_metadata?: { + labels?: Record | null; + manifest?: Record | null; + tag?: { + digest?: string; + name?: string; + }; + } | null; + created_at?: string; + description: string; + docker_metadata?: { + tags?: string[]; + }[]; + draft?: boolean; + /** Format: uri */ + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: { + [key: string]: unknown; + }[]; + name: string; + npm_metadata?: { + name?: string; + version?: string; + npm_user?: string; + author?: Record | null; + bugs?: Record | null; + dependencies?: Record; + dev_dependencies?: Record; + peer_dependencies?: Record; + optional_dependencies?: Record; + description?: string; + dist?: Record | null; + git_head?: string; + homepage?: string; + license?: string; + main?: string; + repository?: Record | null; + scripts?: Record; + id?: string; + node_version?: string; + npm_version?: string; + has_shrinkwrap?: boolean; + maintainers?: Record[]; + contributors?: Record[]; + engines?: Record; + keywords?: string[]; + files?: string[]; + bin?: Record; + man?: Record; + directories?: Record | null; + os?: string[]; + cpu?: string[]; + readme?: string; + installation_command?: string; + release_id?: number; + commit_oid?: string; + published_via_actions?: boolean; + deleted_by_id?: number; + } | null; + nuget_metadata?: + | { + id?: number | string; + name?: string; + value?: OneOf< + [ + boolean, + string, + number, + { + url?: string; + branch?: string; + commit?: string; + type?: string; + }, + ] + >; + }[] + | null; + package_files: { + content_type: string; + created_at: string; + /** Format: uri */ + download_url: string; + id: number; + md5: string | null; + name: string; + sha1: string | null; + sha256: string | null; + size: number; + state: string | null; + updated_at: string; + }[]; + package_url?: string; + prerelease?: boolean; + release?: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + created_at: string; + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + prerelease: boolean; + published_at: string; + tag_name: string; + target_commitish: string; + /** Format: uri */ + url: string; + }; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; + source_url?: string; + summary: string; + tag_name?: string; + target_commitish?: string; + target_oid?: string; + updated_at?: string; + version: string; + } | null; + registry: { + /** Format: uri */ + about_url: string; + name: string; + type: string; + /** Format: uri */ + url: string; + vendor: string; + } | null; + updated_at: string | null; + }; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** package updated event */ + "webhook-package-updated": { + /** @enum {string} */ + action: "updated"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** @description Information about the package. */ + package: { + created_at: string; + description: string | null; + ecosystem: string; + /** Format: uri */ + html_url: string; + id: number; + name: string; + namespace: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + package_type: string; + package_version: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string; + body_html: string; + created_at: string; + description: string; + docker_metadata?: { + tags?: string[]; + }[]; + draft?: boolean; + /** Format: uri */ + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: { + [key: string]: unknown; + }[]; + name: string; + package_files: { + content_type: string; + created_at: string; + /** Format: uri */ + download_url: string; + id: number; + md5: string | null; + name: string; + sha1: string | null; + sha256: string; + size: number; + state: string; + updated_at: string; + }[]; + package_url?: string; + prerelease?: boolean; + release?: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + created_at: string; + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string; + prerelease: boolean; + published_at: string; + tag_name: string; + target_commitish: string; + /** Format: uri */ + url: string; + }; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; + /** Format: uri */ + source_url?: string; + summary: string; + tag_name?: string; + target_commitish: string; + target_oid: string; + updated_at: string; + version: string; + }; + registry: { + /** Format: uri */ + about_url: string; + name: string; + type: string; + /** Format: uri */ + url: string; + vendor: string; + } | null; + updated_at: string; + }; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** page_build event */ + "webhook-page-build": { + /** @description The [List GitHub Pages builds](https://docs.github.com/rest/pages/pages#list-github-pages-builds) itself. */ + build: { + commit: string | null; + created_at: string; + duration: number; + error: { + message: string | null; + }; + /** User */ + pusher: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + status: string; + updated_at: string; + /** Format: uri */ + url: string; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + id: number; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** personal_access_token_request approved event */ + "webhook-personal-access-token-request-approved": { + /** @enum {string} */ + action: "approved"; + personal_access_token_request: components["schemas"]["personal-access-token-request"]; + organization: components["schemas"]["organization-simple-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + installation: components["schemas"]["simple-installation"]; + }; + /** personal_access_token_request cancelled event */ + "webhook-personal-access-token-request-cancelled": { + /** @enum {string} */ + action: "cancelled"; + personal_access_token_request: components["schemas"]["personal-access-token-request"]; + organization: components["schemas"]["organization-simple-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + installation: components["schemas"]["simple-installation"]; + }; + /** personal_access_token_request created event */ + "webhook-personal-access-token-request-created": { + /** @enum {string} */ + action: "created"; + personal_access_token_request: components["schemas"]["personal-access-token-request"]; + organization: components["schemas"]["organization-simple-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + installation: components["schemas"]["simple-installation"]; + }; + /** personal_access_token_request denied event */ + "webhook-personal-access-token-request-denied": { + /** @enum {string} */ + action: "denied"; + personal_access_token_request: components["schemas"]["personal-access-token-request"]; + organization: components["schemas"]["organization-simple-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + installation: components["schemas"]["simple-installation"]; + }; + "webhook-ping": { + /** + * Webhook + * @description The webhook that is being pinged + */ + hook?: { + /** @description Determines whether the hook is actually triggered for the events it subscribes to. */ + active: boolean; + /** @description Only included for GitHub Apps. When you register a new GitHub App, GitHub sends a ping event to the webhook URL you specified during registration. The GitHub App ID sent in this field is required for authenticating an app. */ + app_id?: number; + config: { + content_type?: components["schemas"]["webhook-config-content-type"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + secret?: components["schemas"]["webhook-config-secret"]; + url?: components["schemas"]["webhook-config-url"]; + }; + /** Format: date-time */ + created_at: string; + /** Format: uri */ + deliveries_url?: string; + /** @description Determines what events the hook is triggered for. Default: ['push']. */ + events: string[]; + /** @description Unique identifier of the webhook. */ + id: number; + last_response?: components["schemas"]["hook-response"]; + /** + * @description The type of webhook. The only valid value is 'web'. + * @enum {string} + */ + name: "web"; + /** Format: uri */ + ping_url?: string; + /** Format: uri */ + test_url?: string; + type: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url?: string; + }; + /** @description The ID of the webhook that triggered the ping. */ + hook_id?: number; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + /** @description Random string of GitHub zen. */ + zen?: string; + }; + /** @description The webhooks ping payload encoded with URL encoding. */ + "webhook-ping-form-encoded": { + /** @description A URL-encoded string of the ping JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** project_card converted event */ + "webhook-project-card-converted": { + /** @enum {string} */ + action: "converted"; + changes: { + note: { + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + project_card: components["schemas"]["webhooks_project_card"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** project_card created event */ + "webhook-project-card-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + project_card: components["schemas"]["webhooks_project_card"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** project_card deleted event */ + "webhook-project-card-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Project Card */ + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number | null; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + }; + repository?: components["schemas"]["nullable-repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** project_card edited event */ + "webhook-project-card-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + note: { + from: string | null; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + project_card: components["schemas"]["webhooks_project_card"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** project_card moved event */ + "webhook-project-card-moved": { + /** @enum {string} */ + action: "moved"; + changes?: { + column_id: { + from: number; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + project_card: { + after_id?: number | null; + /** @description Whether or not the card is archived */ + archived: boolean; + column_id: number; + /** Format: uri */ + column_url: string; + /** Format: uri */ + content_url?: string; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** @description The project card's ID */ + id: number; + node_id: string; + note: string | null; + /** Format: uri */ + project_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } & { + after_id: number | null; + archived?: boolean; + column_id?: number; + column_url?: string; + created_at?: string; + creator?: { + 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; + } | null; + id?: number; + node_id?: string; + note?: string | null; + project_url?: string; + updated_at?: string; + url?: string; + }; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** project closed event */ + "webhook-project-closed": { + /** @enum {string} */ + action: "closed"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + project: components["schemas"]["webhooks_project"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** project_column created event */ + "webhook-project-column-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + project_column: components["schemas"]["webhooks_project_column"]; + repository?: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** project_column deleted event */ + "webhook-project-column-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + project_column: components["schemas"]["webhooks_project_column"]; + repository?: components["schemas"]["nullable-repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** project_column edited event */ + "webhook-project-column-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + name?: { + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + project_column: components["schemas"]["webhooks_project_column"]; + repository?: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** project_column moved event */ + "webhook-project-column-moved": { + /** @enum {string} */ + action: "moved"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + project_column: components["schemas"]["webhooks_project_column"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** project created event */ + "webhook-project-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + project: components["schemas"]["webhooks_project"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** project deleted event */ + "webhook-project-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + project: components["schemas"]["webhooks_project"]; + repository?: components["schemas"]["nullable-repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** project edited event */ + "webhook-project-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the project if the action was `edited`. */ + changes?: { + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The changes to the project if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + project: components["schemas"]["webhooks_project"]; + repository?: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** project reopened event */ + "webhook-project-reopened": { + /** @enum {string} */ + action: "reopened"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + project: components["schemas"]["webhooks_project"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** Projects v2 Project Closed Event */ + "webhook-projects-v2-project-closed": { + /** @enum {string} */ + action: "closed"; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + projects_v2: components["schemas"]["projects-v2"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** @description A project was created */ + "webhook-projects-v2-project-created": { + /** @enum {string} */ + action: "created"; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + projects_v2: components["schemas"]["projects-v2"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** Projects v2 Project Deleted Event */ + "webhook-projects-v2-project-deleted": { + /** @enum {string} */ + action: "deleted"; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + projects_v2: components["schemas"]["projects-v2"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** Projects v2 Project Edited Event */ + "webhook-projects-v2-project-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + description?: { + from?: string | null; + to?: string | null; + }; + public?: { + from?: boolean; + to?: boolean; + }; + short_description?: { + from?: string | null; + to?: string | null; + }; + title?: { + from?: string; + to?: string; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + projects_v2: components["schemas"]["projects-v2"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** Projects v2 Item Archived Event */ + "webhook-projects-v2-item-archived": { + /** @enum {string} */ + action: "archived"; + changes: components["schemas"]["webhooks_project_changes"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** Projects v2 Item Converted Event */ + "webhook-projects-v2-item-converted": { + /** @enum {string} */ + action: "converted"; + changes: { + content_type?: { + from?: string | null; + to?: string; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** Projects v2 Item Created Event */ + "webhook-projects-v2-item-created": { + /** @enum {string} */ + action: "created"; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** Projects v2 Item Deleted Event */ + "webhook-projects-v2-item-deleted": { + /** @enum {string} */ + action: "deleted"; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** Projects v2 Item Edited Event */ + "webhook-projects-v2-item-edited": { + /** @enum {string} */ + action: "edited"; + changes?: OneOf< + [ + { + field_value: { + field_node_id?: string; + field_type?: string; + }; + }, + { + body: { + from?: string | null; + to?: string | null; + }; + }, + ] + >; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** Projects v2 Item Reordered Event */ + "webhook-projects-v2-item-reordered": { + /** @enum {string} */ + action: "reordered"; + changes: { + previous_projects_v2_item_node_id?: { + from?: string | null; + to?: string | null; + }; + }; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** Projects v2 Item Restored Event */ + "webhook-projects-v2-item-restored": { + /** @enum {string} */ + action: "restored"; + changes: components["schemas"]["webhooks_project_changes"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + projects_v2_item: components["schemas"]["projects-v2-item"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** Projects v2 Project Reopened Event */ + "webhook-projects-v2-project-reopened": { + /** @enum {string} */ + action: "reopened"; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + projects_v2: components["schemas"]["projects-v2"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** public event */ + "webhook-public": { + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request assigned event */ + "webhook-pull-request-assigned": { + /** @enum {string} */ + action: "assigned"; + assignee: components["schemas"]["webhooks_user"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + number: components["schemas"]["webhooks_number"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request auto_merge_disabled event */ + "webhook-pull-request-auto-merge-disabled": { + /** @enum {string} */ + action: "auto_merge_disabled"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + reason: string; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request auto_merge_enabled event */ + "webhook-pull-request-auto-merge-enabled": { + /** @enum {string} */ + action: "auto_merge_enabled"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + reason?: string; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request closed event */ + "webhook-pull-request-closed": { + /** @enum {string} */ + action: "closed"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + number: components["schemas"]["webhooks_number"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + pull_request: components["schemas"]["pull-request-webhook"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request converted_to_draft event */ + "webhook-pull-request-converted-to-draft": { + /** @enum {string} */ + action: "converted_to_draft"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + number: components["schemas"]["webhooks_number"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + pull_request: components["schemas"]["pull-request-webhook"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request demilestoned event */ + "webhook-pull-request-demilestoned": { + /** @enum {string} */ + action: "demilestoned"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + milestone?: components["schemas"]["milestone"]; + number: components["schemas"]["webhooks_number"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + pull_request: components["schemas"]["webhooks_pull_request_5"]; + repository: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request dequeued event */ + "webhook-pull-request-dequeued": { + /** @enum {string} */ + action: "dequeued"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + reason: string; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request edited event */ + "webhook-pull-request-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the comment if the action was `edited`. */ + changes: { + base?: { + ref: { + from: string; + }; + sha: { + from: string; + }; + }; + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + title?: { + /** @description The previous version of the title if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + number: components["schemas"]["webhooks_number"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + pull_request: components["schemas"]["pull-request-webhook"]; + repository: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request enqueued event */ + "webhook-pull-request-enqueued": { + /** @enum {string} */ + action: "enqueued"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + number: number; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request labeled event */ + "webhook-pull-request-labeled": { + /** @enum {string} */ + action: "labeled"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + label?: components["schemas"]["webhooks_label"]; + number: components["schemas"]["webhooks_number"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request locked event */ + "webhook-pull-request-locked": { + /** @enum {string} */ + action: "locked"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + number: components["schemas"]["webhooks_number"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request milestoned event */ + "webhook-pull-request-milestoned": { + /** @enum {string} */ + action: "milestoned"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + milestone?: components["schemas"]["milestone"]; + number: components["schemas"]["webhooks_number"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + pull_request: components["schemas"]["webhooks_pull_request_5"]; + repository: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request opened event */ + "webhook-pull-request-opened": { + /** @enum {string} */ + action: "opened"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + number: components["schemas"]["webhooks_number"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + pull_request: components["schemas"]["pull-request-webhook"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request ready_for_review event */ + "webhook-pull-request-ready-for-review": { + /** @enum {string} */ + action: "ready_for_review"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + number: components["schemas"]["webhooks_number"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + pull_request: components["schemas"]["pull-request-webhook"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request reopened event */ + "webhook-pull-request-reopened": { + /** @enum {string} */ + action: "reopened"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + number: components["schemas"]["webhooks_number"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + pull_request: components["schemas"]["pull-request-webhook"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request_review_comment created event */ + "webhook-pull-request-review-comment-created": { + /** @enum {string} */ + action: "created"; + /** + * Pull Request Review Comment + * @description The [comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request) itself. + */ + comment: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number | null; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: "LEFT" | "RIGHT" | null; + /** + * @description The level at which the comment is targeted, can be a diff line or a file. + * @enum {string} + */ + subject_type?: "line" | "file"; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge?: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft?: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions?: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request_review_comment deleted event */ + "webhook-pull-request-review-comment-deleted": { + /** @enum {string} */ + action: "deleted"; + comment: components["schemas"]["webhooks_review_comment"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge?: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft?: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request_review_comment edited event */ + "webhook-pull-request-review-comment-edited": { + /** @enum {string} */ + action: "edited"; + changes: components["schemas"]["webhooks_changes"]; + comment: components["schemas"]["webhooks_review_comment"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge?: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft?: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request_review dismissed event */ + "webhook-pull-request-review-dismissed": { + /** @enum {string} */ + action: "dismissed"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository-webhooks"]; + /** @description The review that was affected. */ + review: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the review. */ + body: string | null; + /** @description A commit SHA for the review. */ + commit_id: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the review */ + id: number; + node_id: string; + /** Format: uri */ + pull_request_url: string; + /** @enum {string} */ + state: "dismissed" | "approved" | "changes_requested"; + /** Format: date-time */ + submitted_at: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request_review edited event */ + "webhook-pull-request-review-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository-webhooks"]; + review: components["schemas"]["webhooks_review"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request review_request_removed event */ + "webhook-pull-request-review-request-removed": OneOf< + [ + { + /** @enum {string} */ + action: "review_request_removed"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title. + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository-webhooks"]; + /** User */ + requested_reviewer: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user-webhooks"]; + }, + { + /** @enum {string} */ + action: "review_request_removed"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository-webhooks"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + requested_team: { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }; + sender: components["schemas"]["simple-user-webhooks"]; + }, + ] + >; + /** pull_request review_requested event */ + "webhook-pull-request-review-requested": OneOf< + [ + { + /** @enum {string} */ + action: "review_requested"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository-webhooks"]; + /** User */ + requested_reviewer: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + sender: components["schemas"]["simple-user-webhooks"]; + }, + { + /** @enum {string} */ + action: "review_requested"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + /** @description The pull request number. */ + number: number; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository-webhooks"]; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + requested_team: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }; + sender: components["schemas"]["simple-user-webhooks"]; + }, + ] + >; + /** pull_request_review submitted event */ + "webhook-pull-request-review-submitted": { + /** @enum {string} */ + action: "submitted"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository-webhooks"]; + review: components["schemas"]["webhooks_review"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request_review_thread resolved event */ + "webhook-pull-request-review-thread-resolved": { + /** @enum {string} */ + action: "resolved"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + thread: { + comments: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number | null; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: "LEFT" | "RIGHT" | null; + /** + * @description The level at which the comment is targeted, can be a diff line or a file. + * @enum {string} + */ + subject_type?: "line" | "file"; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }[]; + node_id: string; + }; + }; + /** pull_request_review_thread unresolved event */ + "webhook-pull-request-review-thread-unresolved": { + /** @enum {string} */ + action: "unresolved"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Simple Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + closed_at: string | null; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + commits_url: string; + created_at: string; + /** Format: uri */ + diff_url: string; + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + merge_commit_sha: string | null; + merged_at: string | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + number: number; + /** Format: uri */ + patch_url: string; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + /** Format: uri */ + review_comments_url: string; + /** @enum {string} */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + title: string; + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + thread: { + comments: { + _links: { + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + pull_request: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + }; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** @description The text of the comment. */ + body: string; + /** @description The SHA of the commit to which the comment applies. */ + commit_id: string; + /** Format: date-time */ + created_at: string; + /** @description The diff of the line that the comment refers to. */ + diff_hunk: string; + /** + * Format: uri + * @description HTML URL for the pull request review comment. + */ + html_url: string; + /** @description The ID of the pull request review comment. */ + id: number; + /** @description The comment ID to reply to. */ + in_reply_to_id?: number; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line: number | null; + /** @description The node ID of the pull request review comment. */ + node_id: string; + /** @description The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line: number; + /** @description The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** @description The first line of the range for a multi-line comment. */ + original_start_line: number | null; + /** @description The relative path of the file to which the comment applies. */ + path: string; + /** @description The line index in the diff to which the comment applies. */ + position: number | null; + /** @description The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** + * Format: uri + * @description URL for the pull request that the review comment belongs to. + */ + pull_request_url: string; + /** Reactions */ + reactions: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** + * @description The side of the first line of the range for a multi-line comment. + * @enum {string} + */ + side: "LEFT" | "RIGHT"; + /** @description The first line of the range for a multi-line comment. */ + start_line: number | null; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side: "LEFT" | "RIGHT" | null; + /** + * @description The level at which the comment is targeted, can be a diff line or a file. + * @enum {string} + */ + subject_type?: "line" | "file"; + /** Format: date-time */ + updated_at: string; + /** + * Format: uri + * @description URL for the pull request review comment + */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }[]; + node_id: string; + }; + }; + /** pull_request synchronize event */ + "webhook-pull-request-synchronize": { + /** @enum {string} */ + action: "synchronize"; + after: string; + before: string; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + number: components["schemas"]["webhooks_number"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request unassigned event */ + "webhook-pull-request-unassigned": { + /** @enum {string} */ + action: "unassigned"; + assignee?: components["schemas"]["webhooks_user_mannequin"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + number: components["schemas"]["webhooks_number"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request unlabeled event */ + "webhook-pull-request-unlabeled": { + /** @enum {string} */ + action: "unlabeled"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + label?: components["schemas"]["webhooks_label"]; + number: components["schemas"]["webhooks_number"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string | null; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string | null; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit message title. + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization" | "Mannequin"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** pull_request unlocked event */ + "webhook-pull-request-unlocked": { + /** @enum {string} */ + action: "unlocked"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + number: components["schemas"]["webhooks_number"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** Pull Request */ + pull_request: { + _links: { + /** Link */ + comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + commits: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + html: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + issue: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comment: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + review_comments: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + self: { + /** Format: uri-template */ + href: string; + }; + /** Link */ + statuses: { + /** Format: uri-template */ + href: string; + }; + }; + /** @enum {string|null} */ + active_lock_reason: + | "resolved" + | "off-topic" + | "too heated" + | "spam" + | null; + additions?: number; + /** User */ + assignee: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + assignees: ({ + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null)[]; + /** + * AuthorAssociation + * @description How the author is associated with the repository. + * @enum {string} + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** + * PullRequestAutoMerge + * @description The status of auto merging a pull request. + */ + auto_merge: { + /** @description Commit message for the merge commit. */ + commit_message: string | null; + /** @description Title for the merge commit message. */ + commit_title: string; + /** User */ + enabled_by: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method: "merge" | "squash" | "rebase"; + } | null; + base: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + body: string | null; + changed_files?: number; + /** Format: date-time */ + closed_at: string | null; + comments?: number; + /** Format: uri */ + comments_url: string; + commits?: number; + /** Format: uri */ + commits_url: string; + /** Format: date-time */ + created_at: string; + deletions?: number; + /** Format: uri */ + diff_url: string; + /** @description Indicates whether or not the pull request is a draft. */ + draft: boolean; + head: { + label: string; + ref: string; + /** + * Repository + * @description A git repository + */ + repo: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: + | "PR_BODY" + | "COMMIT_MESSAGES" + | "BLANK"; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + } | null; + sha: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + issue_url: string; + labels: { + /** @description 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + description: string | null; + id: number; + /** @description The name of the label. */ + name: string; + node_id: string; + /** + * Format: uri + * @description URL for the label + */ + url: string; + }[]; + locked: boolean; + /** @description Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify?: boolean; + merge_commit_sha: string | null; + mergeable?: boolean | null; + mergeable_state?: string; + merged?: boolean | null; + /** Format: date-time */ + merged_at: string | null; + /** User */ + merged_by?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** Format: date-time */ + closed_at: string | null; + closed_issues: number; + /** Format: date-time */ + created_at: string; + /** User */ + creator: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + description: string | null; + /** Format: date-time */ + due_on: string | null; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + labels_url: string; + node_id: string; + /** @description The number of the milestone. */ + number: number; + open_issues: number; + /** + * @description The state of the milestone. + * @enum {string} + */ + state: "open" | "closed"; + /** @description The title of the milestone. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + } | null; + node_id: string; + /** @description Number uniquely identifying the pull request within its repository. */ + number: number; + /** Format: uri */ + patch_url: string; + rebaseable?: boolean | null; + requested_reviewers: OneOf< + [ + { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null, + { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }, + ] + >[]; + requested_teams: { + deleted?: boolean; + /** @description Description of the team */ + description?: string | null; + /** Format: uri */ + html_url?: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url?: string; + /** @description Name of the team */ + name: string; + node_id?: string; + parent?: { + /** @description Description of the team */ + description: string | null; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the team */ + id: number; + /** Format: uri-template */ + members_url: string; + /** @description Name of the team */ + name: string; + node_id: string; + /** @description Permission that the team will have for its repositories */ + permission: string; + /** @enum {string} */ + privacy: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url: string; + slug: string; + /** + * Format: uri + * @description URL for the team + */ + url: string; + } | null; + /** @description Permission that the team will have for its repositories */ + permission?: string; + /** @enum {string} */ + privacy?: "open" | "closed" | "secret"; + /** Format: uri */ + repositories_url?: string; + slug?: string; + /** + * Format: uri + * @description URL for the team + */ + url?: string; + }[]; + /** Format: uri-template */ + review_comment_url: string; + review_comments?: number; + /** Format: uri */ + review_comments_url: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state: "open" | "closed"; + /** Format: uri */ + statuses_url: string; + /** @description The title of the pull request. */ + title: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** User */ + user: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** push event */ + "webhook-push": { + /** @description The SHA of the most recent commit on `ref` after the push. */ + after: string; + base_ref: components["schemas"]["webhooks_nullable_string"]; + /** @description The SHA of the most recent commit on `ref` before the push. */ + before: string; + /** @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 2048 commits. If necessary, you can use the [Commits API](https://docs.github.com/rest/commits) to fetch additional commits. */ + commits: { + /** @description An array of files added in the commit. A maximum of 3000 changed files will be reported per commit. */ + added?: string[]; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** @description Whether this commit is distinct from any that have been pushed before. */ + distinct: boolean; + id: string; + /** @description The commit message. */ + message: string; + /** @description An array of files modified by the commit. A maximum of 3000 changed files will be reported per commit. */ + modified?: string[]; + /** @description An array of files removed in the commit. A maximum of 3000 changed files will be reported per commit. */ + removed?: string[]; + /** + * Format: date-time + * @description The ISO 8601 timestamp of the commit. + */ + timestamp: string; + tree_id: string; + /** + * Format: uri + * @description URL that points to the commit API resource. + */ + url: string; + }[]; + /** @description URL that shows the changes in this `ref` update, from the `before` commit to the `after` commit. For a newly created `ref` that is directly based on the default branch, this is the comparison between the head of the default branch and the `after` commit. Otherwise, this shows all commits until the `after` commit. */ + compare: string; + /** @description Whether this push created the `ref`. */ + created: boolean; + /** @description Whether this push deleted the `ref`. */ + deleted: boolean; + enterprise?: components["schemas"]["enterprise-webhooks"]; + /** @description Whether this push was a force push of the `ref`. */ + forced: boolean; + /** Commit */ + head_commit: { + /** @description An array of files added in the commit. */ + added?: string[]; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** @description Whether this commit is distinct from any that have been pushed before. */ + distinct: boolean; + id: string; + /** @description The commit message. */ + message: string; + /** @description An array of files modified by the commit. */ + modified?: string[]; + /** @description An array of files removed in the commit. */ + removed?: string[]; + /** + * Format: date-time + * @description The ISO 8601 timestamp of the commit. + */ + timestamp: string; + tree_id: string; + /** + * Format: uri + * @description URL that points to the commit API resource. + */ + url: string; + } | null; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + pusher: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email?: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** @description The full git ref that was pushed. Example: `refs/heads/main` or `refs/tags/v3.14.1`. */ + ref: string; + /** + * Repository + * @description A git repository + */ + repository: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @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. */ + custom_properties?: { + [key: string]: unknown; + }; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + /** + * @description Whether discussions are enabled. + * @default false + */ + has_discussions: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + /** @description Whether to require contributors to sign off on web-based commits */ + web_commit_signoff_required?: boolean; + }; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + "webhook-registry-package-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + registry_package: { + created_at: string | null; + description: string | null; + ecosystem: string; + html_url: string; + id: number; + name: string; + namespace: string; + 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; + }; + package_type: string; + package_version: { + author?: { + 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; + }; + body?: string | Record; + body_html?: string; + container_metadata?: { + labels?: Record | null; + manifest?: Record | null; + tag?: { + digest?: string; + name?: string; + }; + }; + created_at?: string; + description: string; + docker_metadata?: { + tags?: string[]; + }[]; + draft?: boolean; + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: { + [key: string]: unknown; + }[]; + name: string; + npm_metadata?: { + name?: string; + version?: string; + npm_user?: string; + author?: string | Record | null; + bugs?: string | Record | null; + dependencies?: Record; + dev_dependencies?: Record; + peer_dependencies?: Record; + optional_dependencies?: Record; + description?: string; + dist?: string | Record | null; + git_head?: string; + homepage?: string; + license?: string; + main?: string; + repository?: string | Record | null; + scripts?: Record; + id?: string; + node_version?: string; + npm_version?: string; + has_shrinkwrap?: boolean; + maintainers?: string[]; + contributors?: string[]; + engines?: Record; + keywords?: string[]; + files?: string[]; + bin?: Record; + man?: Record; + directories?: string | Record | null; + os?: string[]; + cpu?: string[]; + readme?: string; + installation_command?: string; + release_id?: number; + commit_oid?: string; + published_via_actions?: boolean; + deleted_by_id?: number; + } | null; + nuget_metadata?: + | { + id?: string | Record | number | null; + name?: string; + value?: OneOf< + [ + boolean, + string, + number, + { + url?: string; + branch?: string; + commit?: string; + type?: string; + }, + ] + >; + }[] + | null; + package_files: { + content_type: string; + created_at: string; + download_url: string; + id: number; + md5: string | null; + name: string; + sha1: string | null; + sha256: string | null; + size: number; + state: string | null; + updated_at: string; + }[]; + package_url: string; + prerelease?: boolean; + release?: { + author?: { + 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; + }; + created_at?: string; + draft?: boolean; + html_url?: string; + id?: number; + name?: string | null; + prerelease?: boolean; + published_at?: string; + tag_name?: string; + target_commitish?: string; + url?: string; + }; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; + summary: string; + tag_name?: string; + target_commitish?: string; + target_oid?: string; + updated_at?: string; + version: string; + } | null; + registry: { + about_url?: string; + name?: string; + type?: string; + url?: string; + vendor?: string; + } | null; + updated_at: string | null; + }; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + "webhook-registry-package-updated": { + /** @enum {string} */ + action: "updated"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + registry_package: { + created_at: string; + description: unknown; + ecosystem: string; + html_url: string; + id: number; + name: string; + namespace: string; + 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; + }; + package_type: string; + package_version: { + author: { + 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; + }; + body: string; + body_html: string; + created_at: string; + description: string; + docker_metadata?: ({ + tags?: string[]; + } | null)[]; + draft?: boolean; + html_url: string; + id: number; + installation_command: string; + manifest?: string; + metadata: { + [key: string]: unknown; + }[]; + name: string; + package_files: { + content_type?: string; + created_at?: string; + download_url?: string; + id?: number; + md5?: string | null; + name?: string; + sha1?: string | null; + sha256?: string; + size?: number; + state?: string; + updated_at?: string; + }[]; + package_url: string; + prerelease?: boolean; + release?: { + author: { + 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; + }; + created_at: string; + draft: boolean; + html_url: string; + id: number; + name: string; + prerelease: boolean; + published_at: string; + tag_name: string; + target_commitish: string; + url: string; + }; + rubygems_metadata?: components["schemas"]["webhook-rubygems-metadata"][]; + summary: string; + tag_name?: string; + target_commitish: string; + target_oid: string; + updated_at: string; + version: string; + }; + registry: Record | null; + updated_at: string; + }; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** release created event */ + "webhook-release-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + release: components["schemas"]["webhooks_release"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** release deleted event */ + "webhook-release-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + release: components["schemas"]["webhooks_release"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** release edited event */ + "webhook-release-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + body?: { + /** @description The previous version of the body if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The previous version of the name if the action was `edited`. */ + from: string; + }; + make_latest?: { + /** @description Whether this release was explicitly `edited` to be the latest. */ + to: boolean; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + release: components["schemas"]["webhooks_release"]; + repository: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** release prereleased event */ + "webhook-release-prereleased": { + /** @enum {string} */ + action: "prereleased"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + /** + * Release + * @description The [release](https://docs.github.com/rest/releases/releases/#get-a-release) object. + */ + release: { + assets: ({ + /** Format: uri */ + browser_download_url: string; + content_type: string; + /** Format: date-time */ + created_at: string; + download_count: number; + id: number; + label: string | null; + /** @description The file name of the asset. */ + name: string; + node_id: string; + size: number; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded"; + /** Format: date-time */ + updated_at: string; + /** User */ + uploader?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + url: string; + } | null)[]; + /** Format: uri */ + assets_url: string; + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + body: string | null; + /** Format: date-time */ + created_at: string | null; + /** Format: uri */ + discussion_url?: string; + /** @description Whether the release is a draft or published */ + draft: boolean; + /** Format: uri */ + html_url: string; + id: number; + name: string | null; + node_id: string; + /** + * @description Whether the release is identified as a prerelease or a full release. + * @enum {boolean} + */ + prerelease: true; + /** Format: date-time */ + published_at: string | null; + /** Reactions */ + reactions?: { + "+1": number; + "-1": number; + confused: number; + eyes: number; + heart: number; + hooray: number; + laugh: number; + rocket: number; + total_count: number; + /** Format: uri */ + url: string; + }; + /** @description The name of the tag. */ + tag_name: string; + /** Format: uri */ + tarball_url: string | null; + /** @description Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + /** Format: uri-template */ + upload_url: string; + /** Format: uri */ + url: string; + /** Format: uri */ + zipball_url: string | null; + }; + repository: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** release published event */ + "webhook-release-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + release: components["schemas"]["webhooks_release_1"]; + repository: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** release released event */ + "webhook-release-released": { + /** @enum {string} */ + action: "released"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + release: components["schemas"]["webhooks_release"]; + repository: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** release unpublished event */ + "webhook-release-unpublished": { + /** @enum {string} */ + action: "unpublished"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + release: components["schemas"]["webhooks_release_1"]; + repository: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** Repository advisory published event */ + "webhook-repository-advisory-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + repository_advisory: components["schemas"]["repository-advisory"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** Repository advisory reported event */ + "webhook-repository-advisory-reported": { + /** @enum {string} */ + action: "reported"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + repository_advisory: components["schemas"]["repository-advisory"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** repository archived event */ + "webhook-repository-archived": { + /** @enum {string} */ + action: "archived"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** repository created event */ + "webhook-repository-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** repository deleted event */ + "webhook-repository-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** repository_dispatch event */ + "webhook-repository-dispatch-sample": { + /** @description The `event_type` that was specified in the `POST /repos/{owner}/{repo}/dispatches` request body. */ + action: string; + branch: string; + /** @description The `client_payload` that was specified in the `POST /repos/{owner}/{repo}/dispatches` request body. */ + client_payload: { + [key: string]: unknown; + } | null; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** repository edited event */ + "webhook-repository-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + default_branch?: { + from: string; + }; + description?: { + from: string | null; + }; + homepage?: { + from: string | null; + }; + topics?: { + from?: string[] | null; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** repository_import event */ + "webhook-repository-import": { + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + /** @enum {string} */ + status: "success" | "cancelled" | "failure"; + }; + /** repository privatized event */ + "webhook-repository-privatized": { + /** @enum {string} */ + action: "privatized"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** repository publicized event */ + "webhook-repository-publicized": { + /** @enum {string} */ + action: "publicized"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** repository renamed event */ + "webhook-repository-renamed": { + /** @enum {string} */ + action: "renamed"; + changes: { + repository: { + name: { + from: string; + }; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** repository ruleset created event */ + "webhook-repository-ruleset-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + repository_ruleset: components["schemas"]["repository-ruleset"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** repository ruleset deleted event */ + "webhook-repository-ruleset-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + repository_ruleset: components["schemas"]["repository-ruleset"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** repository ruleset edited event */ + "webhook-repository-ruleset-edited": { + /** @enum {string} */ + action: "edited"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + repository_ruleset: components["schemas"]["repository-ruleset"]; + changes?: { + name?: { + from?: string; + }; + enforcement?: { + from?: string; + }; + conditions?: { + added?: components["schemas"]["repository-ruleset-conditions"][]; + deleted?: components["schemas"]["repository-ruleset-conditions"][]; + updated?: { + condition?: components["schemas"]["repository-ruleset-conditions"]; + changes?: { + condition_type?: { + from?: string; + }; + target?: { + from?: string; + }; + include?: { + from?: string[]; + }; + exclude?: { + from?: string[]; + }; + }; + }[]; + }; + rules?: { + added?: components["schemas"]["repository-rule"][]; + deleted?: components["schemas"]["repository-rule"][]; + updated?: { + rule?: components["schemas"]["repository-rule"]; + changes?: { + configuration?: { + from?: string; + }; + rule_type?: { + from?: string; + }; + pattern?: { + from?: string; + }; + }; + }[]; + }; + }; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** repository transferred event */ + "webhook-repository-transferred": { + /** @enum {string} */ + action: "transferred"; + changes: { + owner: { + from: { + /** Organization */ + organization?: { + /** Format: uri */ + avatar_url: string; + description: string | null; + /** Format: uri */ + events_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url?: string; + id: number; + /** Format: uri */ + issues_url: string; + login: string; + /** Format: uri-template */ + members_url: string; + node_id: string; + /** Format: uri-template */ + public_members_url: string; + /** Format: uri */ + repos_url: string; + /** Format: uri */ + url: string; + }; + /** User */ + user?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + }; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** repository unarchived event */ + "webhook-repository-unarchived": { + /** @enum {string} */ + action: "unarchived"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** repository_vulnerability_alert create event */ + "webhook-repository-vulnerability-alert-create": { + /** @enum {string} */ + action: "create"; + alert: components["schemas"]["webhooks_alert"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** repository_vulnerability_alert dismiss event */ + "webhook-repository-vulnerability-alert-dismiss": { + /** @enum {string} */ + action: "dismiss"; + /** + * Repository Vulnerability Alert Alert + * @description The security alert of the vulnerable dependency. + */ + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_comment?: string | null; + dismiss_reason: string; + dismissed_at: string; + /** User */ + dismisser: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "dismissed"; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** repository_vulnerability_alert reopen event */ + "webhook-repository-vulnerability-alert-reopen": { + /** @enum {string} */ + action: "reopen"; + alert: components["schemas"]["webhooks_alert"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** repository_vulnerability_alert resolve event */ + "webhook-repository-vulnerability-alert-resolve": { + /** @enum {string} */ + action: "resolve"; + /** + * Repository Vulnerability Alert Alert + * @description The security alert of the vulnerable dependency. + */ + alert: { + affected_package_name: string; + affected_range: string; + created_at: string; + dismiss_reason?: string; + dismissed_at?: string; + /** User */ + dismisser?: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + external_identifier: string; + /** Format: uri */ + external_reference: string | null; + fix_reason?: string; + /** Format: date-time */ + fixed_at?: string; + fixed_in?: string; + ghsa_id: string; + id: number; + node_id: string; + number: number; + severity: string; + /** @enum {string} */ + state: "fixed" | "open"; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** secret_scanning_alert created event */ + "webhook-secret-scanning-alert-created": { + /** @enum {string} */ + action: "created"; + alert: components["schemas"]["secret-scanning-alert-webhook"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** Secret Scanning Alert Location Created Event */ + "webhook-secret-scanning-alert-location-created": { + /** @enum {string} */ + action?: "created"; + alert: components["schemas"]["secret-scanning-alert-webhook"]; + installation?: components["schemas"]["simple-installation"]; + location: components["schemas"]["secret-scanning-location"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** Secret Scanning Alert Location Created Event */ + "webhook-secret-scanning-alert-location-created-form-encoded": { + /** @description A URL-encoded string of the secret_scanning_alert_location.created JSON payload. The decoded payload is a JSON object. */ + payload: string; + }; + /** secret_scanning_alert reopened event */ + "webhook-secret-scanning-alert-reopened": { + /** @enum {string} */ + action: "reopened"; + alert: components["schemas"]["secret-scanning-alert-webhook"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** secret_scanning_alert resolved event */ + "webhook-secret-scanning-alert-resolved": { + /** @enum {string} */ + action: "resolved"; + alert: components["schemas"]["secret-scanning-alert-webhook"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** secret_scanning_alert revoked event */ + "webhook-secret-scanning-alert-revoked": { + /** @enum {string} */ + action: "revoked"; + alert: components["schemas"]["secret-scanning-alert-webhook"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** secret_scanning_alert validated event */ + "webhook-secret-scanning-alert-validated": { + /** @enum {string} */ + action: "validated"; + alert: components["schemas"]["secret-scanning-alert-webhook"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** security_advisory published event */ + "webhook-security-advisory-published": { + /** @enum {string} */ + action: "published"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + security_advisory: components["schemas"]["webhooks_security_advisory"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** security_advisory updated event */ + "webhook-security-advisory-updated": { + /** @enum {string} */ + action: "updated"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + security_advisory: components["schemas"]["webhooks_security_advisory"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** security_advisory withdrawn event */ + "webhook-security-advisory-withdrawn": { + /** @enum {string} */ + action: "withdrawn"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + /** @description The details of the security advisory, including summary, description, and severity. */ + security_advisory: { + cvss: { + score: number; + vector_string: string | null; + }; + cwes: { + cwe_id: string; + name: string; + }[]; + description: string; + ghsa_id: string; + identifiers: { + type: string; + value: string; + }[]; + published_at: string; + references: { + /** Format: uri */ + url: string; + }[]; + severity: string; + summary: string; + updated_at: string; + vulnerabilities: { + first_patched_version: { + identifier: string; + } | null; + package: { + ecosystem: string; + name: string; + }; + severity: string; + vulnerable_version_range: string; + }[]; + withdrawn_at: string; + }; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** security_and_analysis event */ + "webhook-security-and-analysis": { + changes: { + from?: { + security_and_analysis?: components["schemas"]["security-and-analysis"]; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["full-repository"]; + sender?: components["schemas"]["simple-user-webhooks"]; + }; + /** sponsorship cancelled event */ + "webhook-sponsorship-cancelled": { + /** @enum {string} */ + action: "cancelled"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + sponsorship: components["schemas"]["webhooks_sponsorship"]; + }; + /** sponsorship created event */ + "webhook-sponsorship-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + sponsorship: components["schemas"]["webhooks_sponsorship"]; + }; + /** sponsorship edited event */ + "webhook-sponsorship-edited": { + /** @enum {string} */ + action: "edited"; + changes: { + privacy_level?: { + /** @description The `edited` event types include the details about the change when someone edits a sponsorship to change the privacy. */ + from: string; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + sponsorship: components["schemas"]["webhooks_sponsorship"]; + }; + /** sponsorship pending_cancellation event */ + "webhook-sponsorship-pending-cancellation": { + /** @enum {string} */ + action: "pending_cancellation"; + effective_date?: components["schemas"]["webhooks_effective_date"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + sponsorship: components["schemas"]["webhooks_sponsorship"]; + }; + /** sponsorship pending_tier_change event */ + "webhook-sponsorship-pending-tier-change": { + /** @enum {string} */ + action: "pending_tier_change"; + changes: components["schemas"]["webhooks_changes_8"]; + effective_date?: components["schemas"]["webhooks_effective_date"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + sponsorship: components["schemas"]["webhooks_sponsorship"]; + }; + /** sponsorship tier_changed event */ + "webhook-sponsorship-tier-changed": { + /** @enum {string} */ + action: "tier_changed"; + changes: components["schemas"]["webhooks_changes_8"]; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository?: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + sponsorship: components["schemas"]["webhooks_sponsorship"]; + }; + /** star created event */ + "webhook-star-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + /** @description The time the star was created. This is a timestamp in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Will be `null` for the `deleted` action. */ + starred_at: string | null; + }; + /** star deleted event */ + "webhook-star-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + /** @description The time the star was created. This is a timestamp in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Will be `null` for the `deleted` action. */ + starred_at: unknown; + }; + /** status event */ + "webhook-status": { + /** Format: uri */ + avatar_url?: string | null; + /** @description An array of branch objects containing the status' SHA. Each branch contains the given SHA, but the SHA may or may not be the head of the branch. The array includes a maximum of 10 branches. */ + branches: { + commit: { + sha: string | null; + /** Format: uri */ + url: string | null; + }; + name: string; + protected: boolean; + }[]; + commit: { + /** User */ + author: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id?: number; + login?: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + comments_url: string; + commit: { + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + } & { + date: string; + email?: string; + name?: string; + }; + comment_count: number; + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + } & { + date: string; + email?: string; + name?: string; + }; + message: string; + tree: { + sha: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + url: string; + verification: { + payload: string | null; + /** @enum {string} */ + reason: + | "expired_key" + | "not_signing_key" + | "gpgverify_error" + | "gpgverify_unavailable" + | "unsigned" + | "unknown_signature_type" + | "no_user" + | "unverified_email" + | "bad_email" + | "unknown_key" + | "malformed_signature" + | "invalid" + | "valid" + | "bad_cert" + | "ocsp_pending"; + signature: string | null; + verified: boolean; + }; + }; + /** User */ + committer: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id?: number; + login?: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + html_url: string; + node_id: string; + parents: { + /** Format: uri */ + html_url: string; + sha: string; + /** Format: uri */ + url: string; + }[]; + sha: string; + /** Format: uri */ + url: string; + }; + context: string; + created_at: string; + /** @description The optional human-readable description added to the status. */ + description: string | null; + enterprise?: components["schemas"]["enterprise-webhooks"]; + /** @description The unique identifier of the status. */ + id: number; + installation?: components["schemas"]["simple-installation"]; + name: string; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + /** @description The Commit SHA. */ + sha: string; + /** + * @description The new state. Can be `pending`, `success`, `failure`, or `error`. + * @enum {string} + */ + state: "pending" | "success" | "failure" | "error"; + /** @description The optional link added to the status. */ + target_url: string | null; + updated_at: string; + }; + /** team_add event */ + "webhook-team-add": { + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + team: components["schemas"]["webhooks_team_1"]; + }; + /** team added_to_repository event */ + "webhook-team-added-to-repository": { + /** @enum {string} */ + action: "added_to_repository"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @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. */ + custom_properties?: { + [key: string]: unknown; + }; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender?: components["schemas"]["simple-user-webhooks"]; + team: components["schemas"]["webhooks_team_1"]; + }; + /** team created event */ + "webhook-team-created": { + /** @enum {string} */ + action: "created"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @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. */ + custom_properties?: { + [key: string]: unknown; + }; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender: components["schemas"]["simple-user-webhooks"]; + team: components["schemas"]["webhooks_team_1"]; + }; + /** team deleted event */ + "webhook-team-deleted": { + /** @enum {string} */ + action: "deleted"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @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. */ + custom_properties?: { + [key: string]: unknown; + }; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender?: components["schemas"]["simple-user-webhooks"]; + team: components["schemas"]["webhooks_team_1"]; + }; + /** team edited event */ + "webhook-team-edited": { + /** @enum {string} */ + action: "edited"; + /** @description The changes to the team if the action was `edited`. */ + changes: { + description?: { + /** @description The previous version of the description if the action was `edited`. */ + from: string; + }; + name?: { + /** @description The previous version of the name if the action was `edited`. */ + from: string; + }; + privacy?: { + /** @description The previous version of the team's privacy if the action was `edited`. */ + from: string; + }; + notification_setting?: { + /** @description The previous version of the team's notification setting if the action was `edited`. */ + from: string; + }; + repository?: { + permissions: { + from: { + /** @description The previous version of the team member's `admin` permission on a repository, if the action was `edited`. */ + admin?: boolean; + /** @description The previous version of the team member's `pull` permission on a repository, if the action was `edited`. */ + pull?: boolean; + /** @description The previous version of the team member's `push` permission on a repository, if the action was `edited`. */ + push?: boolean; + }; + }; + }; + }; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @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. */ + custom_properties?: { + [key: string]: unknown; + }; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender: components["schemas"]["simple-user-webhooks"]; + team: components["schemas"]["webhooks_team_1"]; + }; + /** team removed_from_repository event */ + "webhook-team-removed-from-repository": { + /** @enum {string} */ + action: "removed_from_repository"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization: components["schemas"]["organization-simple-webhooks"]; + /** + * Repository + * @description A git repository + */ + repository?: { + /** + * @description Whether to allow auto-merge for pull requests. + * @default false + */ + allow_auto_merge?: boolean; + /** @description Whether to allow private forks */ + allow_forking?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + */ + allow_squash_merge?: boolean; + allow_update_branch?: boolean; + /** Format: uri-template */ + archive_url: string; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri */ + clone_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + created_at: number | string; + /** @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. */ + custom_properties?: { + [key: string]: unknown; + }; + /** @description The default branch of the repository. */ + default_branch: string; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + */ + delete_branch_on_merge?: boolean; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** @description Returns whether or not this repository is disabled. */ + disabled?: boolean; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + forks: number; + forks_count: number; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + git_url: string; + /** + * @description Whether downloads are enabled. + * @default true + */ + has_downloads: boolean; + /** + * @description Whether issues are enabled. + * @default true + */ + has_issues: boolean; + has_pages: boolean; + /** + * @description Whether projects are enabled. + * @default true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + */ + has_wiki: boolean; + homepage: string | null; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + is_template?: boolean; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + language: string | null; + /** Format: uri */ + languages_url: string; + /** License */ + license: { + key: string; + name: string; + node_id: string; + spdx_id: string; + /** Format: uri */ + url: string | null; + } | null; + master_branch?: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** Format: uri */ + mirror_url: string | null; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + open_issues: number; + open_issues_count: number; + organization?: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + permissions?: { + admin: boolean; + maintain?: boolean; + pull: boolean; + push: boolean; + triage?: boolean; + }; + /** @description Whether the repository is private or public. */ + private: boolean; + public?: boolean; + /** Format: uri-template */ + pulls_url: string; + pushed_at: number | string | null; + /** Format: uri-template */ + releases_url: string; + role_name?: string | null; + size: number; + ssh_url: string; + stargazers?: number; + stargazers_count: number; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + svn_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + topics: string[]; + /** Format: uri-template */ + trees_url: string; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + /** @enum {string} */ + visibility: "public" | "private" | "internal"; + watchers: number; + watchers_count: number; + }; + sender: components["schemas"]["simple-user-webhooks"]; + team: components["schemas"]["webhooks_team_1"]; + }; + /** watch started event */ + "webhook-watch-started": { + /** @enum {string} */ + action: "started"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + }; + /** workflow_dispatch event */ + "webhook-workflow-dispatch": { + enterprise?: components["schemas"]["enterprise-webhooks"]; + inputs: { + [key: string]: unknown; + } | null; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + ref: string; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + workflow: string; + }; + /** workflow_job completed event */ + "webhook-workflow-job-completed": { + /** @enum {string} */ + action: "completed"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + /** @enum {string|null} */ + conclusion: + | "success" + | "failure" + | null + | "skipped" + | "cancelled" + | "action_required" + | "neutral" + | "timed_out"; + /** @description The time that the job created. */ + created_at: string; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** @description Custom labels for the job. Specified by the [`"runs-on"` attribute](https://docs.github.com/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) in the workflow YAML. */ + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + /** @description The ID of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_id: number | null; + /** @description The name of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_name: string | null; + /** @description The ID of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_id: number | null; + /** @description The name of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_name: string | null; + started_at: string; + /** + * @description The current status of the job. Can be `queued`, `in_progress`, `waiting`, or `completed`. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed" | "waiting"; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: "failure" | "skipped" | "success" | "cancelled" | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "in_progress" | "completed" | "queued"; + }[]; + /** Format: uri */ + url: string; + } & { + check_run_url?: string; + completed_at?: string; + /** @enum {string} */ + conclusion: + | "success" + | "failure" + | "skipped" + | "cancelled" + | "action_required" + | "neutral" + | "timed_out"; + /** @description The time that the job created. */ + created_at?: string; + head_sha?: string; + html_url?: string; + id?: number; + labels?: (string | null)[]; + name?: string; + node_id?: string; + run_attempt?: number; + run_id?: number; + run_url?: string; + runner_group_id?: number | null; + runner_group_name?: string | null; + runner_id?: number | null; + runner_name?: string | null; + started_at?: string; + status?: string; + /** @description The name of the current branch. */ + head_branch?: string | null; + /** @description The name of the workflow. */ + workflow_name?: string | null; + steps?: (Record | null)[]; + url?: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_job in_progress event */ + "webhook-workflow-job-in-progress": { + /** @enum {string} */ + action: "in_progress"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + /** @enum {string|null} */ + conclusion: "success" | "failure" | null | "cancelled" | "neutral"; + /** @description The time that the job created. */ + created_at: string; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** @description Custom labels for the job. Specified by the [`"runs-on"` attribute](https://docs.github.com/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) in the workflow YAML. */ + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + /** @description The ID of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_id: number | null; + /** @description The name of the runner group that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_group_name: string | null; + /** @description The ID of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_id: number | null; + /** @description The name of the runner that is running this job. This will be `null` as long as `workflow_job[status]` is `queued`. */ + runner_name: string | null; + started_at: string; + /** + * @description The current status of the job. Can be `queued`, `in_progress`, or `completed`. + * @enum {string} + */ + status: "queued" | "in_progress" | "completed"; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: "failure" | "skipped" | "success" | null | "cancelled"; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "in_progress" | "completed" | "queued" | "pending"; + }[]; + /** Format: uri */ + url: string; + } & { + check_run_url?: string; + completed_at?: string | null; + conclusion?: string | null; + /** @description The time that the job created. */ + created_at?: string; + head_sha?: string; + html_url?: string; + id?: number; + labels?: string[]; + name?: string; + node_id?: string; + run_attempt?: number; + run_id?: number; + run_url?: string; + runner_group_id?: number | null; + runner_group_name?: string | null; + runner_id?: number | null; + runner_name?: string | null; + started_at?: string; + /** @enum {string} */ + status: "in_progress" | "completed" | "queued"; + /** @description The name of the current branch. */ + head_branch?: string | null; + /** @description The name of the workflow. */ + workflow_name?: string | null; + steps: { + completed_at: string | null; + conclusion: string | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "in_progress" | "completed" | "pending" | "queued"; + }[]; + url?: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_job queued event */ + "webhook-workflow-job-queued": { + /** @enum {string} */ + action: "queued"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + conclusion: string | null; + /** @description The time that the job created. */ + created_at: string; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + runner_group_id: number | null; + runner_group_name: string | null; + runner_id: number | null; + runner_name: string | null; + /** Format: date-time */ + started_at: string; + /** @enum {string} */ + status: "queued" | "in_progress" | "completed" | "waiting"; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: "failure" | "skipped" | "success" | "cancelled" | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: "completed" | "in_progress" | "queued" | "pending"; + }[]; + /** Format: uri */ + url: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_job waiting event */ + "webhook-workflow-job-waiting": { + /** @enum {string} */ + action: "waiting"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + workflow_job: { + /** Format: uri */ + check_run_url: string; + completed_at: string | null; + conclusion: string | null; + /** @description The time that the job created. */ + created_at: string; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + labels: string[]; + name: string; + node_id: string; + run_attempt: number; + run_id: number; + /** Format: uri */ + run_url: string; + runner_group_id: number | null; + runner_group_name: string | null; + runner_id: number | null; + runner_name: string | null; + /** Format: date-time */ + started_at: string; + /** @description The name of the current branch. */ + head_branch: string | null; + /** @description The name of the workflow. */ + workflow_name: string | null; + /** @enum {string} */ + status: "queued" | "in_progress" | "completed" | "waiting"; + steps: { + completed_at: string | null; + /** @enum {string|null} */ + conclusion: "failure" | "skipped" | "success" | "cancelled" | null; + name: string; + number: number; + started_at: string | null; + /** @enum {string} */ + status: + | "completed" + | "in_progress" + | "queued" + | "pending" + | "waiting"; + }[]; + /** Format: uri */ + url: string; + }; + deployment?: components["schemas"]["deployment"]; + }; + /** workflow_run completed event */ + "webhook-workflow-run-completed": { + /** @enum {string} */ + action: "completed"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + workflow: components["schemas"]["webhooks_workflow"]; + /** Workflow Run */ + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + artifacts_url: string; + /** Format: uri */ + cancel_url: string; + check_suite_id: number; + check_suite_node_id: string; + /** Format: uri */ + check_suite_url: string; + /** @enum {string|null} */ + conclusion: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** Repository Lite */ + head_repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + jobs_url: string; + /** Format: uri */ + logs_url: string; + name: string | null; + node_id: string; + path: string; + /** Format: uri */ + previous_attempt_url: string | null; + pull_requests: ({ + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + } | null)[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + /** Repository Lite */ + repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + rerun_url: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "pending" + | "waiting"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + /** Format: uri */ + workflow_url: string; + /** + * @description The event-specific title associated with the run or the run-name if set, or the value of `run-name` if it is set in the workflow. + * @example Simple Workflow + */ + display_title?: string; + }; + }; + /** workflow_run in_progress event */ + "webhook-workflow-run-in-progress": { + /** @enum {string} */ + action: "in_progress"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + workflow: components["schemas"]["webhooks_workflow"]; + /** Workflow Run */ + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + artifacts_url: string; + /** Format: uri */ + cancel_url: string; + check_suite_id: number; + check_suite_node_id: string; + /** Format: uri */ + check_suite_url: string; + /** @enum {string|null} */ + conclusion: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | null; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** Repository Lite */ + head_repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string | null; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + jobs_url: string; + /** Format: uri */ + logs_url: string; + name: string | null; + node_id: string; + path: string; + /** Format: uri */ + previous_attempt_url: string | null; + pull_requests: ({ + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + } | null)[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + /** Repository Lite */ + repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + rerun_url: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "pending"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + /** Format: uri */ + workflow_url: string; + }; + }; + /** workflow_run requested event */ + "webhook-workflow-run-requested": { + /** @enum {string} */ + action: "requested"; + enterprise?: components["schemas"]["enterprise-webhooks"]; + installation?: components["schemas"]["simple-installation"]; + organization?: components["schemas"]["organization-simple-webhooks"]; + repository: components["schemas"]["repository-webhooks"]; + sender: components["schemas"]["simple-user-webhooks"]; + workflow: components["schemas"]["webhooks_workflow"]; + /** Workflow Run */ + workflow_run: { + /** User */ + actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: uri */ + artifacts_url: string; + /** Format: uri */ + cancel_url: string; + check_suite_id: number; + check_suite_node_id: string; + /** Format: uri */ + check_suite_url: string; + /** @enum {string|null} */ + conclusion: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required" + | "stale" + | null + | "skipped" + | "startup_failure"; + /** Format: date-time */ + created_at: string; + event: string; + head_branch: string | null; + /** SimpleCommit */ + head_commit: { + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + author: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + /** + * Committer + * @description Metaproperties for Git author/committer information. + */ + committer: { + /** Format: date-time */ + date?: string; + /** Format: email */ + email: string | null; + /** @description The git author's name. */ + name: string; + username?: string; + }; + id: string; + message: string; + timestamp: string; + tree_id: string; + }; + /** Repository Lite */ + head_repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + head_sha: string; + /** Format: uri */ + html_url: string; + id: number; + /** Format: uri */ + jobs_url: string; + /** Format: uri */ + logs_url: string; + name: string | null; + node_id: string; + path: string; + /** Format: uri */ + previous_attempt_url: string | null; + pull_requests: { + base: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + head: { + ref: string; + /** Repo Ref */ + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + sha: string; + }; + id: number; + number: number; + /** Format: uri */ + url: string; + }[]; + referenced_workflows?: + | { + path: string; + ref?: string; + sha: string; + }[] + | null; + /** Repository Lite */ + repository: { + /** Format: uri-template */ + archive_url: string; + /** Format: uri-template */ + assignees_url: string; + /** Format: uri-template */ + blobs_url: string; + /** Format: uri-template */ + branches_url: string; + /** Format: uri-template */ + collaborators_url: string; + /** Format: uri-template */ + comments_url: string; + /** Format: uri-template */ + commits_url: string; + /** Format: uri-template */ + compare_url: string; + /** Format: uri-template */ + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + /** Format: uri-template */ + git_commits_url: string; + /** Format: uri-template */ + git_refs_url: string; + /** Format: uri-template */ + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + /** @description Unique identifier of the repository */ + id: number; + /** Format: uri-template */ + issue_comment_url: string; + /** Format: uri-template */ + issue_events_url: string; + /** Format: uri-template */ + issues_url: string; + /** Format: uri-template */ + keys_url: string; + /** Format: uri-template */ + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + /** Format: uri-template */ + milestones_url: string; + /** @description The name of the repository. */ + name: string; + node_id: string; + /** Format: uri-template */ + notifications_url: string; + /** User */ + owner: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** @description Whether the repository is private or public. */ + private: boolean; + /** Format: uri-template */ + pulls_url: string; + /** Format: uri-template */ + releases_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri-template */ + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri-template */ + trees_url: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + rerun_url: string; + run_attempt: number; + run_number: number; + /** Format: date-time */ + run_started_at: string; + /** @enum {string} */ + status: + | "requested" + | "in_progress" + | "completed" + | "queued" + | "pending" + | "waiting"; + /** User */ + triggering_actor: { + /** Format: uri */ + avatar_url?: string; + deleted?: boolean; + email?: string | null; + /** Format: uri-template */ + events_url?: string; + /** Format: uri */ + followers_url?: string; + /** Format: uri-template */ + following_url?: string; + /** Format: uri-template */ + gists_url?: string; + gravatar_id?: string; + /** Format: uri */ + html_url?: string; + id: number; + login: string; + name?: string; + node_id?: string; + /** Format: uri */ + organizations_url?: string; + /** Format: uri */ + received_events_url?: string; + /** Format: uri */ + repos_url?: string; + site_admin?: boolean; + /** Format: uri-template */ + starred_url?: string; + /** Format: uri */ + subscriptions_url?: string; + /** @enum {string} */ + type?: "Bot" | "User" | "Organization"; + /** Format: uri */ + url?: string; + } | null; + /** Format: date-time */ + updated_at: string; + /** Format: uri */ + url: string; + workflow_id: number; + /** Format: uri */ + workflow_url: string; + display_title: string; + }; + }; + }; + responses: { + /** @description Validation failed, or the endpoint has been spammed. */ + validation_failed_simple: { + content: { + "application/json": components["schemas"]["validation-error-simple"]; + }; + }; + /** @description Resource not found */ + not_found: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** @description Bad Request */ + bad_request: { + content: { + "application/json": components["schemas"]["basic-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + /** @description Validation failed, or the endpoint has been spammed. */ + validation_failed: { + content: { + "application/json": components["schemas"]["validation-error"]; + }; + }; + /** @description Accepted */ + accepted: { + content: { + "application/json": Record; + }; + }; + /** @description Not modified */ + not_modified: { + content: never; + }; + /** @description Requires authentication */ + requires_authentication: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** @description Forbidden */ + forbidden: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** @description Internal Error */ + internal_error: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** @description Service unavailable */ + service_unavailable: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + }; + }; + }; + /** @description Forbidden Gist */ + forbidden_gist: { + content: { + "application/json": { + block?: { + reason?: string; + created_at?: string; + html_url?: string | null; + }; + message?: string; + documentation_url?: string; + }; + }; + }; + /** @description Moved permanently */ + moved_permanently: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** @description Conflict */ + conflict: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** @description Response */ + actions_runner_jitconfig: { + content: { + "application/json": { + runner: components["schemas"]["runner"]; + /** @description The base64 encoded runner configuration. */ + encoded_jit_config: string; + }; + }; + }; + /** @description Response */ + actions_runner_labels: { + content: { + "application/json": { + total_count: number; + labels: components["schemas"]["runner-label"][]; + }; + }; + }; + /** @description Response */ + actions_runner_labels_readonly: { + content: { + "application/json": { + total_count: number; + labels: components["schemas"]["runner-label"][]; + }; + }; + }; + /** @description The value of `per_page` multiplied by `page` cannot be greater than 10000. */ + package_es_list_error: { + content: never; + }; + /** @description A header with no content is returned. */ + no_content: { + content: never; + }; + /** @description Gone */ + gone: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** @description Temporary Redirect */ + temporary_redirect: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** @description Response if GitHub Advanced Security is not enabled for this repository */ + code_scanning_forbidden_read: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** @description Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository */ + code_scanning_forbidden_write: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** @description Found */ + found: { + content: never; + }; + /** @description Response if there is already a validation run in progress with a different default setup configuration */ + code_scanning_conflict: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** @description Response if GitHub Advanced Security is not enabled for this repository */ + dependency_review_forbidden: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** @description Unavailable due to service under maintenance. */ + porter_maintenance: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** @description Unacceptable */ + unacceptable: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + parameters: { + /** @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. 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)." */ + "pagination-before"?: string; + /** @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. 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)." */ + "pagination-after"?: string; + /** @description The direction to sort the results by. */ + direction?: "asc" | "desc"; + /** @description The GHSA (GitHub Security Advisory) identifier of the advisory. */ + ghsa_id: string; + /** @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)." */ + "per-page"?: number; + /** @description Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: string; + "delivery-id": number; + /** @description 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)." */ + page?: number; + /** @description Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: string; + /** @description The unique identifier of the installation. */ + "installation-id": number; + /** @description The client ID of the GitHub app. */ + "client-id": string; + "app-slug": string; + /** @description The unique identifier of the classroom assignment. */ + "assignment-id": number; + /** @description The unique identifier of the classroom. */ + "classroom-id": number; + /** @description The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: string; + /** + * @description A comma-separated list of states. If specified, only alerts with these states will be returned. + * + * Can be: `auto_dismissed`, `dismissed`, `fixed`, `open` + */ + "dependabot-alert-comma-separated-states"?: string; + /** + * @description A comma-separated list of severities. If specified, only alerts with these severities will be returned. + * + * Can be: `low`, `medium`, `high`, `critical` + */ + "dependabot-alert-comma-separated-severities"?: string; + /** + * @description A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned. + * + * Can be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust` + */ + "dependabot-alert-comma-separated-ecosystems"?: string; + /** @description A comma-separated list of package names. If specified, only alerts for these packages will be returned. */ + "dependabot-alert-comma-separated-packages"?: string; + /** @description The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. */ + "dependabot-alert-scope"?: "development" | "runtime"; + /** + * @description The property by which to sort the results. + * `created` means when the alert was created. + * `updated` means when the alert's state last changed. + */ + "dependabot-alert-sort"?: "created" | "updated"; + /** + * @description **Deprecated**. The number of results per page (max 100), starting from the first matching result. + * This parameter must not be used in combination with `last`. + * Instead, use `per_page` in combination with `after` to fetch the first page of results. + */ + "pagination-first"?: number; + /** + * @description **Deprecated**. The number of results per page (max 100), starting from the last matching result. + * This parameter must not be used in combination with `first`. + * Instead, use `per_page` in combination with `before` to fetch the last page of results. + */ + "pagination-last"?: number; + /** @description Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + "secret-scanning-alert-state"?: "open" | "resolved"; + /** + * @description A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + "secret-scanning-alert-secret-type"?: string; + /** @description A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + "secret-scanning-alert-resolution"?: string; + /** @description The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + "secret-scanning-alert-sort"?: "created" | "updated"; + /** @description A 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`. */ + "secret-scanning-alert-validity"?: string; + /** @description The unique identifier of the gist. */ + "gist-id": string; + /** @description The unique identifier of the comment. */ + "comment-id": number; + /** @description A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: string; + /** @description account_id parameter */ + "account-id": number; + /** @description The unique identifier of the plan. */ + "plan-id": number; + /** @description The property to sort the results by. */ + sort?: "created" | "updated"; + /** @description The account owner of the repository. The name is not case sensitive. */ + owner: string; + /** @description The name of the repository without the `.git` extension. The name is not case sensitive. */ + repo: string; + /** @description If `true`, show notifications marked as read. */ + all?: boolean; + /** @description If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating?: boolean; + /** @description Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + before?: string; + /** @description The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/activity/notifications#list-notifications-for-the-authenticated-user)). */ + "thread-id": number; + /** @description An organization ID. Only return organizations with an ID greater than this ID. */ + "since-org"?: number; + /** @description The organization name. The name is not case sensitive. */ + org: string; + /** @description The unique identifier of the repository. */ + "repository-id": number; + /** @description Unique identifier of the self-hosted runner. */ + "runner-id": number; + /** @description The name of a self-hosted runner's custom label. */ + "runner-label-name": string; + /** @description The name of the secret. */ + "secret-name": string; + /** @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)." */ + "variables-per-page"?: number; + /** @description The name of the variable. */ + "variable-name": string; + /** @description The handle for the GitHub user account. */ + username: string; + /** @description The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + "tool-name"?: components["schemas"]["code-scanning-analysis-tool-name"]; + /** @description The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + "tool-guid"?: components["schemas"]["code-scanning-analysis-tool-guid"]; + /** @description The unique identifier of the hook. You can find this value in the `X-GitHub-Hook-ID` header of a webhook delivery. */ + "hook-id": number; + /** @description The unique identifier of the invitation. */ + "invitation-id": number; + /** @description The name of the codespace. */ + "codespace-name": string; + /** @description The unique identifier of the migration. */ + "migration-id": number; + /** @description repo_name parameter */ + "repo-name": string; + /** @description The slug of the team name. */ + "team-slug": string; + /** @description The unique identifier of the role. */ + "role-id": number; + /** + * @description The selected visibility of the packages. This parameter is optional and only filters an existing result set. + * + * The `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`. + * For the list of GitHub Packages registries that support granular permissions, 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)." + */ + "package-visibility"?: "public" | "private" | "internal"; + /** @description The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + "package-type": + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** @description The name of the package. */ + "package-name": string; + /** @description Unique identifier of the package version. */ + "package-version-id": number; + /** @description The property by which to sort the results. */ + "personal-access-token-sort"?: "created_at"; + /** @description A list of owner usernames to use to filter the results. */ + "personal-access-token-owner"?: string[]; + /** @description The name of the repository to use to filter the results. */ + "personal-access-token-repository"?: string; + /** @description The permission to use to filter the results. */ + "personal-access-token-permission"?: string; + /** @description Only show fine-grained personal access tokens used before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + "personal-access-token-before"?: string; + /** @description Only show fine-grained personal access tokens used after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + "personal-access-token-after"?: string; + /** @description The unique identifier of the fine-grained personal access token. */ + "fine-grained-personal-access-token-id": number; + /** @description The custom property name. The name is case sensitive. */ + "custom-property-name": string; + /** @description The name of the repository to filter on. When specified, only rule evaluations from this repository will be returned. */ + "repository-name-in-query"?: number; + /** + * @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). + */ + "time-period"?: "hour" | "day" | "week" | "month"; + /** @description The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned. */ + "actor-name-in-query"?: string; + /** @description The rule results to filter on. When specified, only suites with this result will be returned. */ + "rule-suite-result"?: "pass" | "fail" | "bypass" | "all"; + /** + * @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. + */ + "rule-suite-id": number; + /** @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 events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. */ + "secret-scanning-pagination-before-org-repo"?: string; + /** @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 events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. */ + "secret-scanning-pagination-after-org-repo"?: string; + /** @description The number that identifies the discussion. */ + "discussion-number": number; + /** @description The number that identifies the comment. */ + "comment-number": number; + /** @description The unique identifier of the reaction. */ + "reaction-id": number; + /** @description The unique identifier of the project. */ + "project-id": number; + /** @description The security feature to enable or disable. */ + "security-product": + | "dependency_graph" + | "dependabot_alerts" + | "dependabot_security_updates" + | "advanced_security" + | "code_scanning_default_setup" + | "secret_scanning" + | "secret_scanning_push_protection"; + /** + * @description The action to take. + * + * `enable_all` means to enable the specified security feature for all repositories in the organization. + * `disable_all` means to disable the specified security feature for all repositories in the organization. + */ + "org-security-product-enablement": "enable_all" | "disable_all"; + /** @description The unique identifier of the card. */ + "card-id": number; + /** @description The unique identifier of the column. */ + "column-id": number; + /** @description The name field of an artifact. When specified, only artifacts with this name will be returned. */ + "artifact-name"?: string; + /** @description The unique identifier of the artifact. */ + "artifact-id": number; + /** @description The full Git reference for narrowing down the cache. The `ref` for a branch should be formatted as `refs/heads/`. To reference a pull request use `refs/pull//merge`. */ + "actions-cache-git-ref-full"?: string; + /** @description An explicit key or prefix for identifying the cache */ + "actions-cache-key"?: string; + /** @description The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes. */ + "actions-cache-list-sort"?: + | "created_at" + | "last_accessed_at" + | "size_in_bytes"; + /** @description A key for identifying the cache. */ + "actions-cache-key-required": string; + /** @description The unique identifier of the GitHub Actions cache. */ + "cache-id": number; + /** @description The unique identifier of the job. */ + "job-id": number; + /** @description Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: string; + /** @description Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + "workflow-run-branch"?: string; + /** @description Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: string; + /** @description Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub Actions can set a status of `waiting`, `pending`, or `requested`. */ + "workflow-run-status"?: + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting" + | "pending"; + /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: string; + /** @description If `true` pull requests are omitted from the response (empty array). */ + "exclude-pull-requests"?: boolean; + /** @description Returns workflow runs with the `check_suite_id` that you specify. */ + "workflow-run-check-suite-id"?: number; + /** @description Only returns workflow runs that are associated with the specified `head_sha`. */ + "workflow-run-head-sha"?: string; + /** @description The unique identifier of the workflow run. */ + "run-id": number; + /** @description The attempt number of the workflow run. */ + "attempt-number": number; + /** @description The ID of the workflow. You can also pass the workflow file name as a string. */ + "workflow-id": number | string; + /** @description The unique identifier of the autolink. */ + "autolink-id": number; + /** @description The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). */ + branch: string; + /** @description The unique identifier of the check run. */ + "check-run-id": number; + /** @description The unique identifier of the check suite. */ + "check-suite-id": number; + /** @description Returns check runs with the specified `name`. */ + "check-name"?: string; + /** @description Returns check runs with the specified `status`. */ + status?: "queued" | "in_progress" | "completed"; + /** @description The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + "git-ref"?: components["schemas"]["code-scanning-ref"]; + /** @description The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + "alert-number": components["schemas"]["alert-number"]; + /** @description The SHA of the commit. */ + "commit-sha": string; + /** @description The commit reference. Can be a commit SHA, 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. */ + "commit-ref": string; + /** @description A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned. */ + "dependabot-alert-comma-separated-manifests"?: string; + /** + * @description The number that identifies a Dependabot alert in its repository. + * You can find this at the end of the URL for a Dependabot alert within GitHub, + * or in `number` fields in the response from the + * `GET /repos/{owner}/{repo}/dependabot/alerts` operation. + */ + "dependabot-alert-number": components["schemas"]["alert-number"]; + /** @description The full path, relative to the repository root, of the dependency manifest file. */ + "manifest-path"?: string; + /** @description deployment_id parameter */ + "deployment-id": number; + /** @description The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with `%2F`. */ + "environment-name": string; + /** @description The unique identifier of the branch policy. */ + "branch-policy-id": number; + /** @description The unique identifier of the protection rule. */ + "protection-rule-id": number; + /** + * @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. + * @example heads/feature-a + */ + "git-ref-only": string; + /** @description A user ID. Only return users with an ID greater than this ID. */ + "since-user"?: number; + /** @description The number that identifies the issue. */ + "issue-number": number; + /** @description The unique identifier of the key. */ + "key-id": number; + /** @description The number that identifies the milestone. */ + "milestone-number": number; + /** @description The ID of the Pages deployment. You can also give the commit SHA of the deployment. */ + "pages-deployment-id": number | string; + /** @description The number that identifies the pull request. */ + "pull-number": number; + /** @description The unique identifier of the review. */ + "review-id": number; + /** @description The unique identifier of the asset. */ + "asset-id": number; + /** @description The unique identifier of the release. */ + "release-id": number; + /** @description The name of the ref. Cannot contain wildcard characters. When specified, only rule evaluations triggered for this ref will be returned. */ + "ref-in-query"?: string; + /** @description The unique identifier of the tag protection. */ + "tag-protection-id": number; + /** @description The time frame to display results for. */ + per?: "day" | "week"; + /** @description A repository ID. Only return repositories with an ID greater than this ID. */ + "since-repo"?: number; + /** @description Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ + order?: "desc" | "asc"; + /** @description The unique identifier of the team. */ + "team-id": number; + /** @description ID of the Repository to filter on */ + "repository-id-in-query"?: number; + /** @description The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ + "export-id": string; + /** @description The unique identifier of the GPG key. */ + "gpg-key-id": number; + /** @description Only show repositories updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + "since-repo-date"?: string; + /** @description Only show repositories updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + "before-repo-date"?: string; + /** @description The unique identifier of the SSH signing key. */ + "ssh-signing-key-id": number; + /** @description The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + "sort-starred"?: "created" | "updated"; + }; + requestBodies: never; + headers: { + /** @example ; rel="next", ; rel="last" */ + link: string; + /** @example text/html */ + "content-type": string; + /** @example 0.17.4 */ + "x-common-marker-version": string; + /** @example 5000 */ + "x-rate-limit-limit": number; + /** @example 4999 */ + "x-rate-limit-remaining": number; + /** @example 1590701888 */ + "x-rate-limit-reset": number; + /** @example https://pipelines.actions.githubusercontent.com/OhgS4QRKqmgx7bKC27GKU83jnQjyeqG8oIMTge8eqtheppcmw8/_apis/pipelines/1/runs/176/signedlogcontent?urlExpires=2020-01-24T18%3A10%3A31.5729946Z&urlSigningMethod=HMACV1&urlSignature=agG73JakPYkHrh06seAkvmH7rBR4Ji4c2%2B6a2ejYh3E%3D */ + location: string; + }; + pathItems: never; +} + +export type $defs = Record; + +export type external = Record; + +export interface operations { + /** + * GitHub API Root + * @description Get Hypermedia links to resources accessible in GitHub's REST API + */ + "meta/root": { + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["root"]; + }; + }; + }; + }; + /** + * List global security advisories + * @description Lists all global security advisories that match the specified parameters. If no other parameters are defined, the request will return only GitHub-reviewed advisories that are not malware. + * + * By default, all responses will exclude advisories for malware, because malware are not standard vulnerabilities. To list advisories for malware, you must include the `type` parameter in your request, with the value `malware`. For more information about the different types of security advisories, see "[About the GitHub Advisory database](https://docs.github.com/code-security/security-advisories/global-security-advisories/about-the-github-advisory-database#about-types-of-security-advisories)." + */ + "security-advisories/list-global-advisories": { + parameters: { + query?: { + /** @description If specified, only advisories with this GHSA (GitHub Security Advisory) identifier will be returned. */ + ghsa_id?: string; + /** @description If specified, only advisories of this type will be returned. By default, a request with no other parameters defined will only return reviewed advisories that are not malware. */ + type?: "reviewed" | "malware" | "unreviewed"; + /** @description If specified, only advisories with this CVE (Common Vulnerabilities and Exposures) identifier will be returned. */ + cve_id?: string; + /** @description If specified, only advisories for these ecosystems will be returned. */ + ecosystem?: components["schemas"]["security-advisory-ecosystems"]; + /** @description If specified, only advisories with these severities will be returned. */ + severity?: "unknown" | "low" | "medium" | "high" | "critical"; + /** + * @description If specified, only advisories with these Common Weakness Enumerations (CWEs) will be returned. + * + * Example: `cwes=79,284,22` or `cwes[]=79&cwes[]=284&cwes[]=22` + */ + cwes?: string | string[]; + /** @description Whether to only return advisories that have been withdrawn. */ + is_withdrawn?: boolean; + /** + * @description If specified, only return advisories that affect any of `package` or `package@version`. A maximum of 1000 packages can be specified. + * If the query parameter causes the URL to exceed the maximum URL length supported by your client, you must specify fewer packages. + * + * Example: `affects=package1,package2@1.0.0,package3@^2.0.0` or `affects[]=package1&affects[]=package2@1.0.0` + */ + affects?: string | string[]; + /** + * @description If specified, only return advisories that were published on a date or date range. + * + * For more information on the syntax of the date range, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." + */ + published?: string; + /** + * @description If specified, only return advisories that were updated on a date or date range. + * + * For more information on the syntax of the date range, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." + */ + updated?: string; + /** + * @description If specified, only show advisories that were updated or published on a date or date range. + * + * For more information on the syntax of the date range, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." + */ + modified?: string; + before?: components["parameters"]["pagination-before"]; + after?: components["parameters"]["pagination-after"]; + direction?: components["parameters"]["direction"]; + /** @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)." */ + per_page?: number; + /** @description The property to sort the results by. */ + sort?: "updated" | "published"; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["global-advisory"][]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + /** @description Too many requests */ + 429: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Get a global security advisory + * @description Gets a global security advisory using its GitHub Security Advisory (GHSA) identifier. + */ + "security-advisories/get-global-advisory": { + parameters: { + path: { + ghsa_id: components["parameters"]["ghsa_id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["global-advisory"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get the authenticated app + * @description Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations for the authenticated app](https://docs.github.com/rest/apps/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-authenticated": { + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + }; + }; + /** + * Create a GitHub App from a manifest + * @description Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`. + */ + "apps/create-from-manifest": { + parameters: { + path: { + code: string; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["integration"] & { + client_id: string; + client_secret: string; + webhook_secret: string | null; + pem: string; + [key: string]: unknown; + }; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Get a webhook configuration for an app + * @description Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-webhook-config-for-app": { + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Update a webhook configuration for an app + * @description Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/update-webhook-config-for-app": { + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * List deliveries for an app webhook + * @description Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/list-webhook-deliveries": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + cursor?: components["parameters"]["cursor"]; + redelivery?: boolean; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get a delivery for an app webhook + * @description Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-webhook-delivery": { + parameters: { + path: { + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Redeliver a delivery for an app webhook + * @description Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/redeliver-webhook-delivery": { + parameters: { + path: { + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List installation requests for the authenticated app + * @description Lists all the pending installation requests for the authenticated GitHub App. + */ + "apps/list-installation-requests-for-authenticated-app": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description List of integration installation requests */ + 200: { + content: { + "application/json": components["schemas"]["integration-installation-request"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * List installations for the authenticated app + * @description You must use a [JWT](https://docs.github.com/enterprise-server@3.9/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * + * The permissions the installation has are included under the `permissions` key. + */ + "apps/list-installations": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + since?: components["parameters"]["since"]; + outdated?: string; + }; + }; + responses: { + /** @description The permissions the installation has are included under the `permissions` key. */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + /** + * @description The ID of the installation. + * @example 1 + */ + id: number; + account: + | ({ + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + } & { + /** @description A short description of the enterprise. */ + description?: string | null; + /** + * Format: uri + * @example https://github.com/enterprises/octo-business + */ + html_url: string; + /** + * Format: uri + * @description The enterprise's website URL. + */ + website_url?: string | null; + /** + * @description Unique identifier of the enterprise + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the enterprise. + * @example Octo Business + */ + name: string; + /** + * @description The slug url identifier for the enterprise. + * @example octo-business + */ + slug: string; + /** + * Format: date-time + * @example 2019-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2019-01-26T19:14:43Z + */ + updated_at: string | null; + /** Format: uri */ + avatar_url: string; + }) + | null; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** + * Format: uri + * @example https://api.github.com/installations/1/access_tokens + */ + access_tokens_url: string; + /** + * Format: uri + * @example https://api.github.com/installation/repositories + */ + repositories_url: string; + /** + * Format: uri + * @example https://github.com/organizations/github/settings/installations/1 + */ + html_url: string; + /** @example 1 */ + app_id: number; + /** @description The ID of the user or organization this token is being scoped to. */ + target_id: number; + /** @example Organization */ + target_type: string; + /** + * App Permissions + * @description The permissions granted to the user access token. + * @example { + * "contents": "read", + * "issues": "read", + * "deployments": "write", + * "single_file": "read" + * } + */ + permissions: { + /** + * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. + * @enum {string} + */ + actions?: "read" | "write"; + /** + * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. + * @enum {string} + */ + administration?: "read" | "write"; + /** + * @description The level of permission to grant the access token for checks on code. + * @enum {string} + */ + checks?: "read" | "write"; + /** + * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. + * @enum {string} + */ + contents?: "read" | "write"; + /** + * @description The level of permission to grant the access token for deployments and deployment statuses. + * @enum {string} + */ + deployments?: "read" | "write"; + /** + * @description The level of permission to grant the access token for managing repository environments. + * @enum {string} + */ + environments?: "read" | "write"; + /** + * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. + * @enum {string} + */ + issues?: "read" | "write"; + /** + * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. + * @enum {string} + */ + metadata?: "read" | "write"; + /** + * @description The level of permission to grant the access token for packages published to GitHub Packages. + * @enum {string} + */ + packages?: "read" | "write"; + /** + * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. + * @enum {string} + */ + pages?: "read" | "write"; + /** + * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. + * @enum {string} + */ + pull_requests?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. + * @enum {string} + */ + repository_hooks?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage repository projects, columns, and cards. + * @enum {string} + */ + repository_projects?: "read" | "write" | "admin"; + /** + * @description The level of permission to grant the access token to view and manage secret scanning alerts. + * @enum {string} + */ + secret_scanning_alerts?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage repository secrets. + * @enum {string} + */ + secrets?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. + * @enum {string} + */ + security_events?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage just a single file. + * @enum {string} + */ + single_file?: "read" | "write"; + /** + * @description The level of permission to grant the access token for commit statuses. + * @enum {string} + */ + statuses?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage Dependabot alerts. + * @enum {string} + */ + vulnerability_alerts?: "read" | "write"; + /** + * @description The level of permission to grant the access token to update GitHub Actions workflow files. + * @enum {string} + */ + workflows?: "write"; + /** + * @description The level of permission to grant the access token for organization teams and members. + * @enum {string} + */ + members?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage access to an organization. + * @enum {string} + */ + organization_administration?: "read" | "write"; + /** + * @description The level of permission to grant the access token for custom repository roles management. This property is in beta and is subject to change. + * @enum {string} + */ + organization_custom_roles?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage announcement banners for an organization. + * @enum {string} + */ + organization_announcement_banners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. + * @enum {string} + */ + organization_hooks?: "read" | "write"; + /** + * @description The level of permission to grant the access token for viewing and managing fine-grained personal access token requests to an organization. + * @enum {string} + */ + organization_personal_access_tokens?: "read" | "write"; + /** + * @description The level of permission to grant the access token for viewing and managing fine-grained personal access tokens that have been approved by an organization. + * @enum {string} + */ + organization_personal_access_token_requests?: "read" | "write"; + /** + * @description The level of permission to grant the access token for viewing an organization's plan. + * @enum {string} + */ + organization_plan?: "read"; + /** + * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). + * @enum {string} + */ + organization_projects?: "read" | "write" | "admin"; + /** + * @description The level of permission to grant the access token for organization packages published to GitHub Packages. + * @enum {string} + */ + organization_packages?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage organization secrets. + * @enum {string} + */ + organization_secrets?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. + * @enum {string} + */ + organization_self_hosted_runners?: "read" | "write"; + /** + * @description The level of permission to grant the access token to view and manage users blocked by the organization. + * @enum {string} + */ + organization_user_blocking?: "read" | "write"; + /** + * @description The level of permission to grant the access token to manage team discussions and related comments. + * @enum {string} + */ + team_discussions?: "read" | "write"; + }; + events: string[]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** @example config.yaml */ + single_file_name: string | null; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + /** @example github-actions */ + app_slug: string; + /** + * Simple User + * @description A GitHub user. + */ + suspended_by: { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + } | null; + /** Format: date-time */ + suspended_at: string | null; + /** @example "test_13f1e99741e3e004@d7e1eb0bc0a1ba12.com" */ + contact_email?: string | null; + }[]; + }; + }; + }; + }; + /** + * Get an installation for the authenticated app + * @description Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-installation": { + parameters: { + path: { + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete an installation for the authenticated app + * @description Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/apps/apps#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/delete-installation": { + parameters: { + path: { + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + * + * Optionally, 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. + * + * Optionally, 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. + * + * When 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. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/create-installation-access-token": { + parameters: { + path: { + installation_id: components["parameters"]["installation-id"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description List of repository names that the token should have access to */ + repositories?: string[]; + /** + * @description List of repository IDs that the token should have access to + * @example [ + * 1 + * ] + */ + repository_ids?: number[]; + permissions?: components["schemas"]["app-permissions"]; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["installation-token"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Suspend an app installation + * @description Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/suspend-installation": { + parameters: { + path: { + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Unsuspend an app installation + * @description Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/unsuspend-installation": { + parameters: { + path: { + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete an app authorization + * @description OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. + * Deleting an application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). + */ + "apps/delete-authorization": { + parameters: { + path: { + client_id: components["parameters"]["client-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Check a token + * @description OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. + */ + "apps/check-token": { + parameters: { + path: { + client_id: components["parameters"]["client-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth or GitHub application. */ + access_token: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Delete an app token + * @description OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. + */ + "apps/delete-token": { + parameters: { + path: { + client_id: components["parameters"]["client-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Reset a token + * @description OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + */ + "apps/reset-token": { + parameters: { + path: { + client_id: components["parameters"]["client-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth or GitHub application. */ + access_token: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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. + * + * 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. + */ + "apps/scope-token": { + parameters: { + path: { + client_id: components["parameters"]["client-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The access token used to authenticate to the GitHub API. + * @example e72e16c7e42f292c6912e7710c838347ae178b4a + */ + access_token: string; + /** + * @description The name of the user or organization to scope the user access token to. **Required** unless `target_id` is specified. + * @example octocat + */ + target?: string; + /** + * @description The ID of the user or organization to scope the user access token to. **Required** unless `target` is specified. + * @example 1 + */ + target_id?: number; + /** @description The list of repository names to scope the user access token to. `repositories` may not be specified if `repository_ids` is specified. */ + repositories?: string[]; + /** + * @description The list of repository IDs to scope the user access token to. `repository_ids` may not be specified if `repositories` is specified. + * @example [ + * 1 + * ] + */ + repository_ids?: number[]; + permissions?: components["schemas"]["app-permissions"]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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`). + */ + "apps/get-by-slug": { + parameters: { + path: { + app_slug: components["parameters"]["app-slug"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get an assignment + * @description Gets a GitHub Classroom assignment. Assignment will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. + */ + "classroom/get-an-assignment": { + parameters: { + path: { + assignment_id: components["parameters"]["assignment-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["classroom-assignment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List accepted assignments for an assignment + * @description Lists any assignment repositories that have been created by students accepting a GitHub Classroom assignment. Accepted assignments will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. + */ + "classroom/list-accepted-assigments-for-an-assignment": { + parameters: { + query?: { + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + }; + path: { + assignment_id: components["parameters"]["assignment-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["classroom-accepted-assignment"][]; + }; + }; + }; + }; + /** + * Get assignment grades + * @description Gets grades for a GitHub Classroom assignment. Grades will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. + */ + "classroom/get-assignment-grades": { + parameters: { + path: { + assignment_id: components["parameters"]["assignment-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["classroom-assignment-grade"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List classrooms + * @description Lists GitHub Classroom classrooms for the current user. Classrooms will only be returned if the current user is an administrator of one or more GitHub Classrooms. + */ + "classroom/list-classrooms": { + parameters: { + query?: { + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-classroom"][]; + }; + }; + }; + }; + /** + * Get a classroom + * @description Gets a GitHub Classroom classroom for the current user. Classroom will only be returned if the current user is an administrator of the GitHub Classroom. + */ + "classroom/get-a-classroom": { + parameters: { + path: { + classroom_id: components["parameters"]["classroom-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["classroom"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List assignments for a classroom + * @description Lists GitHub Classroom assignments for a classroom. Assignments will only be returned if the current user is an administrator of the GitHub Classroom. + */ + "classroom/list-assignments-for-a-classroom": { + parameters: { + query?: { + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + }; + path: { + classroom_id: components["parameters"]["classroom-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-classroom-assignment"][]; + }; + }; + }; + }; + /** + * Get all codes of conduct + * @description Returns array of all GitHub's codes of conduct. + */ + "codes-of-conduct/get-all-codes-of-conduct": { + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["code-of-conduct"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Get a code of conduct + * @description Returns information about the specified GitHub code of conduct. + */ + "codes-of-conduct/get-conduct-code": { + parameters: { + path: { + key: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["code-of-conduct"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get emojis + * @description Lists all the emojis available to use on GitHub. + */ + "emojis/get": { + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + [key: string]: string; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Get a summary of Copilot usage for enterprise members + * @description **Note**: This endpoint is in beta and is subject to change. + * + * You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE + * for all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances, + * and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions. + * + * The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day, + * and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + * they must have telemetry enabled in their IDE. + * + * Only the owners and billing managers of enterprises with a Copilot Business or Enterprise subscription can view Copilot usage + * metrics for the enterprise. + * + * OAuth app tokens and personal access tokens (classic) need the `copilot`, `manage_billing:copilot`, `admin:enterprise`, or `manage_billing:enterprise` scope to use this endpoint. + */ + "copilot/usage-metrics-for-enterprise": { + parameters: { + query?: { + /** @description Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago. */ + since?: string; + /** @description Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed. */ + until?: string; + page?: components["parameters"]["page"]; + /** @description The number of days of metrics to display per page (max 28). 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)." */ + per_page?: number; + }; + path: { + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["copilot-usage-metrics"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * List Dependabot alerts for an enterprise + * @description Lists Dependabot alerts for repositories that are owned by the specified enterprise. + * + * 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. + */ + "dependabot/list-alerts-for-enterprise": { + parameters: { + query?: { + state?: components["parameters"]["dependabot-alert-comma-separated-states"]; + severity?: components["parameters"]["dependabot-alert-comma-separated-severities"]; + ecosystem?: components["parameters"]["dependabot-alert-comma-separated-ecosystems"]; + package?: components["parameters"]["dependabot-alert-comma-separated-packages"]; + scope?: components["parameters"]["dependabot-alert-scope"]; + sort?: components["parameters"]["dependabot-alert-sort"]; + direction?: components["parameters"]["direction"]; + before?: components["parameters"]["pagination-before"]; + after?: components["parameters"]["pagination-after"]; + first?: components["parameters"]["pagination-first"]; + last?: components["parameters"]["pagination-last"]; + per_page?: components["parameters"]["per-page"]; + }; + path: { + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert-with-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * List secret scanning alerts for an enterprise + * @description Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * + * 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. + */ + "secret-scanning/list-alerts-for-enterprise": { + parameters: { + query?: { + state?: components["parameters"]["secret-scanning-alert-state"]; + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + sort?: components["parameters"]["secret-scanning-alert-sort"]; + direction?: components["parameters"]["direction"]; + per_page?: components["parameters"]["per-page"]; + before?: components["parameters"]["pagination-before"]; + after?: components["parameters"]["pagination-after"]; + validity?: components["parameters"]["secret-scanning-alert-validity"]; + }; + path: { + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["organization-secret-scanning-alert"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List public events + * @description We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. + */ + "activity/list-public-events": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Get feeds + * @description 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`. 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. + */ + "activity/get-feeds": { + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["feed"]; + }; + }; + }; + }; + /** + * List gists for the authenticated user + * @description Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: + */ + "gists/list": { + parameters: { + query?: { + since?: components["parameters"]["since"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Create a gist + * @description Allows you to add a new gist with one or more files. + * + * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + */ + "gists/create": { + requestBody: { + content: { + "application/json": { + /** + * @description Description of the gist + * @example Example Ruby script + */ + description?: string; + /** + * @description Names and content for the files that make up the gist + * @example { + * "hello.rb": { + * "content": "puts \"Hello, World!\"" + * } + * } + */ + files: { + [key: string]: { + /** @description Content of the file */ + content: string; + }; + }; + public?: boolean | ("true" | "false"); + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/gists/aa5a315d61ae9438b18d */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List public gists + * @description List public gists sorted by most recently updated to least recently updated. + * + * 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. + */ + "gists/list-public": { + parameters: { + query?: { + since?: components["parameters"]["since"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List starred gists + * @description List the authenticated user's starred gists: + */ + "gists/list-starred": { + parameters: { + query?: { + since?: components["parameters"]["since"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Get a gist + * @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. + */ + "gists/get": { + parameters: { + path: { + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden_gist"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Delete a gist */ + "gists/delete": { + parameters: { + path: { + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "gists/update": { + parameters: { + path: { + gist_id: components["parameters"]["gist-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The description of the gist. + * @example Example Ruby script + */ + description?: string; + /** + * @description The gist files to be updated, renamed, or deleted. Each `key` must match the current filename + * (including extension) of the targeted gist file. For example: `hello.py`. + * + * To delete a file, set the whole file to null. For example: `hello.py : null`. + * @example { + * "hello.rb": { + * "content": "blah", + * "filename": "goodbye.rb" + * } + * } + */ + files?: { + [key: string]: { + /** @description The new content of the file. */ + content?: string; + /** @description The new filename for the file. */ + filename?: string | null; + }; + }; + } | null; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List gist comments + * @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. + */ + "gists/list-comments": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["gist-comment"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create a gist comment + * @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. + */ + "gists/create-comment": { + parameters: { + path: { + gist_id: components["parameters"]["gist-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/gists/a6db0bec360bb87e9418/comments/1 */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get a gist comment + * @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. + */ + "gists/get-comment": { + parameters: { + path: { + gist_id: components["parameters"]["gist-id"]; + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden_gist"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Delete a gist comment */ + "gists/delete-comment": { + parameters: { + path: { + gist_id: components["parameters"]["gist-id"]; + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Update a gist comment + * @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. + */ + "gists/update-comment": { + parameters: { + path: { + gist_id: components["parameters"]["gist-id"]; + comment_id: components["parameters"]["comment-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** List gist commits */ + "gists/list-commits": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + /** @example ; rel="next" */ + Link?: string; + }; + content: { + "application/json": components["schemas"]["gist-commit"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** List gist forks */ + "gists/list-forks": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["gist-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Fork a gist */ + "gists/fork": { + parameters: { + path: { + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/gists/aa5a315d61ae9438b18d */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["base-gist"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Check if a gist is starred */ + "gists/check-is-starred": { + parameters: { + path: { + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** @description Response if gist is starred */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + /** @description Not Found if gist is not starred */ + 404: { + content: { + "application/json": Record; + }; + }; + }; + }; + /** + * 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 method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." + */ + "gists/star": { + parameters: { + path: { + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Unstar a gist */ + "gists/unstar": { + parameters: { + path: { + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get a gist revision + * @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. + */ + "gists/get-revision": { + parameters: { + path: { + gist_id: components["parameters"]["gist-id"]; + sha: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get all gitignore templates + * @description List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/repos/repos#create-a-repository-for-the-authenticated-user). + */ + "gitignore/get-all-templates": { + responses: { + /** @description Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Get a gitignore template + * @description 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. + */ + "gitignore/get-template": { + parameters: { + path: { + name: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["gitignore-template"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * List repositories accessible to the app installation + * @description List repositories that an app installation can access. + */ + "apps/list-repos-accessible-to-installation": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + /** @example selected */ + repository_selection?: string; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Revoke an installation access token + * @description Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/apps/apps#create-an-installation-access-token-for-an-app)" endpoint. + */ + "apps/revoke-installation-access-token": { + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List issues assigned to the authenticated user + * @description List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * **Note**: GitHub's REST API 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`. + */ + "issues/list": { + parameters: { + query?: { + /** @description Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** @description Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + labels?: components["parameters"]["labels"]; + /** @description What to sort results by. */ + sort?: "created" | "updated" | "comments"; + direction?: components["parameters"]["direction"]; + since?: components["parameters"]["since"]; + collab?: boolean; + orgs?: boolean; + owned?: boolean; + pulls?: boolean; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get all commonly used licenses + * @description Lists the most commonly used licenses on GitHub. For more information, see "[Licensing a repository ](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)." + */ + "licenses/get-all-commonly-used": { + parameters: { + query?: { + featured?: boolean; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["license-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Get a license + * @description Gets information about a specific license. For more information, see "[Licensing a repository ](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)." + */ + "licenses/get": { + parameters: { + path: { + license: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["license"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Render a Markdown document */ + "markdown/render": { + requestBody: { + content: { + "application/json": { + /** @description The Markdown text to render in HTML. */ + text: string; + /** + * @description The rendering mode. + * @default markdown + * @example markdown + * @enum {string} + */ + mode?: "markdown" | "gfm"; + /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ + context?: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + "Content-Type": components["headers"]["content-type"]; + /** @example 279 */ + "Content-Length"?: string; + "X-CommonMarker-Version": components["headers"]["x-common-marker-version"]; + }; + content: { + "text/html": string; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Render a Markdown document in raw mode + * @description You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. + */ + "markdown/render-raw": { + requestBody?: { + content: { + "text/plain": string; + "text/x-markdown": string; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + "X-CommonMarker-Version": components["headers"]["x-common-marker-version"]; + }; + content: { + "text/html": string; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Get a subscription plan for an account + * @description Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/get-subscription-plan-for-account": { + parameters: { + path: { + account_id: components["parameters"]["account-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["marketplace-purchase"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + /** @description Not Found when the account has not purchased the listing */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * List plans + * @description Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-plans": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["marketplace-listing-plan"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List accounts for a plan + * @description Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-accounts-for-plan": { + parameters: { + query?: { + sort?: components["parameters"]["sort"]; + /** @description To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + plan_id: components["parameters"]["plan-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["marketplace-purchase"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get a subscription plan for an account (stubbed) + * @description Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/get-subscription-plan-for-account-stubbed": { + parameters: { + path: { + account_id: components["parameters"]["account-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["marketplace-purchase"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + /** @description Not Found when the account has not purchased the listing */ + 404: { + content: never; + }; + }; + }; + /** + * List plans (stubbed) + * @description Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-plans-stubbed": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["marketplace-listing-plan"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * List accounts for a plan (stubbed) + * @description Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-accounts-for-plan-stubbed": { + parameters: { + query?: { + sort?: components["parameters"]["sort"]; + /** @description To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + plan_id: components["parameters"]["plan-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["marketplace-purchase"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * Get GitHub meta information + * @description Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * The API's response also includes a list of GitHub's domain names. + * + * The values shown in the documentation's response are example values. You must always query the API directly to get the latest values. + * + * **Note:** This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. + */ + "meta/get": { + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["api-overview"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** List public events for a network of repositories */ + "activity/list-public-events-for-repo-network": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List notifications for the authenticated user + * @description List all notifications for the current user, sorted by most recently updated. + */ + "activity/list-notifications-for-authenticated-user": { + parameters: { + query?: { + all?: components["parameters"]["all"]; + participating?: components["parameters"]["participating"]; + since?: components["parameters"]["since"]; + before?: components["parameters"]["before"]; + page?: components["parameters"]["page"]; + /** @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)." */ + per_page?: number; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["thread"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Mark notifications as read + * @description Marks all notifications as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/rest/activity/notifications#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. + */ + "activity/mark-notifications-as-read": { + requestBody?: { + content: { + "application/json": { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + /** @description Whether the notification has been read. */ + read?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 202: { + content: { + "application/json": { + message?: string; + }; + }; + }; + /** @description Reset Content */ + 205: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Get a thread + * @description Gets information about a notification thread. + */ + "activity/get-thread": { + parameters: { + path: { + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["thread"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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. + */ + "activity/mark-thread-as-done": { + parameters: { + path: { + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** @description No content */ + 204: { + content: never; + }; + }; + }; + /** + * Mark a thread as read + * @description Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications. + */ + "activity/mark-thread-as-read": { + parameters: { + path: { + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** @description Reset Content */ + 205: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Get a thread subscription for the authenticated user + * @description This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/activity/watching#get-a-repository-subscription). + * + * Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread. + */ + "activity/get-thread-subscription-for-authenticated-user": { + parameters: { + path: { + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["thread-subscription"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Set a thread subscription + * @description If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/activity/notifications#delete-a-thread-subscription) endpoint. + */ + "activity/set-thread-subscription": { + parameters: { + path: { + thread_id: components["parameters"]["thread-id"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Whether to block all notifications from a thread. + * @default false + */ + ignored?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["thread-subscription"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Delete a thread subscription + * @description Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/activity/notifications#set-a-thread-subscription) endpoint and set `ignore` to `true`. + */ + "activity/delete-thread-subscription": { + parameters: { + path: { + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Get Octocat + * @description Get the octocat as ASCII art + */ + "meta/get-octocat": { + parameters: { + query?: { + /** @description The words to show in Octocat's speech bubble */ + s?: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/octocat-stream": string; + }; + }; + }; + }; + /** + * List organizations + * @description 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. + */ + "orgs/list": { + parameters: { + query?: { + since?: components["parameters"]["since-org"]; + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + /** @example ; rel="next" */ + Link?: string; + }; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Get an organization + * @description 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 + * + * 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. + */ + "orgs/get": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete an organization + * @description Deletes an organization and all its repositories. + * + * The organization login will be unavailable for 90 days after deletion. + * + * Please review the Terms of Service regarding account deletion before using this endpoint: + * + * https://docs.github.com/site-policy/github-terms/github-terms-of-service + */ + "orgs/delete": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Update an organization + * @description **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * 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. + */ + "orgs/update": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description Billing email address. This address is not publicized. */ + billing_email?: string; + /** @description The company name. */ + company?: string; + /** @description The publicly visible email address. */ + email?: string; + /** @description The Twitter username of the company. */ + twitter_username?: string; + /** @description The location. */ + location?: string; + /** @description The shorthand name of the company. */ + name?: string; + /** @description The description of the company. The maximum size is 160 characters. */ + description?: string; + /** @description Whether an organization can use organization projects. */ + has_organization_projects?: boolean; + /** @description Whether repositories that belong to the organization can use repository projects. */ + has_repository_projects?: boolean; + /** + * @description Default permission level members have for organization repositories. + * @default read + * @enum {string} + */ + default_repository_permission?: "read" | "write" | "admin" | "none"; + /** + * @description Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + * @default true + */ + members_can_create_repositories?: boolean; + /** @description Whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_internal_repositories?: boolean; + /** @description Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_private_repositories?: boolean; + /** @description Whether organization members can create public repositories, which are visible to anyone. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_public_repositories?: boolean; + /** + * @description Specifies which types of repositories non-admin organization members can create. `private` is only available to repositories that are part of an organization on GitHub Enterprise Cloud. + * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. + * @enum {string} + */ + members_allowed_repository_creation_type?: "all" | "private" | "none"; + /** + * @description Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_pages?: boolean; + /** + * @description Whether organization members can create public GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_public_pages?: boolean; + /** + * @description Whether organization members can create private GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_private_pages?: boolean; + /** + * @description Whether organization members can fork private organization repositories. + * @default false + */ + members_can_fork_private_repositories?: boolean; + /** + * @description Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface. + * @default false + */ + web_commit_signoff_required?: boolean; + /** @example "http://github.blog" */ + blog?: string; + /** + * @description Whether GitHub Advanced Security is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + advanced_security_enabled_for_new_repositories?: boolean; + /** + * @description Whether Dependabot alerts is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependabot_alerts_enabled_for_new_repositories?: boolean; + /** + * @description Whether Dependabot security updates is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependabot_security_updates_enabled_for_new_repositories?: boolean; + /** + * @description Whether dependency graph is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + dependency_graph_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + secret_scanning_enabled_for_new_repositories?: boolean; + /** + * @description Whether secret scanning push protection is automatically enabled for new repositories. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + */ + secret_scanning_push_protection_enabled_for_new_repositories?: boolean; + /** @description Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. */ + secret_scanning_push_protection_custom_link_enabled?: boolean; + /** @description If `secret_scanning_push_protection_custom_link_enabled` is true, the URL that will be displayed to contributors who are blocked from pushing a secret. */ + secret_scanning_push_protection_custom_link?: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-full"]; + }; + }; + 409: components["responses"]["conflict"]; + /** @description Validation failed */ + 422: { + content: { + "application/json": + | components["schemas"]["validation-error"] + | components["schemas"]["validation-error-simple"]; + }; + }; + }; + }; + /** + * Get GitHub Actions cache usage for an organization + * @description Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * + * OAuth tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. + */ + "actions/get-actions-cache-usage-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["actions-cache-usage-org-enterprise"]; + }; + }; + }; + }; + /** + * List repositories with GitHub Actions cache usage for an organization + * @description Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * + * OAuth tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. + */ + "actions/get-actions-cache-usage-by-repo-for-org": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + repository_cache_usages: components["schemas"]["actions-cache-usage-by-repository"][]; + }; + }; + }; + }; + }; + /** + * Get the customization template for an OIDC subject claim for an organization + * @description Gets the customization template for an OpenID Connect (OIDC) subject claim. + * + * OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. + */ + "oidc/get-oidc-custom-sub-template-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description A JSON serialized template for OIDC subject claim customization */ + 200: { + content: { + "application/json": components["schemas"]["oidc-custom-sub"]; + }; + }; + }; + }; + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + */ + "oidc/update-oidc-custom-sub-template-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["oidc-custom-sub"]; + }; + }; + responses: { + /** @description Empty response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get GitHub Actions permissions for an organization + * @description Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "actions/get-github-actions-permissions-organization": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-organization-permissions"]; + }; + }; + }; + }; + /** + * Set GitHub Actions permissions for an organization + * @description Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "actions/set-github-actions-permissions-organization": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List selected repositories enabled for GitHub Actions in an organization + * @description Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "actions/list-selected-repositories-enabled-github-actions-organization": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + }; + }; + /** + * Set selected repositories enabled for GitHub Actions in an organization + * @description Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "actions/set-selected-repositories-enabled-github-actions-organization": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository IDs to enable for GitHub Actions. */ + selected_repository_ids: number[]; + }; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Enable a selected repository for GitHub Actions in an organization + * @description Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "actions/enable-selected-repository-github-actions-organization": { + parameters: { + path: { + org: components["parameters"]["org"]; + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Disable a selected repository for GitHub Actions in an organization + * @description Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "actions/disable-selected-repository-github-actions-organization": { + parameters: { + path: { + org: components["parameters"]["org"]; + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * 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)." + * + * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "actions/get-allowed-actions-organization": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Set allowed actions and reusable workflows for an organization + * @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)." + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "actions/set-allowed-actions-organization": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Get default workflow permissions for an organization + * @description Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "actions/get-github-actions-default-workflow-permissions-organization": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Set default workflow permissions for an organization + * @description Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "actions/set-github-actions-default-workflow-permissions-organization": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + responses: { + /** @description Success response */ + 204: { + content: never; + }; + }; + }; + /** + * List self-hosted runners for an organization + * @description Lists all self-hosted runners configured in an organization. + * + * 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. + */ + "actions/list-self-hosted-runners-for-org": { + parameters: { + query?: { + /** @description The name of a self-hosted runner. */ + name?: string; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * List runner applications for an organization + * @description Lists binaries for the runner application that you can download and run. + * + * 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. + */ + "actions/list-runner-applications-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Create configuration for a just-in-time runner for an organization + * @description Generates a configuration that can be passed to the runner application at startup. + * + * 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. + */ + "actions/generate-runner-jitconfig-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the new runner. */ + name: string; + /** @description The ID of the runner group to register the runner to. */ + runner_group_id: number; + /** @description The names of the custom labels to add to the runner. **Minimum items**: 1. **Maximum items**: 100. */ + labels: string[]; + /** + * @description The working directory to be used for job execution, relative to the runner install directory. + * @default _work + */ + work_folder?: string; + }; + }; + }; + responses: { + 201: components["responses"]["actions_runner_jitconfig"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * 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. + * + * 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. + */ + "actions/create-registration-token-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Create a remove token for an organization + * @description Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * 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. + */ + "actions/create-remove-token-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Get a self-hosted runner for an organization + * @description Gets a specific self-hosted runner configured in an organization. + * + * 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. + */ + "actions/get-self-hosted-runner-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Delete a self-hosted runner from an organization + * @description Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * 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. + */ + "actions/delete-self-hosted-runner-from-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List labels for a self-hosted runner for an organization + * @description Lists all labels for a self-hosted runner configured in an organization. + * + * 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. + */ + "actions/list-labels-for-self-hosted-runner-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Set custom labels for a self-hosted runner for an organization + * @description Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * 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. + */ + "actions/set-custom-labels-for-self-hosted-runner-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + runner_id: components["parameters"]["runner-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Add custom labels to a self-hosted runner for an organization + * @description 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. + * + * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "actions/add-custom-labels-to-self-hosted-runner-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + runner_id: components["parameters"]["runner-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Remove all custom labels from a self-hosted runner for an organization + * @description Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * 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. + */ + "actions/remove-all-custom-labels-from-self-hosted-runner-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner for an organization + * @description Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * 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. + */ + "actions/remove-custom-label-from-self-hosted-runner-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + runner_id: components["parameters"]["runner-id"]; + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * List organization secrets + * @description Lists all secrets available in an organization 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 `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. + */ + "actions/list-org-secrets": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["organization-actions-secret"][]; + }; + }; + }; + }; + }; + /** + * 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. + * + * 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. + */ + "actions/get-org-public-key": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** + * Get an organization secret + * @description Gets a single organization secret without revealing its encrypted value. + * + * 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. + */ + "actions/get-org-secret": { + parameters: { + path: { + org: components["parameters"]["org"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-actions-secret"]; + }; + }; + }; + }; + /** + * Create or update an organization secret + * @description Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-org-secret": { + parameters: { + path: { + org: components["parameters"]["org"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: (number | string)[]; + }; + }; + }; + responses: { + /** @description Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** @description Response when updating a secret */ + 204: { + content: never; + }; + }; + }; + /** + * Delete an organization secret + * @description Deletes a secret in an organization 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`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. + */ + "actions/delete-org-secret": { + parameters: { + path: { + org: components["parameters"]["org"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * 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`. + * + * 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. + */ + "actions/list-selected-repos-for-org-secret": { + parameters: { + query?: { + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + }; + path: { + org: components["parameters"]["org"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** + * 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/actions/secrets#create-or-update-an-organization-secret). + * + * 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. + */ + "actions/set-selected-repos-for-org-secret": { + parameters: { + path: { + org: components["parameters"]["org"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Add selected repository to an organization secret](https://docs.github.com/rest/actions/secrets#add-selected-repository-to-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/actions/secrets#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * 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`. 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). + * + * 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. + */ + "actions/add-selected-repo-to-org-secret": { + parameters: { + path: { + org: components["parameters"]["org"]; + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** @description No Content when repository was added to the selected list */ + 204: { + content: never; + }; + /** @description Conflict when visibility type is not set to selected */ + 409: { + content: never; + }; + }; + }; + /** + * 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/actions/secrets#create-or-update-an-organization-secret). + * + * 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. + */ + "actions/remove-selected-repo-from-org-secret": { + parameters: { + path: { + org: components["parameters"]["org"]; + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** @description Response when repository was removed from the selected list */ + 204: { + content: never; + }; + /** @description Conflict when visibility type not set to selected */ + 409: { + content: never; + }; + }; + }; + /** + * List organization variables + * @description Lists all organization 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. + */ + "actions/list-org-variables": { + parameters: { + query?: { + per_page?: components["parameters"]["variables-per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + variables: components["schemas"]["organization-actions-variable"][]; + }; + }; + }; + }; + }; + /** + * Create an organization variable + * @description Creates an organization 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`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. + */ + "actions/create-org-variable": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name: string; + /** @description The value of the variable. */ + value: string; + /** + * @description The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + responses: { + /** @description Response when creating a variable */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + }; + /** + * Get an organization variable + * @description Gets a specific variable in an organization. + * + * 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. + */ + "actions/get-org-variable": { + parameters: { + path: { + org: components["parameters"]["org"]; + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-actions-variable"]; + }; + }; + }; + }; + /** + * Delete an organization variable + * @description Deletes an organization 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`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. + */ + "actions/delete-org-variable": { + parameters: { + path: { + org: components["parameters"]["org"]; + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Update an organization variable + * @description Updates an organization 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 `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. + */ + "actions/update-org-variable": { + parameters: { + path: { + org: components["parameters"]["org"]; + name: components["parameters"]["variable-name"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name?: string; + /** @description The value of the variable. */ + value?: string; + /** + * @description The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable. + * @enum {string} + */ + visibility?: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`. */ + selected_repository_ids?: number[]; + }; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List selected repositories for an organization variable + * @description Lists all repositories that can access an organization variable + * that is available to selected repositories. + * + * 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. + */ + "actions/list-selected-repos-for-org-variable": { + parameters: { + query?: { + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + }; + path: { + org: components["parameters"]["org"]; + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + /** @description Response when the visibility of the variable is not set to `selected` */ + 409: { + content: never; + }; + }; + }; + /** + * Set selected repositories for an organization variable + * @description Replaces all repositories for an organization variable that is available + * to selected repositories. Organization variables that are available to selected + * repositories have their `visibility` field set to `selected`. + * + * 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. + */ + "actions/set-selected-repos-for-org-variable": { + parameters: { + path: { + org: components["parameters"]["org"]; + name: components["parameters"]["variable-name"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The IDs of the repositories that can access the organization variable. */ + selected_repository_ids: number[]; + }; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + /** @description Response when the visibility of the variable is not set to `selected` */ + 409: { + content: never; + }; + }; + }; + /** + * Add selected repository to an organization variable + * @description 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`. + * + * 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. + */ + "actions/add-selected-repo-to-org-variable": { + parameters: { + path: { + org: components["parameters"]["org"]; + name: components["parameters"]["variable-name"]; + repository_id: number; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + /** @description Response when the visibility of the variable is not set to `selected` */ + 409: { + content: never; + }; + }; + }; + /** + * Remove selected repository from an organization variable + * @description Removes a repository from an organization variable that is + * available to selected repositories. Organization variables that are available to + * selected repositories have their `visibility` field set to `selected`. + * + * 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. + */ + "actions/remove-selected-repo-from-org-variable": { + parameters: { + path: { + org: components["parameters"]["org"]; + name: components["parameters"]["variable-name"]; + repository_id: number; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + /** @description Response when the visibility of the variable is not set to `selected` */ + 409: { + content: never; + }; + }; + }; + /** + * List users blocked by an organization + * @description List the users blocked by an organization. + */ + "orgs/list-blocked-users": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** + * Check if a user is blocked by an organization + * @description Returns a 204 if the given user is blocked by the given organization. Returns a 404 if the organization is not blocking the user, or if the user account has been identified as spam by GitHub. + */ + "orgs/check-blocked-user": { + parameters: { + path: { + org: components["parameters"]["org"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description If the user is blocked */ + 204: { + content: never; + }; + /** @description If the user is not blocked */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Block a user from an organization + * @description Blocks the given user on behalf of the specified organization and returns a 204. If the organization cannot block the given user a 422 is returned. + */ + "orgs/block-user": { + parameters: { + path: { + org: components["parameters"]["org"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Unblock a user from an organization + * @description Unblocks the given user on behalf of the specified organization. + */ + "orgs/unblock-user": { + parameters: { + path: { + org: components["parameters"]["org"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List code scanning alerts for an organization + * @description Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * 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 `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. + */ + "code-scanning/list-alerts-for-org": { + parameters: { + query?: { + tool_name?: components["parameters"]["tool-name"]; + tool_guid?: components["parameters"]["tool-guid"]; + before?: components["parameters"]["pagination-before"]; + after?: components["parameters"]["pagination-after"]; + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + direction?: components["parameters"]["direction"]; + /** @description If specified, only code scanning alerts with this state will be returned. */ + state?: components["schemas"]["code-scanning-alert-state-query"]; + /** @description The property by which to sort the results. */ + sort?: "created" | "updated"; + /** @description If specified, only code scanning alerts with this severity will be returned. */ + severity?: components["schemas"]["code-scanning-alert-severity"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["code-scanning-organization-alert-items"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List codespaces for the organization + * @description Lists the codespaces associated to a specified organization. + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "codespaces/list-in-organization": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Manage access control for organization codespaces + * @deprecated + * @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. + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "codespaces/set-codespaces-access": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Which users can access codespaces in the organization. `disabled` means that no users can access codespaces in the organization. + * @enum {string} + */ + visibility: + | "disabled" + | "selected_members" + | "all_members" + | "all_members_and_outside_collaborators"; + /** @description The usernames of the organization members who should have access to codespaces in the organization. Required when `visibility` is `selected_members`. The provided list of usernames will replace any existing value. */ + selected_usernames?: string[]; + }; + }; + }; + responses: { + /** @description Response when successfully modifying permissions. */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + /** @description Users are neither members nor collaborators of this organization. */ + 400: { + content: never; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Add users to Codespaces access for an organization + * @deprecated + * @description Codespaces for the specified users will be billed to the organization. + * + * 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "codespaces/set-codespaces-access-users": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The usernames of the organization members whose codespaces be billed to the organization. */ + selected_usernames: string[]; + }; + }; + }; + responses: { + /** @description Response when successfully modifying permissions. */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + /** @description Users are neither members nor collaborators of this organization. */ + 400: { + content: never; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Remove users from Codespaces access for an organization + * @deprecated + * @description Codespaces for the specified users will no longer be billed to the organization. + * + * 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "codespaces/delete-codespaces-access-users": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The usernames of the organization members whose codespaces should not be billed to the organization. */ + selected_usernames: string[]; + }; + }; + }; + responses: { + /** @description Response when successfully modifying permissions. */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + /** @description Users are neither members nor collaborators of this organization. */ + 400: { + content: never; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * List organization secrets + * @description 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. + */ + "codespaces/list-org-secrets": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["codespaces-org-secret"][]; + }; + }; + }; + }; + }; + /** + * 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. + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "codespaces/get-org-public-key": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-public-key"]; + }; + }; + }; + }; + /** + * Get an organization secret + * @description 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. + */ + "codespaces/get-org-secret": { + parameters: { + path: { + org: components["parameters"]["org"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["codespaces-org-secret"]; + }; + }; + }; + }; + /** + * Create or update an organization secret + * @description 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "codespaces/create-or-update-org-secret": { + parameters: { + path: { + org: components["parameters"]["org"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/codespaces/organization-secrets#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description The ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository IDs that can access the organization secret. You can only provide a list of repository IDs when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/codespaces/organization-secrets#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/codespaces/organization-secrets#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/codespaces/organization-secrets#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: number[]; + }; + }; + }; + responses: { + /** @description Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** @description Response when updating a secret */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Delete an organization secret + * @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. + */ + "codespaces/delete-org-secret": { + parameters: { + path: { + org: components["parameters"]["org"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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`. + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "codespaces/list-selected-repos-for-org-secret": { + parameters: { + query?: { + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + }; + path: { + org: components["parameters"]["org"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Set selected repositories for an organization secret + * @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. + */ + "codespaces/set-selected-repos-for-org-secret": { + parameters: { + path: { + org: components["parameters"]["org"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/codespaces/organization-secrets#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/codespaces/organization-secrets#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + /** @description Conflict when visibility type not set to selected */ + 409: { + content: never; + }; + }; + }; + /** + * Add selected repository to an organization secret + * @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. + */ + "codespaces/add-selected-repo-to-org-secret": { + parameters: { + path: { + org: components["parameters"]["org"]; + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** @description No Content when repository was added to the selected list */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + /** @description Conflict when visibility type is not set to selected */ + 409: { + content: never; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Remove selected repository from an organization secret + * @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. + */ + "codespaces/remove-selected-repo-from-org-secret": { + parameters: { + path: { + org: components["parameters"]["org"]; + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** @description Response when repository was removed from the selected list */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + /** @description Conflict when visibility type not set to selected */ + 409: { + content: never; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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 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 "[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 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. + */ + "copilot/get-copilot-organization-details": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description OK */ + 200: { + content: { + "application/json": components["schemas"]["copilot-organization-details"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + /** @description There is a problem with your account's associated payment method. */ + 422: { + content: never; + }; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * List all Copilot seat assignments for an organization + * @description **Note**: This endpoint is in beta and is subject to change. + * + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + */ + "copilot/list-copilot-seats": { + parameters: { + query?: { + page?: components["parameters"]["page"]; + /** @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)." */ + per_page?: number; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + /** @description Total number of Copilot seats for the organization currently being billed. */ + total_seats?: number; + seats?: components["schemas"]["copilot-seat-details"][]; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * 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 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 can configure GitHub Copilot in their 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. + */ + "copilot/add-copilot-seats-for-teams": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description List of team names within the organization to which to grant access to GitHub Copilot. */ + selected_teams: string[]; + }; + }; + }; + responses: { + /** @description OK */ + 201: { + content: { + "application/json": { + seats_created: number; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + /** @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. */ + 422: { + content: never; + }; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Remove teams from the Copilot subscription for an organization + * @description **Note**: This endpoint is in beta and is subject to change. + * + * 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 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)". + * + * Only organization owners can configure GitHub Copilot in their organization. + * + * OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + */ + "copilot/cancel-copilot-seat-assignment-for-teams": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of teams from which to revoke access to GitHub Copilot. */ + selected_teams: string[]; + }; + }; + }; + responses: { + /** @description OK */ + 200: { + content: { + "application/json": { + seats_cancelled: number; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + /** @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. */ + 422: { + content: never; + }; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * 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 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 can configure GitHub Copilot in their 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. + */ + "copilot/add-copilot-seats-for-users": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The usernames of the organization members to be granted access to GitHub Copilot. */ + selected_usernames: string[]; + }; + }; + }; + responses: { + /** @description OK */ + 201: { + content: { + "application/json": { + seats_created: number; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + /** @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. */ + 422: { + content: never; + }; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Remove users from the Copilot subscription for an organization + * @description **Note**: This endpoint is in beta and is subject to change. + * + * 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 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)". + * + * Only organization owners can configure GitHub Copilot in their organization. + * + * OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + */ + "copilot/cancel-copilot-seat-assignment-for-users": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The usernames of the organization members for which to revoke access to GitHub Copilot. */ + selected_usernames: string[]; + }; + }; + }; + responses: { + /** @description OK */ + 200: { + content: { + "application/json": { + seats_cancelled: number; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + /** @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 seat cannot be cancelled because it was assigned to them via a team. */ + 422: { + content: never; + }; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Get a summary of Copilot usage for organization members + * @description **Note**: This endpoint is in beta and is subject to change. + * + * You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE + * across an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. + * See the response schema tab for detailed metrics definitions. + * + * The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day, + * and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + * they must have telemetry enabled in their IDE. + * + * Copilot Business or Copilot Enterprise organization owners, and owners and billing managers of their parent enterprises, can view + * Copilot usage metrics. + * + * OAuth app tokens and personal access tokens (classic) need the `copilot`, `manage_billing:copilot`, `admin:org`, `admin:enterprise`, or `manage_billing:enterprise` scope to use this endpoint. + */ + "copilot/usage-metrics-for-org": { + parameters: { + query?: { + /** @description Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago. */ + since?: string; + /** @description Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed. */ + until?: string; + page?: components["parameters"]["page"]; + /** @description The number of days of metrics to display per page (max 28). 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)." */ + per_page?: number; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["copilot-usage-metrics"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * List Dependabot alerts for an organization + * @description Lists Dependabot alerts for an organization. + * + * 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 `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. + */ + "dependabot/list-alerts-for-org": { + parameters: { + query?: { + state?: components["parameters"]["dependabot-alert-comma-separated-states"]; + severity?: components["parameters"]["dependabot-alert-comma-separated-severities"]; + ecosystem?: components["parameters"]["dependabot-alert-comma-separated-ecosystems"]; + package?: components["parameters"]["dependabot-alert-comma-separated-packages"]; + scope?: components["parameters"]["dependabot-alert-scope"]; + sort?: components["parameters"]["dependabot-alert-sort"]; + direction?: components["parameters"]["direction"]; + before?: components["parameters"]["pagination-before"]; + after?: components["parameters"]["pagination-after"]; + first?: components["parameters"]["pagination-first"]; + last?: components["parameters"]["pagination-last"]; + per_page?: components["parameters"]["per-page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert-with-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * List organization secrets + * @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. + */ + "dependabot/list-org-secrets": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["organization-dependabot-secret"][]; + }; + }; + }; + }; + }; + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "dependabot/get-org-public-key": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + /** + * Get an organization secret + * @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. + */ + "dependabot/get-org-secret": { + parameters: { + path: { + org: components["parameters"]["org"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-dependabot-secret"]; + }; + }; + }; + }; + /** + * Create or update an organization secret + * @description Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "dependabot/create-or-update-org-secret": { + parameters: { + path: { + org: components["parameters"]["org"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: (string | number)[]; + }; + }; + }; + responses: { + /** @description Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** @description Response when updating a secret */ + 204: { + content: never; + }; + }; + }; + /** + * Delete an organization secret + * @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. + */ + "dependabot/delete-org-secret": { + parameters: { + path: { + org: components["parameters"]["org"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * 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`. + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "dependabot/list-selected-repos-for-org-secret": { + parameters: { + query?: { + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + }; + path: { + org: components["parameters"]["org"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** + * 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). + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "dependabot/set-selected-repos-for-org-secret": { + parameters: { + path: { + org: components["parameters"]["org"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/dependabot/secrets#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/dependabot/secrets#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * 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). + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "dependabot/add-selected-repo-to-org-secret": { + parameters: { + path: { + org: components["parameters"]["org"]; + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** @description No Content when repository was added to the selected list */ + 204: { + content: never; + }; + /** @description Conflict when visibility type is not set to selected */ + 409: { + content: never; + }; + }; + }; + /** + * 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). + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "dependabot/remove-selected-repo-from-org-secret": { + parameters: { + path: { + org: components["parameters"]["org"]; + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** @description Response when repository was removed from the selected list */ + 204: { + content: never; + }; + /** @description Conflict when visibility type not set to selected */ + 409: { + content: never; + }; + }; + }; + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. + */ + "packages/list-docker-migration-conflicting-packages-for-organization": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** List public organization events */ + "activity/list-public-org-events": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** + * List failed organization invitations + * @description The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. + */ + "orgs/list-failed-invitations": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List organization webhooks + * @description You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + "orgs/list-webhooks": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["org-hook"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create an organization webhook + * @description Create a hook that posts payloads in JSON format. + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or + * edit webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + "orgs/create-webhook": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Must be passed as "web". */ + name: string; + /** @description Key/value pairs to provide settings for this webhook. */ + config: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "kdaigle" */ + username?: string; + /** @example "password" */ + password?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. Set to `["*"]` to receive all possible events. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/orgs/octocat/hooks/1 */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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). + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + "orgs/get-webhook": { + parameters: { + path: { + org: components["parameters"]["org"]; + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete an organization webhook + * @description You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + "orgs/delete-webhook": { + parameters: { + path: { + org: components["parameters"]["org"]; + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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)". + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + "orgs/update-webhook": { + parameters: { + path: { + org: components["parameters"]["org"]; + hook_id: components["parameters"]["hook-id"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + /** @example "web" */ + name?: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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)." + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + "orgs/get-webhook-config-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * 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)." + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + "orgs/update-webhook-config-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + hook_id: components["parameters"]["hook-id"]; + }; + }; + requestBody?: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * List deliveries for an organization webhook + * @description Returns a list of webhook deliveries for a webhook configured in an organization. + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + "orgs/list-webhook-deliveries": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + cursor?: components["parameters"]["cursor"]; + redelivery?: boolean; + }; + path: { + org: components["parameters"]["org"]; + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get a webhook delivery for an organization webhook + * @description Returns a delivery for a webhook configured in an organization. + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + "orgs/get-webhook-delivery": { + parameters: { + path: { + org: components["parameters"]["org"]; + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Redeliver a delivery for an organization webhook + * @description Redeliver a delivery for a webhook configured in an organization. + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + "orgs/redeliver-webhook-delivery": { + parameters: { + path: { + org: components["parameters"]["org"]; + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Ping an organization webhook + * @description This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) + * to be sent to the hook. + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + "orgs/ping-webhook": { + parameters: { + path: { + org: components["parameters"]["org"]; + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get an organization installation for the authenticated app + * @description Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-org-installation": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + /** + * 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. + * + * 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. + */ + "orgs/list-app-installations": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + installations: components["schemas"]["installation"][]; + }; + }; + }; + }; + }; + /** + * Get interaction restrictions for an organization + * @description Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. + */ + "interactions/get-restrictions-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": + | components["schemas"]["interaction-limit-response"] + | Record; + }; + }; + }; + }; + /** + * Set interaction restrictions for an organization + * @description Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. + */ + "interactions/set-restrictions-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Remove interaction restrictions for an organization + * @description Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. + */ + "interactions/remove-restrictions-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List pending organization invitations + * @description The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, or `hiring_manager`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + */ + "orgs/list-pending-invitations": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + /** @description Filter invitations by their member role. */ + role?: + | "all" + | "admin" + | "direct_member" + | "billing_manager" + | "hiring_manager"; + /** @description Filter invitations by their invitation source. */ + invitation_source?: "all" | "member" | "scim"; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create an organization invitation + * @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. 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)." + */ + "orgs/create-invitation": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description **Required unless you provide `email`**. GitHub user ID for the person you are inviting. */ + invitee_id?: number; + /** @description **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. */ + email?: string; + /** + * @description The role for the new member. + * * `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. + * * `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. + * * `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. + * * `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. + * @default direct_member + * @enum {string} + */ + role?: "admin" | "direct_member" | "billing_manager" | "reinstate"; + /** @description Specify IDs for the teams you want to invite new members to. */ + team_ids?: number[]; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["organization-invitation"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Cancel an organization invitation + * @description Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + "orgs/cancel-invitation": { + parameters: { + path: { + org: components["parameters"]["org"]; + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List organization invitation teams + * @description List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. + */ + "orgs/list-invitation-teams": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List organization issues assigned to the authenticated user + * @description List issues in an organization assigned to the authenticated user. + * + * **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`. + */ + "issues/list-for-org": { + parameters: { + query?: { + /** @description Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** @description Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + labels?: components["parameters"]["labels"]; + /** @description What to sort results by. */ + sort?: "created" | "updated" | "comments"; + direction?: components["parameters"]["direction"]; + since?: components["parameters"]["since"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List organization members + * @description List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. + */ + "orgs/list-members": { + parameters: { + query?: { + /** @description Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. */ + filter?: "2fa_disabled" | "all"; + /** @description Filter members returned by their role. */ + role?: "all" | "admin" | "member"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Check organization membership for a user + * @description Check if a user is, publicly or privately, a member of the organization. + */ + "orgs/check-membership-for-user": { + parameters: { + path: { + org: components["parameters"]["org"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response if requester is an organization member and user is a member */ + 204: { + content: never; + }; + /** @description Response if requester is not an organization member */ + 302: { + headers: { + /** @example https://api.github.com/orgs/github/public_members/pezra */ + Location?: string; + }; + content: never; + }; + /** @description Not Found if requester is an organization member and user is not a member */ + 404: { + content: never; + }; + }; + }; + /** + * Remove an organization member + * @description Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. + */ + "orgs/remove-member": { + parameters: { + path: { + org: components["parameters"]["org"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * List codespaces for a user in organization + * @description Lists the codespaces that a member of an organization has for repositories in that organization. + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "codespaces/get-codespaces-for-user-in-org": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Delete a codespace from the organization + * @description Deletes a user's codespace. + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "codespaces/delete-from-organization": { + parameters: { + path: { + org: components["parameters"]["org"]; + username: components["parameters"]["username"]; + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Stop a codespace for an organization user + * @description Stops a user's codespace. + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + "codespaces/stop-in-organization": { + parameters: { + path: { + org: components["parameters"]["org"]; + username: components["parameters"]["username"]; + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Get Copilot seat assignment details for a user + * @description **Note**: This endpoint is in beta and is subject to change. + * + * Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. + * + * 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. + */ + "copilot/get-copilot-seat-details-for-user": { + parameters: { + path: { + org: components["parameters"]["org"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description The user's GitHub Copilot seat details, including usage. */ + 200: { + content: { + "application/json": components["schemas"]["copilot-seat-details"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + /** @description Copilot Business or Enterprise is not enabled for this organization or the user has a pending organization invitation. */ + 422: { + content: never; + }; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Get organization membership for a user + * @description In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. + */ + "orgs/get-membership-for-user": { + parameters: { + path: { + org: components["parameters"]["org"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Set organization membership for a user + * @description Only authenticated organization owners can add a member to the organization or update the member's role. + * + * * If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/orgs/members#get-organization-membership-for-a-user) will be `pending` until they accept the invitation. + * + * * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent. + * + * **Rate limits** + * + * To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. + */ + "orgs/set-membership-for-user": { + parameters: { + path: { + org: components["parameters"]["org"]; + username: components["parameters"]["username"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description The role to give the user in the organization. Can be one of: + * * `admin` - The user will become an owner of the organization. + * * `member` - The user will become a non-owner member of the organization. + * @default member + * @enum {string} + */ + role?: "admin" | "member"; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Remove organization membership for a user + * @description In order to remove a user's membership with an organization, the authenticated user must be an organization owner. + * + * If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. + */ + "orgs/remove-membership-for-user": { + parameters: { + path: { + org: components["parameters"]["org"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List organization migrations + * @description Lists the most recent migrations, including both exports (which can be started through the REST API) and imports (which cannot be started using the REST API). + * + * A list of `repositories` is only returned for export migrations. + */ + "migrations/list-for-org": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + /** @description Exclude attributes from the API response to improve performance */ + exclude?: "repositories"[]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["migration"][]; + }; + }; + }; + }; + /** + * Start an organization migration + * @description Initiates the generation of a migration archive. + */ + "migrations/start-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description A list of arrays indicating which repositories should be migrated. */ + repositories: string[]; + /** + * @description Indicates whether repositories should be locked (to prevent manipulation) while migrating data. + * @default false + * @example true + */ + lock_repositories?: boolean; + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @default false + */ + exclude_metadata?: boolean; + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @default false + */ + exclude_git_data?: boolean; + /** + * @description Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_attachments?: boolean; + /** + * @description Indicates whether releases should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_releases?: boolean; + /** + * @description Indicates whether projects owned by the organization or users should be excluded. from the migration. + * @default false + * @example true + */ + exclude_owner_projects?: boolean; + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean; + /** @description Exclude related items from being returned in the response in order to improve performance of the request. */ + exclude?: "repositories"[]; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get an organization migration status + * @description Fetches the status of a migration. + * + * The `state` of a migration can be one of the following values: + * + * * `pending`, which means the migration hasn't started yet. + * * `exporting`, which means the migration is in progress. + * * `exported`, which means the migration finished successfully. + * * `failed`, which means the migration failed. + */ + "migrations/get-status-for-org": { + parameters: { + query?: { + /** @description Exclude attributes from the API response to improve performance */ + exclude?: "repositories"[]; + }; + path: { + org: components["parameters"]["org"]; + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** + * @description * `pending`, which means the migration hasn't started yet. + * * `exporting`, which means the migration is in progress. + * * `exported`, which means the migration finished successfully. + * * `failed`, which means the migration failed. + */ + 200: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Download an organization migration archive + * @description Fetches the URL to a migration archive. + */ + "migrations/download-archive-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** @description Response */ + 302: { + content: never; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete an organization migration archive + * @description Deletes a previous migration archive. Migration archives are automatically deleted after seven days. + */ + "migrations/delete-archive-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Unlock an organization repository + * @description Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/repos/repos#delete-a-repository) when the migration is complete and you no longer need the source data. + */ + "migrations/unlock-repo-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + migration_id: components["parameters"]["migration-id"]; + repo_name: components["parameters"]["repo-name"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List repositories in an organization migration + * @description List all the repositories for this organization migration. + */ + "migrations/list-repos-for-org": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "orgs/list-organization-fine-grained-permissions": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-fine-grained-permission"][]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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. + */ + "orgs/list-org-roles": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response - list of organization roles */ + 200: { + content: { + "application/json": { + /** @description The total number of organization roles available to the organization. */ + total_count?: number; + /** @description The list of organization roles available to the organization. */ + roles?: components["schemas"]["organization-role"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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. + */ + "orgs/create-custom-organization-role": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the custom role. */ + name: string; + /** @description A short description about the intended usage of this role or what permissions it grants. */ + description?: string; + /** @description A list of additional permissions included in this role. */ + permissions: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["organization-role"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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. + */ + "orgs/revoke-all-org-roles-team": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * 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. + */ + "orgs/assign-team-to-org-role": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + role_id: components["parameters"]["role-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + /** @description Response if the organization, team or role does not exist. */ + 404: { + content: never; + }; + /** @description Response if the organization roles feature is not enabled for the organization, or validation failed. */ + 422: { + content: never; + }; + }; + }; + /** + * 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. + */ + "orgs/revoke-org-role-team": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + role_id: components["parameters"]["role-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * 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. + */ + "orgs/revoke-all-org-roles-user": { + parameters: { + path: { + org: components["parameters"]["org"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * 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. + */ + "orgs/assign-user-to-org-role": { + parameters: { + path: { + org: components["parameters"]["org"]; + username: components["parameters"]["username"]; + role_id: components["parameters"]["role-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + /** @description Response if the organization, user or role does not exist. */ + 404: { + content: never; + }; + /** @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. */ + 422: { + content: never; + }; + }; + }; + /** + * 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. + */ + "orgs/revoke-org-role-user": { + parameters: { + path: { + org: components["parameters"]["org"]; + username: components["parameters"]["username"]; + role_id: components["parameters"]["role-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * 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. + */ + "orgs/get-org-role": { + parameters: { + path: { + org: components["parameters"]["org"]; + role_id: components["parameters"]["role-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-role"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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. + */ + "orgs/delete-custom-organization-role": { + parameters: { + path: { + org: components["parameters"]["org"]; + role_id: components["parameters"]["role-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * 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. + */ + "orgs/patch-custom-organization-role": { + parameters: { + path: { + org: components["parameters"]["org"]; + role_id: components["parameters"]["role-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the custom role. */ + name?: string; + /** @description A short description about the intended usage of this role or what permissions it grants. */ + description?: string; + /** @description A list of additional permissions included in this role. */ + permissions?: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-role"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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. + */ + "orgs/list-org-role-teams": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + role_id: components["parameters"]["role-id"]; + }; + }; + responses: { + /** @description Response - List of assigned teams */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + /** @description Response if the organization or role does not exist. */ + 404: { + content: never; + }; + /** @description Response if the organization roles feature is not enabled or validation failed. */ + 422: { + content: never; + }; + }; + }; + /** + * 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. + */ + "orgs/list-org-role-users": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + role_id: components["parameters"]["role-id"]; + }; + }; + responses: { + /** @description Response - List of assigned users */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + /** @description Response if the organization or role does not exist. */ + 404: { + content: never; + }; + /** @description Response if the organization roles feature is not enabled or validation failed. */ + 422: { + content: never; + }; + }; + }; + /** + * List outside collaborators for an organization + * @description List all users who are outside collaborators of an organization. + */ + "orgs/list-outside-collaborators": { + parameters: { + query?: { + /** @description Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. */ + filter?: "2fa_disabled" | "all"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** + * Convert an organization member to outside collaborator + * @description When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + */ + "orgs/convert-member-to-outside-collaborator": { + parameters: { + path: { + org: components["parameters"]["org"]; + username: components["parameters"]["username"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description When set to `true`, the request will be performed asynchronously. Returns a 202 status code when the job is successfully queued. + * @default false + */ + async?: boolean; + }; + }; + }; + responses: { + /** @description User is getting converted asynchronously */ + 202: { + content: { + "application/json": Record; + }; + }; + /** @description User was converted */ + 204: { + content: never; + }; + /** @description Forbidden if user is the last owner of the organization, not a member of the organization, or if the enterprise enforces a policy for inviting outside collaborators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + 403: { + content: never; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove outside collaborator from an organization + * @description Removing a user from this list will remove them from all the organization's repositories. + */ + "orgs/remove-outside-collaborator": { + parameters: { + path: { + org: components["parameters"]["org"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + /** @description Unprocessable Entity if user is a member of the organization */ + 422: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + }; + /** + * List packages for an organization + * @description Lists packages in an organization readable by the user. + * + * 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)." + */ + "packages/list-packages-for-organization": { + parameters: { + query: { + /** @description The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + visibility?: components["parameters"]["package-visibility"]; + /** @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)." */ + page?: number; + /** @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)." */ + per_page?: number; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 400: components["responses"]["package_es_list_error"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Get a package for an organization + * @description Gets a specific package in an organization. + * + * 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)." + */ + "packages/get-package-for-organization": { + parameters: { + path: { + package_type: components["parameters"]["package-type"]; + package_name: components["parameters"]["package-name"]; + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Delete a package for an organization + * @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. + * + * 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)." + */ + "packages/delete-package-for-org": { + parameters: { + path: { + package_type: components["parameters"]["package-type"]; + package_name: components["parameters"]["package-name"]; + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restore a package for an organization + * @description Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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)." + */ + "packages/restore-package-for-org": { + parameters: { + query?: { + /** @description package token */ + token?: string; + }; + path: { + package_type: components["parameters"]["package-type"]; + package_name: components["parameters"]["package-name"]; + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List package versions for a package owned by an organization + * @description Lists package versions for a package owned by an organization. + * + * 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)." + */ + "packages/get-all-package-versions-for-package-owned-by-org": { + parameters: { + query?: { + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + /** @description The state of the package, either active or deleted. */ + state?: "active" | "deleted"; + }; + path: { + package_type: components["parameters"]["package-type"]; + package_name: components["parameters"]["package-name"]; + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get a package version for an organization + * @description Gets a specific package version in an organization. + * + * 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)." + */ + "packages/get-package-version-for-organization": { + parameters: { + path: { + package_type: components["parameters"]["package-type"]; + package_name: components["parameters"]["package-name"]; + org: components["parameters"]["org"]; + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Delete package version for an organization + * @description Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * 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)." + */ + "packages/delete-package-version-for-org": { + parameters: { + path: { + package_type: components["parameters"]["package-type"]; + package_name: components["parameters"]["package-name"]; + org: components["parameters"]["org"]; + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restore package version for an organization + * @description Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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)." + */ + "packages/restore-package-version-for-org": { + parameters: { + path: { + package_type: components["parameters"]["package-type"]; + package_name: components["parameters"]["package-name"]; + org: components["parameters"]["org"]; + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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 use this endpoint. + */ + "orgs/list-pat-grant-requests": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + sort?: components["parameters"]["personal-access-token-sort"]; + direction?: components["parameters"]["direction"]; + owner?: components["parameters"]["personal-access-token-owner"]; + repository?: components["parameters"]["personal-access-token-repository"]; + permission?: components["parameters"]["personal-access-token-permission"]; + last_used_before?: components["parameters"]["personal-access-token-before"]; + last_used_after?: components["parameters"]["personal-access-token-after"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["organization-programmatic-access-grant-request"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * 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 use this endpoint. + */ + "orgs/review-pat-grant-requests-in-bulk": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Unique identifiers of the requests for access via fine-grained personal access token. Must be formed of between 1 and 100 `pat_request_id` values. */ + pat_request_ids?: number[]; + /** + * @description Action to apply to the requests. + * @enum {string} + */ + action: "approve" | "deny"; + /** @description Reason for approving or denying the requests. Max 1024 characters. */ + reason?: string | null; + }; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * 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 use this endpoint. + */ + "orgs/review-pat-grant-request": { + parameters: { + path: { + org: components["parameters"]["org"]; + /** @description Unique identifier of the request for access via fine-grained personal access token. */ + pat_request_id: number; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Action to apply to the request. + * @enum {string} + */ + action: "approve" | "deny"; + /** @description Reason for approving or denying the request. Max 1024 characters. */ + reason?: string | null; + }; + }; + }; + responses: { + 204: components["responses"]["no_content"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * 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 use this endpoint. + */ + "orgs/list-pat-grant-request-repositories": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + /** @description Unique identifier of the request for access via fine-grained personal access token. */ + pat_request_id: number; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * 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 use this endpoint. + */ + "orgs/list-pat-grants": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + sort?: components["parameters"]["personal-access-token-sort"]; + direction?: components["parameters"]["direction"]; + owner?: components["parameters"]["personal-access-token-owner"]; + repository?: components["parameters"]["personal-access-token-repository"]; + permission?: components["parameters"]["personal-access-token-permission"]; + last_used_before?: components["parameters"]["personal-access-token-before"]; + last_used_after?: components["parameters"]["personal-access-token-after"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["organization-programmatic-access-grant"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * 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 use this endpoint. + */ + "orgs/update-pat-accesses": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Action to apply to the fine-grained personal access token. + * @enum {string} + */ + action: "revoke"; + /** @description The IDs of the fine-grained personal access tokens. */ + pat_ids: number[]; + }; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * 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 use this endpoint. + */ + "orgs/update-pat-access": { + parameters: { + path: { + org: components["parameters"]["org"]; + pat_id: components["parameters"]["fine-grained-personal-access-token-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Action to apply to the fine-grained personal access token. + * @enum {string} + */ + action: "revoke"; + }; + }; + }; + responses: { + 204: components["responses"]["no_content"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * 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 use this endpoint. + */ + "orgs/list-pat-grant-repositories": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + /** @description Unique identifier of the fine-grained personal access token. */ + pat_id: number; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * List organization projects + * @description Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + "projects/list-for-org": { + parameters: { + query?: { + /** @description Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Create an organization project + * @description Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + "projects/create-for-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Get all custom properties for an organization + * @description Gets all custom properties defined for an organization. + * Organization members can read these properties. + */ + "orgs/get-all-custom-properties": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["org-custom-property"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "orgs/create-or-update-custom-properties": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The array of custom properties to create or update. */ + properties: components["schemas"]["org-custom-property"][]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["org-custom-property"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get a custom property for an organization + * @description Gets a custom property that is defined for an organization. + * Organization members can read these properties. + */ + "orgs/get-custom-property": { + parameters: { + path: { + org: components["parameters"]["org"]; + custom_property_name: components["parameters"]["custom-property-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["org-custom-property"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "orgs/create-or-update-custom-property": { + parameters: { + path: { + org: components["parameters"]["org"]; + custom_property_name: components["parameters"]["custom-property-name"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The type of the value for the property + * @example single_select + * @enum {string} + */ + value_type: "string" | "single_select"; + /** @description Whether the property is required. */ + required?: boolean; + /** @description Default value of the property */ + default_value?: string | string[] | null; + /** @description Short description of the property */ + description?: string | null; + /** + * @description An ordered list of the allowed values of the property. + * The property can have up to 200 allowed values. + */ + allowed_values?: string[] | null; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["org-custom-property"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "orgs/remove-custom-property": { + parameters: { + path: { + org: components["parameters"]["org"]; + custom_property_name: components["parameters"]["custom-property-name"]; + }; + }; + responses: { + 204: components["responses"]["no_content"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List custom property values for organization repositories + * @description Lists organization repositories with all of their custom property values. + * Organization members can read these properties. + */ + "orgs/list-custom-properties-values-for-repos": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + /** @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. */ + repository_query?: string; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["org-repo-custom-property-values"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "orgs/create-or-update-custom-properties-values-for-repos": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of repositories that the custom property values will be applied to. */ + repository_names: string[]; + /** @description List of custom property names and associated values to apply to the repositories. */ + properties: components["schemas"]["custom-property-value"][]; + }; + }; + }; + responses: { + /** @description No Content when custom property values are successfully created or updated */ + 204: { + content: never; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List public organization members + * @description Members of an organization can choose to have their membership publicized or not. + */ + "orgs/list-public-members": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** + * Check public organization membership for a user + * @description Check if the provided user is a public member of the organization. + */ + "orgs/check-public-membership-for-user": { + parameters: { + path: { + org: components["parameters"]["org"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response if user is a public member */ + 204: { + content: never; + }; + /** @description Not Found if user is not a public member */ + 404: { + content: never; + }; + }; + }; + /** + * Set public organization membership for the authenticated user + * @description The user can publicize their own membership. (A user cannot publicize the membership for another user.) + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." + */ + "orgs/set-public-membership-for-authenticated-user": { + parameters: { + path: { + org: components["parameters"]["org"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Remove public organization membership for the authenticated user + * @description Removes the public membership for the authenticated user from the specified organization, unless public visibility is enforced by default. + */ + "orgs/remove-public-membership-for-authenticated-user": { + parameters: { + path: { + org: components["parameters"]["org"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List organization repositories + * @description Lists repositories for the specified organization. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "repos/list-for-org": { + parameters: { + query?: { + /** @description Specifies the types of repositories you want returned. */ + type?: "all" | "public" | "private" | "forks" | "sources" | "member"; + /** @description The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** @description The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Create an organization repository + * @description Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * 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. + */ + "repos/create-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the repository. */ + name: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean; + /** + * @description The visibility of the repository. + * @enum {string} + */ + visibility?: "public" | "private"; + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean; + /** + * @description Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + * @default true + */ + has_projects?: boolean; + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads?: boolean; + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean; + /** @description The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. */ + team_id?: number; + /** + * @description Pass `true` to create an initial commit with empty README. + * @default false + */ + auto_init?: boolean; + /** @description Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". */ + gitignore_template?: string; + /** @description Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://docs.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". */ + license_template?: string; + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean; + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean; + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. **The authenticated user must be an organization owner to set this property to `true`.** + * @default false + */ + delete_branch_on_merge?: boolean; + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** @description The custom properties for the new repository. The keys are the custom property names, and the values are the corresponding custom property values. */ + custom_properties?: { + [key: string]: unknown; + }; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get all organization repository rulesets + * @description Get all the repository rulesets for an organization. + */ + "repos/get-org-rulesets": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-ruleset"][]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Create an organization repository ruleset + * @description Create a repository ruleset for an organization. + */ + "repos/create-org-ruleset": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + /** @description Request body */ + requestBody: { + content: { + "application/json": { + /** @description The name of the ruleset. */ + name: string; + /** + * @description The target of the ruleset + * + * **Note**: The `push` target is in beta and is subject to change. + * @enum {string} + */ + target?: "branch" | "tag" | "push"; + enforcement: components["schemas"]["repository-rule-enforcement"]; + /** @description The actors that can bypass the rules in this ruleset */ + bypass_actors?: components["schemas"]["repository-ruleset-bypass-actor"][]; + conditions?: components["schemas"]["org-ruleset-conditions"]; + /** @description An array of rules within the ruleset. */ + rules?: components["schemas"]["repository-rule"][]; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["repository-ruleset"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * 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)." + */ + "repos/get-org-rule-suites": { + parameters: { + query?: { + repository_name?: components["parameters"]["repository-name-in-query"]; + time_period?: components["parameters"]["time-period"]; + actor_name?: components["parameters"]["actor-name-in-query"]; + rule_suite_result?: components["parameters"]["rule-suite-result"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["rule-suites"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * 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)." + */ + "repos/get-org-rule-suite": { + parameters: { + path: { + org: components["parameters"]["org"]; + rule_suite_id: components["parameters"]["rule-suite-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["rule-suite"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Get an organization repository ruleset + * @description Get a repository ruleset for an organization. + */ + "repos/get-org-ruleset": { + parameters: { + path: { + org: components["parameters"]["org"]; + /** @description The ID of the ruleset. */ + ruleset_id: number; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-ruleset"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Update an organization repository ruleset + * @description Update a ruleset for an organization. + */ + "repos/update-org-ruleset": { + parameters: { + path: { + org: components["parameters"]["org"]; + /** @description The ID of the ruleset. */ + ruleset_id: number; + }; + }; + /** @description Request body */ + requestBody?: { + content: { + "application/json": { + /** @description The name of the ruleset. */ + name?: string; + /** + * @description The target of the ruleset + * + * **Note**: The `push` target is in beta and is subject to change. + * @enum {string} + */ + target?: "branch" | "tag" | "push"; + enforcement?: components["schemas"]["repository-rule-enforcement"]; + /** @description The actors that can bypass the rules in this ruleset */ + bypass_actors?: components["schemas"]["repository-ruleset-bypass-actor"][]; + conditions?: components["schemas"]["org-ruleset-conditions"]; + /** @description An array of rules within the ruleset. */ + rules?: components["schemas"]["repository-rule"][]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-ruleset"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Delete an organization repository ruleset + * @description Delete a ruleset for an organization. + */ + "repos/delete-org-ruleset": { + parameters: { + path: { + org: components["parameters"]["org"]; + /** @description The ID of the ruleset. */ + ruleset_id: number; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * List secret scanning alerts for an organization + * @description Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * + * 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. + */ + "secret-scanning/list-alerts-for-org": { + parameters: { + query?: { + state?: components["parameters"]["secret-scanning-alert-state"]; + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + sort?: components["parameters"]["secret-scanning-alert-sort"]; + direction?: components["parameters"]["direction"]; + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + before?: components["parameters"]["secret-scanning-pagination-before-org-repo"]; + after?: components["parameters"]["secret-scanning-pagination-after-org-repo"]; + validity?: components["parameters"]["secret-scanning-alert-validity"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["organization-secret-scanning-alert"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List repository security advisories for an organization + * @description Lists repository security advisories for an organization. + * + * 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. + */ + "security-advisories/list-org-repository-advisories": { + parameters: { + query?: { + direction?: components["parameters"]["direction"]; + /** @description The property to sort the results by. */ + sort?: "created" | "updated" | "published"; + before?: components["parameters"]["pagination-before"]; + after?: components["parameters"]["pagination-after"]; + /** @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)." */ + per_page?: number; + /** @description Filter by the state of the repository advisories. Only advisories of this state will be returned. */ + state?: "triage" | "draft" | "published" | "closed"; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-advisory"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List security manager teams + * @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)." + * + * 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 `read:org` scope to use this endpoint. + */ + "orgs/list-security-manager-teams": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-simple"][]; + }; + }; + }; + }; + /** + * Add a security manager team + * @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." + * + * The authenticated user must be an administrator for the organization to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + */ + "orgs/add-security-manager-team": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + /** @description The organization has reached the maximum number of security manager teams. */ + 409: { + content: never; + }; + }; + }; + /** + * Remove a security manager team + * @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." + * + * 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. + */ + "orgs/remove-security-manager-team": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Get GitHub Actions billing for an organization + * @description Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint. + */ + "billing/get-github-actions-billing-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Get GitHub Packages billing for an organization + * @description Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint. + */ + "billing/get-github-packages-billing-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Get shared storage billing for an organization + * @description Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint. + */ + "billing/get-shared-storage-billing-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** + * Get a summary of Copilot usage for a team + * @description **Note**: This endpoint is in beta and is subject to change. + * + * You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE + * for users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. + * See the response schema tab for detailed metrics definitions. + * + * The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day, + * and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + * they must have telemetry enabled in their IDE. + * + * **Note**: This endpoint will only return results for a given day if the team had five or more members on that day. + * + * Copilot Business or Copilot Enterprise organization owners for the organization that contains this team, + * and owners and billing managers of their parent enterprises, can view Copilot usage metrics for a team. + * + * OAuth app tokens and personal access tokens (classic) need the `copilot`, `manage_billing:copilot`, `admin:org`, `admin:enterprise`, or `manage_billing:enterprise` scope to use this endpoint. + */ + "copilot/usage-metrics-for-team": { + parameters: { + query?: { + /** @description Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago. */ + since?: string; + /** @description Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed. */ + until?: string; + page?: components["parameters"]["page"]; + /** @description The number of days of metrics to display per page (max 28). 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)." */ + per_page?: number; + }; + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["copilot-usage-metrics"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * List teams + * @description Lists all teams in an organization that are visible to the authenticated user. + */ + "teams/list": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Create a team + * @description To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://docs.github.com/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + "teams/create": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name: string; + /** @description The description of the team. */ + description?: string; + /** @description List GitHub IDs for organization members who will become team maintainers. */ + maintainers?: string[]; + /** @description The full name (e.g., "organization-name/repository-name") of repositories to add the team to. */ + repo_names?: string[]; + /** + * @description The level of privacy this team should have. The options are: + * **For a non-nested team:** + * * `secret` - only visible to organization owners and members of this team. + * * `closed` - visible to all members of this organization. + * Default: `secret` + * **For a parent or child team:** + * * `closed` - visible to all members of this organization. + * Default for child team: `closed` + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description The notification setting the team has chosen. The options are: + * * `notifications_enabled` - team members receive notifications when the team is @mentioned. + * * `notifications_disabled` - no one receives notifications. + * Default: `notifications_enabled` + * @enum {string} + */ + notification_setting?: + | "notifications_enabled" + | "notifications_disabled"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get a team by name + * @description Gets a team using the team's `slug`. To create the `slug`, GitHub replaces special characters in the `name` string, changes all words to lowercase, and replaces spaces with a `-` separator. For example, `"My TEam Näme"` would become `my-team-name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + "teams/get-by-name": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete a team + * @description To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + "teams/delete-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Update a team + * @description To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + "teams/update-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The name of the team. */ + name?: string; + /** @description The description of the team. */ + description?: string; + /** + * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. The options are: + * **For a non-nested team:** + * * `secret` - only visible to organization owners and members of this team. + * * `closed` - visible to all members of this organization. + * **For a parent or child team:** + * * `closed` - visible to all members of this organization. + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description The notification setting the team has chosen. Editing teams without specifying this parameter leaves `notification_setting` intact. The options are: + * * `notifications_enabled` - team members receive notifications when the team is @mentioned. + * * `notifications_disabled` - no one receives notifications. + * @enum {string} + */ + notification_setting?: + | "notifications_enabled" + | "notifications_disabled"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null; + }; + }; + }; + responses: { + /** @description Response when the updated information already exists */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List discussions + * @description 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. + */ + "teams/list-discussions-in-org": { + parameters: { + query?: { + direction?: components["parameters"]["direction"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + /** @description Pinned discussions only filter */ + pinned?: string; + }; + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["team-discussion"][]; + }; + }; + }; + }; + /** + * Create a discussion + * @description 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)." + * + * **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. + */ + "teams/create-discussion-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title: string; + /** @description The discussion post's body text. */ + body: string; + /** + * @description Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. + * @default false + */ + private?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * Get a discussion + * @description 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. + */ + "teams/get-discussion-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * Delete a discussion + * @description 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. + */ + "teams/delete-discussion-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Update a discussion + * @description 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. + */ + "teams/update-discussion-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * List discussion comments + * @description 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. + */ + "teams/list-discussion-comments-in-org": { + parameters: { + query?: { + direction?: components["parameters"]["direction"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["team-discussion-comment"][]; + }; + }; + }; + }; + /** + * Create a discussion comment + * @description 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)." + * + * **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. + */ + "teams/create-discussion-comment-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * Get a discussion comment + * @description 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. + */ + "teams/get-discussion-comment-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + discussion_number: components["parameters"]["discussion-number"]; + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * Delete a discussion comment + * @description 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. + */ + "teams/delete-discussion-comment-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + discussion_number: components["parameters"]["discussion-number"]; + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Update a discussion comment + * @description 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. + */ + "teams/update-discussion-comment-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + discussion_number: components["parameters"]["discussion-number"]; + comment_number: components["parameters"]["comment-number"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * 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). + * + * **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. + */ + "reactions/list-for-team-discussion-comment-in-org": { + parameters: { + query?: { + /** @description Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + discussion_number: components["parameters"]["discussion-number"]; + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * 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). + * + * 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. + */ + "reactions/create-for-team-discussion-comment-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + discussion_number: components["parameters"]["discussion-number"]; + comment_number: components["parameters"]["comment-number"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the team discussion comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + responses: { + /** @description Response when the reaction type has already been added to this team discussion comment */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + }; + /** + * Delete team discussion comment reaction + * @description **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). + * + * OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + */ + "reactions/delete-for-team-discussion-comment": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + discussion_number: components["parameters"]["discussion-number"]; + comment_number: components["parameters"]["comment-number"]; + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List reactions for a team discussion + * @description 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. + */ + "reactions/list-for-team-discussion-in-org": { + parameters: { + query?: { + /** @description Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * Create reaction for a team discussion + * @description 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. + */ + "reactions/create-for-team-discussion-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the team discussion. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + }; + /** + * Delete team discussion reaction + * @description **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). + * + * OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + */ + "reactions/delete-for-team-discussion": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + discussion_number: components["parameters"]["discussion-number"]; + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List pending team invitations + * @description The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + "teams/list-pending-invitations-in-org": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + }; + }; + /** + * List team members + * @description Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + "teams/list-members-in-org": { + parameters: { + query?: { + /** @description Filters members returned by their role in the team. */ + role?: "member" | "maintainer" | "all"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** + * Get team membership for a user + * @description Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/teams/teams#create-a-team). + */ + "teams/get-membership-for-user-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** @description if user has no team membership */ + 404: { + content: never; + }; + }; + }; + /** + * Add or update team membership for a user + * @description Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + "teams/add-or-update-membership-for-user-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + username: components["parameters"]["username"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** @description Forbidden if team synchronization is set up */ + 403: { + content: never; + }; + /** @description Unprocessable Entity if you attempt to add an organization to a team */ + 422: { + content: never; + }; + }; + }; + /** + * Remove team membership for a user + * @description To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + "teams/remove-membership-for-user-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + /** @description Forbidden if team synchronization is set up */ + 403: { + content: never; + }; + }; + }; + /** + * List team projects + * @description Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + "teams/list-projects-in-org": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["team-project"][]; + }; + }; + }; + }; + /** + * Check team permissions for a project + * @description Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/check-permissions-for-project-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** @description Not Found if project is not managed by this team */ + 404: { + content: never; + }; + }; + }; + /** + * Add or update team project permissions + * @description Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/add-or-update-project-permissions-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + project_id: components["parameters"]["project-id"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description The permission to grant to the team for this project. Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + } | null; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + /** @description Forbidden if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + }; + /** + * Remove a project from a team + * @description Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/remove-project-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List team repositories + * @description Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + "teams/list-repos-in-org": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Check team permissions for a repository + * @description Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked. + * + * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * 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}`. + */ + "teams/check-permissions-for-repo-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Alternative response with repository permissions */ + 200: { + content: { + "application/json": components["schemas"]["team-repository"]; + }; + }; + /** @description Response if team has permission for the repository. This is the response when the repository media type hasn't been provded in the Accept header. */ + 204: { + content: never; + }; + /** @description Not Found if team does not have permission for the repository */ + 404: { + content: never; + }; + }; + }; + /** + * 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 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}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + "teams/add-or-update-repo-permissions-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description The permission to grant the team on this repository. We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @default push + */ + permission?: string; + }; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Remove a repository from a team + * @description If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + "teams/remove-repo-in-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List child teams + * @description Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + "teams/list-child-in-org": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + org: components["parameters"]["org"]; + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** @description if child teams exist */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + }; + }; + /** + * Enable or disable a security feature for an organization + * @description 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)." + * + * The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + */ + "orgs/enable-or-disable-security-product-on-all-org-repos": { + parameters: { + path: { + org: components["parameters"]["org"]; + security_product: components["parameters"]["security-product"]; + enablement: components["parameters"]["org-security-product-enablement"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description CodeQL query suite to be used. If you specify the `query_suite` parameter, the default setup will be configured with this query suite only on all repositories that didn't have default setup already configured. It will not change the query suite on repositories that already have default setup configured. + * If you don't specify any `query_suite` in your request, the preferred query suite of the organization will be applied. + * @enum {string} + */ + query_suite?: "default" | "extended"; + }; + }; + }; + responses: { + /** @description Action started */ + 204: { + content: never; + }; + /** @description The action could not be taken due to an in progress enablement, or a policy is preventing enablement */ + 422: { + content: never; + }; + }; + }; + /** + * Get a project card + * @description Gets information about a project card. + */ + "projects/get-card": { + parameters: { + path: { + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete a project card + * @description Deletes a project card + */ + "projects/delete-card": { + parameters: { + path: { + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** @description Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Update an existing project card */ + "projects/update-card": { + parameters: { + path: { + card_id: components["parameters"]["card-id"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description The project card's note + * @example Update all gems + */ + note?: string | null; + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Move a project card */ + "projects/move-card": { + parameters: { + path: { + card_id: components["parameters"]["card-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The position of the card in a column. Can be one of: `top`, `bottom`, or `after:` to place after the specified card. + * @example bottom + */ + position: string; + /** + * @description The unique identifier of the column the card should be moved to + * @example 42 + */ + column_id?: number; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": Record; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** @description Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + resource?: string; + field?: string; + }[]; + }; + }; + }; + 422: components["responses"]["validation_failed"]; + /** @description Response */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + }[]; + }; + }; + }; + }; + }; + /** + * Get a project column + * @description Gets information about a project column. + */ + "projects/get-column": { + parameters: { + path: { + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete a project column + * @description Deletes a project column. + */ + "projects/delete-column": { + parameters: { + path: { + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Update an existing project column */ + "projects/update-column": { + parameters: { + path: { + column_id: components["parameters"]["column-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * List project cards + * @description Lists the project cards in a project. + */ + "projects/list-cards": { + parameters: { + query?: { + /** @description Filters the project cards that are returned by the card's state. */ + archived_state?: "all" | "archived" | "not_archived"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["project-card"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Create a project card */ + "projects/create-card": { + parameters: { + path: { + column_id: components["parameters"]["column-id"]; + }; + }; + requestBody: { + content: { + "application/json": OneOf< + [ + { + /** + * @description The project card's note + * @example Update all gems + */ + note: string | null; + }, + { + /** + * @description The unique identifier of the content associated with the card + * @example 42 + */ + content_id: number; + /** + * @description The piece of content associated with the card + * @example PullRequest + */ + content_type: string; + }, + ] + >; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** @description Validation failed */ + 422: { + content: { + "application/json": + | components["schemas"]["validation-error"] + | components["schemas"]["validation-error-simple"]; + }; + }; + /** @description Response */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + }[]; + }; + }; + }; + }; + }; + /** Move a project column */ + "projects/move-column": { + parameters: { + path: { + column_id: components["parameters"]["column-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The position of the column in a project. Can be one of: `first`, `last`, or `after:` to place after the specified column. + * @example last + */ + position: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": Record; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Get a project + * @description Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + "projects/get": { + parameters: { + path: { + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Delete a project + * @description Deletes a project board. Returns a `404 Not Found` status if projects are disabled. + */ + "projects/delete": { + parameters: { + path: { + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** @description Delete Success */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** @description Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * Update a project + * @description Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + "projects/update": { + parameters: { + path: { + project_id: components["parameters"]["project-id"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Name of the project + * @example Week One Sprint + */ + name?: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null; + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state?: string; + /** + * @description The baseline permission that all organization members have on this project + * @enum {string} + */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** @description Whether or not this project can be seen by everyone. */ + private?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** @description Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + /** @description Not Found if the authenticated user does not have access to the project */ + 404: { + content: never; + }; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * List project collaborators + * @description Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. + */ + "projects/list-collaborators": { + parameters: { + query?: { + /** @description Filters the collaborators by their affiliation. `outside` means outside collaborators of a project that are not a member of the project's organization. `direct` means collaborators with permissions to a project, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: "outside" | "direct" | "all"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Add project collaborator + * @description Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. + */ + "projects/add-collaborator": { + parameters: { + path: { + project_id: components["parameters"]["project-id"]; + username: components["parameters"]["username"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description The permission to grant the collaborator. + * @default write + * @example write + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + } | null; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Remove user as a collaborator + * @description Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. + */ + "projects/remove-collaborator": { + parameters: { + path: { + project_id: components["parameters"]["project-id"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get project permission for a user + * @description Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. + */ + "projects/get-permission-for-user": { + parameters: { + path: { + project_id: components["parameters"]["project-id"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["project-collaborator-permission"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List project columns + * @description Lists the project columns in a project. + */ + "projects/list-columns": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["project-column"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Create a project column + * @description Creates a new project column. + */ + "projects/create-column": { + parameters: { + path: { + project_id: components["parameters"]["project-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Get rate limit status for the authenticated user + * @description **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * 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/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)." + * * The `dependency_snapshots` object provides your rate limit status for submitting snapshots to the dependency graph. For more information, see "[Dependency graph](https://docs.github.com/rest/dependency-graph)." + * * The `code_scanning_upload` object provides your rate limit status for uploading SARIF results to code scanning. For more information, see "[Uploading a SARIF file to GitHub](https://docs.github.com/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github)." + * * The `actions_runner_registration` object provides your rate limit status for registering self-hosted runners in GitHub Actions. For more information, see "[Self-hosted runners](https://docs.github.com/rest/actions/self-hosted-runners)." + * * The `source_import` object is no longer in use for any API endpoints, and it will be removed in the next API version. For more information about API versions, see "[API Versions](https://docs.github.com/rest/overview/api-versions)." + * + * **Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. + */ + "rate-limit/get": { + responses: { + /** @description Response */ + 200: { + headers: { + "X-RateLimit-Limit": components["headers"]["x-rate-limit-limit"]; + "X-RateLimit-Remaining": components["headers"]["x-rate-limit-remaining"]; + "X-RateLimit-Reset": components["headers"]["x-rate-limit-reset"]; + }; + content: { + "application/json": components["schemas"]["rate-limit-overview"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get a repository + * @description The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + "repos/get": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete a repository + * @description 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. + */ + "repos/delete": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 307: components["responses"]["temporary_redirect"]; + /** @description If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Update a repository + * @description **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/repos/repos#replace-all-repository-topics) endpoint. + */ + "repos/update": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The name of the repository. */ + name?: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Either `true` to make the repository private or `false` to make it public. Default: `false`. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. + * @default false + */ + private?: boolean; + /** + * @description The visibility of the repository. + * @enum {string} + */ + visibility?: "public" | "private"; + /** + * @description Specify which security and analysis features to enable or disable for the repository. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request: + * `{ "security_and_analysis": {"advanced_security": { "status": "enabled" } } }`. + * + * You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. + */ + security_and_analysis?: { + /** @description Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." */ + advanced_security?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + /** @description Use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." */ + secret_scanning?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + /** @description Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." */ + secret_scanning_push_protection?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + } | null; + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean; + /** + * @description Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + * @default true + */ + has_projects?: boolean; + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean; + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean; + /** @description Updates the default branch for this repository. */ + default_branch?: string; + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean; + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean; + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean; + /** + * @description Either `true` to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise. + * @default false + */ + allow_update_branch?: boolean; + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether to archive this repository. `false` will unarchive a previously archived repository. + * @default false + */ + archived?: boolean; + /** + * @description Either `true` to allow private forks, or `false` to prevent private forks. + * @default false + */ + allow_forking?: boolean; + /** + * @description Either `true` to require contributors to sign off on web-based commits, or `false` to not require contributors to sign off on web-based commits. + * @default false + */ + web_commit_signoff_required?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 307: components["responses"]["temporary_redirect"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List artifacts for a repository + * @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. + */ + "actions/list-artifacts-for-repo": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + name?: components["parameters"]["artifact-name"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + }; + }; + }; + }; + }; + /** + * 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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/get-artifact": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + artifact_id: components["parameters"]["artifact-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["artifact"]; + }; + }; + }; + }; + /** + * Delete an artifact + * @description Deletes an artifact for a workflow run. + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/delete-artifact": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + artifact_id: components["parameters"]["artifact-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Download an artifact + * @description Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/download-artifact": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + artifact_id: components["parameters"]["artifact-id"]; + archive_format: string; + }; + }; + responses: { + /** @description Response */ + 302: { + headers: { + Location: components["headers"]["location"]; + }; + content: never; + }; + 410: components["responses"]["gone"]; + }; + }; + /** + * Get GitHub Actions cache usage for a repository + * @description Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * + * Anyone with read access to the repository can use this endpoint. + * + * If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/get-actions-cache-usage": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-usage-by-repository"]; + }; + }; + }; + }; + /** + * List GitHub Actions caches for a repository + * @description Lists the GitHub Actions caches for a repository. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/get-actions-cache-list": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + ref?: components["parameters"]["actions-cache-git-ref-full"]; + key?: components["parameters"]["actions-cache-key"]; + sort?: components["parameters"]["actions-cache-list-sort"]; + direction?: components["parameters"]["direction"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + /** + * Delete GitHub Actions caches for a repository (using a cache key) + * @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. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/delete-actions-cache-by-key": { + parameters: { + query: { + key: components["parameters"]["actions-cache-key-required"]; + ref?: components["parameters"]["actions-cache-git-ref-full"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + /** + * Delete a GitHub Actions cache for a repository (using a cache ID) + * @description Deletes a GitHub Actions cache for a repository, using a cache ID. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/delete-actions-cache-by-id": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + cache_id: components["parameters"]["cache-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * 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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/get-job-for-workflow-run": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["job"]; + }; + }; + }; + }; + /** + * 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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/download-job-logs-for-workflow-run": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** @description Response */ + 302: { + headers: { + /** @example https://pipelines.actions.githubusercontent.com/ab1f3cCFPB34Nd6imvFxpGZH5hNlDp2wijMwl2gDoO0bcrrlJj/_apis/pipelines/1/jobs/19/signedlogcontent?urlExpires=2020-01-22T22%3A44%3A54.1389777Z&urlSigningMethod=HMACV1&urlSignature=2TUDfIg4fm36OJmfPy6km5QD5DLCOkBVzvhWZM8B%2BUY%3D */ + Location?: string; + }; + content: never; + }; + }; + }; + /** + * Re-run a job from a workflow run + * @description Re-run a job and its dependent jobs in a workflow run. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/re-run-job-for-workflow-run": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + job_id: components["parameters"]["job-id"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Get the customization template for an OIDC subject claim for a repository + * @description Gets the customization template for an OpenID Connect (OIDC) subject claim. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/get-custom-oidc-sub-claim-for-repo": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Status response */ + 200: { + content: { + "application/json": components["schemas"]["oidc-custom-sub-repo"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/set-custom-oidc-sub-claim-for-repo": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Whether to use the default template or not. If `true`, the `include_claim_keys` field is ignored. */ + use_default: boolean; + /** @description Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. */ + include_claim_keys?: string[]; + }; + }; + }; + responses: { + /** @description Empty response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * List repository organization secrets + * @description Lists all organization secrets shared with a repository 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. + */ + "actions/list-repo-organization-secrets": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + }; + }; + }; + }; + }; + /** + * List repository organization variables + * @description Lists all organization variables shared with a repository. + * + * 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. + */ + "actions/list-repo-organization-variables": { + parameters: { + query?: { + per_page?: components["parameters"]["variables-per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + variables: components["schemas"]["actions-variable"][]; + }; + }; + }; + }; + }; + /** + * Get GitHub Actions permissions for a repository + * @description Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/get-github-actions-permissions-repository": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-repository-permissions"]; + }; + }; + }; + }; + /** + * Set GitHub Actions permissions for a repository + * @description Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/set-github-actions-permissions-repository": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Get the level of access for workflows outside of the repository + * @description Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/get-workflow-access-to-repository": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + }; + }; + /** + * Set the level of access for workflows outside of the repository + * @description Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to 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)". + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/set-workflow-access-to-repository": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Get allowed actions and reusable workflows for a repository + * @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)." + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/get-allowed-actions-repository": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Set allowed actions and reusable workflows for a repository + * @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)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/set-allowed-actions-repository": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Get default workflow permissions for a repository + * @description Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/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)." + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/get-github-actions-default-workflow-permissions-repository": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Set default workflow permissions for a repository + * @description Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/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)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/set-github-actions-default-workflow-permissions-repository": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + responses: { + /** @description Success response */ + 204: { + content: never; + }; + /** @description Conflict response when changing a setting is prevented by the owning organization */ + 409: { + content: never; + }; + }; + }; + /** + * List self-hosted runners for a repository + * @description Lists all self-hosted runners configured in a repository. + * + * 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. + */ + "actions/list-self-hosted-runners-for-repo": { + parameters: { + query?: { + /** @description The name of a self-hosted runner. */ + name?: string; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * List runner applications for a repository + * @description Lists binaries for the runner application that you can download and run. + * + * 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. + */ + "actions/list-runner-applications-for-repo": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Create configuration for a just-in-time runner for a repository + * @description Generates a configuration that can be passed to the runner application at startup. + * + * 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. + */ + "actions/generate-runner-jitconfig-for-repo": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the new runner. */ + name: string; + /** @description The ID of the runner group to register the runner to. */ + runner_group_id: number; + /** @description The names of the custom labels to add to the runner. **Minimum items**: 1. **Maximum items**: 100. */ + labels: string[]; + /** + * @description The working directory to be used for job execution, relative to the runner install directory. + * @default _work + */ + work_folder?: string; + }; + }; + }; + responses: { + 201: components["responses"]["actions_runner_jitconfig"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Create a registration token for a repository + * @description Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * 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. + */ + "actions/create-registration-token-for-repo": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Create a remove token for a repository + * @description 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. + * + * 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 repository to use this endpoint. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/create-remove-token-for-repo": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Get a self-hosted runner for a repository + * @description Gets a specific self-hosted runner configured in a repository. + * + * 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. + */ + "actions/get-self-hosted-runner-for-repo": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Delete a self-hosted runner from a repository + * @description Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * 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. + */ + "actions/delete-self-hosted-runner-from-repo": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List labels for a self-hosted runner for a repository + * @description Lists all labels for a self-hosted runner configured in a repository. + * + * 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. + */ + "actions/list-labels-for-self-hosted-runner-for-repo": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Set custom labels for a self-hosted runner for a repository + * @description Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * 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. + */ + "actions/set-custom-labels-for-self-hosted-runner-for-repo": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + runner_id: components["parameters"]["runner-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Add custom labels to a self-hosted runner for a repository + * @description Adds custom labels to a self-hosted runner configured in a repository. + * + * 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. + */ + "actions/add-custom-labels-to-self-hosted-runner-for-repo": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + runner_id: components["parameters"]["runner-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Remove all custom labels from a self-hosted runner for a repository + * @description Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * 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. + */ + "actions/remove-all-custom-labels-from-self-hosted-runner-for-repo": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner for a repository + * @description Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * 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. + */ + "actions/remove-custom-label-from-self-hosted-runner-for-repo": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + runner_id: components["parameters"]["runner-id"]; + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * 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/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. + * + * 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`. + */ + "actions/list-workflow-runs-for-repo": { + parameters: { + query?: { + actor?: components["parameters"]["actor"]; + branch?: components["parameters"]["workflow-run-branch"]; + event?: components["parameters"]["event"]; + status?: components["parameters"]["workflow-run-status"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + created?: components["parameters"]["created"]; + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + head_sha?: components["parameters"]["workflow-run-head-sha"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** + * Get a workflow run + * @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. + */ + "actions/get-workflow-run": { + parameters: { + query?: { + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + /** + * Delete a workflow run + * @description 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. + */ + "actions/delete-workflow-run": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Get the review history for a workflow run + * @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. + */ + "actions/get-reviews-for-run": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["environment-approvals"][]; + }; + }; + }; + }; + /** + * Approve a workflow run for a fork pull request + * @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)." + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/approve-workflow-run": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List workflow run artifacts + * @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. + */ + "actions/list-workflow-run-artifacts": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + name?: components["parameters"]["artifact-name"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + }; + }; + }; + }; + }; + /** + * Get a workflow run attempt + * @description 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. + */ + "actions/get-workflow-run-attempt": { + parameters: { + query?: { + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + run_id: components["parameters"]["run-id"]; + attempt_number: components["parameters"]["attempt-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + /** + * List jobs for a workflow run attempt + * @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. + */ + "actions/list-jobs-for-workflow-run-attempt": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + run_id: components["parameters"]["run-id"]; + attempt_number: components["parameters"]["attempt-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + jobs: components["schemas"]["job"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/download-workflow-run-attempt-logs": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + run_id: components["parameters"]["run-id"]; + attempt_number: components["parameters"]["attempt-number"]; + }; + }; + responses: { + /** @description Response */ + 302: { + headers: { + /** @example https://pipelines.actions.githubusercontent.com/ab1f3cCFPB34Nd6imvFxpGZH5hNlDp2wijMwl2gDoO0bcrrlJj/_apis/pipelines/1/runs/19/signedlogcontent?urlExpires=2020-01-22T22%3A44%3A54.1389777Z&urlSigningMethod=HMACV1&urlSignature=2TUDfIg4fm36OJmfPy6km5QD5DLCOkBVzvhWZM8B%2BUY%3D */ + Location?: string; + }; + content: never; + }; + }; + }; + /** + * Cancel a workflow run + * @description Cancels a workflow run using its `id`. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/cancel-workflow-run": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** @description Response */ + 202: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 409: components["responses"]["conflict"]; + }; + }; + /** + * Review custom deployment protection rules for a workflow run + * @description Approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." + * + * **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). + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + */ + "actions/review-custom-gates-for-run": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + run_id: components["parameters"]["run-id"]; + }; + }; + requestBody: { + content: { + "application/json": + | components["schemas"]["review-custom-gates-comment-required"] + | components["schemas"]["review-custom-gates-state-required"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * 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. + */ + "actions/force-cancel-workflow-run": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** @description Response */ + 202: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 409: components["responses"]["conflict"]; + }; + }; + /** + * List jobs for a workflow run + * @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. + */ + "actions/list-jobs-for-workflow-run": { + parameters: { + query?: { + /** @description Filters jobs by their `completed_at` timestamp. `latest` returns jobs from the most recent execution of the workflow run. `all` returns all jobs for a workflow run, including from old executions of the workflow run. */ + filter?: "latest" | "all"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + jobs: components["schemas"]["job"][]; + }; + }; + }; + }; + }; + /** + * 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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/download-workflow-run-logs": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** @description Response */ + 302: { + headers: { + /** @example https://pipelines.actions.githubusercontent.com/ab1f3cCFPB34Nd6imvFxpGZH5hNlDp2wijMwl2gDoO0bcrrlJj/_apis/pipelines/1/runs/19/signedlogcontent?urlExpires=2020-01-22T22%3A44%3A54.1389777Z&urlSigningMethod=HMACV1&urlSignature=2TUDfIg4fm36OJmfPy6km5QD5DLCOkBVzvhWZM8B%2BUY%3D */ + Location?: string; + }; + content: never; + }; + }; + }; + /** + * Delete workflow run logs + * @description Deletes all logs for a workflow run. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/delete-workflow-run-logs": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 403: components["responses"]["forbidden"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Get pending deployments for a workflow run + * @description Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. + * + * If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/get-pending-deployments-for-run": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["pending-deployment"][]; + }; + }; + }; + }; + /** + * Review pending deployments for a workflow run + * @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. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/review-pending-deployments-for-run": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + run_id: components["parameters"]["run-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The list of environment ids to approve or reject + * @example [ + * 161171787, + * 161171795 + * ] + */ + environment_ids: number[]; + /** + * @description Whether to approve or reject deployment to the specified environments. + * @example approved + * @enum {string} + */ + state: "approved" | "rejected"; + /** + * @description A comment to accompany the deployment review + * @example Ship it! + */ + comment: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment"][]; + }; + }; + }; + }; + /** + * Re-run a workflow + * @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. + */ + "actions/re-run-workflow": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + run_id: components["parameters"]["run-id"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + }; + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/re-run-workflow-failed-jobs": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + run_id: components["parameters"]["run-id"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + }; + /** + * Get workflow run usage + * @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. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + */ + "actions/get-workflow-run-usage": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run-usage"]; + }; + }; + }; + }; + /** + * List repository secrets + * @description Lists all secrets available in a repository 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. + */ + "actions/list-repo-secrets": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + }; + }; + }; + }; + }; + /** + * 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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/get-repo-public-key": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** + * Get a repository secret + * @description Gets a single repository secret without revealing its encrypted value. + * + * 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. + */ + "actions/get-repo-secret": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + /** + * Create or update a repository secret + * @description Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). 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. + */ + "actions/create-or-update-repo-secret": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/actions/secrets#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + responses: { + /** @description Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** @description Response when updating a secret */ + 204: { + content: never; + }; + }; + }; + /** + * Delete a repository secret + * @description Deletes a secret in a repository 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. + */ + "actions/delete-repo-secret": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List repository variables + * @description Lists all repository 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. + */ + "actions/list-repo-variables": { + parameters: { + query?: { + per_page?: components["parameters"]["variables-per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + variables: components["schemas"]["actions-variable"][]; + }; + }; + }; + }; + }; + /** + * Create a repository variable + * @description Creates a repository 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. + */ + "actions/create-repo-variable": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name: string; + /** @description The value of the variable. */ + value: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + }; + /** + * Get a repository variable + * @description Gets a specific variable in a repository. + * + * 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. + */ + "actions/get-repo-variable": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-variable"]; + }; + }; + }; + }; + /** + * Delete a repository variable + * @description Deletes a repository 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. + */ + "actions/delete-repo-variable": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Update a repository variable + * @description Updates a repository 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. + */ + "actions/update-repo-variable": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + name: components["parameters"]["variable-name"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name?: string; + /** @description The value of the variable. */ + value?: string; + }; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List repository workflows + * @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. + */ + "actions/list-repo-workflows": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + workflows: components["schemas"]["workflow"][]; + }; + }; + }; + }; + }; + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + */ + "actions/get-workflow": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow"]; + }; + }; + }; + }; + /** + * Disable a workflow + * @description Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/disable-workflow": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Create a workflow dispatch event + * @description You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/create-workflow-dispatch": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The git reference for the workflow. The reference can be a branch or tag name. */ + ref: string; + /** @description Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. */ + inputs?: { + [key: string]: unknown; + }; + }; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Enable a workflow + * @description Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "actions/enable-workflow": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * 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/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. + */ + "actions/list-workflow-runs": { + parameters: { + query?: { + actor?: components["parameters"]["actor"]; + branch?: components["parameters"]["workflow-run-branch"]; + event?: components["parameters"]["event"]; + status?: components["parameters"]["workflow-run-status"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + created?: components["parameters"]["created"]; + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + head_sha?: components["parameters"]["workflow-run-head-sha"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** + * Get workflow usage + * @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. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + */ + "actions/get-workflow-usage": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-usage"]; + }; + }; + }; + }; + /** + * List repository activities + * @description 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 activity and data for your repository](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository)." + */ + "repos/list-activities": { + parameters: { + query?: { + direction?: components["parameters"]["direction"]; + per_page?: components["parameters"]["per-page"]; + before?: components["parameters"]["pagination-before"]; + after?: components["parameters"]["pagination-after"]; + /** + * @description The Git reference for the activities you want to list. + * + * The `ref` for a branch can be formatted either as `refs/heads/BRANCH_NAME` or `BRANCH_NAME`, where `BRANCH_NAME` is the name of your branch. + */ + ref?: string; + /** @description The GitHub username to use to filter by the actor who performed the activity. */ + actor?: string; + /** + * @description The time period to filter by. + * + * For example, `day` will filter for activity that occurred in the past 24 hours, and `week` will filter for activity that occurred in the past 7 days (168 hours). + */ + time_period?: "day" | "week" | "month" | "quarter" | "year"; + /** + * @description The activity type to filter by. + * + * For example, you can choose to filter by "force_push", to see all force pushes to the repository. + */ + activity_type?: + | "push" + | "force_push" + | "branch_creation" + | "branch_deletion" + | "pr_merge" + | "merge_queue_merge"; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["activity"][]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * List assignees + * @description Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. + */ + "issues/list-assignees": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Check if a user can be assigned + * @description Checks if a user has permission to be assigned to an issue in this repository. + * + * If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + "issues/check-user-can-be-assigned": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + assignee: string; + }; + }; + responses: { + /** @description If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. */ + 204: { + content: never; + }; + /** @description Otherwise a `404` status code is returned. */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Get all autolinks of a repository + * @description Gets all autolinks that are configured for a repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/list-autolinks": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["autolink"][]; + }; + }; + }; + }; + /** + * Create an autolink reference for a repository + * @description Users with admin access to the repository can create an autolink. + */ + "repos/create-autolink": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description This prefix appended by certain characters will generate a link any time it is found in an issue, pull request, or commit. */ + key_prefix: string; + /** @description The URL must contain `` for the reference number. `` matches different characters depending on the value of `is_alphanumeric`. */ + url_template: string; + /** + * @description Whether this autolink reference matches alphanumeric characters. If true, the `` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters. + * @default true + */ + is_alphanumeric?: boolean; + }; + }; + }; + responses: { + /** @description response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World/autolinks/1 */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["autolink"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get an autolink reference of a repository + * @description This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/get-autolink": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + autolink_id: components["parameters"]["autolink-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["autolink"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete an autolink reference from a repository + * @description This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/delete-autolink": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + autolink_id: components["parameters"]["autolink-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Check if automated security fixes are enabled for a repository + * @description Shows whether automated security fixes are enabled, disabled or paused for a repository. The authenticated user must have admin read access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/articles/configuring-automated-security-fixes)". + */ + "repos/check-automated-security-fixes": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response if dependabot is enabled */ + 200: { + content: { + "application/json": components["schemas"]["check-automated-security-fixes"]; + }; + }; + /** @description Not Found if dependabot is not enabled for the repository */ + 404: { + content: never; + }; + }; + }; + /** + * Enable automated security fixes + * @description Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/articles/configuring-automated-security-fixes)". + */ + "repos/enable-automated-security-fixes": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Disable automated security fixes + * @description Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/articles/configuring-automated-security-fixes)". + */ + "repos/disable-automated-security-fixes": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** List branches */ + "repos/list-branches": { + parameters: { + query?: { + /** @description Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. */ + protected?: boolean; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["short-branch"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Get a branch */ + "repos/get-branch": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-with-protection"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get branch protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + "repos/get-branch-protection": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-protection"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Update branch protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Protecting a branch requires admin or owner permissions to the repository. + * + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + * + * **Note**: The list of users, apps, and teams in total is limited to 100 items. + */ + "repos/update-branch-protection": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Require status checks to pass before merging. Set to `null` to disable. */ + required_status_checks: { + /** @description Require branches to be up to date before merging. */ + strict: boolean; + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts: string[]; + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: { + /** @description The name of the required check */ + context: string; + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number; + }[]; + } | null; + /** @description Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable. */ + enforce_admins: boolean | null; + /** @description Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ + required_pull_request_reviews: { + /** @description Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ + dismissal_restrictions?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[]; + /** @description The list of team `slug`s with dismissal access */ + teams?: string[]; + /** @description The list of app `slug`s with dismissal access */ + apps?: string[]; + }; + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them. */ + require_code_owner_reviews?: boolean; + /** @description Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false`. + * @default false + */ + require_last_push_approval?: boolean; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[]; + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[]; + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[]; + }; + } | null; + /** @description Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. */ + restrictions: { + /** @description The list of user `login`s with push access */ + users: string[]; + /** @description The list of team `slug`s with push access */ + teams: string[]; + /** @description The list of app `slug`s with push access */ + apps?: string[]; + } | null; + /** @description Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see "[Requiring a linear commit history](https://docs.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. */ + required_linear_history?: boolean; + /** @description Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." */ + allow_force_pushes?: boolean | null; + /** @description Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ + allow_deletions?: boolean; + /** @description If set to `true`, the `restrictions` branch protection settings which limits who can push will also block pushes which create new branches, unless the push is initiated by a user, team, or app which has the ability to push. Set to `true` to restrict new branch creation. Default: `false`. */ + block_creations?: boolean; + /** @description Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. */ + required_conversation_resolution?: boolean; + /** + * @description Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. Default: `false`. + * @default false + */ + lock_branch?: boolean; + /** + * @description Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. Default: `false`. + * @default false + */ + allow_fork_syncing?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Delete branch protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + "repos/delete-branch-protection": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Get admin branch protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + "repos/get-admin-branch-protection": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + /** + * Set admin branch protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/set-admin-branch-protection": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + /** + * Delete admin branch protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/delete-admin-branch-protection": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get pull request review protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + "repos/get-pull-request-review-protection": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-pull-request-review"]; + }; + }; + }; + }; + /** + * Delete pull request review protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + "repos/delete-pull-request-review-protection": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Update pull request review protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + * + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + */ + "repos/update-pull-request-review-protection": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ + dismissal_restrictions?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[]; + /** @description The list of team `slug`s with dismissal access */ + teams?: string[]; + /** @description The list of app `slug`s with dismissal access */ + apps?: string[]; + }; + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) have reviewed. */ + require_code_owner_reviews?: boolean; + /** @description Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number; + /** + * @description Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false` + * @default false + */ + require_last_push_approval?: boolean; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[]; + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[]; + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[]; + }; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-pull-request-review"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get commit signature protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + "repos/get-commit-signature-protection": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create commit signature protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits. + */ + "repos/create-commit-signature-protection": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete commit signature protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits. + */ + "repos/delete-commit-signature-protection": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get status checks protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + "repos/get-status-checks-protection": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["status-check-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove status check protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + "repos/remove-status-check-protection": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Update status check protection + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/update-status-check-protection": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description Require branches to be up to date before merging. */ + strict?: boolean; + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts?: string[]; + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: { + /** @description The name of the required check */ + context: string; + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number; + }[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["status-check-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get all status check contexts + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + "repos/get-all-status-check-contexts": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Set status check contexts + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + "repos/set-status-check-contexts": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Add status check contexts + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + "repos/add-status-check-contexts": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Remove status check contexts + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + "repos/remove-status-check-contexts": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The name of the status checks */ + contexts: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + "repos/get-access-restrictions": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-restriction-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + "repos/delete-access-restrictions": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Get apps with access to the protected branch + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the 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. + */ + "repos/get-apps-with-access-to-protected-branch": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Set app access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * 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. + */ + "repos/set-app-access-restrictions": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. */ + apps: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Add app access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only 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. + */ + "repos/add-app-access-restrictions": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. */ + apps: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Remove app access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * 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. + */ + "repos/remove-app-access-restrictions": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The GitHub Apps that have push access to this branch. Use the slugified version of the app name. **Note**: The list of users, apps, and teams in total is limited to 100 items. */ + apps: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get teams with access to the protected branch + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + "repos/get-teams-with-access-to-protected-branch": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Set team access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams. + */ + "repos/set-team-access-restrictions": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Add team access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. You can also give push access to child teams. + */ + "repos/add-team-access-restrictions": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Remove team access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + */ + "repos/remove-team-access-restrictions": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The slug values for teams */ + teams: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get users with access to the protected branch + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + "repos/get-users-with-access-to-protected-branch": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Set user access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people. + * + * | Type | Description | + * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/set-user-access-restrictions": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Add user access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified people push access for this branch. + * + * | Type | Description | + * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/add-user-access-restrictions": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Remove user access restrictions + * @description Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-user-access-restrictions": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The username for users */ + users: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Rename a branch + * @description Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The 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. + * + * In order to rename the default branch, fine-grained access tokens also need the `administration:write` repository permission. + */ + "repos/rename-branch": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The new name of the branch. */ + new_name: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["branch-with-protection"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Create a check run + * @description **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Creates a new check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to create check runs. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + "checks/create": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the check. For example, "code-coverage". */ + name: string; + /** @description The SHA of the commit. */ + head_sha: string; + /** @description The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used. */ + details_url?: string; + /** @description A reference for the run on the integrator's system. */ + external_id?: string; + /** + * @description The current status. + * @default queued + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed"; + /** + * Format: date-time + * @description The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** + * Format: date-time + * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + completed_at?: string; + /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. */ + output?: { + /** @description The title of the check run. */ + title: string; + /** @description The summary of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ + summary: string; + /** @description The details of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. GitHub Actions are limited to 10 warning annotations and 10 error annotations per step. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". */ + annotations?: { + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** @description The start line of the annotation. Line numbers start at 1. */ + start_line: number; + /** @description The end line of the annotation. */ + end_line: number; + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. Column numbers start at 1. */ + start_column?: number; + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number; + /** + * @description The level of the annotation. + * @enum {string} + */ + annotation_level: "notice" | "warning" | "failure"; + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string; + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string; + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string; + }[]; + /** @description Adds images to the output displayed in the GitHub pull request UI. */ + images?: { + /** @description The alternative text for the image. */ + alt: string; + /** @description The full URL of the image. */ + image_url: string; + /** @description A short image description. */ + caption?: string; + }[]; + }; + /** @description Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: { + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + }[]; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + }; + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. + */ + "checks/get": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + }; + /** + * Update a check run + * @description Updates a check run for a specific commit in a 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 apps and personal access tokens (classic) cannot use this endpoint. + */ + "checks/update": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the check. For example, "code-coverage". */ + name?: string; + /** @description The URL of the integrator's site that has the full details of the check. */ + details_url?: string; + /** @description A reference for the run on the integrator's system. */ + external_id?: string; + /** + * Format: date-time + * @description This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** + * @description The current status of the check run. Only GitHub Actions can set a status of `waiting`, `pending`, or `requested`. + * @enum {string} + */ + status?: + | "queued" + | "in_progress" + | "completed" + | "waiting" + | "requested" + | "pending"; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** + * Format: date-time + * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + completed_at?: string; + /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. */ + output?: { + /** @description **Required**. */ + title?: string; + /** @description Can contain Markdown. */ + summary: string; + /** @description Can contain Markdown. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/checks/runs#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. GitHub Actions are limited to 10 warning annotations and 10 error annotations per step. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". */ + annotations?: { + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** @description The start line of the annotation. Line numbers start at 1. */ + start_line: number; + /** @description The end line of the annotation. */ + end_line: number; + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. Column numbers start at 1. */ + start_column?: number; + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number; + /** + * @description The level of the annotation. + * @enum {string} + */ + annotation_level: "notice" | "warning" | "failure"; + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string; + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string; + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string; + }[]; + /** @description Adds images to the output displayed in the GitHub pull request UI. */ + images?: { + /** @description The alternative text for the image. */ + alt: string; + /** @description The full URL of the image. */ + image_url: string; + /** @description A short image description. */ + caption?: string; + }[]; + }; + /** @description Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/guides/using-the-rest-api-to-interact-with-checks#check-runs-and-requested-actions)." */ + actions?: { + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + }[]; + } & ( + | { + /** @enum {unknown} */ + status?: "completed"; + [key: string]: unknown; + } + | { + /** @enum {unknown} */ + status?: "queued" | "in_progress"; + [key: string]: unknown; + } + ); + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + }; + /** + * List check run annotations + * @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. + */ + "checks/list-annotations": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["check-annotation"][]; + }; + }; + }; + }; + /** + * Rerequest a check run + * @description Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * 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. + */ + "checks/rerequest-run": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** @description Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App */ + 403: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 404: components["responses"]["not_found"]; + /** @description Validation error if the check run is not rerequestable */ + 422: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * 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`. + * + * OAuth apps and personal access tokens (classic) cannot use this endpoint. + */ + "checks/create-suite": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The sha of the head commit. */ + head_sha: string; + }; + }; + }; + responses: { + /** @description Response when the suite already exists */ + 200: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + /** @description Response when the suite was created */ + 201: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + }; + /** + * 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. + */ + "checks/set-suites-preferences": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. */ + auto_trigger_checks?: { + /** @description The `id` of the GitHub App. */ + app_id: number; + /** + * @description Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. + * @default true + */ + setting: boolean; + }[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["check-suite-preference"]; + }; + }; + }; + }; + /** + * 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`. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. + */ + "checks/get-suite": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + check_suite_id: components["parameters"]["check-suite-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + }; + /** + * List check runs in a check suite + * @description Lists check runs for a check suite using its `id`. + * + * **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. + */ + "checks/list-for-suite": { + parameters: { + query?: { + check_name?: components["parameters"]["check-name"]; + status?: components["parameters"]["status"]; + /** @description Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: "latest" | "all"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + check_suite_id: components["parameters"]["check-suite-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + }; + }; + }; + }; + }; + /** + * Rerequest a check suite + * @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. + * + * OAuth apps and personal access tokens (classic) cannot use this endpoint. + */ + "checks/rerequest-suite": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + check_suite_id: components["parameters"]["check-suite-id"]; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + }; + /** + * List code scanning alerts for a repository + * @description Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + "code-scanning/list-alerts-for-repo": { + parameters: { + query?: { + tool_name?: components["parameters"]["tool-name"]; + tool_guid?: components["parameters"]["tool-guid"]; + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + ref?: components["parameters"]["git-ref"]; + direction?: components["parameters"]["direction"]; + /** @description The property by which to sort the results. . `number` is deprecated - we recommend that you use `created` instead. */ + sort?: "created" | "number" | "updated"; + /** @description Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ + state?: components["schemas"]["code-scanning-alert-state"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert-items"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Get a code scanning alert + * @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. + */ + "code-scanning/get-alert": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Update a code scanning alert + * @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. + */ + "code-scanning/update-alert": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + alert_number: components["parameters"]["alert-number"]; + }; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["code-scanning-alert-set-state"]; + dismissed_reason?: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List instances of a code scanning alert + * @description Lists all instances of the specified 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. + */ + "code-scanning/list-alert-instances": { + parameters: { + query?: { + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + ref?: components["parameters"]["git-ref"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert-instance"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List code scanning analyses for a repository + * @description Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * **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. + */ + "code-scanning/list-recent-analyses": { + parameters: { + query?: { + tool_name?: components["parameters"]["tool-name"]; + tool_guid?: components["parameters"]["tool-guid"]; + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + /** @description The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["schemas"]["code-scanning-ref"]; + /** @description Filter analyses belonging to the same SARIF upload. */ + sarif_id?: components["schemas"]["code-scanning-analysis-sarif-id"]; + direction?: components["parameters"]["direction"]; + /** @description The property by which to sort the results. */ + sort?: "created"; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Get a code scanning analysis for a repository + * @description Gets a specified code scanning analysis for a repository. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * 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. + */ + "code-scanning/get-analysis": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + /** @description The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis"]; + "application/json+sarif": { + [key: string]: unknown; + }; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Delete a code scanning analysis from a repository + * @description 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. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `category` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + * + * 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. + */ + "code-scanning/delete-analysis": { + parameters: { + query?: { + /** @description Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */ + confirm_delete?: string | null; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + /** @description The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis-deletion"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List CodeQL databases for a repository + * @description Lists the CodeQL databases that are available in 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. + */ + "code-scanning/list-codeql-databases": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-codeql-database"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Get a CodeQL database for a repository + * @description Gets a CodeQL database for a language in a repository. + * + * By default this endpoint returns JSON metadata about the CodeQL database. To + * download the CodeQL database binary content, set the `Accept` header of the request + * to [`application/zip`](https://docs.github.com/rest/overview/media-types), and make sure + * your HTTP client is configured to follow redirects or use the `Location` header + * to make a second request to get the redirect URL. + * + * 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. + */ + "code-scanning/get-codeql-database": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + /** @description The language of the CodeQL database. */ + language: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-codeql-database"]; + }; + }; + 302: components["responses"]["found"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Get a code scanning default setup configuration + * @description Gets a code scanning default setup configuration. + * + * 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. + */ + "code-scanning/get-default-setup": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-default-setup"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Update a code scanning default setup configuration + * @description Updates a code scanning default setup configuration. + * + * 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. + */ + "code-scanning/update-default-setup": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["code-scanning-default-setup-update"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** @description Response */ + 202: { + content: { + "application/json": components["schemas"]["code-scanning-default-setup-update-response"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["code_scanning_conflict"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * 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. For troubleshooting information, see "[Troubleshooting SARIF uploads](https://docs.github.com/code-security/code-scanning/troubleshooting-sarif)." + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + * + * SARIF upload supports a maximum 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 the most important entries whenever applicable. + * To get the most out of your analysis when it includes data above the supported limits, try to optimize the analysis configuration. For example, for the CodeQL tool, identify and remove the most noisy queries. For more information, see "[SARIF results exceed one or more limits](https://docs.github.com/code-security/code-scanning/troubleshooting-sarif/results-exceed-limit)." + * + * + * | **SARIF data** | **Maximum values** | **Additional limits** | + * |----------------------------------|:------------------:|----------------------------------------------------------------------------------| + * | Runs per file | 20 | | + * | Results per run | 25,000 | Only the top 5,000 results will be included, prioritized by severity. | + * | Rules per run | 25,000 | | + * | Tool extensions per run | 100 | | + * | Thread Flow Locations per result | 10,000 | Only the top 1,000 Thread Flow Locations will be included, using prioritization. | + * | Location per result | 1,000 | Only 100 locations will be included. | + * | Tags per rule | 20 | Only 10 tags will be included. | + * + * + * The `202 Accepted` response includes an `id` value. + * You can use this ID to check the status of the upload by using it in the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/code-scanning/code-scanning#get-information-about-a-sarif-upload)." + * + * 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. + */ + "code-scanning/upload-sarif": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + ref: components["schemas"]["code-scanning-ref-full"]; + sarif: components["schemas"]["code-scanning-analysis-sarif-file"]; + /** + * Format: uri + * @description The base directory used in the analysis, as it appears in the SARIF file. + * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. + * @example file:///github/workspace/ + */ + checkout_uri?: string; + /** + * Format: date-time + * @description The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ + tool_name?: string; + /** + * @description 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. + */ + validate?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 202: { + content: { + "application/json": components["schemas"]["code-scanning-sarifs-receipt"]; + }; + }; + /** @description Bad Request if the sarif field is invalid */ + 400: { + content: never; + }; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + /** @description Payload Too Large if the sarif field is too large */ + 413: { + content: never; + }; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * 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)." + * 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. + */ + "code-scanning/get-sarif": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + /** @description The SARIF ID obtained after uploading. */ + sarif_id: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-sarifs-status"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + /** @description Not Found if the sarif id does not match any upload */ + 404: { + content: never; + }; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List CODEOWNERS errors + * @description List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + "repos/codeowners-errors": { + parameters: { + query?: { + /** @description A branch, tag or commit name used to determine which version of the CODEOWNERS file to use. Default: the repository's default branch (e.g. `main`) */ + ref?: string; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["codeowners-errors"]; + }; + }; + /** @description Resource not found */ + 404: { + content: never; + }; + }; + }; + /** + * List codespaces in a repository for the authenticated user + * @description Lists the codespaces associated to a specified repository and the authenticated user. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + "codespaces/list-in-repository-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Create a codespace in a repository + * @description Creates a codespace owned by the authenticated user in the specified repository. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + "codespaces/create-with-repo-for-authenticated-user": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. */ + location?: string; + /** + * @description The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. + * @enum {string} + */ + geo?: "EuropeWest" | "SoutheastAsia" | "UsEast" | "UsWest"; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } | null; + }; + }; + responses: { + /** @description Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** @description Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List devcontainer configurations in a repository for the authenticated user + * @description 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. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + "codespaces/list-devcontainers-in-repository-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + devcontainers: { + path: string; + name?: string; + display_name?: string; + }[]; + }; + }; + }; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * List available machine types for a repository + * @description List the machine types available for a given repository based on its configuration. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + "codespaces/repo-machines-for-authenticated-user": { + parameters: { + query?: { + /** @description The location to check for available machines. Assigned by IP if not provided. */ + location?: string; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description The branch or commit to check for prebuild availability and devcontainer restrictions. */ + ref?: string; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + machines: components["schemas"]["codespace-machine"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Get default attributes for a codespace + * @description Gets the default attributes for codespaces created by the user with the repository. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + "codespaces/pre-flight-with-repo-for-authenticated-user": { + parameters: { + query?: { + /** @description The branch or commit to check for a default devcontainer path. If not specified, the default branch will be checked. */ + ref?: string; + /** @description An alternative IP for default location auto-detection, such as when proxying a request. */ + client_ip?: string; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response when a user is able to create codespaces from the repository. */ + 200: { + content: { + "application/json": { + billable_owner?: components["schemas"]["simple-user"]; + defaults?: { + location: string; + devcontainer_path: string | null; + }; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "codespaces/check-permissions-for-devcontainer": { + parameters: { + query: { + /** @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. */ + ref: string; + /** @description Path to the devcontainer.json configuration to use for the permission check. */ + devcontainer_path: string; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response when the permission check is successful */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-permissions-check-for-devcontainer"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List repository secrets + * @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. + */ + "codespaces/list-repo-secrets": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["repo-codespaces-secret"][]; + }; + }; + }; + }; + }; + /** + * 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, OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "codespaces/get-repo-public-key": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-public-key"]; + }; + }; + }; + }; + /** + * Get a repository secret + * @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. + */ + "codespaces/get-repo-secret": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["repo-codespaces-secret"]; + }; + }; + }; + }; + /** + * Create or update a repository secret + * @description 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "codespaces/create-or-update-repo-secret": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/codespaces/repository-secrets#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + responses: { + /** @description Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** @description Response when updating a secret */ + 204: { + content: never; + }; + }; + }; + /** + * Delete a repository secret + * @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. + */ + "codespaces/delete-repo-secret": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List repository collaborators + * @description For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * + * Team members will include the members of child teams. + * + * 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. + */ + "repos/list-collaborators": { + parameters: { + query?: { + /** @description Filter collaborators returned by their affiliation. `outside` means all outside collaborators of an organization-owned repository. `direct` means all collaborators with permissions to an organization-owned repository, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: "outside" | "direct" | "all"; + /** @description Filter collaborators by the permissions they have on the repository. If not specified, all collaborators will be returned. */ + permission?: "pull" | "triage" | "push" | "maintain" | "admin"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["collaborator"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Check if a user is a repository collaborator + * @description For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * + * Team members will include the members of child teams. + * + * 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. + */ + "repos/check-collaborator": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response if user is a collaborator */ + 204: { + content: never; + }; + /** @description Not Found if user is not a collaborator */ + 404: { + content: never; + }; + }; + }; + /** + * 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. 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)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP 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). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. + */ + "repos/add-collaborator": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + username: components["parameters"]["username"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. + * @default push + */ + permission?: string; + }; + }; + }; + responses: { + /** @description Response when a new invitation is created */ + 201: { + content: { + "application/json": components["schemas"]["repository-invitation"]; + }; + }; + /** + * @description Response when: + * - an existing collaborator is added as a collaborator + * - an organization member is added as an individual collaborator + * - an existing team member (whose team is also a repository collaborator) is added as an individual collaborator + */ + 204: { + content: never; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Remove a repository collaborator + * @description Removes a collaborator from a repository. + * + * To use this endpoint, the authenticated user must either be an administrator of the repository or target themselves for removal. + * + * This endpoint also: + * - Cancels any outstanding invitations + * - Unasigns the user from any issues + * - Removes access to organization projects if the user is not an organization member and is not a collaborator on any other organization repositories. + * - Unstars the repository + * - Updates access permissions to packages + * + * Removing a user as a collaborator has the following effects on forks: + * - If the user had access to a fork through their membership to this repository, the user will also be removed from the fork. + * - If the user had their own fork of the repository, the fork will be deleted. + * - If the user still has read access to the repository, open pull requests by this user from a fork will be denied. + * + * **Note**: A user can still have access to the repository through organization permissions like base repository permissions. + * + * Although the API responds immediately, the additional permission updates might take some extra time to complete in the background. + * + * For more information on fork permissions, see "[About permissions and visibility of forks](https://docs.github.com/pull-requests/collaborating-with-pull-requests/working-with-forks/about-permissions-and-visibility-of-forks)". + */ + "repos/remove-collaborator": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description No Content when collaborator was removed from the repository. */ + 204: { + content: never; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get repository permissions for a user + * @description Checks the repository permission of a collaborator. The possible repository + * permissions are `admin`, `write`, `read`, and `none`. + * + * *Note*: The `permission` attribute provides the legacy base roles of `admin`, `write`, `read`, and `none`, where the + * `maintain` role is mapped to `write` and the `triage` role is mapped to `read`. To determine the role assigned to the + * collaborator, see the `role_name` attribute, which will provide the full role name, including custom roles. The + * `permissions` hash can also be used to determine which base level of access the collaborator has to the repository. + */ + "repos/get-collaborator-permission-level": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description if user has admin permissions */ + 200: { + content: { + "application/json": components["schemas"]["repository-collaborator-permission"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List commit comments for a repository + * @description Lists the commit comments for a specified repository. 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`. + */ + "repos/list-commit-comments-for-repo": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["commit-comment"][]; + }; + }; + }; + }; + /** + * Get a commit comment + * @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`. + */ + "repos/get-commit-comment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Delete a commit comment */ + "repos/delete-commit-comment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Update a commit comment + * @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`. + */ + "repos/update-commit-comment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + comment_id: components["parameters"]["comment-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment */ + body: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List reactions for a commit comment + * @description List the reactions to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). + */ + "reactions/list-for-commit-comment": { + parameters: { + query?: { + /** @description Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a commit comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create reaction for a commit comment + * @description Create a reaction to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. + */ + "reactions/create-for-commit-comment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + comment_id: components["parameters"]["comment-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the commit comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + responses: { + /** @description Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** @description Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Delete a commit comment reaction + * @description **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). + */ + "reactions/delete-for-commit-comment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + comment_id: components["parameters"]["comment-id"]; + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List commits + * @description **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + "repos/list-commits": { + parameters: { + query?: { + /** @description SHA or branch to start listing commits from. Default: the repository’s default branch (usually `main`). */ + sha?: string; + /** @description Only commits containing this file path will be returned. */ + path?: string; + /** @description GitHub username or email address to use to filter by commit author. */ + author?: string; + /** @description GitHub username or email address to use to filter by commit committer. */ + committer?: string; + since?: components["parameters"]["since"]; + /** @description Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + until?: string; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["commit"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * List branches for HEAD commit + * @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. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + "repos/list-branches-for-head-commit": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-short"][]; + }; + }; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List commit comments + * @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`. + */ + "repos/list-comments-for-commit": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["commit-comment"][]; + }; + }; + }; + }; + /** + * Create a commit comment + * @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. 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`. + */ + "repos/create-commit-comment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + /** @description Relative path of the file to comment on. */ + path?: string; + /** @description Line index in the diff to comment on. */ + position?: number; + /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ + line?: number; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World/comments/1 */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List pull requests associated with a commit + * @description Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, will only return open pull requests associated with the commit. + * + * To list the open or merged pull requests associated with a branch, you can set the `commit_sha` parameter to the branch name. + */ + "repos/list-pull-requests-associated-with-commit": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["pull-request-simple"][]; + }; + }; + 409: components["responses"]["conflict"]; + }; + }; + /** + * Get a commit + * @description Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff 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. + * + * 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. + * + * - **`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** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + "repos/get-commit": { + parameters: { + query?: { + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + ref: components["parameters"]["commit-ref"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List check runs for a Git reference + * @description 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. + * + * 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. + */ + "checks/list-for-ref": { + parameters: { + query?: { + check_name?: components["parameters"]["check-name"]; + status?: components["parameters"]["status"]; + /** @description Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: "latest" | "all"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + app_id?: number; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + ref: components["parameters"]["commit-ref"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + }; + }; + }; + }; + }; + /** + * List check suites for a Git reference + * @description Lists check suites 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 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. + */ + "checks/list-suites-for-ref": { + parameters: { + query?: { + /** + * @description Filters check suites by GitHub App `id`. + * @example 1 + */ + app_id?: number; + check_name?: components["parameters"]["check-name"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + ref: components["parameters"]["commit-ref"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + check_suites: components["schemas"]["check-suite"][]; + }; + }; + }; + }; + }; + /** + * Get the combined status for a specific reference + * @description Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. + * + * + * Additionally, a combined `state` is returned. The `state` is one of: + * + * * **failure** if any of the contexts report as `error` or `failure` + * * **pending** if there are no statuses or a context is `pending` + * * **success** if the latest status for all contexts is `success` + */ + "repos/get-combined-status-for-ref": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + ref: components["parameters"]["commit-ref"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-commit-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List commit statuses for a reference + * @description Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one. + * + * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. + */ + "repos/list-commit-statuses-for-ref": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + ref: components["parameters"]["commit-ref"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["status"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + }; + }; + /** + * Get community profile metrics + * @description Returns all community profile metrics for a repository. The repository cannot be a fork. + * + * The returned metrics include an overall health score, the repository description, the presence of documentation, the + * detected code of conduct, the detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * 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. + */ + "repos/get-community-profile-metrics": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["community-profile"]; + }; + }; + }; + }; + /** + * Compare two commits + * @description 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 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. + * + * When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination: + * + * - The list of changed files is only shown on the first page of results, but it includes all changed files for the entire comparison. + * - The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results. + * + * For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)." + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + "repos/compare-commits-with-basehead": { + parameters: { + query?: { + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + /** @description The base branch and head branch to compare. This parameter expects the format `BASE...HEAD`. Both must be branch names in `repo`. To compare with a branch that exists in a different repository in the same network as `repo`, the `basehead` parameter expects the format `USERNAME:BASE...USERNAME:HEAD`. */ + basehead: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comparison"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Get repository content + * @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. + */ + "repos/get-content": { + parameters: { + query?: { + /** @description The name of the commit/branch/tag. Default: the repository’s default branch. */ + ref?: string; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + /** @description path parameter */ + path: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/vnd.github.object": components["schemas"]["content-tree"]; + "application/json": + | components["schemas"]["content-directory"] + | components["schemas"]["content-file"] + | components["schemas"]["content-symlink"] + | components["schemas"]["content-submodule"]; + }; + }; + 302: components["responses"]["found"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create or update file contents + * @description 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. + */ + "repos/create-or-update-file-contents": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + /** @description path parameter */ + path: string; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The new file content, using Base64 encoding. */ + content: string; + /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ + sha?: string; + /** @description The branch name. Default: the repository’s default branch. */ + branch?: string; + /** @description The person that committed the file. Default: the authenticated user. */ + committer?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-05T13:13:22+05:00" */ + date?: string; + }; + /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ + author?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-15T17:13:22+05:00" */ + date?: string; + }; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Delete a file + * @description Deletes a file in a repository. + * + * You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author. + * + * The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used. + * + * You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + "repos/delete-file": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + /** @description path parameter */ + path: string; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The blob SHA of the file being deleted. */ + sha: string; + /** @description The branch name. Default: the repository’s default branch */ + branch?: string; + /** @description object containing information about the committer. */ + committer?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + /** @description object containing information about the author. */ + author?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List repository contributors + * @description Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API caches contributor data to improve performance. + * + * GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information. + */ + "repos/list-contributors": { + parameters: { + query?: { + /** @description Set to `1` or `true` to include anonymous contributors in results. */ + anon?: string; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description If repository contains content */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["contributor"][]; + }; + }; + /** @description Response if repository is empty */ + 204: { + content: never; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List Dependabot alerts for a repository + * @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. + */ + "dependabot/list-alerts-for-repo": { + parameters: { + query?: { + state?: components["parameters"]["dependabot-alert-comma-separated-states"]; + severity?: components["parameters"]["dependabot-alert-comma-separated-severities"]; + ecosystem?: components["parameters"]["dependabot-alert-comma-separated-ecosystems"]; + package?: components["parameters"]["dependabot-alert-comma-separated-packages"]; + manifest?: components["parameters"]["dependabot-alert-comma-separated-manifests"]; + scope?: components["parameters"]["dependabot-alert-scope"]; + sort?: components["parameters"]["dependabot-alert-sort"]; + direction?: components["parameters"]["direction"]; + /** + * @deprecated + * @description **Deprecated**. Page number of the results to fetch. Use cursor-based pagination with `before` or `after` instead. + */ + page?: number; + /** + * @deprecated + * @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)." + */ + per_page?: number; + before?: components["parameters"]["pagination-before"]; + after?: components["parameters"]["pagination-after"]; + first?: components["parameters"]["pagination-first"]; + last?: components["parameters"]["pagination-last"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Get a Dependabot alert + * @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. + */ + "dependabot/get-alert": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + alert_number: components["parameters"]["dependabot-alert-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Update a Dependabot alert + * @description 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)." + * + * 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. + */ + "dependabot/update-alert": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + alert_number: components["parameters"]["dependabot-alert-number"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the Dependabot alert. + * A `dismissed_reason` must be provided when setting the state to `dismissed`. + * @enum {string} + */ + state: "dismissed" | "open"; + /** + * @description **Required when `state` is `dismissed`.** A reason for dismissing the alert. + * @enum {string} + */ + dismissed_reason?: + | "fix_started" + | "inaccurate" + | "no_bandwidth" + | "not_used" + | "tolerable_risk"; + /** @description An optional comment associated with dismissing the alert. */ + dismissed_comment?: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-alert"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * List repository secrets + * @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. + */ + "dependabot/list-repo-secrets": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["dependabot-secret"][]; + }; + }; + }; + }; + }; + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint if the repository is private. + */ + "dependabot/get-repo-public-key": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + /** + * Get a repository secret + * @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. + */ + "dependabot/get-repo-secret": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-secret"]; + }; + }; + }; + }; + /** + * Create or update a repository secret + * @description Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "dependabot/create-or-update-repo-secret": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/dependabot/secrets#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + responses: { + /** @description Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** @description Response when updating a secret */ + 204: { + content: never; + }; + }; + }; + /** + * Delete a repository secret + * @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. + */ + "dependabot/delete-repo-secret": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Get a diff of the dependencies between commits + * @description Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. + */ + "dependency-graph/diff-range": { + parameters: { + query?: { + name?: components["parameters"]["manifest-path"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + /** @description The base and head Git revisions to compare. The Git revisions will be resolved to commit SHAs. Named revisions will be resolved to their corresponding HEAD commits, and an appropriate merge base will be determined. This parameter expects the format `{base}...{head}`. */ + basehead: string; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["dependency-graph-diff"]; + }; + }; + 403: components["responses"]["dependency_review_forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Export a software bill of materials (SBOM) for a repository. + * @description Exports the software bill of materials (SBOM) for a repository in SPDX JSON format. + */ + "dependency-graph/export-sbom": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["dependency-graph-spdx-sbom"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create a snapshot of dependencies for a repository + * @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. + */ + "dependency-graph/create-repository-snapshot": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["snapshot"]; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": { + /** @description ID of the created snapshot. */ + id: number; + /** @description The time at which the snapshot was created. */ + created_at: string; + /** @description Either "SUCCESS", "ACCEPTED", or "INVALID". "SUCCESS" indicates that the snapshot was successfully created and the repository's dependencies were updated. "ACCEPTED" indicates that the snapshot was successfully created, but the repository's dependencies were not updated. "INVALID" indicates that the snapshot was malformed. */ + result: string; + /** @description A message providing further details about the result, such as why the dependencies were not updated. */ + message: string; + }; + }; + }; + }; + }; + /** + * List deployments + * @description Simple filtering of deployments is available via query parameters: + */ + "repos/list-deployments": { + parameters: { + query?: { + /** @description The SHA recorded at creation time. */ + sha?: string; + /** @description The name of the ref. This can be a branch, tag, or SHA. */ + ref?: string; + /** @description The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). */ + task?: string; + /** @description The name of the environment that was deployed to (e.g., `staging` or `production`). */ + environment?: string | null; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["deployment"][]; + }; + }; + }; + }; + /** + * Create a deployment + * @description Deployments offer a few configurable parameters with certain defaults. + * + * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them + * before we merge a pull request. + * + * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have + * multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter + * makes it easier to track which environments have requested deployments. The default environment is `production`. + * + * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If + * the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, + * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will + * return a failure response. + * + * By default, [commit statuses](https://docs.github.com/rest/commits/statuses) for every submitted context must be in a `success` + * state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to + * specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do + * not require any contexts or create any commit statuses, the deployment will always succeed. + * + * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text + * field that will be passed on when a deployment event is dispatched. + * + * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might + * be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an + * application with debugging enabled. + * + * Merged branch response: + * + * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating + * a deployment. This auto-merge happens when: + * * Auto-merge option is enabled in the repository + * * Topic branch does not include the latest changes on the base branch, which is `master` in the response example + * * There are no merge conflicts + * + * If there are no new commits in the base branch, a new request to create a deployment should give a successful + * response. + * + * Merge conflict response: + * + * This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't + * be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts. + * + * Failed commit status checks: + * + * This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success` + * status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` or `repo_deployment` scope to use this endpoint. + */ + "repos/create-deployment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The ref to deploy. This can be a branch, tag, or SHA. */ + ref: string; + /** + * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + * @default deploy + */ + task?: string; + /** + * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + * @default true + */ + auto_merge?: boolean; + /** @description The [status](https://docs.github.com/rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts. */ + required_contexts?: string[]; + payload?: OneOf< + [ + { + [key: string]: unknown; + }, + string, + ] + >; + /** + * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + * @default production + */ + environment?: string; + /** + * @description Short description of the deployment. + * @default + */ + description?: string | null; + /** + * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * @default false + */ + transient_environment?: boolean; + /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ + production_environment?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["deployment"]; + }; + }; + /** @description Merged branch response */ + 202: { + content: { + "application/json": { + message?: string; + }; + }; + }; + /** @description Conflict when there is a merge conflict or the commit's status checks failed */ + 409: { + content: never; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Get a deployment */ + "repos/get-deployment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/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. + */ + "repos/delete-deployment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * List deployment statuses + * @description Users with pull access can view deployment statuses for a deployment: + */ + "repos/list-deployment-statuses": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["deployment-status"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create a deployment status + * @description Users with `push` access can create deployment statuses for a given deployment. + * + * OAuth app tokens and personal access tokens (classic) need the `repo_deployment` scope to use this endpoint. + */ + "repos/create-deployment-status": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. + * @enum {string} + */ + state: + | "error" + | "failure" + | "inactive" + | "in_progress" + | "queued" + | "pending" + | "success"; + /** + * @description The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. + * @default + */ + target_url?: string; + /** + * @description The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` + * @default + */ + log_url?: string; + /** + * @description A short description of the status. The maximum description length is 140 characters. + * @default + */ + description?: string; + /** @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. If not defined, the environment of the previous status on the deployment will be used, if it exists. Otherwise, the environment of the deployment will be used. */ + environment?: string; + /** + * @description Sets the URL for accessing your environment. Default: `""` + * @default + */ + environment_url?: string; + /** @description Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` */ + auto_inactive?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/example/deployments/42/statuses/1 */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["deployment-status"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get a deployment status + * @description Users with pull access can view a deployment status for a deployment: + */ + "repos/get-deployment-status": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + deployment_id: components["parameters"]["deployment-id"]; + status_id: number; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create a repository dispatch event + * @description You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * 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 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. + */ + "repos/create-dispatch-event": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description A custom webhook event name. Must be 100 characters or fewer. */ + event_type: string; + /** @description JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. */ + client_payload?: { + [key: string]: unknown; + }; + }; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List environments + * @description Lists the environments 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. + */ + "repos/get-all-environments": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + /** + * @description The number of environments in this repository + * @example 5 + */ + total_count?: number; + environments?: components["schemas"]["environment"][]; + }; + }; + }; + }; + }; + /** + * Get an environment + * @description **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * Anyone with read access to the repository can use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + */ + "repos/get-environment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["environment"]; + }; + }; + }; + }; + /** + * Create or update an environment + * @description Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **Note:** To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "repos/create-or-update-environment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + environment_name: components["parameters"]["environment-name"]; + }; + }; + requestBody?: { + content: { + "application/json": { + wait_timer?: components["schemas"]["wait-timer"]; + prevent_self_review?: components["schemas"]["prevent-self-review"]; + /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: + | { + type?: components["schemas"]["deployment-reviewer-type"]; + /** + * @description The id of the user or team who can review the deployment + * @example 4532992 + */ + id?: number; + }[] + | null; + deployment_branch_policy?: components["schemas"]["deployment-branch-policy-settings"]; + } | null; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["environment"]; + }; + }; + /** @description Validation error when the environment name is invalid or when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value */ + 422: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Delete an environment + * @description OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "repos/delete-an-environment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** @description Default response */ + 204: { + content: never; + }; + }; + }; + /** + * List deployment branch policies + * @description Lists the deployment branch policies for an environment. + * + * 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. + */ + "repos/list-deployment-branch-policies": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + /** + * @description The number of deployment branch policies for the environment. + * @example 2 + */ + total_count: number; + branch_policies: components["schemas"]["deployment-branch-policy"][]; + }; + }; + }; + }; + }; + /** + * Create a deployment branch policy + * @description Creates a deployment branch or tag policy for an environment. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "repos/create-deployment-branch-policy": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + environment_name: components["parameters"]["environment-name"]; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["deployment-branch-policy-name-pattern-with-type"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + /** @description Response if the same branch name pattern already exists */ + 303: { + content: never; + }; + /** @description Not Found or `deployment_branch_policy.custom_branch_policies` property for the environment is set to false */ + 404: { + content: never; + }; + }; + }; + /** + * Get a deployment branch policy + * @description Gets a deployment branch or tag policy for an environment. + * + * 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. + */ + "repos/get-deployment-branch-policy": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + environment_name: components["parameters"]["environment-name"]; + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + }; + }; + /** + * Update a deployment branch policy + * @description Updates a deployment branch or tag policy for an environment. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "repos/update-deployment-branch-policy": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + environment_name: components["parameters"]["environment-name"]; + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["deployment-branch-policy-name-pattern"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-branch-policy"]; + }; + }; + }; + }; + /** + * Delete a deployment branch policy + * @description Deletes a deployment branch or tag policy for an environment. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "repos/delete-deployment-branch-policy": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + environment_name: components["parameters"]["environment-name"]; + branch_policy_id: components["parameters"]["branch-policy-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * 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. 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. + */ + "repos/get-all-deployment-protection-rules": { + parameters: { + path: { + environment_name: components["parameters"]["environment-name"]; + repo: components["parameters"]["repo"]; + owner: components["parameters"]["owner"]; + }; + }; + responses: { + /** @description List of deployment protection rules */ + 200: { + content: { + "application/json": { + /** + * @description The number of enabled custom deployment protection rules for this environment + * @example 10 + */ + total_count?: number; + custom_deployment_protection_rules?: components["schemas"]["deployment-protection-rule"][]; + }; + }; + }; + }; + }; + /** + * Create a custom deployment protection rule on an environment + * @description Enable a custom deployment protection rule for an environment. + * + * 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. + */ + "repos/create-deployment-protection-rule": { + parameters: { + path: { + environment_name: components["parameters"]["environment-name"]; + repo: components["parameters"]["repo"]; + owner: components["parameters"]["owner"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The ID of the custom app that will be enabled on the environment. */ + integration_id?: number; + }; + }; + }; + responses: { + /** @description The enabled custom deployment protection rule */ + 201: { + content: { + "application/json": components["schemas"]["deployment-protection-rule"]; + }; + }; + }; + }; + /** + * 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. + * + * 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. + */ + "repos/list-custom-deployment-rule-integrations": { + parameters: { + query?: { + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + }; + path: { + environment_name: components["parameters"]["environment-name"]; + repo: components["parameters"]["repo"]; + owner: components["parameters"]["owner"]; + }; + }; + responses: { + /** @description A list of custom deployment rule integrations available for this environment. */ + 200: { + content: { + "application/json": { + /** + * @description The total number of custom deployment protection rule integrations available for this environment. + * @example 35 + */ + total_count?: number; + available_custom_deployment_protection_rule_integrations?: components["schemas"]["custom-deployment-rule-app"][]; + }; + }; + }; + }; + }; + /** + * 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. 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. + */ + "repos/get-custom-deployment-protection-rule": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + environment_name: components["parameters"]["environment-name"]; + protection_rule_id: components["parameters"]["protection-rule-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-protection-rule"]; + }; + }; + }; + }; + /** + * Disable a custom protection rule for an environment + * @description Disables a custom deployment protection rule for an environment. + * + * 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. + */ + "repos/disable-deployment-protection-rule": { + parameters: { + path: { + environment_name: components["parameters"]["environment-name"]; + repo: components["parameters"]["repo"]; + owner: components["parameters"]["owner"]; + protection_rule_id: components["parameters"]["protection-rule-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * 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. + */ + "actions/list-environment-secrets": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + }; + }; + }; + }; + }; + /** + * 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. + */ + "actions/get-environment-public-key": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** + * 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. + */ + "actions/get-environment-secret": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + environment_name: components["parameters"]["environment-name"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + /** + * 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. + */ + "actions/create-or-update-environment-secret": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + environment_name: components["parameters"]["environment-name"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/actions/secrets#get-an-environment-public-key) endpoint. */ + encrypted_value: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + }; + }; + }; + responses: { + /** @description Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** @description Response when updating a secret */ + 204: { + content: never; + }; + }; + }; + /** + * 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. + */ + "actions/delete-environment-secret": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + environment_name: components["parameters"]["environment-name"]; + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** @description Default response */ + 204: { + content: never; + }; + }; + }; + /** + * 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. + */ + "actions/list-environment-variables": { + parameters: { + query?: { + per_page?: components["parameters"]["variables-per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + variables: components["schemas"]["actions-variable"][]; + }; + }; + }; + }; + }; + /** + * 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. + */ + "actions/create-environment-variable": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + environment_name: components["parameters"]["environment-name"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name: string; + /** @description The value of the variable. */ + value: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + }; + /** + * 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. + */ + "actions/get-environment-variable": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + environment_name: components["parameters"]["environment-name"]; + name: components["parameters"]["variable-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-variable"]; + }; + }; + }; + }; + /** + * 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. + */ + "actions/delete-environment-variable": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + name: components["parameters"]["variable-name"]; + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * 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. + */ + "actions/update-environment-variable": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + name: components["parameters"]["variable-name"]; + environment_name: components["parameters"]["environment-name"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the variable. */ + name?: string; + /** @description The value of the variable. */ + value?: string; + }; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List repository events + * @description **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + */ + "activity/list-repo-events": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** List forks */ + "repos/list-forks": { + parameters: { + query?: { + /** @description The sort order. `stargazers` will sort by star count. */ + sort?: "newest" | "oldest" | "stargazers" | "watchers"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 400: components["responses"]["bad_request"]; + }; + }; + /** + * Create a fork + * @description Create a fork for the authenticated user. + * + * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * + * **Note**: Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. + */ + "repos/create-fork": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description Optional parameter to specify the organization name if forking into an organization. */ + organization?: string; + /** @description When forking from an existing repository, a new name for the fork. */ + name?: string; + /** @description When forking from an existing repository, fork with only the default branch. */ + default_branch_only?: boolean; + } | null; + }; + }; + responses: { + /** @description Response */ + 202: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Create a blob */ + "git/create-blob": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The new blob's content. */ + content: string; + /** + * @description The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + * @default utf-8 + */ + encoding?: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/example/git/blobs/3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15 */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["short-blob"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get a blob + * @description The `content` in the response will always be Base64 encoded. + * + * 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. + */ + "git/get-blob": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + file_sha: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["blob"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Create a commit + * @description Creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects). + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + "git/create-commit": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message */ + message: string; + /** @description The SHA of the tree object this commit points to */ + tree: string; + /** @description The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. */ + parents?: string[]; + /** @description Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details. */ + author?: { + /** @description The name of the author (or committer) of the commit */ + name: string; + /** @description The email of the author (or committer) of the commit */ + email: string; + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + /** @description Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. */ + committer?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + /** @description The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. */ + signature?: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get a commit object + * @description Gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects). + * + * To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)." + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + "git/get-commit": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["git-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + /** + * List matching references + * @description Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + "git/list-matching-refs": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + ref: components["parameters"]["git-ref-only"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["git-ref"][]; + }; + }; + 409: components["responses"]["conflict"]; + }; + }; + /** + * Get a reference + * @description Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + "git/get-ref": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + ref: components["parameters"]["git-ref-only"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + /** + * Create a reference + * @description Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches. + */ + "git/create-ref": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. */ + ref: string; + /** @description The SHA1 value for this reference. */ + sha: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Delete a reference + * @description Deletes the provided reference. + */ + "git/delete-ref": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + ref: components["parameters"]["git-ref-only"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Update a reference + * @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. + */ + "git/update-ref": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + ref: components["parameters"]["git-ref-only"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The SHA1 value to set this reference to */ + sha: string; + /** + * @description Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. + * @default false + */ + force?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Create a tag object + * @description Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/rest/git/refs#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + "git/create-tag": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ + tag: string; + /** @description The tag message. */ + message: string; + /** @description The SHA of the git object this is tagging. */ + object: string; + /** + * @description The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + * @enum {string} + */ + type: "commit" | "tree" | "blob"; + /** @description An object with information about the individual creating the tag. */ + tagger?: { + /** @description The name of the author of the tag */ + name: string; + /** @description The email of the author of the tag */ + email: string; + /** + * Format: date-time + * @description When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string; + }; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-tag"]; + }; + }; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get a tag + * @description **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + "git/get-tag": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + tag_sha: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tag"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + /** + * Create a tree + * @description The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/git/commits#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/git/refs#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + "git/create-tree": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ + tree: { + /** @description The file referenced in the tree. */ + path?: string; + /** + * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. + * @enum {string} + */ + mode?: "100644" | "100755" | "040000" | "160000" | "120000"; + /** + * @description Either `blob`, `tree`, or `commit`. + * @enum {string} + */ + type?: "blob" | "tree" | "commit"; + /** + * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + sha?: string | null; + /** + * @description The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + content?: string; + }[]; + /** + * @description The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. + * If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. + */ + base_tree?: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World/trees/cd8274d15fa3ae2ab983129fb037999f264ba9a7 */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-tree"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get a tree + * @description Returns a single tree using the SHA1 value or ref name for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + "git/get-tree": { + parameters: { + query?: { + /** @description Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in `:tree_sha`. For example, setting `recursive` to any of the following will enable returning objects or subtrees: `0`, `1`, `"true"`, and `"false"`. Omit this parameter to prevent recursively returning objects or subtrees. */ + recursive?: string; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + /** @description The SHA1 value or ref (branch or tag) name of the tree. */ + tree_sha: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tree"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List repository webhooks + * @description Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. + */ + "repos/list-webhooks": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["hook"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create a repository webhook + * @description Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can + * share the same `config` as long as those webhooks do not have any `events` that overlap. + */ + "repos/create-webhook": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ + name?: string; + /** @description Key/value pairs to provide settings for this webhook. */ + config?: { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + } | null; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World/hooks/12345678 */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get a repository webhook + * @description Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository)." + */ + "repos/get-webhook": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Delete a repository webhook */ + "repos/delete-webhook": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Update a repository webhook + * @description Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository)." + */ + "repos/update-webhook": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + hook_id: components["parameters"]["hook-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + config?: components["schemas"]["webhook-config"]; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ + add_events?: string[]; + /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ + remove_events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `read:repo_hook` or `repo` scope to use this endpoint. + */ + "repos/get-webhook-config-for-repo": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `write:repo_hook` or `repo` scope to use this endpoint. + */ + "repos/update-webhook-config-for-repo": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + hook_id: components["parameters"]["hook-id"]; + }; + }; + requestBody?: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * List deliveries for a repository webhook + * @description Returns a list of webhook deliveries for a webhook configured in a repository. + */ + "repos/list-webhook-deliveries": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + cursor?: components["parameters"]["cursor"]; + redelivery?: boolean; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get a delivery for a repository webhook + * @description Returns a delivery for a webhook configured in a repository. + */ + "repos/get-webhook-delivery": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Redeliver a delivery for a repository webhook + * @description Redeliver a webhook delivery for a webhook configured in a repository. + */ + "repos/redeliver-webhook-delivery": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Ping a repository webhook + * @description This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. + */ + "repos/ping-webhook": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Test the push repository webhook + * @description This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. + * + * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` + */ + "repos/test-push-webhook": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get an import status + * @deprecated + * @description View the progress of an import. + * + * **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** + * + * This section includes details about the possible values of the `status` field of the Import Progress response. + * + * An import that does not have errors will progress through these steps: + * + * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. + * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). + * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. + * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". + * * `complete` - the import is complete, and the repository is ready on GitHub. + * + * If there are problems, you will see one of these in the `status` field: + * + * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/migrations/source-imports#update-an-import) section. + * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. + * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/migrations/source-imports#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/migrations/source-imports#cancel-an-import) and [retry](https://docs.github.com/rest/migrations/source-imports#start-an-import) with the correct URL. + * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/migrations/source-imports#update-an-import) section. + * + * **The project_choices field** + * + * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. + * + * **Git LFS related fields** + * + * This section includes details about Git LFS related fields that may be present in the Import Progress response. + * + * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. + * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. + * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. + * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. + */ + "migrations/get-import-status": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** + * Start an import + * @deprecated + * @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). + */ + "migrations/start-import": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The URL of the originating repository. */ + vcs_url: string; + /** + * @description The originating VCS type. Without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. + * @enum {string} + */ + vcs?: "subversion" | "git" | "mercurial" | "tfvc"; + /** @description If authentication is required, the username to provide to `vcs_url`. */ + vcs_username?: string; + /** @description If authentication is required, the password to provide to `vcs_url`. */ + vcs_password?: string; + /** @description For a tfvc import, the name of the project that is being imported. */ + tfvc_project?: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/spraints/socm/import */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** + * Cancel an import + * @deprecated + * @description Stop an import for a repository. + * + * **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). + */ + "migrations/cancel-import": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** + * Update an import + * @deprecated + * @description An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API + * request. If no parameters are provided, the import will be restarted. + * + * Some servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress will + * 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:** 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). + */ + "migrations/update-import": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The username to provide to the originating repository. */ + vcs_username?: string; + /** @description The password to provide to the originating repository. */ + vcs_password?: string; + /** + * @description The type of version control system you are migrating from. + * @example "git" + * @enum {string} + */ + vcs?: "subversion" | "tfvc" | "git" | "mercurial"; + /** + * @description For a tfvc import, the name of the project that is being imported. + * @example "project1" + */ + tfvc_project?: string; + } | null; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** + * Get commit authors + * @deprecated + * @description Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `. + * + * 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:** 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). + */ + "migrations/get-commit-authors": { + parameters: { + query?: { + since?: components["parameters"]["since-user"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-author"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** + * Map a commit author + * @deprecated + * @description Update an author's identity for the import. Your application can continue updating authors any time before you push + * new commits to the repository. + * + * **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). + */ + "migrations/map-commit-author": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + author_id: number; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The new Git author email. */ + email?: string; + /** @description The new Git author name. */ + name?: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-author"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** + * Get large files + * @deprecated + * @description List files larger than 100MB found during the import + * + * **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). + */ + "migrations/get-large-files": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-large-file"][]; + }; + }; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** + * Update Git LFS preference + * @deprecated + * @description You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability + * is powered by [Git LFS](https://git-lfs.com). + * + * 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:** 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). + */ + "migrations/set-lfs-preference": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to store large files during the import. `opt_in` means large files will be stored using Git LFS. `opt_out` means large files will be removed during the import. + * @enum {string} + */ + use_lfs: "opt_in" | "opt_out"; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["porter_maintenance"]; + }; + }; + /** + * Get a repository installation for the authenticated app + * @description Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-repo-installation": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get interaction restrictions for a repository + * @description Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. + */ + "interactions/get-restrictions-for-repo": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": + | components["schemas"]["interaction-limit-response"] + | Record; + }; + }; + }; + }; + /** + * Set interaction restrictions for a repository + * @description Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. + */ + "interactions/set-restrictions-for-repo": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + /** @description Response */ + 409: { + content: never; + }; + }; + }; + /** + * Remove interaction restrictions for a repository + * @description Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. + */ + "interactions/remove-restrictions-for-repo": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + /** @description Response */ + 409: { + content: never; + }; + }; + }; + /** + * List repository invitations + * @description When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. + */ + "repos/list-invitations": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["repository-invitation"][]; + }; + }; + }; + }; + /** Delete a repository invitation */ + "repos/delete-invitation": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** Update a repository invitation */ + "repos/update-invitation": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. + * @enum {string} + */ + permissions?: "read" | "write" | "maintain" | "triage" | "admin"; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-invitation"]; + }; + }; + }; + }; + /** + * List repository issues + * @description List issues in a repository. Only open issues will be listed. + * + * **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`. + */ + "issues/list-for-repo": { + parameters: { + query?: { + /** @description If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned. */ + milestone?: string; + /** @description Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + /** @description Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user. */ + assignee?: string; + /** @description The user that created the issue. */ + creator?: string; + /** @description A user that's mentioned in the issue. */ + mentioned?: string; + labels?: components["parameters"]["labels"]; + /** @description What to sort results by. */ + sort?: "created" | "updated" | "comments"; + direction?: components["parameters"]["direction"]; + since?: components["parameters"]["since"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Create an issue + * @description Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. 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`. + */ + "issues/create": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the issue. */ + title: string | number; + /** @description The contents of the issue. */ + body?: string; + /** @description Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ */ + assignee?: string | null; + milestone?: string | number | null; + /** @description Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ */ + labels?: OneOf< + [ + string, + { + id?: number; + name?: string; + description?: string | null; + color?: string | null; + }, + ] + >[]; + /** @description Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ + assignees?: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World/issues/1347 */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List issue comments for a repository + * @description 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`. + */ + "issues/list-comments-for-repo": { + parameters: { + query?: { + sort?: components["parameters"]["sort"]; + /** @description Either `asc` or `desc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + since?: components["parameters"]["since"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["issue-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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. + * + * 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`. + */ + "issues/get-comment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete an issue comment + * @description You can use the REST API to delete comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request. + */ + "issues/delete-comment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * 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. + * + * 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`. + */ + "issues/update-comment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + comment_id: components["parameters"]["comment-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List reactions for an issue comment + * @description List the reactions to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). + */ + "reactions/list-for-issue-comment": { + parameters: { + query?: { + /** @description Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to an issue comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create reaction for an issue comment + * @description Create a reaction to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. + */ + "reactions/create-for-issue-comment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + comment_id: components["parameters"]["comment-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the issue comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + responses: { + /** @description Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** @description Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Delete an issue comment reaction + * @description **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). + */ + "reactions/delete-for-issue-comment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + comment_id: components["parameters"]["comment-id"]; + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List issue events for a repository + * @description Lists events for a repository. + */ + "issues/list-events-for-repo": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["issue-event"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get an issue event + * @description Gets a single event by the event id. + */ + "issues/get-event": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + event_id: number; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-event"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * Get an issue + * @description 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 + * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe + * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. + * + * **Note**: GitHub's REST API 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`. + */ + "issues/get": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * Update 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`. + */ + "issues/update": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + issue_number: components["parameters"]["issue-number"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The title of the issue. */ + title?: string | number | null; + /** @description The contents of the issue. */ + body?: string | null; + /** @description Username to assign to this issue. **This field is deprecated.** */ + assignee?: string | null; + /** + * @description The open or closed state of the issue. + * @enum {string} + */ + state?: "open" | "closed"; + /** + * @description The reason for the state change. Ignored unless `state` is changed. + * @example not_planned + * @enum {string|null} + */ + state_reason?: "completed" | "not_planned" | "reopened" | null; + milestone?: string | number | null; + /** @description Labels to associate with this issue. Pass one or more labels to _replace_ the set of labels on this issue. Send an empty array (`[]`) to clear all labels from the issue. Only users with push access can set labels for issues. Without push access to the repository, label changes are silently dropped. */ + labels?: OneOf< + [ + string, + { + id?: number; + name?: string; + description?: string | null; + color?: string | null; + }, + ] + >[]; + /** @description Usernames to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this issue. Send an empty array (`[]`) to clear all assignees from the issue. Only users with push access can set assignees for new issues. Without push access to the repository, assignee changes are silently dropped. */ + assignees?: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Add assignees to an issue + * @description Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. + */ + "issues/add-assignees": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + issue_number: components["parameters"]["issue-number"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ */ + assignees?: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + }; + }; + /** + * Remove assignees from an issue + * @description Removes one or more assignees from an issue. + */ + "issues/remove-assignees": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + issue_number: components["parameters"]["issue-number"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ */ + assignees: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + }; + }; + /** + * Check if a user can be assigned to a issue + * @description Checks if a user has permission to be assigned to a specific issue. + * + * If the `assignee` can be assigned to this issue, a `204` status code with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + "issues/check-user-can-be-assigned-to-issue": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + issue_number: components["parameters"]["issue-number"]; + assignee: string; + }; + }; + responses: { + /** @description Response if `assignee` can be assigned to `issue_number` */ + 204: { + content: never; + }; + /** @description Response if `assignee` can not be assigned to `issue_number` */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * List issue comments + * @description 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`. + */ + "issues/list-comments": { + parameters: { + query?: { + since?: components["parameters"]["since"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["issue-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * Create an issue comment + * @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. + * 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`. + */ + "issues/create-comment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + issue_number: components["parameters"]["issue-number"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World/issues/comments/1 */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List issue events + * @description Lists all events for an issue. + */ + "issues/list-events": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["issue-event-for-issue"][]; + }; + }; + 410: components["responses"]["gone"]; + }; + }; + /** + * List labels for an issue + * @description Lists all labels for an issue. + */ + "issues/list-labels-on-issue": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * Set labels for an issue + * @description Removes any previous labels and sets the new labels for an issue. + */ + "issues/set-labels": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + issue_number: components["parameters"]["issue-number"]; + }; + }; + requestBody?: { + content: { + "application/json": OneOf< + [ + { + /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/rest/issues/labels#add-labels-to-an-issue)." */ + labels?: string[]; + }, + { + labels?: { + name: string; + }[]; + }, + ] + >; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Add labels to an issue + * @description Adds labels to an issue. If you provide an empty array of labels, all labels are removed from the issue. + */ + "issues/add-labels": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + issue_number: components["parameters"]["issue-number"]; + }; + }; + requestBody?: { + content: { + "application/json": OneOf< + [ + { + /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/rest/issues/labels#set-labels-for-an-issue)." */ + labels?: string[]; + }, + { + labels?: { + name: string; + }[]; + }, + ] + >; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Remove all labels from an issue + * @description Removes all labels from an issue. + */ + "issues/remove-all-labels": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * Remove a label from an issue + * @description Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist. + */ + "issues/remove-label": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + issue_number: components["parameters"]["issue-number"]; + name: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * Lock an issue + * @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 method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." + */ + "issues/lock": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + issue_number: components["parameters"]["issue-number"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: + * * `off-topic` + * * `too heated` + * * `resolved` + * * `spam` + * @enum {string} + */ + lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; + } | null; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Unlock an issue + * @description Users with push access can unlock an issue's conversation. + */ + "issues/unlock": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List reactions for an issue + * @description List the reactions to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). + */ + "reactions/list-for-issue": { + parameters: { + query?: { + /** @description Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to an issue. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * Create reaction for an issue + * @description Create a reaction to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). A response with an HTTP `200` status means that you already added the reaction type to this issue. + */ + "reactions/create-for-issue": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + issue_number: components["parameters"]["issue-number"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the issue. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Delete an issue reaction + * @description **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). + */ + "reactions/delete-for-issue": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + issue_number: components["parameters"]["issue-number"]; + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List timeline events for an issue + * @description List all timeline events for an issue. + */ + "issues/list-events-for-timeline": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["timeline-issue-events"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** List deploy keys */ + "repos/list-deploy-keys": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["deploy-key"][]; + }; + }; + }; + }; + /** + * Create a deploy key + * @description You can create a read-only deploy key. + */ + "repos/create-deploy-key": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description A name for the key. */ + title?: string; + /** @description The contents of the key. */ + key: string; + /** + * @description If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. + * + * Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." + */ + read_only?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World/keys/1 */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["deploy-key"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Get a deploy key */ + "repos/get-deploy-key": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["deploy-key"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete a deploy key + * @description Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. + */ + "repos/delete-deploy-key": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List labels for a repository + * @description Lists all labels for a repository. + */ + "issues/list-labels-for-repo": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create a label + * @description Creates a label for the specified repository with the given name and color. The name and color parameters are required. The color must be a valid [hexadecimal color code](http://www.color-hex.com/). + */ + "issues/create-label": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ + name: string; + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World/labels/bug */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["label"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get a label + * @description Gets a label using the given name. + */ + "issues/get-label": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["label"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete a label + * @description Deletes a label using the given label name. + */ + "issues/delete-label": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Update a label + * @description Updates a label using the given label name. + */ + "issues/update-label": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + name: string; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ + new_name?: string; + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["label"]; + }; + }; + }; + }; + /** + * List repository languages + * @description Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. + */ + "repos/list-languages": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["language"]; + }; + }; + }; + }; + /** + * Get the license for a repository + * @description This method returns the contents of the repository's license file, if one is detected. + * + * 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). + */ + "licenses/get-for-repo": { + parameters: { + query?: { + ref?: components["parameters"]["git-ref"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["license-content"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Sync a fork branch with the upstream repository + * @description Sync a branch of a forked repository to keep it up-to-date with the upstream repository. + */ + "repos/merge-upstream": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the branch which should be updated to match upstream. */ + branch: string; + }; + }; + }; + responses: { + /** @description The branch has been successfully synced with the upstream repository */ + 200: { + content: { + "application/json": components["schemas"]["merged-upstream"]; + }; + }; + /** @description The branch could not be synced because of a merge conflict */ + 409: { + content: never; + }; + /** @description The branch could not be synced for some other reason */ + 422: { + content: never; + }; + }; + }; + /** Merge a branch */ + "repos/merge": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the base branch that the head will be merged into. */ + base: string; + /** @description The head to merge. This can be a branch name or a commit SHA1. */ + head: string; + /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ + commit_message?: string; + }; + }; + }; + responses: { + /** @description Successful Response (The resulting merge commit) */ + 201: { + content: { + "application/json": components["schemas"]["commit"]; + }; + }; + /** @description Response when already merged */ + 204: { + content: never; + }; + 403: components["responses"]["forbidden"]; + /** @description Not Found when the base or head does not exist */ + 404: { + content: never; + }; + /** @description Conflict when there is a merge conflict */ + 409: { + content: never; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List milestones + * @description Lists milestones for a repository. + */ + "issues/list-milestones": { + parameters: { + query?: { + /** @description The state of the milestone. Either `open`, `closed`, or `all`. */ + state?: "open" | "closed" | "all"; + /** @description What to sort results by. Either `due_on` or `completeness`. */ + sort?: "due_on" | "completeness"; + /** @description The direction of the sort. Either `asc` or `desc`. */ + direction?: "asc" | "desc"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["milestone"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create a milestone + * @description Creates a milestone. + */ + "issues/create-milestone": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the milestone. */ + title: string; + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: "open" | "closed"; + /** @description A description of the milestone. */ + description?: string; + /** + * Format: date-time + * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + due_on?: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World/milestones/1 */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get a milestone + * @description Gets a milestone using the given milestone number. + */ + "issues/get-milestone": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete a milestone + * @description Deletes a milestone using the given milestone number. + */ + "issues/delete-milestone": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Update a milestone */ + "issues/update-milestone": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The title of the milestone. */ + title?: string; + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: "open" | "closed"; + /** @description A description of the milestone. */ + description?: string; + /** + * Format: date-time + * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + due_on?: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + }; + }; + /** + * List labels for issues in a milestone + * @description Lists labels for issues in a milestone. + */ + "issues/list-labels-for-milestone": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + }; + }; + /** + * List repository notifications for the authenticated user + * @description Lists all notifications for the current user in the specified repository. + */ + "activity/list-repo-notifications-for-authenticated-user": { + parameters: { + query?: { + all?: components["parameters"]["all"]; + participating?: components["parameters"]["participating"]; + since?: components["parameters"]["since"]; + before?: components["parameters"]["before"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["thread"][]; + }; + }; + }; + }; + /** + * Mark repository notifications as read + * @description Marks all notifications in a repository as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List repository notifications for the authenticated user](https://docs.github.com/rest/activity/notifications#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. + */ + "activity/mark-repo-notifications-as-read": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + }; + }; + }; + responses: { + /** @description Response */ + 202: { + content: { + "application/json": { + message?: string; + url?: string; + }; + }; + }; + /** @description Reset Content */ + 205: { + content: never; + }; + }; + }; + /** + * Get a GitHub Pages site + * @description Gets information about a GitHub Pages site. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "repos/get-pages": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Update information about a GitHub Pages site + * @description Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * 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. + */ + "repos/update-information-about-pages-site": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ + cname?: string | null; + /** @description Specify whether HTTPS should be enforced for the repository. */ + https_enforced?: boolean; + /** + * @description The process by which the GitHub Pages site will be built. `workflow` means that the site is built by a custom GitHub Actions workflow. `legacy` means that the site is built by GitHub when changes are pushed to a specific branch. + * @enum {string} + */ + build_type?: "legacy" | "workflow"; + source?: + | ("gh-pages" | "master" | "master /docs") + | { + /** @description The repository branch used to publish your site's source files. */ + branch: string; + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. + * @enum {string} + */ + path: "/" | "/docs"; + }; + }; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 400: components["responses"]["bad_request"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Create a GitHub Pages site + * @description Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." + * + * 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. + */ + "repos/create-pages-site": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The process in which the Page will be built. Possible values are `"legacy"` and `"workflow"`. + * @enum {string} + */ + build_type?: "legacy" | "workflow"; + /** @description The source branch and directory used to publish your Pages site. */ + source?: { + /** @description The repository branch used to publish your site's source files. */ + branch: string; + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` + * @default / + * @enum {string} + */ + path?: "/" | "/docs"; + }; + } | null; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Delete a GitHub Pages site + * @description Deletes a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * 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. + */ + "repos/delete-pages-site": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List GitHub Pages builds + * @description Lists builts of a GitHub Pages site. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "repos/list-pages-builds": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["page-build"][]; + }; + }; + }; + }; + /** + * Request a GitHub Pages build + * @description You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures. + * + * Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes. + */ + "repos/request-pages-build": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["page-build-status"]; + }; + }; + }; + }; + /** + * Get latest Pages build + * @description Gets information about the single most recent build of a GitHub Pages site. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "repos/get-latest-pages-build": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + /** + * Get GitHub Pages build + * @description Gets information about a GitHub Pages build. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "repos/get-pages-build": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + build_id: number; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + /** + * Create a GitHub Pages deployment + * @description Create a GitHub Pages deployment for a repository. + * + * The authenticated user must have write permission to the repository. + */ + "repos/create-pages-deployment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @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_id?: number; + /** @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. */ + artifact_url?: string; + /** + * @description The target environment for this GitHub Pages deployment. + * @default github-pages + */ + environment?: string; + /** + * @description A unique string that represents the version of the build for this deployment. + * @default GITHUB_SHA + */ + pages_build_version: string; + /** @description The OIDC token issued by GitHub Actions certifying the origin of the deployment. */ + oidc_token: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["page-deployment"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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. + */ + "repos/get-pages-deployment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pages_deployment_id: components["parameters"]["pages-deployment-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["pages-deployment-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Cancel a GitHub Pages deployment + * @description Cancels a GitHub Pages deployment. + * + * The authenticated user must have write permissions for the GitHub Pages site. + */ + "repos/cancel-pages-deployment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pages_deployment_id: components["parameters"]["pages-deployment-id"]; + }; + }; + responses: { + 204: components["responses"]["no_content"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get a DNS health check for GitHub Pages + * @description Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * 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. + */ + "repos/get-pages-health-check": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["pages-health-check"]; + }; + }; + /** @description Empty response */ + 202: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** @description Custom domains are not available for GitHub Pages */ + 400: { + content: never; + }; + 404: components["responses"]["not_found"]; + /** @description There isn't a CNAME for this page */ + 422: { + content: never; + }; + }; + }; + /** + * 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)". + */ + "repos/check-private-vulnerability-reporting": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Private vulnerability reporting status */ + 200: { + content: { + "application/json": { + /** @description Whether or not private vulnerability reporting is enabled for the repository. */ + enabled: boolean; + }; + }; + }; + 422: components["responses"]["bad_request"]; + }; + }; + /** + * Enable private vulnerability reporting for a repository + * @description Enables private vulnerability reporting for a repository. The authenticated user must have admin access to the repository. For more information, see "[Privately reporting a security vulnerability](https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)." + */ + "repos/enable-private-vulnerability-reporting": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + 204: components["responses"]["no_content"]; + 422: components["responses"]["bad_request"]; + }; + }; + /** + * Disable private vulnerability reporting for a repository + * @description Disables private vulnerability reporting for a repository. The authenticated user must have admin access to the repository. For more information, see "[Privately reporting a security vulnerability](https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)". + */ + "repos/disable-private-vulnerability-reporting": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + 204: components["responses"]["no_content"]; + 422: components["responses"]["bad_request"]; + }; + }; + /** + * List repository projects + * @description Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + "projects/list-for-repo": { + parameters: { + query?: { + /** @description Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Create a repository project + * @description Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + "projects/create-for-repo": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * 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. + */ + "repos/get-custom-properties-values": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["custom-property-value"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/create-or-update-custom-properties-values": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description A list of custom property names and associated values to apply to the repositories. */ + properties: components["schemas"]["custom-property-value"][]; + }; + }; + }; + responses: { + /** @description No Content when custom property values are successfully created or updated */ + 204: { + content: never; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List pull requests + * @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`. + */ + "pulls/list": { + parameters: { + query?: { + /** @description Either `open`, `closed`, or `all` to filter by state. */ + state?: "open" | "closed" | "all"; + /** @description Filter pulls by head user or head organization and branch name in the format of `user:ref-name` or `organization:ref-name`. For example: `github:new-script-format` or `octocat:test-branch`. */ + head?: string; + /** @description Filter pulls by base branch name. Example: `gh-pages`. */ + base?: string; + /** @description What to sort results by. `popularity` will sort by the number of comments. `long-running` will sort by date created and will limit the results to pull requests that have been open for more than a month and have had activity within the past month. */ + sort?: "created" | "updated" | "popularity" | "long-running"; + /** @description The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */ + direction?: "asc" | "desc"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["pull-request-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Create a pull request + * @description Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. + * + * 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`. + */ + "pulls/create": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the new pull request. Required unless `issue` is specified. */ + title?: string; + /** @description The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. */ + head: string; + /** + * Format: repo.nwo + * @description The name of the repository where the changes in the pull request were made. This field is required for cross-repository pull requests if both repositories are owned by the same organization. + * @example octo-org/octo-repo + */ + head_repo?: string; + /** @description The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. */ + base: string; + /** @description The contents of the pull request. */ + body?: string; + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ + draft?: boolean; + /** + * Format: int64 + * @description An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified. + * @example 1 + */ + issue?: number; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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. + * + * 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`. + */ + "pulls/list-review-comments-for-repo": { + parameters: { + query?: { + sort?: "created" | "updated" | "created_at"; + /** @description The direction to sort results. Ignored without `sort` parameter. */ + direction?: "asc" | "desc"; + since?: components["parameters"]["since"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"][]; + }; + }; + }; + }; + /** + * Get a review comment for a pull request + * @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`. + */ + "pulls/get-review-comment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete a review comment for a pull request + * @description Deletes a review comment. + */ + "pulls/delete-review-comment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Update a review comment for a pull request + * @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`. + */ + "pulls/update-review-comment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + comment_id: components["parameters"]["comment-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the reply to the review comment. */ + body: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + }; + }; + /** + * List reactions for a pull request review comment + * @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). + */ + "reactions/list-for-pull-request-review-comment": { + parameters: { + query?: { + /** @description Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a pull request review comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create reaction for a pull request review comment + * @description Create a reaction to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. + */ + "reactions/create-for-pull-request-review-comment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + comment_id: components["parameters"]["comment-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the pull request review comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + responses: { + /** @description Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** @description Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Delete a pull request comment reaction + * @description **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). + */ + "reactions/delete-for-pull-request-comment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + comment_id: components["parameters"]["comment-id"]; + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Get a pull request + * @description Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/pulls/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/pulls/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. + * + * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: + * + * * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. + * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. + * + * Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * 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. + */ + "pulls/get": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** @description Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ + 200: { + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 406: components["responses"]["unacceptable"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Update a pull request + * @description Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. + * + * 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`. + */ + "pulls/update": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The title of the pull request. */ + title?: string; + /** @description The contents of the pull request. */ + body?: string; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state?: "open" | "closed"; + /** @description The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. */ + base?: string; + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Create a codespace from a pull request + * @description Creates a codespace owned by the authenticated user for the specified pull request. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + "codespaces/create-with-pr-for-authenticated-user": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. */ + location?: string; + /** + * @description The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. + * @enum {string} + */ + geo?: "EuropeWest" | "SoutheastAsia" | "UsEast" | "UsWest"; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + } | null; + }; + }; + responses: { + /** @description Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** @description Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List review comments on a pull request + * @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`. + */ + "pulls/list-review-comments": { + parameters: { + query?: { + sort?: components["parameters"]["sort"]; + /** @description The direction to sort results. Ignored without `sort` parameter. */ + direction?: "asc" | "desc"; + since?: components["parameters"]["since"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"][]; + }; + }; + }; + }; + /** + * Create a review comment for a pull request + * @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)." + * + * 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. + * + * 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`. + */ + "pulls/create-review-comment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + /** @description The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */ + commit_id: string; + /** @description The relative path to the file that necessitates a comment. */ + path: string; + /** + * @deprecated + * @description **This parameter is deprecated. Use `line` instead**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. 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. + */ + position?: number; + /** + * @description In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** @description **Required unless using `subject_type:file`**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ + line?: number; + /** @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ + start_line?: number; + /** + * @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * @enum {string} + */ + start_side?: "LEFT" | "RIGHT" | "side"; + /** + * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. + * @example 2 + */ + in_reply_to?: number; + /** + * @description The level at which the comment is targeted. + * @enum {string} + */ + subject_type?: "line" | "file"; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Create a reply for a review comment + * @description Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/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`. + */ + "pulls/create-reply-for-review-comment": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + comment_id: components["parameters"]["comment-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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) + * 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`. + */ + "pulls/list-commits": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["commit"][]; + }; + }; + }; + }; + /** + * List pull requests files + * @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`. + */ + "pulls/list-files": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["diff-entry"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Check if a pull request has been merged + * @description Checks if a pull request has been merged into the base branch. The HTTP status of the response indicates whether or not the pull request has been merged; the response body is empty. + */ + "pulls/check-if-merged": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** @description Response if pull request has been merged */ + 204: { + content: never; + }; + /** @description Not Found if pull request has not been merged */ + 404: { + content: never; + }; + }; + }; + /** + * 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. 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)." + */ + "pulls/merge": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description Title for the automatic commit message. */ + commit_title?: string; + /** @description Extra detail to append to automatic commit message. */ + commit_message?: string; + /** @description SHA that pull request head must match to allow merge. */ + sha?: string; + /** + * @description The merge method to use. + * @enum {string} + */ + merge_method?: "merge" | "squash" | "rebase"; + } | null; + }; + }; + responses: { + /** @description if merge was successful */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-merge-result"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + /** @description Method Not Allowed if merge cannot be performed */ + 405: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + /** @description Conflict if sha was provided and pull request head did not match */ + 409: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get all requested reviewers for a pull request + * @description Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. + */ + "pulls/list-requested-reviewers": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["pull-request-review-request"]; + }; + }; + }; + }; + /** + * Request reviewers for a pull request + * @description This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "pulls/request-reviewers": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description An array of user `login`s that will be requested. */ + reviewers?: string[]; + /** @description An array of team `slug`s that will be requested. */ + team_reviewers?: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["pull-request-simple"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** @description Unprocessable Entity if user is not a collaborator */ + 422: { + content: never; + }; + }; + }; + /** + * Remove requested reviewers from a pull request + * @description Removes review requests from a pull request for a given set of users and/or teams. + */ + "pulls/remove-requested-reviewers": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of user `login`s that will be removed. */ + reviewers: string[]; + /** @description An array of team `slug`s that will be removed. */ + team_reviewers?: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-simple"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List reviews for a pull request + * @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`. + */ + "pulls/list-reviews": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** @description The list of reviews returns in chronological order. */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["pull-request-review"][]; + }; + }; + }; + }; + /** + * Create a review for a pull request + * @description 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. 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`. + */ + "pulls/create-review": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. */ + commit_id?: string; + /** @description **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ + body?: string; + /** + * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request) when you are ready. + * @enum {string} + */ + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ + comments?: { + /** @description The relative path to the file that necessitates a review comment. */ + path: string; + /** @description The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. 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. */ + position?: number; + /** @description Text of the review comment. */ + body: string; + /** @example 28 */ + line?: number; + /** @example RIGHT */ + side?: string; + /** @example 26 */ + start_line?: number; + /** @example LEFT */ + start_side?: string; + }[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Get a review for a pull request + * @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`. + */ + "pulls/get-review": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Update a review for a pull request + * @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`. + */ + "pulls/update-review": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + review_id: components["parameters"]["review-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The body text of the pull request review. */ + body: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Delete a pending review for a pull request + * @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`. + */ + "pulls/delete-pending-review": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * List comments for a 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`. + */ + "pulls/list-comments-for-review": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["review-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Dismiss a review for a pull request + * @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`. + */ + "pulls/dismiss-review": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + review_id: components["parameters"]["review-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The message for the pull request review dismissal */ + message: string; + /** + * @example "DISMISS" + * @enum {string} + */ + event?: "DISMISS"; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * 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)." + * + * 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`. + */ + "pulls/submit-review": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + review_id: components["parameters"]["review-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The body text of the pull request review */ + body?: string; + /** + * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. + * @enum {string} + */ + event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Update a pull request branch + * @description Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. + */ + "pulls/update-branch": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/rest/commits/commits#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ + expected_head_sha?: string; + } | null; + }; + }; + responses: { + /** @description Response */ + 202: { + content: { + "application/json": { + message?: string; + url?: string; + }; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get a repository README + * @description Gets the preferred README for a repository. + * + * 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). + */ + "repos/get-readme": { + parameters: { + query?: { + /** @description The name of the commit/branch/tag. Default: the repository’s default branch. */ + ref?: string; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get a repository README for a directory + * @description Gets the README from a repository 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. 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). + */ + "repos/get-readme-in-directory": { + parameters: { + query?: { + /** @description The name of the commit/branch/tag. Default: the repository’s default branch. */ + ref?: string; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + /** @description The alternate path to look for a README file */ + dir: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List releases + * @description This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/rest/repos/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + "repos/list-releases": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["release"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create a release + * @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. 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)." + */ + "repos/create-release": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name: string; + /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch. */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** + * @description `true` to create a draft (unpublished) release, `false` to create a published one. + * @default false + */ + draft?: boolean; + /** + * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. + * @default false + */ + prerelease?: boolean; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + /** + * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. + * @default false + */ + generate_release_notes?: boolean; + /** + * @description Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version. + * @default true + * @enum {string} + */ + make_latest?: "true" | "false" | "legacy"; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World/releases/1 */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["release"]; + }; + }; + /** @description Not Found if the discussion category name is invalid */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get a release asset + * @description To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. + */ + "repos/get-release-asset": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + 302: components["responses"]["found"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Delete a release asset */ + "repos/delete-release-asset": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Update a release asset + * @description Users with push access to the repository can edit a release asset. + */ + "repos/update-release-asset": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + asset_id: components["parameters"]["asset-id"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The file name of the asset. */ + name?: string; + /** @description An alternate short description of the asset. Used in place of the filename. */ + label?: string; + /** @example "uploaded" */ + state?: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + }; + }; + /** + * Generate release notes content for a release + * @description Generate a name and body describing a [release](https://docs.github.com/rest/releases/releases#get-a-release). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. + */ + "repos/generate-release-notes": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The tag name for the release. This can be an existing tag or a new one. */ + tag_name: string; + /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ + target_commitish?: string; + /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ + previous_tag_name?: string; + /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ + configuration_file_path?: string; + }; + }; + }; + responses: { + /** @description Name and body of generated release notes */ + 200: { + content: { + "application/json": components["schemas"]["release-notes-content"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get the latest release + * @description View the latest published full release for the repository. + * + * The latest release is the most recent non-prerelease, non-draft release, sorted by the `created_at` attribute. The `created_at` attribute is the date of the commit used for the release, and not the date when the release was drafted or published. + */ + "repos/get-latest-release": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + }; + }; + /** + * Get a release by tag name + * @description Get a published release with the specified tag. + */ + "repos/get-release-by-tag": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + /** @description tag parameter */ + tag: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get a release + * @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)." + */ + "repos/get-release": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** @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)." */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + /** @description Unauthorized */ + 401: { + content: never; + }; + }; + }; + /** + * Delete a release + * @description Users with push access to the repository can delete a release. + */ + "repos/delete-release": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Update a release + * @description Users with push access to the repository can edit a release. + */ + "repos/update-release": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + release_id: components["parameters"]["release-id"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name?: string; + /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch. */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** @description `true` makes the release a draft, and `false` publishes the release. */ + draft?: boolean; + /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ + prerelease?: boolean; + /** + * @description Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version. + * @default true + * @enum {string} + */ + make_latest?: "true" | "false" | "legacy"; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + /** @description Not Found if the discussion category name is invalid */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** List release assets */ + "repos/list-release-assets": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["release-asset"][]; + }; + }; + }; + }; + /** + * Upload a release asset + * @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 + * the response of the [Create a release endpoint](https://docs.github.com/rest/releases/releases#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, + * you'll still need to pass your authentication to be able to upload an asset. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List release assets](https://docs.github.com/rest/releases/assets#list-release-assets)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * To find the `release_id` query the [`GET /repos/{owner}/{repo}/releases/latest` endpoint](https://docs.github.com/rest/releases/releases#get-the-latest-release). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + "repos/upload-release-asset": { + parameters: { + query: { + name: string; + label?: string; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + release_id: components["parameters"]["release-id"]; + }; + }; + requestBody?: { + content: { + "application/octet-stream": string; + }; + }; + responses: { + /** @description Response for successful upload */ + 201: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + /** @description Response if you upload an asset with the same filename as another uploaded asset */ + 422: { + content: never; + }; + }; + }; + /** + * List reactions for a release + * @description List the reactions to a [release](https://docs.github.com/rest/releases/releases#get-a-release). + */ + "reactions/list-for-release": { + parameters: { + query?: { + /** @description Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a release. */ + content?: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create reaction for a release + * @description Create a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release). A response with a `Status: 200 OK` means that you already added the reaction type to this release. + */ + "reactions/create-for-release": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + release_id: components["parameters"]["release-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the release. + * @enum {string} + */ + content: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + }; + responses: { + /** @description Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** @description Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Delete a release reaction + * @description **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release). + */ + "reactions/delete-for-release": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + release_id: components["parameters"]["release-id"]; + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Get rules for a branch + * @description Returns all active rules that apply to the specified branch. The branch does not need to exist; rules that would apply + * to a branch with that name will be returned. All active rules that apply will be returned, regardless of the level + * at which they are configured (e.g. repository or organization). Rules in rulesets with "evaluate" or "disabled" + * enforcement statuses are not returned. + */ + "repos/get-branch-rules": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-rule-detailed"][]; + }; + }; + }; + }; + /** + * Get all repository rulesets + * @description Get all the rulesets for a repository. + */ + "repos/get-repo-rulesets": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + /** @description Include rulesets configured at higher levels that apply to this repository */ + includes_parents?: boolean; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-ruleset"][]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Create a repository ruleset + * @description Create a ruleset for a repository. + */ + "repos/create-repo-ruleset": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + /** @description Request body */ + requestBody: { + content: { + "application/json": { + /** @description The name of the ruleset. */ + name: string; + /** + * @description The target of the ruleset + * + * **Note**: The `push` target is in beta and is subject to change. + * @enum {string} + */ + target?: "branch" | "tag" | "push"; + enforcement: components["schemas"]["repository-rule-enforcement"]; + /** @description The actors that can bypass the rules in this ruleset */ + bypass_actors?: components["schemas"]["repository-ruleset-bypass-actor"][]; + conditions?: components["schemas"]["repository-ruleset-conditions"]; + /** @description An array of rules within the ruleset. */ + rules?: components["schemas"]["repository-rule"][]; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["repository-ruleset"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * 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)." + */ + "repos/get-repo-rule-suites": { + parameters: { + query?: { + ref?: components["parameters"]["ref-in-query"]; + time_period?: components["parameters"]["time-period"]; + actor_name?: components["parameters"]["actor-name-in-query"]; + rule_suite_result?: components["parameters"]["rule-suite-result"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["rule-suites"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * 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)." + */ + "repos/get-repo-rule-suite": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + rule_suite_id: components["parameters"]["rule-suite-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["rule-suite"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Get a repository ruleset + * @description Get a ruleset for a repository. + */ + "repos/get-repo-ruleset": { + parameters: { + query?: { + /** @description Include rulesets configured at higher levels that apply to this repository */ + includes_parents?: boolean; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + /** @description The ID of the ruleset. */ + ruleset_id: number; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-ruleset"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Update a repository ruleset + * @description Update a ruleset for a repository. + */ + "repos/update-repo-ruleset": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + /** @description The ID of the ruleset. */ + ruleset_id: number; + }; + }; + /** @description Request body */ + requestBody?: { + content: { + "application/json": { + /** @description The name of the ruleset. */ + name?: string; + /** + * @description The target of the ruleset + * + * **Note**: The `push` target is in beta and is subject to change. + * @enum {string} + */ + target?: "branch" | "tag" | "push"; + enforcement?: components["schemas"]["repository-rule-enforcement"]; + /** @description The actors that can bypass the rules in this ruleset */ + bypass_actors?: components["schemas"]["repository-ruleset-bypass-actor"][]; + conditions?: components["schemas"]["repository-ruleset-conditions"]; + /** @description An array of rules within the ruleset. */ + rules?: components["schemas"]["repository-rule"][]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-ruleset"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Delete a repository ruleset + * @description Delete a ruleset for a repository. + */ + "repos/delete-repo-ruleset": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + /** @description The ID of the ruleset. */ + ruleset_id: number; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * List secret scanning alerts for a repository + * @description Lists secret scanning alerts for an eligible repository, from newest to oldest. + * + * 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. + */ + "secret-scanning/list-alerts-for-repo": { + parameters: { + query?: { + state?: components["parameters"]["secret-scanning-alert-state"]; + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + sort?: components["parameters"]["secret-scanning-alert-sort"]; + direction?: components["parameters"]["direction"]; + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + before?: components["parameters"]["secret-scanning-pagination-before-org-repo"]; + after?: components["parameters"]["secret-scanning-pagination-after-org-repo"]; + validity?: components["parameters"]["secret-scanning-alert-validity"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"][]; + }; + }; + /** @description Repository is public or secret scanning is disabled for the repository */ + 404: { + content: never; + }; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Get a secret scanning alert + * @description Gets a single secret scanning alert detected in an eligible repository. + * + * 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. + */ + "secret-scanning/get-alert": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + /** @description Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: { + content: never; + }; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Update a secret scanning alert + * @description Updates the status of a secret scanning alert in an eligible repository. + * + * 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. + */ + "secret-scanning/update-alert": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + alert_number: components["parameters"]["alert-number"]; + }; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + resolution_comment?: components["schemas"]["secret-scanning-alert-resolution-comment"]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"]; + }; + }; + /** @description Bad request, resolution comment is invalid or the resolution was not changed. */ + 400: { + content: never; + }; + /** @description Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: { + content: never; + }; + /** @description State does not match the resolution or resolution comment */ + 422: { + content: never; + }; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List locations for a secret scanning alert + * @description Lists all locations for a given secret scanning alert for an eligible repository. + * + * 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. + */ + "secret-scanning/list-locations-for-alert": { + parameters: { + query?: { + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["secret-scanning-location"][]; + }; + }; + /** @description Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: { + content: never; + }; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List repository security advisories + * @description Lists security advisories in a repository. + * + * 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. + */ + "security-advisories/list-repository-advisories": { + parameters: { + query?: { + direction?: components["parameters"]["direction"]; + /** @description The property to sort the results by. */ + sort?: "created" | "updated" | "published"; + before?: components["parameters"]["pagination-before"]; + after?: components["parameters"]["pagination-after"]; + /** @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)." */ + per_page?: number; + /** @description Filter by state of the repository advisories. Only advisories of this state will be returned. */ + state?: "triage" | "draft" | "published" | "closed"; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-advisory"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create a repository security advisory + * @description Creates a new repository security advisory. + * + * 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. + */ + "security-advisories/create-repository-advisory": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["repository-advisory-create"]; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["repository-advisory"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Privately report a security vulnerability + * @description Report a security vulnerability to the maintainers of the repository. + * See "[Privately reporting a security vulnerability](https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)" for more information about private vulnerability reporting. + */ + "security-advisories/create-private-vulnerability-report": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["private-vulnerability-report-create"]; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["repository-advisory"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get a repository security advisory + * @description Get a repository security advisory using its GitHub Security Advisory (GHSA) identifier. + * + * 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. + */ + "security-advisories/get-repository-advisory": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + ghsa_id: components["parameters"]["ghsa_id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-advisory"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Update a repository security advisory + * @description Update a repository security advisory using its GitHub Security Advisory (GHSA) identifier. + * + * 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. + */ + "security-advisories/update-repository-advisory": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + ghsa_id: components["parameters"]["ghsa_id"]; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["repository-advisory-update"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-advisory"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + /** @description Validation failed, or the endpoint has been spammed. */ + 422: { + content: { + "application/json": components["schemas"]["validation-error"]; + }; + }; + }; + }; + /** + * Request a CVE for a repository security advisory + * @description If you want a CVE identification number for the security vulnerability in your project, and don't already have one, you can request a CVE identification number from GitHub. For more information see "[Requesting a CVE identification number](https://docs.github.com/code-security/security-advisories/repository-security-advisories/publishing-a-repository-security-advisory#requesting-a-cve-identification-number-optional)." + * + * You may request a CVE for public repositories, but cannot do so for private repositories. + * + * In order to request a CVE for a 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. + */ + "security-advisories/create-repository-advisory-cve-request": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + ghsa_id: components["parameters"]["ghsa_id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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. + */ + "security-advisories/create-fork": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + ghsa_id: components["parameters"]["ghsa_id"]; + }; + }; + responses: { + /** @description Response */ + 202: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List stargazers + * @description Lists the people that have starred the repository. + * + * 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. + */ + "activity/list-stargazers-for-repo": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": + | components["schemas"]["simple-user"][] + | components["schemas"]["stargazer"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get the weekly commit activity + * @description + * 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. + */ + "repos/get-code-frequency-stats": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + 200: { + content: { + "application/json": components["schemas"]["code-frequency-stat"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + /** @description Repository contains more than 10,000 commits */ + 422: { + content: never; + }; + }; + }; + /** + * Get the last year of commit activity + * @description Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. + */ + "repos/get-commit-activity-stats": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-activity"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** + * Get all contributor commit activity + * @description + * 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](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. + */ + "repos/get-contributors-stats": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["contributor-activity"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** + * Get the weekly commit count + * @description Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`. + * + * The array order is oldest week (index 0) to most recent week. + * + * The most recent week is seven days ago at UTC midnight to today at UTC midnight. + */ + "repos/get-participation-stats": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description The array order is oldest week (index 0) to most recent week. */ + 200: { + content: { + "application/json": components["schemas"]["participation-stats"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get the hourly commit count for each day + * @description Each array contains the day number, hour number, and number of commits: + * + * * `0-6`: Sunday - Saturday + * * `0-23`: Hour of day + * * Number of commits + * + * For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. + */ + "repos/get-punch-card-stats": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. */ + 200: { + content: { + "application/json": components["schemas"]["code-frequency-stat"][]; + }; + }; + 204: components["responses"]["no_content"]; + }; + }; + /** + * Create a commit status + * @description Users with push access in a repository can create commit statuses for a given SHA. + * + * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. + */ + "repos/create-commit-status": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + sha: string; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the status. + * @enum {string} + */ + state: "error" | "failure" | "pending" | "success"; + /** + * @description The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. + * For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: + * `http://ci.example.com/user/repo/build/sha` + */ + target_url?: string | null; + /** @description A short description of the status. */ + description?: string | null; + /** + * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. + * @default default + */ + context?: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["status"]; + }; + }; + }; + }; + /** + * List watchers + * @description Lists the people watching the specified repository. + */ + "activity/list-watchers-for-repo": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** + * Get a repository subscription + * @description Gets information about whether the authenticated user is subscribed to the repository. + */ + "activity/get-repo-subscription": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description if you subscribe to the repository */ + 200: { + content: { + "application/json": components["schemas"]["repository-subscription"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** @description Not Found if you don't subscribe to the repository */ + 404: { + content: never; + }; + }; + }; + /** + * Set a repository subscription + * @description If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/activity/watching#delete-a-repository-subscription) completely. + */ + "activity/set-repo-subscription": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description Determines if notifications should be received from this repository. */ + subscribed?: boolean; + /** @description Determines if all notifications should be blocked from this repository. */ + ignored?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-subscription"]; + }; + }; + }; + }; + /** + * Delete a repository subscription + * @description This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://docs.github.com/rest/activity/watching#set-a-repository-subscription). + */ + "activity/delete-repo-subscription": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** List repository tags */ + "repos/list-tags": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["tag"][]; + }; + }; + }; + }; + /** + * List tag protection states for a repository + * @description This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + "repos/list-tag-protection": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["tag-protection"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create a tag protection state for a repository + * @description This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + "repos/create-tag-protection": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description An optional glob pattern to match against when enforcing tag protection. */ + pattern: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["tag-protection"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete a tag protection state for a repository + * @description This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + "repos/delete-tag-protection": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + tag_protection_id: components["parameters"]["tag-protection-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Download a repository archive (tar) + * @description Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use + * the `Location` header to make a second `GET` request. + * **Note**: For private repositories, these links are temporary and expire after five minutes. + */ + "repos/download-tarball-archive": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + ref: string; + }; + }; + responses: { + /** @description Response */ + 302: { + headers: { + /** @example https://codeload.github.com/me/myprivate/legacy.zip/master?login=me&token=thistokenexpires */ + Location?: string; + }; + content: never; + }; + }; + }; + /** + * List repository teams + * @description Lists the teams that have access to the specified repository and that are also visible to the authenticated user. + * + * For a public repository, a team is listed only if that team added the public repository explicitly. + * + * 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. + */ + "repos/list-teams": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Get all repository topics */ + "repos/get-all-topics": { + parameters: { + query?: { + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Replace all repository topics */ + "repos/replace-all-topics": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. */ + names: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Get repository clones + * @description Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. + */ + "repos/get-clones": { + parameters: { + query?: { + per?: components["parameters"]["per"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["clone-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Get top referral paths + * @description Get the top 10 popular contents over the last 14 days. + */ + "repos/get-top-paths": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["content-traffic"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Get top referral sources + * @description Get the top 10 referrers over the last 14 days. + */ + "repos/get-top-referrers": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["referrer-traffic"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Get page views + * @description Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. + */ + "repos/get-views": { + parameters: { + query?: { + per?: components["parameters"]["per"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["view-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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/). + */ + "repos/transfer": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The username or organization name the repository will be transferred to. */ + new_owner: string; + /** @description The new name to be given to the repository. */ + new_name?: string; + /** @description ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ + team_ids?: number[]; + }; + }; + }; + responses: { + /** @description Response */ + 202: { + content: { + "application/json": components["schemas"]["minimal-repository"]; + }; + }; + }; + }; + /** + * Check if vulnerability alerts are enabled for a repository + * @description Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". + */ + "repos/check-vulnerability-alerts": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response if repository is enabled with vulnerability alerts */ + 204: { + content: never; + }; + /** @description Not Found if repository is not enabled with vulnerability alerts */ + 404: { + content: never; + }; + }; + }; + /** + * Enable vulnerability alerts + * @description Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". + */ + "repos/enable-vulnerability-alerts": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Disable vulnerability alerts + * @description Disables dependency alerts and the dependency graph for a repository. + * The authenticated user must have admin access to the repository. For more information, + * see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". + */ + "repos/disable-vulnerability-alerts": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Download a repository archive (zip) + * @description Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use + * the `Location` header to make a second `GET` request. + * + * **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. + */ + "repos/download-zipball-archive": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + ref: string; + }; + }; + responses: { + /** @description Response */ + 302: { + headers: { + /** @example https://codeload.github.com/me/myprivate/legacy.zip/master?login=me&token=thistokenexpires */ + Location?: string; + }; + content: never; + }; + }; + }; + /** + * Create a repository using a template + * @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 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. + */ + "repos/create-using-template": { + parameters: { + path: { + /** @description The account owner of the template repository. The name is not case sensitive. */ + template_owner: string; + /** @description The name of the template repository without the `.git` extension. The name is not case sensitive. */ + template_repo: string; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. */ + owner?: string; + /** @description The name of the new repository. */ + name: string; + /** @description A short description of the new repository. */ + description?: string; + /** + * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. + * @default false + */ + include_all_branches?: boolean; + /** + * @description Either `true` to create a new private repository or `false` to create a new public one. + * @default false + */ + private?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + }; + }; + /** + * List public repositories + * @description Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of repositories. + */ + "repos/list-public": { + parameters: { + query?: { + since?: components["parameters"]["since-repo"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + /** @example ; rel="next" */ + Link?: string; + }; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * 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/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). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * Considerations for code search: + * + * Due to the complexity of searching code, there are a few restrictions on how searches are performed: + * + * * Only the _default branch_ is considered. In most cases, this will be the `master` branch. + * * Only files smaller than 384 KB are searchable. + * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing + * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. + * + * This endpoint requires you to authenticate and limits you to 10 requests per minute. + */ + "search/code": { + parameters: { + query: { + /** @description The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as 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 code](https://docs.github.com/search-github/searching-on-github/searching-code)" for a detailed list of qualifiers. */ + q: string; + /** + * @deprecated + * @description **This field is deprecated.** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results) + */ + sort?: "indexed"; + /** + * @deprecated + * @description **This field is deprecated.** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["code-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * 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/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). + * + * For example, if you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + "search/commits": { + parameters: { + query: { + /** @description The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as 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 commits](https://docs.github.com/search-github/searching-on-github/searching-commits)" for a detailed list of qualifiers. */ + q: string; + /** @description Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results) */ + sort?: "author-date" | "committer-date"; + order?: components["parameters"]["order"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["commit-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * 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/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). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + "search/issues-and-pull-requests": { + parameters: { + query: { + /** @description The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as 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 issues and pull requests](https://docs.github.com/search-github/searching-on-github/searching-issues-and-pull-requests)" for a detailed list of qualifiers. */ + q: string; + /** @description Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results) */ + sort?: + | "comments" + | "reactions" + | "reactions-+1" + | "reactions--1" + | "reactions-smile" + | "reactions-thinking_face" + | "reactions-heart" + | "reactions-tada" + | "interactions" + | "created" + | "updated"; + order?: components["parameters"]["order"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["issue-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * 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/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). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + "search/labels": { + parameters: { + query: { + /** @description The id of the repository. */ + repository_id: number; + /** @description The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/search/search#constructing-a-search-query). */ + q: string; + /** @description Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results) */ + sort?: "created" | "updated"; + order?: components["parameters"]["order"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["label-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Search repositories + * @description 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). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + "search/repos": { + parameters: { + query: { + /** @description The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as 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. */ + q: string; + /** @description Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results) */ + sort?: "stars" | "forks" | "help-wanted-issues" | "updated"; + order?: components["parameters"]["order"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["repo-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * 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/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). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results. + */ + "search/topics": { + parameters: { + query: { + /** @description The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as 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). */ + q: string; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["topic-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Search users + * @description 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). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + * + * This endpoint does not accept authentication and will only include publicly visible users. As an alternative, you can use the GraphQL API. The GraphQL API requires authentication and will return private users, including Enterprise Managed Users (EMUs), that you are authorized to view. For more information, see "[GraphQL Queries](https://docs.github.com/graphql/reference/queries#search)." + */ + "search/users": { + parameters: { + query: { + /** @description The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as 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 users](https://docs.github.com/search-github/searching-on-github/searching-users)" for a detailed list of qualifiers. */ + q: string; + /** @description Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results) */ + sort?: "followers" | "repositories" | "joined"; + order?: components["parameters"]["order"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["user-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Get a team (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/teams/teams#get-a-team-by-name) endpoint. + */ + "teams/get-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete a team (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/teams/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + "teams/delete-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Update a team (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/teams/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + "teams/update-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the team. */ + name: string; + /** @description The description of the team. */ + description?: string; + /** + * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: + * **For a non-nested team:** + * * `secret` - only visible to organization owners and members of this team. + * * `closed` - visible to all members of this organization. + * **For a parent or child team:** + * * `closed` - visible to all members of this organization. + * @enum {string} + */ + privacy?: "secret" | "closed"; + /** + * @description The notification setting the team has chosen. Editing teams without specifying this parameter leaves `notification_setting` intact. The options are: + * * `notifications_enabled` - team members receive notifications when the team is @mentioned. + * * `notifications_disabled` - no one receives notifications. + * @enum {string} + */ + notification_setting?: + | "notifications_enabled" + | "notifications_disabled"; + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null; + }; + }; + }; + responses: { + /** @description Response when the updated information already exists */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List discussions (Legacy) + * @deprecated + * @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 app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. + */ + "teams/list-discussions-legacy": { + parameters: { + query?: { + direction?: components["parameters"]["direction"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["team-discussion"][]; + }; + }; + }; + }; + /** + * Create a discussion (Legacy) + * @deprecated + * @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. + * + * 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + */ + "teams/create-discussion-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title: string; + /** @description The discussion post's body text. */ + body: string; + /** + * @description Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. + * @default false + */ + private?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * Get a discussion (Legacy) + * @deprecated + * @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 app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. + */ + "teams/get-discussion-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * Delete a discussion (Legacy) + * @deprecated + * @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 app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + */ + "teams/delete-discussion-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Update a discussion (Legacy) + * @deprecated + * @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 app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + */ + "teams/update-discussion-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * List discussion comments (Legacy) + * @deprecated + * @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 app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. + */ + "teams/list-discussion-comments-legacy": { + parameters: { + query?: { + direction?: components["parameters"]["direction"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + team_id: components["parameters"]["team-id"]; + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["team-discussion-comment"][]; + }; + }; + }; + }; + /** + * Create a discussion comment (Legacy) + * @deprecated + * @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. + * + * 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + */ + "teams/create-discussion-comment-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * Get a discussion comment (Legacy) + * @deprecated + * @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 app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. + */ + "teams/get-discussion-comment-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + discussion_number: components["parameters"]["discussion-number"]; + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * Delete a discussion comment (Legacy) + * @deprecated + * @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 app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + */ + "teams/delete-discussion-comment-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + discussion_number: components["parameters"]["discussion-number"]; + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * Update a discussion comment (Legacy) + * @deprecated + * @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 app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + */ + "teams/update-discussion-comment-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + discussion_number: components["parameters"]["discussion-number"]; + comment_number: components["parameters"]["comment-number"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * List reactions for a team discussion comment (Legacy) + * @deprecated + * @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 app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. + */ + "reactions/list-for-team-discussion-comment-legacy": { + parameters: { + query?: { + /** @description Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + team_id: components["parameters"]["team-id"]; + discussion_number: components["parameters"]["discussion-number"]; + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * Create reaction for a team discussion comment (Legacy) + * @deprecated + * @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). + * + * 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. + */ + "reactions/create-for-team-discussion-comment-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + discussion_number: components["parameters"]["discussion-number"]; + comment_number: components["parameters"]["comment-number"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the team discussion comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + }; + /** + * List reactions for a team discussion (Legacy) + * @deprecated + * @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 app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. + */ + "reactions/list-for-team-discussion-legacy": { + parameters: { + query?: { + /** @description Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + team_id: components["parameters"]["team-id"]; + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * Create reaction for a team discussion (Legacy) + * @deprecated + * @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). + * + * 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. + */ + "reactions/create-for-team-discussion-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the team discussion. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + }; + /** + * List pending team invitations (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/teams/members#list-pending-team-invitations) endpoint. + * + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + */ + "teams/list-pending-invitations-legacy": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + }; + }; + /** + * List team members (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/teams/members#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + "teams/list-members-legacy": { + parameters: { + query?: { + /** @description Filters members returned by their role in the team. */ + role?: "member" | "maintainer" | "all"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get team member (Legacy) + * @deprecated + * @description The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + "teams/get-member-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description if user is a member */ + 204: { + content: never; + }; + /** @description if user is not a member */ + 404: { + content: never; + }; + }; + }; + /** + * Add team member (Legacy) + * @deprecated + * @description The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." + */ + "teams/add-member-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 403: components["responses"]["forbidden"]; + /** @description Not Found if team synchronization is set up */ + 404: { + content: never; + }; + /** @description Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ + 422: { + content: never; + }; + }; + }; + /** + * Remove team member (Legacy) + * @deprecated + * @description The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + "teams/remove-member-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + /** @description Not Found if team synchronization is setup */ + 404: { + content: never; + }; + }; + }; + /** + * Get team membership for a user (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/teams/members#get-team-membership-for-a-user) endpoint. + * + * Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/teams/teams#create-a-team). + */ + "teams/get-membership-for-user-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Add or update team membership for a user (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. + */ + "teams/add-or-update-membership-for-user-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + username: components["parameters"]["username"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** @description Forbidden if team synchronization is set up */ + 403: { + content: never; + }; + 404: components["responses"]["not_found"]; + /** @description Unprocessable Entity if you attempt to add an organization to a team */ + 422: { + content: never; + }; + }; + }; + /** + * Remove team membership for a user (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + "teams/remove-membership-for-user-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + /** @description if team synchronization is set up */ + 403: { + content: never; + }; + }; + }; + /** + * List team projects (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + "teams/list-projects-legacy": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["team-project"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Check team permissions for a project (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + "teams/check-permissions-for-project-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** @description Not Found if project is not managed by this team */ + 404: { + content: never; + }; + }; + }; + /** + * Add or update team project permissions (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions) endpoint. + * + * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + */ + "teams/add-or-update-project-permissions-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + project_id: components["parameters"]["project-id"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description The permission to grant to the team for this project. Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + }; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + /** @description Forbidden if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Remove a project from a team (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team) endpoint. + * + * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. + */ + "teams/remove-project-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List team repositories (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/teams/teams#list-team-repositories) endpoint. + */ + "teams/list-repos-legacy": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Check team permissions for a repository (Legacy) + * @deprecated + * @description **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint. + * + * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + "teams/check-permissions-for-repo-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Alternative response with extra repository information */ + 200: { + content: { + "application/json": components["schemas"]["team-repository"]; + }; + }; + /** @description Response if repository is managed by this team */ + 204: { + content: never; + }; + /** @description Not Found if repository is not managed by this team */ + 404: { + content: never; + }; + }; + }; + /** + * Add or update team repository permissions (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions)" endpoint. + * + * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." + */ + "teams/add-or-update-repo-permissions-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description The permission to grant the team on this repository. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + }; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Remove a repository from a team (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team) endpoint. + * + * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. + */ + "teams/remove-repo-legacy": { + parameters: { + path: { + team_id: components["parameters"]["team-id"]; + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List child teams (Legacy) + * @deprecated + * @description **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/teams/teams#list-child-teams) endpoint. + */ + "teams/list-child-legacy": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** @description if child teams exist */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get the authenticated user + * @description OAuth app tokens and personal access tokens (classic) need the `user` scope in order for the response to include private profile information. + */ + "users/get-authenticated": { + responses: { + /** @description Response */ + 200: { + content: { + "application/json": + | components["schemas"]["private-user"] + | components["schemas"]["public-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Update the authenticated user + * @description **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. + */ + "users/update-authenticated": { + requestBody?: { + content: { + "application/json": { + /** + * @description The new name of the user. + * @example Omar Jahandar + */ + name?: string; + /** + * @description The publicly visible email address of the user. + * @example omar@example.com + */ + email?: string; + /** + * @description The new blog URL of the user. + * @example blog.example.com + */ + blog?: string; + /** + * @description The new Twitter username of the user. + * @example therealomarj + */ + twitter_username?: string | null; + /** + * @description The new company of the user. + * @example Acme corporation + */ + company?: string; + /** + * @description The new location of the user. + * @example Berlin, Germany + */ + location?: string; + /** @description The new hiring availability of the user. */ + hireable?: boolean; + /** @description The new short biography of the user. */ + bio?: string; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["private-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List users blocked by the authenticated user + * @description List the users you've blocked on your personal account. + */ + "users/list-blocked-by-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Check if a user is blocked by the authenticated user + * @description Returns a 204 if the given user is blocked by the authenticated user. Returns a 404 if the given user is not blocked by the authenticated user, or if the given user account has been identified as spam by GitHub. + */ + "users/check-blocked": { + parameters: { + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description If the user is blocked */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** @description If the user is not blocked */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Block a user + * @description Blocks the given user and returns a 204. If the authenticated user cannot block the given user a 422 is returned. + */ + "users/block": { + parameters: { + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Unblock a user + * @description Unblocks the given user and returns a 204. + */ + "users/unblock": { + parameters: { + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List codespaces for the authenticated user + * @description Lists the authenticated user's codespaces. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + "codespaces/list-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + repository_id?: components["parameters"]["repository-id-in-query"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Create a codespace for the authenticated user + * @description Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + "codespaces/create-for-authenticated-user": { + requestBody: { + content: { + "application/json": OneOf< + [ + { + /** @description Repository id for this codespace */ + repository_id: number; + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. */ + location?: string; + /** + * @description The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. + * @enum {string} + */ + geo?: "EuropeWest" | "SoutheastAsia" | "UsEast" | "UsWest"; + /** @description IP for location auto-detection when proxying a request */ + client_ip?: string; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Whether to authorize requested permissions from devcontainer.json */ + multi_repo_permissions_opt_out?: boolean; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). */ + retention_period_minutes?: number; + }, + { + /** @description Pull request number for this codespace */ + pull_request: { + /** @description Pull request number */ + pull_request_number: number; + /** @description Repository id for this codespace */ + repository_id: number; + }; + /** @description The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. */ + location?: string; + /** + * @description The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is being deprecated. + * @enum {string} + */ + geo?: "EuropeWest" | "SoutheastAsia" | "UsEast" | "UsWest"; + /** @description Machine type to use for this codespace */ + machine?: string; + /** @description Path to devcontainer.json config to use for this codespace */ + devcontainer_path?: string; + /** @description Working directory for this codespace */ + working_directory?: string; + /** @description Time in minutes before codespace stops from inactivity */ + idle_timeout_minutes?: number; + }, + ] + >; + }; + }; + responses: { + /** @description Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** @description Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List secrets for the authenticated user + * @description Lists all development environment secrets available for a user's codespaces without revealing their + * encrypted values. + * + * 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. + */ + "codespaces/list-secrets-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["codespaces-secret"][]; + }; + }; + }; + }; + }; + /** + * Get public key for the authenticated user + * @description Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * 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. + */ + "codespaces/get-public-key-for-authenticated-user": { + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-user-public-key"]; + }; + }; + }; + }; + /** + * Get a secret for the authenticated user + * @description Gets a development environment secret available to a user's codespaces without revealing its encrypted value. + * + * 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. + */ + "codespaces/get-secret-for-authenticated-user": { + parameters: { + path: { + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-secret"]; + }; + }; + }; + }; + /** + * Create or update a secret for the authenticated user + * @description 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)." + * + * 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. + */ + "codespaces/create-or-update-secret-for-authenticated-user": { + parameters: { + path: { + secret_name: components["parameters"]["secret-name"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/rest/codespaces/secrets#get-public-key-for-the-authenticated-user) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + /** @description An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/codespaces/secrets#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/codespaces/secrets#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/codespaces/secrets#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids?: (number | string)[]; + }; + }; + }; + responses: { + /** @description Response after successfully creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** @description Response after successfully updating a secret */ + 204: { + content: never; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Delete a secret for the authenticated user + * @description 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. + * + * 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. + */ + "codespaces/delete-secret-for-authenticated-user": { + parameters: { + path: { + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List selected repositories for a user secret + * @description List the repositories that have been granted the ability to use 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. + */ + "codespaces/list-repositories-for-secret-for-authenticated-user": { + parameters: { + path: { + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Set selected repositories for a user secret + * @description Select the repositories that will use 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. + */ + "codespaces/set-repositories-for-secret-for-authenticated-user": { + parameters: { + path: { + secret_name: components["parameters"]["secret-name"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/codespaces/secrets#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/rest/codespaces/secrets#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/codespaces/secrets#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids: number[]; + }; + }; + }; + responses: { + /** @description No Content when repositories were added to the selected list */ + 204: { + content: never; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Add a selected repository to a user secret + * @description 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. + */ + "codespaces/add-repository-for-secret-for-authenticated-user": { + parameters: { + path: { + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** @description No Content when repository was added to the selected list */ + 204: { + content: never; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Remove a selected repository from a user secret + * @description 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. + */ + "codespaces/remove-repository-for-secret-for-authenticated-user": { + parameters: { + path: { + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** @description No Content when repository was removed from the selected list */ + 204: { + content: never; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Get a codespace for the authenticated user + * @description Gets information about a user's codespace. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + "codespaces/get-for-authenticated-user": { + parameters: { + path: { + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Delete a codespace for the authenticated user + * @description Deletes a user's codespace. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + "codespaces/delete-for-authenticated-user": { + parameters: { + path: { + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Update a codespace for the authenticated user + * @description Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + "codespaces/update-for-authenticated-user": { + parameters: { + path: { + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + requestBody?: { + content: { + "application/json": { + /** @description A valid machine to transition this codespace to. */ + machine?: string; + /** @description Display name for this codespace */ + display_name?: string; + /** @description Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in. */ + recent_folders?: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Export a codespace for the authenticated user + * @description Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * If changes cannot be pushed to the codespace's repository, they will be pushed to a new or previously-existing fork instead. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + "codespaces/export-for-authenticated-user": { + parameters: { + path: { + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** @description Response */ + 202: { + content: { + "application/json": components["schemas"]["codespace-export-details"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Get details about a codespace export + * @description Gets information about an export of a codespace. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + "codespaces/get-export-details-for-authenticated-user": { + parameters: { + path: { + codespace_name: components["parameters"]["codespace-name"]; + export_id: components["parameters"]["export-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace-export-details"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List machine types for a codespace + * @description List the machine types a codespace can transition to use. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + "codespaces/codespace-machines-for-authenticated-user": { + parameters: { + path: { + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": { + total_count: number; + machines: components["schemas"]["codespace-machine"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Create a repository from an unpublished codespace + * @description Publishes an unpublished codespace, creating a new repository and assigning it to the codespace. + * + * The codespace's token is granted write permissions to the repository, allowing the user to push their changes. + * + * This will fail for a codespace that is already published, meaning it has an associated repository. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + "codespaces/publish-for-authenticated-user": { + parameters: { + path: { + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description A name for the new repository. */ + name?: string; + /** + * @description Whether the new repository should be private. + * @default false + */ + private?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["codespace-with-full-repository"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Start a codespace for the authenticated user + * @description Starts a user's codespace. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + "codespaces/start-for-authenticated-user": { + parameters: { + path: { + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + /** @description Payment required */ + 402: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Stop a codespace for the authenticated user + * @description Stops a user's codespace. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + "codespaces/stop-for-authenticated-user": { + parameters: { + path: { + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. + */ + "packages/list-docker-migration-conflicting-packages-for-authenticated-user": { + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + }; + }; + /** + * Set primary email visibility for the authenticated user + * @description Sets the visibility for your primary email addresses. + */ + "users/set-primary-email-visibility-for-authenticated-user": { + requestBody: { + content: { + "application/json": { + /** + * @description Denotes whether an email is publicly visible. + * @enum {string} + */ + visibility: "public" | "private"; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List email addresses for the authenticated user + * @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. + */ + "users/list-emails-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Add an email address for the authenticated user + * @description OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. + */ + "users/add-email-for-authenticated-user": { + requestBody?: { + content: { + "application/json": { + /** + * @description Adds one or more email addresses to your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. + * @example [] + */ + emails: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Delete an email address for the authenticated user + * @description OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. + */ + "users/delete-email-for-authenticated-user": { + requestBody?: { + content: { + "application/json": { + /** @description Email addresses associated with the GitHub user account. */ + emails: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List followers of the authenticated user + * @description Lists the people following the authenticated user. + */ + "users/list-followers-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * List the people the authenticated user follows + * @description Lists the people who the authenticated user follows. + */ + "users/list-followed-by-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Check if a person is followed by the authenticated user */ + "users/check-person-is-followed-by-authenticated": { + parameters: { + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description if the person is followed by the authenticated user */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** @description if the person is not followed by the authenticated user */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * 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/guides/getting-started-with-the-rest-api#http-method)." + * + * OAuth app tokens and personal access tokens (classic) need the `user:follow` scope to use this endpoint. + */ + "users/follow": { + parameters: { + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Unfollow a user + * @description OAuth app tokens and personal access tokens (classic) need the `user:follow` scope to use this endpoint. + */ + "users/unfollow": { + parameters: { + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List GPG keys for the authenticated user + * @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. + */ + "users/list-gpg-keys-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["gpg-key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create a GPG key for the authenticated user + * @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. + */ + "users/create-gpg-key-for-authenticated-user": { + requestBody: { + content: { + "application/json": { + /** @description A descriptive name for the new key. */ + name?: string; + /** @description A GPG key in ASCII-armored format. */ + armored_public_key: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["gpg-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get a GPG key for the authenticated user + * @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. + */ + "users/get-gpg-key-for-authenticated-user": { + parameters: { + path: { + gpg_key_id: components["parameters"]["gpg-key-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["gpg-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete a GPG key for the authenticated user + * @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. + */ + "users/delete-gpg-key-for-authenticated-user": { + parameters: { + path: { + gpg_key_id: components["parameters"]["gpg-key-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List app installations accessible to the user access token + * @description Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * You can find the permissions for the installation under the `permissions` key. + */ + "apps/list-installations-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description You can find the permissions for the installation under the `permissions` key. */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + installations: components["schemas"]["installation"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * List repositories accessible to the user access token + * @description List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * The access the user has to each repository is included in the hash under the `permissions` key. + */ + "apps/list-installation-repos-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** @description The access the user has to each repository is included in the hash under the `permissions` key. */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": { + total_count: number; + repository_selection?: string; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "apps/add-repo-to-installation-for-authenticated-user": { + parameters: { + path: { + installation_id: components["parameters"]["installation-id"]; + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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`. + */ + "apps/remove-repo-from-installation-for-authenticated-user": { + parameters: { + path: { + installation_id: components["parameters"]["installation-id"]; + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + /** @description Returned when the application is installed on `all` repositories in the organization, or if this request would remove the last repository that the application has access to in the organization. */ + 422: { + content: never; + }; + }; + }; + /** + * Get interaction restrictions for your public repositories + * @description Shows which type of GitHub user can interact with your public repositories and when the restriction expires. + */ + "interactions/get-restrictions-for-authenticated-user": { + responses: { + /** @description Default response */ + 200: { + content: { + "application/json": + | components["schemas"]["interaction-limit-response"] + | Record; + }; + }; + /** @description Response when there are no restrictions */ + 204: { + content: never; + }; + }; + }; + /** + * Set interaction restrictions for your public repositories + * @description Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. + */ + "interactions/set-restrictions-for-authenticated-user": { + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Remove interaction restrictions from your public repositories + * @description Removes any interaction restrictions from your public repositories. + */ + "interactions/remove-restrictions-for-authenticated-user": { + responses: { + /** @description Response */ + 204: { + content: never; + }; + }; + }; + /** + * List user account issues assigned to the authenticated user + * @description List issues across owned and member repositories assigned to the authenticated user. + * + * **Note**: GitHub's REST API 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`. + */ + "issues/list-for-authenticated-user": { + parameters: { + query?: { + /** @description Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** @description Indicates the state of the issues to return. */ + state?: "open" | "closed" | "all"; + labels?: components["parameters"]["labels"]; + /** @description What to sort results by. */ + sort?: "created" | "updated" | "comments"; + direction?: components["parameters"]["direction"]; + since?: components["parameters"]["since"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List public SSH keys for the authenticated user + * @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. + */ + "users/list-public-ssh-keys-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create a public SSH key for the authenticated user + * @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. + */ + "users/create-public-ssh-key-for-authenticated-user": { + requestBody: { + content: { + "application/json": { + /** + * @description A descriptive name for the new key. + * @example Personal MacBook Air + */ + title?: string; + /** @description The public SSH key to add to your GitHub account. */ + key: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get a public SSH key for the authenticated user + * @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. + */ + "users/get-public-ssh-key-for-authenticated-user": { + parameters: { + path: { + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete a public SSH key for the authenticated user + * @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. + */ + "users/delete-public-ssh-key-for-authenticated-user": { + parameters: { + path: { + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List subscriptions for the authenticated user + * @description Lists the active subscriptions for the authenticated user. + */ + "apps/list-subscriptions-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["user-marketplace-purchase"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List subscriptions for the authenticated user (stubbed) + * @description Lists the active subscriptions for the authenticated user. + */ + "apps/list-subscriptions-for-authenticated-user-stubbed": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["user-marketplace-purchase"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * List organization memberships for the authenticated user + * @description Lists all of the authenticated user's organization memberships. + */ + "orgs/list-memberships-for-authenticated-user": { + parameters: { + query?: { + /** @description Indicates the state of the memberships to return. If not specified, the API returns both active and pending memberships. */ + state?: "active" | "pending"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["org-membership"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get an organization membership for the authenticated user + * @description If the authenticated user is an active or pending member of the organization, this endpoint will return the user's membership. If the authenticated user is not affiliated with the organization, a `404` is returned. This endpoint will return a `403` if the request is made by a GitHub App that is blocked by the organization. + */ + "orgs/get-membership-for-authenticated-user": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Update an organization membership for the authenticated user + * @description Converts the authenticated user to an active member of the organization, if that user has a pending invitation from the organization. + */ + "orgs/update-membership-for-authenticated-user": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state that the membership should be in. Only `"active"` will be accepted. + * @enum {string} + */ + state: "active"; + }; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List user migrations + * @description Lists all migrations a user has started. + */ + "migrations/list-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["migration"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Start a user migration + * @description Initiates the generation of a user migration archive. + */ + "migrations/start-for-authenticated-user": { + requestBody: { + content: { + "application/json": { + /** + * @description Lock the repositories being migrated at the start of the migration + * @example true + */ + lock_repositories?: boolean; + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @example true + */ + exclude_metadata?: boolean; + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @example true + */ + exclude_git_data?: boolean; + /** + * @description Do not include attachments in the migration + * @example true + */ + exclude_attachments?: boolean; + /** + * @description Do not include releases in the migration + * @example true + */ + exclude_releases?: boolean; + /** + * @description Indicates whether projects owned by the organization or users should be excluded. + * @example true + */ + exclude_owner_projects?: boolean; + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean; + /** + * @description Exclude attributes from the API response to improve performance + * @example [ + * "repositories" + * ] + */ + exclude?: "repositories"[]; + repositories: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get a user migration status + * @description Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values: + * + * * `pending` - the migration hasn't started yet. + * * `exporting` - the migration is in progress. + * * `exported` - the migration finished successfully. + * * `failed` - the migration failed. + * + * Once the migration has been `exported` you can [download the migration archive](https://docs.github.com/rest/migrations/users#download-a-user-migration-archive). + */ + "migrations/get-status-for-authenticated-user": { + parameters: { + query?: { + exclude?: string[]; + }; + path: { + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Download a user migration archive + * @description Fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects: + * + * * attachments + * * bases + * * commit\_comments + * * issue\_comments + * * issue\_events + * * issues + * * milestones + * * organizations + * * projects + * * protected\_branches + * * pull\_request\_reviews + * * pull\_requests + * * releases + * * repositories + * * review\_comments + * * schema + * * users + * + * The archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data. + */ + "migrations/get-archive-for-authenticated-user": { + parameters: { + path: { + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** @description Response */ + 302: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Delete a user migration archive + * @description Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/migrations/users#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/migrations/users#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. + */ + "migrations/delete-archive-for-authenticated-user": { + parameters: { + path: { + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Unlock a user repository + * @description Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/migrations/users#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/repos/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. + */ + "migrations/unlock-repo-for-authenticated-user": { + parameters: { + path: { + migration_id: components["parameters"]["migration-id"]; + repo_name: components["parameters"]["repo-name"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List repositories for a user migration + * @description Lists all the repositories for this user migration. + */ + "migrations/list-repos-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List organizations for the authenticated user + * @description List organizations for the authenticated user. + * + * 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. + */ + "orgs/list-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * List packages for the authenticated user's namespace + * @description Lists packages owned by the authenticated user within the user's namespace. + * + * 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)." + */ + "packages/list-packages-for-authenticated-user": { + parameters: { + query: { + /** @description The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + visibility?: components["parameters"]["package-visibility"]; + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 400: components["responses"]["package_es_list_error"]; + }; + }; + /** + * Get a package for the authenticated user + * @description Gets a specific package for a package owned by the authenticated user. + * + * 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)." + */ + "packages/get-package-for-authenticated-user": { + parameters: { + path: { + package_type: components["parameters"]["package-type"]; + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Delete a package for the authenticated user + * @description Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * 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)." + */ + "packages/delete-package-for-authenticated-user": { + parameters: { + path: { + package_type: components["parameters"]["package-type"]; + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restore a package for the authenticated user + * @description Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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)." + */ + "packages/restore-package-for-authenticated-user": { + parameters: { + query?: { + /** @description package token */ + token?: string; + }; + path: { + package_type: components["parameters"]["package-type"]; + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List package versions for a package owned by the authenticated user + * @description Lists package versions for a package owned by the authenticated user. + * + * 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)." + */ + "packages/get-all-package-versions-for-package-owned-by-authenticated-user": { + parameters: { + query?: { + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + /** @description The state of the package, either active or deleted. */ + state?: "active" | "deleted"; + }; + path: { + package_type: components["parameters"]["package-type"]; + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get a package version for the authenticated user + * @description Gets a specific package version for a package owned by the authenticated user. + * + * 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)." + */ + "packages/get-package-version-for-authenticated-user": { + parameters: { + path: { + package_type: components["parameters"]["package-type"]; + package_name: components["parameters"]["package-name"]; + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Delete a package version for the authenticated user + * @description Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * 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)." + */ + "packages/delete-package-version-for-authenticated-user": { + parameters: { + path: { + package_type: components["parameters"]["package-type"]; + package_name: components["parameters"]["package-name"]; + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restore a package version for the authenticated user + * @description Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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)." + */ + "packages/restore-package-version-for-authenticated-user": { + parameters: { + path: { + package_type: components["parameters"]["package-type"]; + package_name: components["parameters"]["package-name"]; + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create a user project + * @description Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + "projects/create-for-authenticated-user": { + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `user:email` scope to use this endpoint. + */ + "users/list-public-emails-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List repositories for the authenticated user + * @description Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + */ + "repos/list-for-authenticated-user": { + parameters: { + query?: { + /** @description Limit results to repositories with the specified visibility. */ + visibility?: "all" | "public" | "private"; + /** + * @description Comma-separated list of values. Can include: + * * `owner`: Repositories that are owned by the authenticated user. + * * `collaborator`: Repositories that the user has been added to as a collaborator. + * * `organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on. + */ + affiliation?: string; + /** @description Limit results to repositories of the specified type. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. */ + type?: "all" | "owner" | "public" | "private" | "member"; + /** @description The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** @description The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + since?: components["parameters"]["since-repo-date"]; + before?: components["parameters"]["before-repo-date"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Create a repository for the authenticated user + * @description Creates a new repository for the authenticated user. + * + * 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. + */ + "repos/create-for-authenticated-user": { + requestBody: { + content: { + "application/json": { + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues?: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects?: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki?: boolean; + /** + * @description Whether discussions are enabled. + * @default false + * @example true + */ + has_discussions?: boolean; + /** @description The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. */ + team_id?: number; + /** + * @description Whether the repository is initialized with a minimal README. + * @default false + */ + auto_init?: boolean; + /** + * @description The desired language or platform to apply to the .gitignore. + * @example Haskell + */ + gitignore_template?: string; + /** + * @description The license keyword of the open source license for this repository. + * @example mit + */ + license_template?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads?: boolean; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + headers: { + /** @example https://api.github.com/repos/octocat/Hello-World */ + Location?: string; + }; + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List repository invitations for the authenticated user + * @description When authenticating as a user, this endpoint will list all currently open repository invitations for that user. + */ + "repos/list-invitations-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["repository-invitation"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Decline a repository invitation */ + "repos/decline-invitation-for-authenticated-user": { + parameters: { + path: { + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + /** Accept a repository invitation */ + "repos/accept-invitation-for-authenticated-user": { + parameters: { + path: { + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + /** + * List social accounts for the authenticated user + * @description Lists all of your social accounts. + */ + "users/list-social-accounts-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["social-account"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Add social accounts for the authenticated user + * @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. + */ + "users/add-social-account-for-authenticated-user": { + requestBody: { + content: { + "application/json": { + /** + * @description Full URLs for the social media profiles to add. + * @example [] + */ + account_urls: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["social-account"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Delete social accounts for the authenticated user + * @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. + */ + "users/delete-social-account-for-authenticated-user": { + requestBody: { + content: { + "application/json": { + /** + * @description Full URLs for the social media profiles to delete. + * @example [] + */ + account_urls: string[]; + }; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List SSH signing keys for the authenticated user + * @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. + */ + "users/list-ssh-signing-keys-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["ssh-signing-key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Create a SSH signing key for the authenticated user + * @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. + */ + "users/create-ssh-signing-key-for-authenticated-user": { + requestBody: { + content: { + "application/json": { + /** + * @description A descriptive name for the new key. + * @example Personal MacBook Air + */ + title?: string; + /** @description The public SSH key to add to your GitHub account. For more information, see "[Checking for existing SSH keys](https://docs.github.com/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys)." */ + key: string; + }; + }; + }; + responses: { + /** @description Response */ + 201: { + content: { + "application/json": components["schemas"]["ssh-signing-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get an SSH signing key for the authenticated user + * @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. + */ + "users/get-ssh-signing-key-for-authenticated-user": { + parameters: { + path: { + ssh_signing_key_id: components["parameters"]["ssh-signing-key-id"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["ssh-signing-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Delete an SSH signing key for the authenticated user + * @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. + */ + "users/delete-ssh-signing-key-for-authenticated-user": { + parameters: { + path: { + ssh_signing_key_id: components["parameters"]["ssh-signing-key-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List repositories starred by the authenticated user + * @description Lists repositories the authenticated user has starred. + * + * 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. + */ + "activity/list-repos-starred-by-authenticated-user": { + parameters: { + query?: { + sort?: components["parameters"]["sort-starred"]; + direction?: components["parameters"]["direction"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["repository"][]; + "application/vnd.github.v3.star+json": components["schemas"]["starred-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Check if a repository is starred by the authenticated user + * @description Whether the authenticated user has starred the repository. + */ + "activity/check-repo-is-starred-by-authenticated-user": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response if this repository is starred by you */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** @description Not Found if this repository is not starred by you */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * 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 method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." + */ + "activity/star-repo-for-authenticated-user": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Unstar a repository for the authenticated user + * @description Unstar a repository that the authenticated user has previously starred. + */ + "activity/unstar-repo-for-authenticated-user": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List repositories watched by the authenticated user + * @description Lists repositories the authenticated user is watching. + */ + "activity/list-watched-repos-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * List teams for the authenticated user + * @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. + */ + "teams/list-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["team-full"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List users + * @description Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. + * + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of users. + */ + "users/list": { + parameters: { + query?: { + since?: components["parameters"]["since-user"]; + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + /** @example ; rel="next" */ + Link?: string; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Get a user + * @description Provides publicly available information about someone with a GitHub account. + * + * 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)". + */ + "users/get-by-username": { + parameters: { + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": + | components["schemas"]["private-user"] + | components["schemas"]["public-user"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. + */ + "packages/list-docker-migration-conflicting-packages-for-user": { + parameters: { + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * List events for the authenticated user + * @description If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. + */ + "activity/list-events-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** + * List organization events for the authenticated user + * @description This is the user's organization dashboard. You must be authenticated as the user to view this. + */ + "activity/list-org-events-for-authenticated-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + username: components["parameters"]["username"]; + org: components["parameters"]["org"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** List public events for a user */ + "activity/list-public-events-for-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** + * List followers of a user + * @description Lists the people following the specified user. + */ + "users/list-followers-for-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** + * List the people a user follows + * @description Lists the people who the specified user follows. + */ + "users/list-following-for-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** Check if a user follows another user */ + "users/check-following-for-user": { + parameters: { + path: { + username: components["parameters"]["username"]; + target_user: string; + }; + }; + responses: { + /** @description if the user follows the target user */ + 204: { + content: never; + }; + /** @description if the user does not follow the target user */ + 404: { + content: never; + }; + }; + }; + /** + * List gists for a user + * @description Lists public gists for the specified user: + */ + "gists/list-for-user": { + parameters: { + query?: { + since?: components["parameters"]["since"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List GPG keys for a user + * @description Lists the GPG keys for a user. This information is accessible by anyone. + */ + "users/list-gpg-keys-for-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["gpg-key"][]; + }; + }; + }; + }; + /** + * Get contextual information for a user + * @description 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, you would use a `subject_type` value of `repository` and a `subject_id` value of `1300192` (the ID of the `Spoon-Knife` repository). + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + "users/get-context-for-user": { + parameters: { + query?: { + /** @description Identifies which additional information you'd like to receive about the person's hovercard. Can be `organization`, `repository`, `issue`, `pull_request`. **Required** when using `subject_id`. */ + subject_type?: "organization" | "repository" | "issue" | "pull_request"; + /** @description Uses the ID for the `subject_type` you specified. **Required** when using `subject_type`. */ + subject_id?: string; + }; + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["hovercard"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Get a user installation for the authenticated app + * @description Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-user-installation": { + parameters: { + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + /** + * List public keys for a user + * @description Lists the _verified_ public SSH keys for a user. This is accessible by anyone. + */ + "users/list-public-keys-for-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["key-simple"][]; + }; + }; + }; + }; + /** + * List organizations for a user + * @description List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. + * + * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/orgs/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + "orgs/list-for-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + }; + }; + /** + * List packages for a user + * @description Lists all packages in a user's namespace for which the requesting user has access. + * + * 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)." + */ + "packages/list-packages-for-user": { + parameters: { + query: { + /** @description The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + visibility?: components["parameters"]["package-visibility"]; + page?: components["parameters"]["page"]; + per_page?: components["parameters"]["per-page"]; + }; + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 400: components["responses"]["package_es_list_error"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Get a package for a user + * @description Gets a specific package metadata for a public package owned by a user. + * + * 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)." + */ + "packages/get-package-for-user": { + parameters: { + path: { + package_type: components["parameters"]["package-type"]; + package_name: components["parameters"]["package-name"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Delete a package for a user + * @description Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * 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)." + */ + "packages/delete-package-for-user": { + parameters: { + path: { + package_type: components["parameters"]["package-type"]; + package_name: components["parameters"]["package-name"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restore a package for a user + * @description Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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)." + */ + "packages/restore-package-for-user": { + parameters: { + query?: { + /** @description package token */ + token?: string; + }; + path: { + package_type: components["parameters"]["package-type"]; + package_name: components["parameters"]["package-name"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List package versions for a package owned by a user + * @description Lists package versions for a public package owned by a specified user. + * + * 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)." + */ + "packages/get-all-package-versions-for-package-owned-by-user": { + parameters: { + path: { + package_type: components["parameters"]["package-type"]; + package_name: components["parameters"]["package-name"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get a package version for a user + * @description Gets a specific package version for a public package owned by a specified user. + * + * 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)." + */ + "packages/get-package-version-for-user": { + parameters: { + path: { + package_type: components["parameters"]["package-type"]; + package_name: components["parameters"]["package-name"]; + package_version_id: components["parameters"]["package-version-id"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Delete package version for a user + * @description Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * 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)." + */ + "packages/delete-package-version-for-user": { + parameters: { + path: { + package_type: components["parameters"]["package-type"]; + package_name: components["parameters"]["package-name"]; + username: components["parameters"]["username"]; + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restore package version for a user + * @description Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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)." + */ + "packages/restore-package-version-for-user": { + parameters: { + path: { + package_type: components["parameters"]["package-type"]; + package_name: components["parameters"]["package-name"]; + username: components["parameters"]["username"]; + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** @description Response */ + 204: { + content: never; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List user projects + * @description Lists projects for a user. + */ + "projects/list-for-user": { + parameters: { + query?: { + /** @description Indicates the state of the projects to return. */ + state?: "open" | "closed" | "all"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * List events received by the authenticated user + * @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. + */ + "activity/list-received-events-for-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** List public events received by a user */ + "activity/list-received-public-events-for-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** + * List repositories for a user + * @description Lists public repositories for the specified user. + */ + "repos/list-for-user": { + parameters: { + query?: { + /** @description Limit results to repositories of the specified type. */ + type?: "all" | "owner" | "member"; + /** @description The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** @description The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Get GitHub Actions billing for a user + * @description Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. + */ + "billing/get-github-actions-billing-user": { + parameters: { + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Get GitHub Packages billing for a user + * @description Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. + */ + "billing/get-github-packages-billing-user": { + parameters: { + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Get shared storage billing for a user + * @description Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. + */ + "billing/get-shared-storage-billing-user": { + parameters: { + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** + * List social accounts for a user + * @description Lists social media accounts for a user. This endpoint is accessible by anyone. + */ + "users/list-social-accounts-for-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["social-account"][]; + }; + }; + }; + }; + /** + * List SSH signing keys for a user + * @description Lists the SSH signing keys for a user. This operation is accessible by anyone. + */ + "users/list-ssh-signing-keys-for-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["ssh-signing-key"][]; + }; + }; + }; + }; + /** + * List repositories starred by a user + * @description Lists repositories a user has starred. + * + * 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. + */ + "activity/list-repos-starred-by-user": { + parameters: { + query?: { + sort?: components["parameters"]["sort-starred"]; + direction?: components["parameters"]["direction"]; + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": + | components["schemas"]["starred-repository"][] + | components["schemas"]["repository"][]; + }; + }; + }; + }; + /** + * List repositories watched by a user + * @description Lists repositories a user is watching. + */ + "activity/list-repos-watched-by-user": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + username: components["parameters"]["username"]; + }; + }; + responses: { + /** @description Response */ + 200: { + headers: { + Link: components["headers"]["link"]; + }; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Get all API versions + * @description Get all supported GitHub API versions. + */ + "meta/get-all-versions": { + responses: { + /** @description Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Get the Zen of GitHub + * @description Get a random sentence from the Zen of GitHub + */ + "meta/get-zen": { + responses: { + /** @description Response */ + 200: { + content: { + "application/json": string; + }; + }; + }; + }; + /** + * Compare two commits + * @description **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. Both `:base` and `:head` must be branch names in `:repo`. To compare branches across other repositories in the same network as `:repo`, use the format `:branch`. + * + * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + "repos/compare-commits": { + parameters: { + query?: { + per_page?: components["parameters"]["per-page"]; + page?: components["parameters"]["page"]; + }; + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + base: string; + head: string; + }; + }; + responses: { + /** @description Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comparison"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; +} diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/LICENSE b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/LICENSE new file mode 100644 index 000000000..57bee5f18 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/LICENSE @@ -0,0 +1,7 @@ +MIT License Copyright (c) 2019 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/README.md b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/README.md new file mode 100644 index 000000000..5443892b0 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/README.md @@ -0,0 +1,272 @@ +# plugin-paginate-rest.js + +> Octokit plugin to paginate REST API endpoint responses + +[![@latest](https://img.shields.io/npm/v/@octokit/plugin-paginate-rest.svg)](https://www.npmjs.com/package/@octokit/plugin-paginate-rest) +[![Build Status](https://github.com/octokit/plugin-paginate-rest.js/workflows/Test/badge.svg)](https://github.com/octokit/plugin-paginate-rest.js/actions?workflow=Test) + +## Usage + + + + + + +
+Browsers + + +Load `@octokit/plugin-paginate-rest` and [`@octokit/core`](https://github.com/octokit/core.js) (or core-compatible module) directly from [esm.sh](https://esm.sh) + +```html + +``` + +
+Node + + +Install with `npm install @octokit/core @octokit/plugin-paginate-rest`. Optionally replace `@octokit/core` with a core-compatible module + +```js +import { Octokit } from "@octokit/core"; +import { + paginateRest, + composePaginateRest, +} from "@octokit/plugin-paginate-rest"; +``` + +
+ +```js +const MyOctokit = Octokit.plugin(paginateRest); +const octokit = new MyOctokit({ auth: "secret123" }); + +// See https://developer.github.com/v3/issues/#list-issues-for-a-repository +const issues = await octokit.paginate("GET /repos/{owner}/{repo}/issues", { + owner: "octocat", + repo: "hello-world", + since: "2010-10-01", + per_page: 100, +}); +``` + +If you want to utilize the pagination methods in another plugin, use `composePaginateRest`. + +```js +function myPlugin(octokit, options) { + return { + allStars({owner, repo}) => { + return composePaginateRest( + octokit, + "GET /repos/{owner}/{repo}/stargazers", + {owner, repo } + ) + } + } +} +``` + +> [!IMPORTANT] +> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json`. See the TypeScript docs on [package.json "exports"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports). + +## `octokit.paginate()` + +The `paginateRest` plugin adds a new `octokit.paginate()` method which accepts the same parameters as [`octokit.request`](https://github.com/octokit/request.js#request). Only "List ..." endpoints such as [List issues for a repository](https://developer.github.com/v3/issues/#list-issues-for-a-repository) are supporting pagination. Their [response includes a Link header](https://developer.github.com/v3/issues/#response-1). For other endpoints, `octokit.paginate()` behaves the same as `octokit.request()`. + +The `per_page` parameter is usually defaulting to `30`, and can be set to up to `100`, which helps retrieving a big amount of data without hitting the rate limits too soon. + +An optional `mapFunction` can be passed to map each page response to a new value, usually an array with only the data you need. This can help to reduce memory usage, as only the relevant data has to be kept in memory until the pagination is complete. + +```js +const issueTitles = await octokit.paginate( + "GET /repos/{owner}/{repo}/issues", + { + owner: "octocat", + repo: "hello-world", + since: "2010-10-01", + per_page: 100, + }, + (response) => response.data.map((issue) => issue.title), +); +``` + +The `mapFunction` gets a 2nd argument `done` which can be called to end the pagination early. + +```js +const issues = await octokit.paginate( + "GET /repos/{owner}/{repo}/issues", + { + owner: "octocat", + repo: "hello-world", + since: "2010-10-01", + per_page: 100, + }, + (response, done) => { + if (response.data.find((issue) => issue.title.includes("something"))) { + done(); + } + return response.data; + }, +); +``` + +Alternatively you can pass a `request` method as first argument. This is great when using in combination with [`@octokit/plugin-rest-endpoint-methods`](https://github.com/octokit/plugin-rest-endpoint-methods.js/): + +```js +const issues = await octokit.paginate(octokit.rest.issues.listForRepo, { + owner: "octocat", + repo: "hello-world", + since: "2010-10-01", + per_page: 100, +}); +``` + +## `octokit.paginate.iterator()` + +If your target runtime environments supports async iterators (such as most modern browsers and Node 10+), you can iterate through each response + +```js +const parameters = { + owner: "octocat", + repo: "hello-world", + since: "2010-10-01", + per_page: 100, +}; +for await (const response of octokit.paginate.iterator( + "GET /repos/{owner}/{repo}/issues", + parameters, +)) { + // do whatever you want with each response, break out of the loop, etc. + const issues = response.data; + console.log("%d issues found", issues.length); +} +``` + +Alternatively you can pass a `request` method as first argument. This is great when using in combination with [`@octokit/plugin-rest-endpoint-methods`](https://github.com/octokit/plugin-rest-endpoint-methods.js/): + +```js +const parameters = { + owner: "octocat", + repo: "hello-world", + since: "2010-10-01", + per_page: 100, +}; +for await (const response of octokit.paginate.iterator( + octokit.rest.issues.listForRepo, + parameters, +)) { + // do whatever you want with each response, break out of the loop, etc. + const issues = response.data; + console.log("%d issues found", issues.length); +} +``` + +## `composePaginateRest` and `composePaginateRest.iterator` + +The `compose*` methods work just like their `octokit.*` counterparts described above, with the differenct that both methods require an `octokit` instance to be passed as first argument + +## How it works + +`octokit.paginate()` wraps `octokit.request()`. As long as a `rel="next"` link value is present in the response's `Link` header, it sends another request for that URL, and so on. + +Most of GitHub's paginating REST API endpoints return an array, but there are a few exceptions which return an object with a key that includes the items array. For example: + +- [Search repositories](https://developer.github.com/v3/search/#example) (key `items`) +- [List check runs for a specific ref](https://developer.github.com/v3/checks/runs/#response-3) (key: `check_runs`) +- [List check suites for a specific ref](https://developer.github.com/v3/checks/suites/#response-1) (key: `check_suites`) +- [List repositories](https://developer.github.com/v3/apps/installations/#list-repositories) for an installation (key: `repositories`) +- [List installations for a user](https://developer.github.com/v3/apps/installations/#response-1) (key `installations`) + +`octokit.paginate()` is working around these inconsistencies so you don't have to worry about it. + +If a response is lacking the `Link` header, `octokit.paginate()` still resolves with an array, even if the response returns a single object. + +## Types + +The plugin also exposes some types and runtime type guards for TypeScript projects. + + + + + + +
+Types + + +```typescript +import { + PaginateInterface, + PaginatingEndpoints, +} from "@octokit/plugin-paginate-rest"; +``` + +
+Guards + + +```typescript +import { isPaginatingEndpoint } from "@octokit/plugin-paginate-rest"; +``` + +
+ +### PaginateInterface + +An `interface` that declares all the overloads of the `.paginate` method. + +### PaginatingEndpoints + +An `interface` which describes all API endpoints supported by the plugin. Some overloads of `.paginate()` method and `composePaginateRest()` function depend on `PaginatingEndpoints`, using the `keyof PaginatingEndpoints` as a type for one of its arguments. + +```typescript +import { Octokit } from "@octokit/core"; +import { + PaginatingEndpoints, + composePaginateRest, +} from "@octokit/plugin-paginate-rest"; + +type DataType = "data" extends keyof T ? T["data"] : unknown; + +async function myPaginatePlugin( + octokit: Octokit, + endpoint: E, + parameters?: PaginatingEndpoints[E]["parameters"], +): Promise> { + return await composePaginateRest(octokit, endpoint, parameters); +} +``` + +### isPaginatingEndpoint + +A type guard, `isPaginatingEndpoint(arg)` returns `true` if `arg` is one of the keys in `PaginatingEndpoints` (is `keyof PaginatingEndpoints`). + +```typescript +import { Octokit } from "@octokit/core"; +import { + isPaginatingEndpoint, + composePaginateRest, +} from "@octokit/plugin-paginate-rest"; + +async function myPlugin(octokit: Octokit, arg: unknown) { + if (isPaginatingEndpoint(arg)) { + return await composePaginateRest(octokit, arg); + } + // ... +} +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js new file mode 100644 index 000000000..644d90a91 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js @@ -0,0 +1,368 @@ +// pkg/dist-src/version.js +var VERSION = "0.0.0-development"; + +// pkg/dist-src/normalize-paginated-list-response.js +function normalizePaginatedListResponse(response) { + if (!response.data) { + return { + ...response, + data: [] + }; + } + const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data); + if (!responseNeedsNormalization) return response; + const incompleteResults = response.data.incomplete_results; + const repositorySelection = response.data.repository_selection; + const totalCount = response.data.total_count; + delete response.data.incomplete_results; + delete response.data.repository_selection; + delete response.data.total_count; + const namespaceKey = Object.keys(response.data)[0]; + const data = response.data[namespaceKey]; + response.data = data; + if (typeof incompleteResults !== "undefined") { + response.data.incomplete_results = incompleteResults; + } + if (typeof repositorySelection !== "undefined") { + response.data.repository_selection = repositorySelection; + } + response.data.total_count = totalCount; + return response; +} + +// pkg/dist-src/iterator.js +function iterator(octokit, route, parameters) { + const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); + const requestMethod = typeof route === "function" ? route : octokit.request; + const method = options.method; + const headers = options.headers; + let url = options.url; + return { + [Symbol.asyncIterator]: () => ({ + async next() { + if (!url) return { done: true }; + try { + const response = await requestMethod({ method, url, headers }); + const normalizedResponse = normalizePaginatedListResponse(response); + url = ((normalizedResponse.headers.link || "").match( + /<([^>]+)>;\s*rel="next"/ + ) || [])[1]; + return { value: normalizedResponse }; + } catch (error) { + if (error.status !== 409) throw error; + url = ""; + return { + value: { + status: 200, + headers: {}, + data: [] + } + }; + } + } + }) + }; +} + +// pkg/dist-src/paginate.js +function paginate(octokit, route, parameters, mapFn) { + if (typeof parameters === "function") { + mapFn = parameters; + parameters = void 0; + } + return gather( + octokit, + [], + iterator(octokit, route, parameters)[Symbol.asyncIterator](), + mapFn + ); +} +function gather(octokit, results, iterator2, mapFn) { + return iterator2.next().then((result) => { + if (result.done) { + return results; + } + let earlyExit = false; + function done() { + earlyExit = true; + } + results = results.concat( + mapFn ? mapFn(result.value, done) : result.value.data + ); + if (earlyExit) { + return results; + } + return gather(octokit, results, iterator2, mapFn); + }); +} + +// pkg/dist-src/compose-paginate.js +var composePaginateRest = Object.assign(paginate, { + iterator +}); + +// pkg/dist-src/generated/paginating-endpoints.js +var paginatingEndpoints = [ + "GET /advisories", + "GET /app/hook/deliveries", + "GET /app/installation-requests", + "GET /app/installations", + "GET /assignments/{assignment_id}/accepted_assignments", + "GET /classrooms", + "GET /classrooms/{classroom_id}/assignments", + "GET /enterprises/{enterprise}/copilot/usage", + "GET /enterprises/{enterprise}/dependabot/alerts", + "GET /enterprises/{enterprise}/secret-scanning/alerts", + "GET /events", + "GET /gists", + "GET /gists/public", + "GET /gists/starred", + "GET /gists/{gist_id}/comments", + "GET /gists/{gist_id}/commits", + "GET /gists/{gist_id}/forks", + "GET /installation/repositories", + "GET /issues", + "GET /licenses", + "GET /marketplace_listing/plans", + "GET /marketplace_listing/plans/{plan_id}/accounts", + "GET /marketplace_listing/stubbed/plans", + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", + "GET /networks/{owner}/{repo}/events", + "GET /notifications", + "GET /organizations", + "GET /orgs/{org}/actions/cache/usage-by-repository", + "GET /orgs/{org}/actions/permissions/repositories", + "GET /orgs/{org}/actions/runners", + "GET /orgs/{org}/actions/secrets", + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", + "GET /orgs/{org}/actions/variables", + "GET /orgs/{org}/actions/variables/{name}/repositories", + "GET /orgs/{org}/blocks", + "GET /orgs/{org}/code-scanning/alerts", + "GET /orgs/{org}/codespaces", + "GET /orgs/{org}/codespaces/secrets", + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories", + "GET /orgs/{org}/copilot/billing/seats", + "GET /orgs/{org}/copilot/usage", + "GET /orgs/{org}/dependabot/alerts", + "GET /orgs/{org}/dependabot/secrets", + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", + "GET /orgs/{org}/events", + "GET /orgs/{org}/failed_invitations", + "GET /orgs/{org}/hooks", + "GET /orgs/{org}/hooks/{hook_id}/deliveries", + "GET /orgs/{org}/installations", + "GET /orgs/{org}/invitations", + "GET /orgs/{org}/invitations/{invitation_id}/teams", + "GET /orgs/{org}/issues", + "GET /orgs/{org}/members", + "GET /orgs/{org}/members/{username}/codespaces", + "GET /orgs/{org}/migrations", + "GET /orgs/{org}/migrations/{migration_id}/repositories", + "GET /orgs/{org}/organization-roles/{role_id}/teams", + "GET /orgs/{org}/organization-roles/{role_id}/users", + "GET /orgs/{org}/outside_collaborators", + "GET /orgs/{org}/packages", + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + "GET /orgs/{org}/personal-access-token-requests", + "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories", + "GET /orgs/{org}/personal-access-tokens", + "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories", + "GET /orgs/{org}/projects", + "GET /orgs/{org}/properties/values", + "GET /orgs/{org}/public_members", + "GET /orgs/{org}/repos", + "GET /orgs/{org}/rulesets", + "GET /orgs/{org}/rulesets/rule-suites", + "GET /orgs/{org}/secret-scanning/alerts", + "GET /orgs/{org}/security-advisories", + "GET /orgs/{org}/team/{team_slug}/copilot/usage", + "GET /orgs/{org}/teams", + "GET /orgs/{org}/teams/{team_slug}/discussions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/invitations", + "GET /orgs/{org}/teams/{team_slug}/members", + "GET /orgs/{org}/teams/{team_slug}/projects", + "GET /orgs/{org}/teams/{team_slug}/repos", + "GET /orgs/{org}/teams/{team_slug}/teams", + "GET /projects/columns/{column_id}/cards", + "GET /projects/{project_id}/collaborators", + "GET /projects/{project_id}/columns", + "GET /repos/{owner}/{repo}/actions/artifacts", + "GET /repos/{owner}/{repo}/actions/caches", + "GET /repos/{owner}/{repo}/actions/organization-secrets", + "GET /repos/{owner}/{repo}/actions/organization-variables", + "GET /repos/{owner}/{repo}/actions/runners", + "GET /repos/{owner}/{repo}/actions/runs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", + "GET /repos/{owner}/{repo}/actions/secrets", + "GET /repos/{owner}/{repo}/actions/variables", + "GET /repos/{owner}/{repo}/actions/workflows", + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", + "GET /repos/{owner}/{repo}/activity", + "GET /repos/{owner}/{repo}/assignees", + "GET /repos/{owner}/{repo}/branches", + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", + "GET /repos/{owner}/{repo}/code-scanning/alerts", + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + "GET /repos/{owner}/{repo}/code-scanning/analyses", + "GET /repos/{owner}/{repo}/codespaces", + "GET /repos/{owner}/{repo}/codespaces/devcontainers", + "GET /repos/{owner}/{repo}/codespaces/secrets", + "GET /repos/{owner}/{repo}/collaborators", + "GET /repos/{owner}/{repo}/comments", + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/commits", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", + "GET /repos/{owner}/{repo}/commits/{ref}/status", + "GET /repos/{owner}/{repo}/commits/{ref}/statuses", + "GET /repos/{owner}/{repo}/contributors", + "GET /repos/{owner}/{repo}/dependabot/alerts", + "GET /repos/{owner}/{repo}/dependabot/secrets", + "GET /repos/{owner}/{repo}/deployments", + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", + "GET /repos/{owner}/{repo}/environments", + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps", + "GET /repos/{owner}/{repo}/environments/{environment_name}/secrets", + "GET /repos/{owner}/{repo}/environments/{environment_name}/variables", + "GET /repos/{owner}/{repo}/events", + "GET /repos/{owner}/{repo}/forks", + "GET /repos/{owner}/{repo}/hooks", + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", + "GET /repos/{owner}/{repo}/invitations", + "GET /repos/{owner}/{repo}/issues", + "GET /repos/{owner}/{repo}/issues/comments", + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/issues/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", + "GET /repos/{owner}/{repo}/issues/{issue_number}/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", + "GET /repos/{owner}/{repo}/keys", + "GET /repos/{owner}/{repo}/labels", + "GET /repos/{owner}/{repo}/milestones", + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", + "GET /repos/{owner}/{repo}/notifications", + "GET /repos/{owner}/{repo}/pages/builds", + "GET /repos/{owner}/{repo}/projects", + "GET /repos/{owner}/{repo}/pulls", + "GET /repos/{owner}/{repo}/pulls/comments", + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", + "GET /repos/{owner}/{repo}/releases", + "GET /repos/{owner}/{repo}/releases/{release_id}/assets", + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", + "GET /repos/{owner}/{repo}/rules/branches/{branch}", + "GET /repos/{owner}/{repo}/rulesets", + "GET /repos/{owner}/{repo}/rulesets/rule-suites", + "GET /repos/{owner}/{repo}/secret-scanning/alerts", + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", + "GET /repos/{owner}/{repo}/security-advisories", + "GET /repos/{owner}/{repo}/stargazers", + "GET /repos/{owner}/{repo}/subscribers", + "GET /repos/{owner}/{repo}/tags", + "GET /repos/{owner}/{repo}/teams", + "GET /repos/{owner}/{repo}/topics", + "GET /repositories", + "GET /search/code", + "GET /search/commits", + "GET /search/issues", + "GET /search/labels", + "GET /search/repositories", + "GET /search/topics", + "GET /search/users", + "GET /teams/{team_id}/discussions", + "GET /teams/{team_id}/discussions/{discussion_number}/comments", + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /teams/{team_id}/discussions/{discussion_number}/reactions", + "GET /teams/{team_id}/invitations", + "GET /teams/{team_id}/members", + "GET /teams/{team_id}/projects", + "GET /teams/{team_id}/repos", + "GET /teams/{team_id}/teams", + "GET /user/blocks", + "GET /user/codespaces", + "GET /user/codespaces/secrets", + "GET /user/emails", + "GET /user/followers", + "GET /user/following", + "GET /user/gpg_keys", + "GET /user/installations", + "GET /user/installations/{installation_id}/repositories", + "GET /user/issues", + "GET /user/keys", + "GET /user/marketplace_purchases", + "GET /user/marketplace_purchases/stubbed", + "GET /user/memberships/orgs", + "GET /user/migrations", + "GET /user/migrations/{migration_id}/repositories", + "GET /user/orgs", + "GET /user/packages", + "GET /user/packages/{package_type}/{package_name}/versions", + "GET /user/public_emails", + "GET /user/repos", + "GET /user/repository_invitations", + "GET /user/social_accounts", + "GET /user/ssh_signing_keys", + "GET /user/starred", + "GET /user/subscriptions", + "GET /user/teams", + "GET /users", + "GET /users/{username}/events", + "GET /users/{username}/events/orgs/{org}", + "GET /users/{username}/events/public", + "GET /users/{username}/followers", + "GET /users/{username}/following", + "GET /users/{username}/gists", + "GET /users/{username}/gpg_keys", + "GET /users/{username}/keys", + "GET /users/{username}/orgs", + "GET /users/{username}/packages", + "GET /users/{username}/projects", + "GET /users/{username}/received_events", + "GET /users/{username}/received_events/public", + "GET /users/{username}/repos", + "GET /users/{username}/social_accounts", + "GET /users/{username}/ssh_signing_keys", + "GET /users/{username}/starred", + "GET /users/{username}/subscriptions" +]; + +// pkg/dist-src/paginating-endpoints.js +function isPaginatingEndpoint(arg) { + if (typeof arg === "string") { + return paginatingEndpoints.includes(arg); + } else { + return false; + } +} + +// pkg/dist-src/index.js +function paginateRest(octokit) { + return { + paginate: Object.assign(paginate.bind(null, octokit), { + iterator: iterator.bind(null, octokit) + }) + }; +} +paginateRest.VERSION = VERSION; +export { + composePaginateRest, + isPaginatingEndpoint, + paginateRest, + paginatingEndpoints +}; diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js.map b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js.map new file mode 100644 index 000000000..ce8a8b4d6 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../dist-src/version.js", "../dist-src/normalize-paginated-list-response.js", "../dist-src/iterator.js", "../dist-src/paginate.js", "../dist-src/compose-paginate.js", "../dist-src/generated/paginating-endpoints.js", "../dist-src/paginating-endpoints.js", "../dist-src/index.js"], + "sourcesContent": ["const VERSION = \"0.0.0-development\";\nexport {\n VERSION\n};\n", "function normalizePaginatedListResponse(response) {\n if (!response.data) {\n return {\n ...response,\n data: []\n };\n }\n const responseNeedsNormalization = \"total_count\" in response.data && !(\"url\" in response.data);\n if (!responseNeedsNormalization) return response;\n const incompleteResults = response.data.incomplete_results;\n const repositorySelection = response.data.repository_selection;\n const totalCount = response.data.total_count;\n delete response.data.incomplete_results;\n delete response.data.repository_selection;\n delete response.data.total_count;\n const namespaceKey = Object.keys(response.data)[0];\n const data = response.data[namespaceKey];\n response.data = data;\n if (typeof incompleteResults !== \"undefined\") {\n response.data.incomplete_results = incompleteResults;\n }\n if (typeof repositorySelection !== \"undefined\") {\n response.data.repository_selection = repositorySelection;\n }\n response.data.total_count = totalCount;\n return response;\n}\nexport {\n normalizePaginatedListResponse\n};\n", "import { normalizePaginatedListResponse } from \"./normalize-paginated-list-response.js\";\nfunction iterator(octokit, route, parameters) {\n const options = typeof route === \"function\" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters);\n const requestMethod = typeof route === \"function\" ? route : octokit.request;\n const method = options.method;\n const headers = options.headers;\n let url = options.url;\n return {\n [Symbol.asyncIterator]: () => ({\n async next() {\n if (!url) return { done: true };\n try {\n const response = await requestMethod({ method, url, headers });\n const normalizedResponse = normalizePaginatedListResponse(response);\n url = ((normalizedResponse.headers.link || \"\").match(\n /<([^>]+)>;\\s*rel=\"next\"/\n ) || [])[1];\n return { value: normalizedResponse };\n } catch (error) {\n if (error.status !== 409) throw error;\n url = \"\";\n return {\n value: {\n status: 200,\n headers: {},\n data: []\n }\n };\n }\n }\n })\n };\n}\nexport {\n iterator\n};\n", "import { iterator } from \"./iterator.js\";\nfunction paginate(octokit, route, parameters, mapFn) {\n if (typeof parameters === \"function\") {\n mapFn = parameters;\n parameters = void 0;\n }\n return gather(\n octokit,\n [],\n iterator(octokit, route, parameters)[Symbol.asyncIterator](),\n mapFn\n );\n}\nfunction gather(octokit, results, iterator2, mapFn) {\n return iterator2.next().then((result) => {\n if (result.done) {\n return results;\n }\n let earlyExit = false;\n function done() {\n earlyExit = true;\n }\n results = results.concat(\n mapFn ? mapFn(result.value, done) : result.value.data\n );\n if (earlyExit) {\n return results;\n }\n return gather(octokit, results, iterator2, mapFn);\n });\n}\nexport {\n paginate\n};\n", "import { paginate } from \"./paginate.js\";\nimport { iterator } from \"./iterator.js\";\nconst composePaginateRest = Object.assign(paginate, {\n iterator\n});\nexport {\n composePaginateRest\n};\n", "const paginatingEndpoints = [\n \"GET /advisories\",\n \"GET /app/hook/deliveries\",\n \"GET /app/installation-requests\",\n \"GET /app/installations\",\n \"GET /assignments/{assignment_id}/accepted_assignments\",\n \"GET /classrooms\",\n \"GET /classrooms/{classroom_id}/assignments\",\n \"GET /enterprises/{enterprise}/copilot/usage\",\n \"GET /enterprises/{enterprise}/dependabot/alerts\",\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\",\n \"GET /events\",\n \"GET /gists\",\n \"GET /gists/public\",\n \"GET /gists/starred\",\n \"GET /gists/{gist_id}/comments\",\n \"GET /gists/{gist_id}/commits\",\n \"GET /gists/{gist_id}/forks\",\n \"GET /installation/repositories\",\n \"GET /issues\",\n \"GET /licenses\",\n \"GET /marketplace_listing/plans\",\n \"GET /marketplace_listing/plans/{plan_id}/accounts\",\n \"GET /marketplace_listing/stubbed/plans\",\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"GET /networks/{owner}/{repo}/events\",\n \"GET /notifications\",\n \"GET /organizations\",\n \"GET /orgs/{org}/actions/cache/usage-by-repository\",\n \"GET /orgs/{org}/actions/permissions/repositories\",\n \"GET /orgs/{org}/actions/runners\",\n \"GET /orgs/{org}/actions/secrets\",\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/actions/variables\",\n \"GET /orgs/{org}/actions/variables/{name}/repositories\",\n \"GET /orgs/{org}/blocks\",\n \"GET /orgs/{org}/code-scanning/alerts\",\n \"GET /orgs/{org}/codespaces\",\n \"GET /orgs/{org}/codespaces/secrets\",\n \"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/copilot/billing/seats\",\n \"GET /orgs/{org}/copilot/usage\",\n \"GET /orgs/{org}/dependabot/alerts\",\n \"GET /orgs/{org}/dependabot/secrets\",\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/events\",\n \"GET /orgs/{org}/failed_invitations\",\n \"GET /orgs/{org}/hooks\",\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries\",\n \"GET /orgs/{org}/installations\",\n \"GET /orgs/{org}/invitations\",\n \"GET /orgs/{org}/invitations/{invitation_id}/teams\",\n \"GET /orgs/{org}/issues\",\n \"GET /orgs/{org}/members\",\n \"GET /orgs/{org}/members/{username}/codespaces\",\n \"GET /orgs/{org}/migrations\",\n \"GET /orgs/{org}/migrations/{migration_id}/repositories\",\n \"GET /orgs/{org}/organization-roles/{role_id}/teams\",\n \"GET /orgs/{org}/organization-roles/{role_id}/users\",\n \"GET /orgs/{org}/outside_collaborators\",\n \"GET /orgs/{org}/packages\",\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n \"GET /orgs/{org}/personal-access-token-requests\",\n \"GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories\",\n \"GET /orgs/{org}/personal-access-tokens\",\n \"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories\",\n \"GET /orgs/{org}/projects\",\n \"GET /orgs/{org}/properties/values\",\n \"GET /orgs/{org}/public_members\",\n \"GET /orgs/{org}/repos\",\n \"GET /orgs/{org}/rulesets\",\n \"GET /orgs/{org}/rulesets/rule-suites\",\n \"GET /orgs/{org}/secret-scanning/alerts\",\n \"GET /orgs/{org}/security-advisories\",\n \"GET /orgs/{org}/team/{team_slug}/copilot/usage\",\n \"GET /orgs/{org}/teams\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/invitations\",\n \"GET /orgs/{org}/teams/{team_slug}/members\",\n \"GET /orgs/{org}/teams/{team_slug}/projects\",\n \"GET /orgs/{org}/teams/{team_slug}/repos\",\n \"GET /orgs/{org}/teams/{team_slug}/teams\",\n \"GET /projects/columns/{column_id}/cards\",\n \"GET /projects/{project_id}/collaborators\",\n \"GET /projects/{project_id}/columns\",\n \"GET /repos/{owner}/{repo}/actions/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/caches\",\n \"GET /repos/{owner}/{repo}/actions/organization-secrets\",\n \"GET /repos/{owner}/{repo}/actions/organization-variables\",\n \"GET /repos/{owner}/{repo}/actions/runners\",\n \"GET /repos/{owner}/{repo}/actions/runs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/secrets\",\n \"GET /repos/{owner}/{repo}/actions/variables\",\n \"GET /repos/{owner}/{repo}/actions/workflows\",\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\",\n \"GET /repos/{owner}/{repo}/activity\",\n \"GET /repos/{owner}/{repo}/assignees\",\n \"GET /repos/{owner}/{repo}/branches\",\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\",\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n \"GET /repos/{owner}/{repo}/code-scanning/analyses\",\n \"GET /repos/{owner}/{repo}/codespaces\",\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\",\n \"GET /repos/{owner}/{repo}/codespaces/secrets\",\n \"GET /repos/{owner}/{repo}/collaborators\",\n \"GET /repos/{owner}/{repo}/comments\",\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/commits\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/status\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\",\n \"GET /repos/{owner}/{repo}/contributors\",\n \"GET /repos/{owner}/{repo}/dependabot/alerts\",\n \"GET /repos/{owner}/{repo}/dependabot/secrets\",\n \"GET /repos/{owner}/{repo}/deployments\",\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n \"GET /repos/{owner}/{repo}/environments\",\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\",\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps\",\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/secrets\",\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/variables\",\n \"GET /repos/{owner}/{repo}/events\",\n \"GET /repos/{owner}/{repo}/forks\",\n \"GET /repos/{owner}/{repo}/hooks\",\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\",\n \"GET /repos/{owner}/{repo}/invitations\",\n \"GET /repos/{owner}/{repo}/issues\",\n \"GET /repos/{owner}/{repo}/issues/comments\",\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\",\n \"GET /repos/{owner}/{repo}/keys\",\n \"GET /repos/{owner}/{repo}/labels\",\n \"GET /repos/{owner}/{repo}/milestones\",\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\",\n \"GET /repos/{owner}/{repo}/notifications\",\n \"GET /repos/{owner}/{repo}/pages/builds\",\n \"GET /repos/{owner}/{repo}/projects\",\n \"GET /repos/{owner}/{repo}/pulls\",\n \"GET /repos/{owner}/{repo}/pulls/comments\",\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\",\n \"GET /repos/{owner}/{repo}/releases\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n \"GET /repos/{owner}/{repo}/rules/branches/{branch}\",\n \"GET /repos/{owner}/{repo}/rulesets\",\n \"GET /repos/{owner}/{repo}/rulesets/rule-suites\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\",\n \"GET /repos/{owner}/{repo}/security-advisories\",\n \"GET /repos/{owner}/{repo}/stargazers\",\n \"GET /repos/{owner}/{repo}/subscribers\",\n \"GET /repos/{owner}/{repo}/tags\",\n \"GET /repos/{owner}/{repo}/teams\",\n \"GET /repos/{owner}/{repo}/topics\",\n \"GET /repositories\",\n \"GET /search/code\",\n \"GET /search/commits\",\n \"GET /search/issues\",\n \"GET /search/labels\",\n \"GET /search/repositories\",\n \"GET /search/topics\",\n \"GET /search/users\",\n \"GET /teams/{team_id}/discussions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/reactions\",\n \"GET /teams/{team_id}/invitations\",\n \"GET /teams/{team_id}/members\",\n \"GET /teams/{team_id}/projects\",\n \"GET /teams/{team_id}/repos\",\n \"GET /teams/{team_id}/teams\",\n \"GET /user/blocks\",\n \"GET /user/codespaces\",\n \"GET /user/codespaces/secrets\",\n \"GET /user/emails\",\n \"GET /user/followers\",\n \"GET /user/following\",\n \"GET /user/gpg_keys\",\n \"GET /user/installations\",\n \"GET /user/installations/{installation_id}/repositories\",\n \"GET /user/issues\",\n \"GET /user/keys\",\n \"GET /user/marketplace_purchases\",\n \"GET /user/marketplace_purchases/stubbed\",\n \"GET /user/memberships/orgs\",\n \"GET /user/migrations\",\n \"GET /user/migrations/{migration_id}/repositories\",\n \"GET /user/orgs\",\n \"GET /user/packages\",\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n \"GET /user/public_emails\",\n \"GET /user/repos\",\n \"GET /user/repository_invitations\",\n \"GET /user/social_accounts\",\n \"GET /user/ssh_signing_keys\",\n \"GET /user/starred\",\n \"GET /user/subscriptions\",\n \"GET /user/teams\",\n \"GET /users\",\n \"GET /users/{username}/events\",\n \"GET /users/{username}/events/orgs/{org}\",\n \"GET /users/{username}/events/public\",\n \"GET /users/{username}/followers\",\n \"GET /users/{username}/following\",\n \"GET /users/{username}/gists\",\n \"GET /users/{username}/gpg_keys\",\n \"GET /users/{username}/keys\",\n \"GET /users/{username}/orgs\",\n \"GET /users/{username}/packages\",\n \"GET /users/{username}/projects\",\n \"GET /users/{username}/received_events\",\n \"GET /users/{username}/received_events/public\",\n \"GET /users/{username}/repos\",\n \"GET /users/{username}/social_accounts\",\n \"GET /users/{username}/ssh_signing_keys\",\n \"GET /users/{username}/starred\",\n \"GET /users/{username}/subscriptions\"\n];\nexport {\n paginatingEndpoints\n};\n", "import {\n paginatingEndpoints\n} from \"./generated/paginating-endpoints.js\";\nimport { paginatingEndpoints as paginatingEndpoints2 } from \"./generated/paginating-endpoints.js\";\nfunction isPaginatingEndpoint(arg) {\n if (typeof arg === \"string\") {\n return paginatingEndpoints.includes(arg);\n } else {\n return false;\n }\n}\nexport {\n isPaginatingEndpoint,\n paginatingEndpoints2 as paginatingEndpoints\n};\n", "import { VERSION } from \"./version.js\";\nimport { paginate } from \"./paginate.js\";\nimport { iterator } from \"./iterator.js\";\nimport { composePaginateRest } from \"./compose-paginate.js\";\nimport {\n isPaginatingEndpoint,\n paginatingEndpoints\n} from \"./paginating-endpoints.js\";\nfunction paginateRest(octokit) {\n return {\n paginate: Object.assign(paginate.bind(null, octokit), {\n iterator: iterator.bind(null, octokit)\n })\n };\n}\npaginateRest.VERSION = VERSION;\nexport {\n composePaginateRest,\n isPaginatingEndpoint,\n paginateRest,\n paginatingEndpoints\n};\n"], + "mappings": ";AAAA,IAAM,UAAU;;;ACAhB,SAAS,+BAA+B,UAAU;AAChD,MAAI,CAAC,SAAS,MAAM;AAClB,WAAO;AAAA,MACL,GAAG;AAAA,MACH,MAAM,CAAC;AAAA,IACT;AAAA,EACF;AACA,QAAM,6BAA6B,iBAAiB,SAAS,QAAQ,EAAE,SAAS,SAAS;AACzF,MAAI,CAAC,2BAA4B,QAAO;AACxC,QAAM,oBAAoB,SAAS,KAAK;AACxC,QAAM,sBAAsB,SAAS,KAAK;AAC1C,QAAM,aAAa,SAAS,KAAK;AACjC,SAAO,SAAS,KAAK;AACrB,SAAO,SAAS,KAAK;AACrB,SAAO,SAAS,KAAK;AACrB,QAAM,eAAe,OAAO,KAAK,SAAS,IAAI,EAAE,CAAC;AACjD,QAAM,OAAO,SAAS,KAAK,YAAY;AACvC,WAAS,OAAO;AAChB,MAAI,OAAO,sBAAsB,aAAa;AAC5C,aAAS,KAAK,qBAAqB;AAAA,EACrC;AACA,MAAI,OAAO,wBAAwB,aAAa;AAC9C,aAAS,KAAK,uBAAuB;AAAA,EACvC;AACA,WAAS,KAAK,cAAc;AAC5B,SAAO;AACT;;;ACzBA,SAAS,SAAS,SAAS,OAAO,YAAY;AAC5C,QAAM,UAAU,OAAO,UAAU,aAAa,MAAM,SAAS,UAAU,IAAI,QAAQ,QAAQ,SAAS,OAAO,UAAU;AACrH,QAAM,gBAAgB,OAAO,UAAU,aAAa,QAAQ,QAAQ;AACpE,QAAM,SAAS,QAAQ;AACvB,QAAM,UAAU,QAAQ;AACxB,MAAI,MAAM,QAAQ;AAClB,SAAO;AAAA,IACL,CAAC,OAAO,aAAa,GAAG,OAAO;AAAA,MAC7B,MAAM,OAAO;AACX,YAAI,CAAC,IAAK,QAAO,EAAE,MAAM,KAAK;AAC9B,YAAI;AACF,gBAAM,WAAW,MAAM,cAAc,EAAE,QAAQ,KAAK,QAAQ,CAAC;AAC7D,gBAAM,qBAAqB,+BAA+B,QAAQ;AAClE,kBAAQ,mBAAmB,QAAQ,QAAQ,IAAI;AAAA,YAC7C;AAAA,UACF,KAAK,CAAC,GAAG,CAAC;AACV,iBAAO,EAAE,OAAO,mBAAmB;AAAA,QACrC,SAAS,OAAO;AACd,cAAI,MAAM,WAAW,IAAK,OAAM;AAChC,gBAAM;AACN,iBAAO;AAAA,YACL,OAAO;AAAA,cACL,QAAQ;AAAA,cACR,SAAS,CAAC;AAAA,cACV,MAAM,CAAC;AAAA,YACT;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;;;AC/BA,SAAS,SAAS,SAAS,OAAO,YAAY,OAAO;AACnD,MAAI,OAAO,eAAe,YAAY;AACpC,YAAQ;AACR,iBAAa;AAAA,EACf;AACA,SAAO;AAAA,IACL;AAAA,IACA,CAAC;AAAA,IACD,SAAS,SAAS,OAAO,UAAU,EAAE,OAAO,aAAa,EAAE;AAAA,IAC3D;AAAA,EACF;AACF;AACA,SAAS,OAAO,SAAS,SAAS,WAAW,OAAO;AAClD,SAAO,UAAU,KAAK,EAAE,KAAK,CAAC,WAAW;AACvC,QAAI,OAAO,MAAM;AACf,aAAO;AAAA,IACT;AACA,QAAI,YAAY;AAChB,aAAS,OAAO;AACd,kBAAY;AAAA,IACd;AACA,cAAU,QAAQ;AAAA,MAChB,QAAQ,MAAM,OAAO,OAAO,IAAI,IAAI,OAAO,MAAM;AAAA,IACnD;AACA,QAAI,WAAW;AACb,aAAO;AAAA,IACT;AACA,WAAO,OAAO,SAAS,SAAS,WAAW,KAAK;AAAA,EAClD,CAAC;AACH;;;AC5BA,IAAM,sBAAsB,OAAO,OAAO,UAAU;AAAA,EAClD;AACF,CAAC;;;ACJD,IAAM,sBAAsB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;;;AC1OA,SAAS,qBAAqB,KAAK;AACjC,MAAI,OAAO,QAAQ,UAAU;AAC3B,WAAO,oBAAoB,SAAS,GAAG;AAAA,EACzC,OAAO;AACL,WAAO;AAAA,EACT;AACF;;;ACFA,SAAS,aAAa,SAAS;AAC7B,SAAO;AAAA,IACL,UAAU,OAAO,OAAO,SAAS,KAAK,MAAM,OAAO,GAAG;AAAA,MACpD,UAAU,SAAS,KAAK,MAAM,OAAO;AAAA,IACvC,CAAC;AAAA,EACH;AACF;AACA,aAAa,UAAU;", + "names": [] +} diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/compose-paginate.js b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/compose-paginate.js new file mode 100644 index 000000000..f3a6537aa --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/compose-paginate.js @@ -0,0 +1,8 @@ +import { paginate } from "./paginate.js"; +import { iterator } from "./iterator.js"; +const composePaginateRest = Object.assign(paginate, { + iterator +}); +export { + composePaginateRest +}; diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/generated/paginating-endpoints.js b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/generated/paginating-endpoints.js new file mode 100644 index 000000000..918a51141 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/generated/paginating-endpoints.js @@ -0,0 +1,242 @@ +const paginatingEndpoints = [ + "GET /advisories", + "GET /app/hook/deliveries", + "GET /app/installation-requests", + "GET /app/installations", + "GET /assignments/{assignment_id}/accepted_assignments", + "GET /classrooms", + "GET /classrooms/{classroom_id}/assignments", + "GET /enterprises/{enterprise}/copilot/usage", + "GET /enterprises/{enterprise}/dependabot/alerts", + "GET /enterprises/{enterprise}/secret-scanning/alerts", + "GET /events", + "GET /gists", + "GET /gists/public", + "GET /gists/starred", + "GET /gists/{gist_id}/comments", + "GET /gists/{gist_id}/commits", + "GET /gists/{gist_id}/forks", + "GET /installation/repositories", + "GET /issues", + "GET /licenses", + "GET /marketplace_listing/plans", + "GET /marketplace_listing/plans/{plan_id}/accounts", + "GET /marketplace_listing/stubbed/plans", + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", + "GET /networks/{owner}/{repo}/events", + "GET /notifications", + "GET /organizations", + "GET /orgs/{org}/actions/cache/usage-by-repository", + "GET /orgs/{org}/actions/permissions/repositories", + "GET /orgs/{org}/actions/runners", + "GET /orgs/{org}/actions/secrets", + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", + "GET /orgs/{org}/actions/variables", + "GET /orgs/{org}/actions/variables/{name}/repositories", + "GET /orgs/{org}/blocks", + "GET /orgs/{org}/code-scanning/alerts", + "GET /orgs/{org}/codespaces", + "GET /orgs/{org}/codespaces/secrets", + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories", + "GET /orgs/{org}/copilot/billing/seats", + "GET /orgs/{org}/copilot/usage", + "GET /orgs/{org}/dependabot/alerts", + "GET /orgs/{org}/dependabot/secrets", + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", + "GET /orgs/{org}/events", + "GET /orgs/{org}/failed_invitations", + "GET /orgs/{org}/hooks", + "GET /orgs/{org}/hooks/{hook_id}/deliveries", + "GET /orgs/{org}/installations", + "GET /orgs/{org}/invitations", + "GET /orgs/{org}/invitations/{invitation_id}/teams", + "GET /orgs/{org}/issues", + "GET /orgs/{org}/members", + "GET /orgs/{org}/members/{username}/codespaces", + "GET /orgs/{org}/migrations", + "GET /orgs/{org}/migrations/{migration_id}/repositories", + "GET /orgs/{org}/organization-roles/{role_id}/teams", + "GET /orgs/{org}/organization-roles/{role_id}/users", + "GET /orgs/{org}/outside_collaborators", + "GET /orgs/{org}/packages", + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + "GET /orgs/{org}/personal-access-token-requests", + "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories", + "GET /orgs/{org}/personal-access-tokens", + "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories", + "GET /orgs/{org}/projects", + "GET /orgs/{org}/properties/values", + "GET /orgs/{org}/public_members", + "GET /orgs/{org}/repos", + "GET /orgs/{org}/rulesets", + "GET /orgs/{org}/rulesets/rule-suites", + "GET /orgs/{org}/secret-scanning/alerts", + "GET /orgs/{org}/security-advisories", + "GET /orgs/{org}/team/{team_slug}/copilot/usage", + "GET /orgs/{org}/teams", + "GET /orgs/{org}/teams/{team_slug}/discussions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/invitations", + "GET /orgs/{org}/teams/{team_slug}/members", + "GET /orgs/{org}/teams/{team_slug}/projects", + "GET /orgs/{org}/teams/{team_slug}/repos", + "GET /orgs/{org}/teams/{team_slug}/teams", + "GET /projects/columns/{column_id}/cards", + "GET /projects/{project_id}/collaborators", + "GET /projects/{project_id}/columns", + "GET /repos/{owner}/{repo}/actions/artifacts", + "GET /repos/{owner}/{repo}/actions/caches", + "GET /repos/{owner}/{repo}/actions/organization-secrets", + "GET /repos/{owner}/{repo}/actions/organization-variables", + "GET /repos/{owner}/{repo}/actions/runners", + "GET /repos/{owner}/{repo}/actions/runs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", + "GET /repos/{owner}/{repo}/actions/secrets", + "GET /repos/{owner}/{repo}/actions/variables", + "GET /repos/{owner}/{repo}/actions/workflows", + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", + "GET /repos/{owner}/{repo}/activity", + "GET /repos/{owner}/{repo}/assignees", + "GET /repos/{owner}/{repo}/branches", + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", + "GET /repos/{owner}/{repo}/code-scanning/alerts", + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + "GET /repos/{owner}/{repo}/code-scanning/analyses", + "GET /repos/{owner}/{repo}/codespaces", + "GET /repos/{owner}/{repo}/codespaces/devcontainers", + "GET /repos/{owner}/{repo}/codespaces/secrets", + "GET /repos/{owner}/{repo}/collaborators", + "GET /repos/{owner}/{repo}/comments", + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/commits", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", + "GET /repos/{owner}/{repo}/commits/{ref}/status", + "GET /repos/{owner}/{repo}/commits/{ref}/statuses", + "GET /repos/{owner}/{repo}/contributors", + "GET /repos/{owner}/{repo}/dependabot/alerts", + "GET /repos/{owner}/{repo}/dependabot/secrets", + "GET /repos/{owner}/{repo}/deployments", + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", + "GET /repos/{owner}/{repo}/environments", + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps", + "GET /repos/{owner}/{repo}/environments/{environment_name}/secrets", + "GET /repos/{owner}/{repo}/environments/{environment_name}/variables", + "GET /repos/{owner}/{repo}/events", + "GET /repos/{owner}/{repo}/forks", + "GET /repos/{owner}/{repo}/hooks", + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", + "GET /repos/{owner}/{repo}/invitations", + "GET /repos/{owner}/{repo}/issues", + "GET /repos/{owner}/{repo}/issues/comments", + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/issues/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", + "GET /repos/{owner}/{repo}/issues/{issue_number}/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", + "GET /repos/{owner}/{repo}/keys", + "GET /repos/{owner}/{repo}/labels", + "GET /repos/{owner}/{repo}/milestones", + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", + "GET /repos/{owner}/{repo}/notifications", + "GET /repos/{owner}/{repo}/pages/builds", + "GET /repos/{owner}/{repo}/projects", + "GET /repos/{owner}/{repo}/pulls", + "GET /repos/{owner}/{repo}/pulls/comments", + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", + "GET /repos/{owner}/{repo}/releases", + "GET /repos/{owner}/{repo}/releases/{release_id}/assets", + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", + "GET /repos/{owner}/{repo}/rules/branches/{branch}", + "GET /repos/{owner}/{repo}/rulesets", + "GET /repos/{owner}/{repo}/rulesets/rule-suites", + "GET /repos/{owner}/{repo}/secret-scanning/alerts", + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", + "GET /repos/{owner}/{repo}/security-advisories", + "GET /repos/{owner}/{repo}/stargazers", + "GET /repos/{owner}/{repo}/subscribers", + "GET /repos/{owner}/{repo}/tags", + "GET /repos/{owner}/{repo}/teams", + "GET /repos/{owner}/{repo}/topics", + "GET /repositories", + "GET /search/code", + "GET /search/commits", + "GET /search/issues", + "GET /search/labels", + "GET /search/repositories", + "GET /search/topics", + "GET /search/users", + "GET /teams/{team_id}/discussions", + "GET /teams/{team_id}/discussions/{discussion_number}/comments", + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /teams/{team_id}/discussions/{discussion_number}/reactions", + "GET /teams/{team_id}/invitations", + "GET /teams/{team_id}/members", + "GET /teams/{team_id}/projects", + "GET /teams/{team_id}/repos", + "GET /teams/{team_id}/teams", + "GET /user/blocks", + "GET /user/codespaces", + "GET /user/codespaces/secrets", + "GET /user/emails", + "GET /user/followers", + "GET /user/following", + "GET /user/gpg_keys", + "GET /user/installations", + "GET /user/installations/{installation_id}/repositories", + "GET /user/issues", + "GET /user/keys", + "GET /user/marketplace_purchases", + "GET /user/marketplace_purchases/stubbed", + "GET /user/memberships/orgs", + "GET /user/migrations", + "GET /user/migrations/{migration_id}/repositories", + "GET /user/orgs", + "GET /user/packages", + "GET /user/packages/{package_type}/{package_name}/versions", + "GET /user/public_emails", + "GET /user/repos", + "GET /user/repository_invitations", + "GET /user/social_accounts", + "GET /user/ssh_signing_keys", + "GET /user/starred", + "GET /user/subscriptions", + "GET /user/teams", + "GET /users", + "GET /users/{username}/events", + "GET /users/{username}/events/orgs/{org}", + "GET /users/{username}/events/public", + "GET /users/{username}/followers", + "GET /users/{username}/following", + "GET /users/{username}/gists", + "GET /users/{username}/gpg_keys", + "GET /users/{username}/keys", + "GET /users/{username}/orgs", + "GET /users/{username}/packages", + "GET /users/{username}/projects", + "GET /users/{username}/received_events", + "GET /users/{username}/received_events/public", + "GET /users/{username}/repos", + "GET /users/{username}/social_accounts", + "GET /users/{username}/ssh_signing_keys", + "GET /users/{username}/starred", + "GET /users/{username}/subscriptions" +]; +export { + paginatingEndpoints +}; diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/index.js b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/index.js new file mode 100644 index 000000000..02a5b1097 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/index.js @@ -0,0 +1,22 @@ +import { VERSION } from "./version.js"; +import { paginate } from "./paginate.js"; +import { iterator } from "./iterator.js"; +import { composePaginateRest } from "./compose-paginate.js"; +import { + isPaginatingEndpoint, + paginatingEndpoints +} from "./paginating-endpoints.js"; +function paginateRest(octokit) { + return { + paginate: Object.assign(paginate.bind(null, octokit), { + iterator: iterator.bind(null, octokit) + }) + }; +} +paginateRest.VERSION = VERSION; +export { + composePaginateRest, + isPaginatingEndpoint, + paginateRest, + paginatingEndpoints +}; diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/iterator.js b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/iterator.js new file mode 100644 index 000000000..f765c4e66 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/iterator.js @@ -0,0 +1,36 @@ +import { normalizePaginatedListResponse } from "./normalize-paginated-list-response.js"; +function iterator(octokit, route, parameters) { + const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); + const requestMethod = typeof route === "function" ? route : octokit.request; + const method = options.method; + const headers = options.headers; + let url = options.url; + return { + [Symbol.asyncIterator]: () => ({ + async next() { + if (!url) return { done: true }; + try { + const response = await requestMethod({ method, url, headers }); + const normalizedResponse = normalizePaginatedListResponse(response); + url = ((normalizedResponse.headers.link || "").match( + /<([^>]+)>;\s*rel="next"/ + ) || [])[1]; + return { value: normalizedResponse }; + } catch (error) { + if (error.status !== 409) throw error; + url = ""; + return { + value: { + status: 200, + headers: {}, + data: [] + } + }; + } + } + }) + }; +} +export { + iterator +}; diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/normalize-paginated-list-response.js b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/normalize-paginated-list-response.js new file mode 100644 index 000000000..e8cec690b --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/normalize-paginated-list-response.js @@ -0,0 +1,30 @@ +function normalizePaginatedListResponse(response) { + if (!response.data) { + return { + ...response, + data: [] + }; + } + const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data); + if (!responseNeedsNormalization) return response; + const incompleteResults = response.data.incomplete_results; + const repositorySelection = response.data.repository_selection; + const totalCount = response.data.total_count; + delete response.data.incomplete_results; + delete response.data.repository_selection; + delete response.data.total_count; + const namespaceKey = Object.keys(response.data)[0]; + const data = response.data[namespaceKey]; + response.data = data; + if (typeof incompleteResults !== "undefined") { + response.data.incomplete_results = incompleteResults; + } + if (typeof repositorySelection !== "undefined") { + response.data.repository_selection = repositorySelection; + } + response.data.total_count = totalCount; + return response; +} +export { + normalizePaginatedListResponse +}; diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/paginate.js b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/paginate.js new file mode 100644 index 000000000..0e888b99f --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/paginate.js @@ -0,0 +1,34 @@ +import { iterator } from "./iterator.js"; +function paginate(octokit, route, parameters, mapFn) { + if (typeof parameters === "function") { + mapFn = parameters; + parameters = void 0; + } + return gather( + octokit, + [], + iterator(octokit, route, parameters)[Symbol.asyncIterator](), + mapFn + ); +} +function gather(octokit, results, iterator2, mapFn) { + return iterator2.next().then((result) => { + if (result.done) { + return results; + } + let earlyExit = false; + function done() { + earlyExit = true; + } + results = results.concat( + mapFn ? mapFn(result.value, done) : result.value.data + ); + if (earlyExit) { + return results; + } + return gather(octokit, results, iterator2, mapFn); + }); +} +export { + paginate +}; diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/paginating-endpoints.js b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/paginating-endpoints.js new file mode 100644 index 000000000..f9a110a87 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/paginating-endpoints.js @@ -0,0 +1,15 @@ +import { + paginatingEndpoints +} from "./generated/paginating-endpoints.js"; +import { paginatingEndpoints as paginatingEndpoints2 } from "./generated/paginating-endpoints.js"; +function isPaginatingEndpoint(arg) { + if (typeof arg === "string") { + return paginatingEndpoints.includes(arg); + } else { + return false; + } +} +export { + isPaginatingEndpoint, + paginatingEndpoints2 as paginatingEndpoints +}; diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/version.js b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/version.js new file mode 100644 index 000000000..625af3608 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-src/version.js @@ -0,0 +1,4 @@ +const VERSION = "11.3.5"; +export { + VERSION +}; diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/compose-paginate.d.ts b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/compose-paginate.d.ts new file mode 100644 index 000000000..484eadb25 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/compose-paginate.d.ts @@ -0,0 +1,2 @@ +import type { ComposePaginateInterface } from "./types.js"; +export declare const composePaginateRest: ComposePaginateInterface; diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts new file mode 100644 index 000000000..25bd42eaa --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts @@ -0,0 +1,1771 @@ +import type { Endpoints } from "@octokit/types"; +export interface PaginatingEndpoints { + /** + * @see https://docs.github.com/rest/security-advisories/global-advisories#list-global-security-advisories + */ + "GET /advisories": { + parameters: Endpoints["GET /advisories"]["parameters"]; + response: Endpoints["GET /advisories"]["response"]; + }; + /** + * @see https://docs.github.com/rest/apps/webhooks#list-deliveries-for-an-app-webhook + */ + "GET /app/hook/deliveries": { + parameters: Endpoints["GET /app/hook/deliveries"]["parameters"]; + response: Endpoints["GET /app/hook/deliveries"]["response"]; + }; + /** + * @see https://docs.github.com/rest/apps/apps#list-installation-requests-for-the-authenticated-app + */ + "GET /app/installation-requests": { + parameters: Endpoints["GET /app/installation-requests"]["parameters"]; + response: Endpoints["GET /app/installation-requests"]["response"]; + }; + /** + * @see https://docs.github.com/enterprise-server@3.9/rest/apps/apps#list-installations-for-the-authenticated-app + */ + "GET /app/installations": { + parameters: Endpoints["GET /app/installations"]["parameters"]; + response: Endpoints["GET /app/installations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/classroom/classroom#list-accepted-assignments-for-an-assignment + */ + "GET /assignments/{assignment_id}/accepted_assignments": { + parameters: Endpoints["GET /assignments/{assignment_id}/accepted_assignments"]["parameters"]; + response: Endpoints["GET /assignments/{assignment_id}/accepted_assignments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/classroom/classroom#list-classrooms + */ + "GET /classrooms": { + parameters: Endpoints["GET /classrooms"]["parameters"]; + response: Endpoints["GET /classrooms"]["response"]; + }; + /** + * @see https://docs.github.com/rest/classroom/classroom#list-assignments-for-a-classroom + */ + "GET /classrooms/{classroom_id}/assignments": { + parameters: Endpoints["GET /classrooms/{classroom_id}/assignments"]["parameters"]; + response: Endpoints["GET /classrooms/{classroom_id}/assignments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/copilot/copilot-usage#get-a-summary-of-copilot-usage-for-enterprise-members + */ + "GET /enterprises/{enterprise}/copilot/usage": { + parameters: Endpoints["GET /enterprises/{enterprise}/copilot/usage"]["parameters"]; + response: Endpoints["GET /enterprises/{enterprise}/copilot/usage"]["response"]; + }; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/dependabot/alerts": { + parameters: Endpoints["GET /enterprises/{enterprise}/dependabot/alerts"]["parameters"]; + response: Endpoints["GET /enterprises/{enterprise}/dependabot/alerts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/secret-scanning/alerts": { + parameters: Endpoints["GET /enterprises/{enterprise}/secret-scanning/alerts"]["parameters"]; + response: Endpoints["GET /enterprises/{enterprise}/secret-scanning/alerts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/activity/events#list-public-events + */ + "GET /events": { + parameters: Endpoints["GET /events"]["parameters"]; + response: Endpoints["GET /events"]["response"]; + }; + /** + * @see https://docs.github.com/rest/gists/gists#list-gists-for-the-authenticated-user + */ + "GET /gists": { + parameters: Endpoints["GET /gists"]["parameters"]; + response: Endpoints["GET /gists"]["response"]; + }; + /** + * @see https://docs.github.com/rest/gists/gists#list-public-gists + */ + "GET /gists/public": { + parameters: Endpoints["GET /gists/public"]["parameters"]; + response: Endpoints["GET /gists/public"]["response"]; + }; + /** + * @see https://docs.github.com/rest/gists/gists#list-starred-gists + */ + "GET /gists/starred": { + parameters: Endpoints["GET /gists/starred"]["parameters"]; + response: Endpoints["GET /gists/starred"]["response"]; + }; + /** + * @see https://docs.github.com/rest/gists/comments#list-gist-comments + */ + "GET /gists/{gist_id}/comments": { + parameters: Endpoints["GET /gists/{gist_id}/comments"]["parameters"]; + response: Endpoints["GET /gists/{gist_id}/comments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/gists/gists#list-gist-commits + */ + "GET /gists/{gist_id}/commits": { + parameters: Endpoints["GET /gists/{gist_id}/commits"]["parameters"]; + response: Endpoints["GET /gists/{gist_id}/commits"]["response"]; + }; + /** + * @see https://docs.github.com/rest/gists/gists#list-gist-forks + */ + "GET /gists/{gist_id}/forks": { + parameters: Endpoints["GET /gists/{gist_id}/forks"]["parameters"]; + response: Endpoints["GET /gists/{gist_id}/forks"]["response"]; + }; + /** + * @see https://docs.github.com/rest/apps/installations#list-repositories-accessible-to-the-app-installation + */ + "GET /installation/repositories": { + parameters: Endpoints["GET /installation/repositories"]["parameters"]; + response: Endpoints["GET /installation/repositories"]["response"] & { + data: Endpoints["GET /installation/repositories"]["response"]["data"]["repositories"]; + }; + }; + /** + * @see https://docs.github.com/rest/issues/issues#list-issues-assigned-to-the-authenticated-user + */ + "GET /issues": { + parameters: Endpoints["GET /issues"]["parameters"]; + response: Endpoints["GET /issues"]["response"]; + }; + /** + * @see https://docs.github.com/rest/licenses/licenses#get-all-commonly-used-licenses + */ + "GET /licenses": { + parameters: Endpoints["GET /licenses"]["parameters"]; + response: Endpoints["GET /licenses"]["response"]; + }; + /** + * @see https://docs.github.com/rest/apps/marketplace#list-plans + */ + "GET /marketplace_listing/plans": { + parameters: Endpoints["GET /marketplace_listing/plans"]["parameters"]; + response: Endpoints["GET /marketplace_listing/plans"]["response"]; + }; + /** + * @see https://docs.github.com/rest/apps/marketplace#list-accounts-for-a-plan + */ + "GET /marketplace_listing/plans/{plan_id}/accounts": { + parameters: Endpoints["GET /marketplace_listing/plans/{plan_id}/accounts"]["parameters"]; + response: Endpoints["GET /marketplace_listing/plans/{plan_id}/accounts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/apps/marketplace#list-plans-stubbed + */ + "GET /marketplace_listing/stubbed/plans": { + parameters: Endpoints["GET /marketplace_listing/stubbed/plans"]["parameters"]; + response: Endpoints["GET /marketplace_listing/stubbed/plans"]["response"]; + }; + /** + * @see https://docs.github.com/rest/apps/marketplace#list-accounts-for-a-plan-stubbed + */ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts": { + parameters: Endpoints["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"]["parameters"]; + response: Endpoints["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/activity/events#list-public-events-for-a-network-of-repositories + */ + "GET /networks/{owner}/{repo}/events": { + parameters: Endpoints["GET /networks/{owner}/{repo}/events"]["parameters"]; + response: Endpoints["GET /networks/{owner}/{repo}/events"]["response"]; + }; + /** + * @see https://docs.github.com/rest/activity/notifications#list-notifications-for-the-authenticated-user + */ + "GET /notifications": { + parameters: Endpoints["GET /notifications"]["parameters"]; + response: Endpoints["GET /notifications"]["response"]; + }; + /** + * @see https://docs.github.com/rest/orgs/orgs#list-organizations + */ + "GET /organizations": { + parameters: Endpoints["GET /organizations"]["parameters"]; + response: Endpoints["GET /organizations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/actions/cache#list-repositories-with-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage-by-repository": { + parameters: Endpoints["GET /orgs/{org}/actions/cache/usage-by-repository"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/cache/usage-by-repository"]["response"] & { + data: Endpoints["GET /orgs/{org}/actions/cache/usage-by-repository"]["response"]["data"]["repository_cache_usages"]; + }; + }; + /** + * @see https://docs.github.com/rest/actions/permissions#list-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "GET /orgs/{org}/actions/permissions/repositories": { + parameters: Endpoints["GET /orgs/{org}/actions/permissions/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/permissions/repositories"]["response"] & { + data: Endpoints["GET /orgs/{org}/actions/permissions/repositories"]["response"]["data"]["repositories"]; + }; + }; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#list-self-hosted-runners-for-an-organization + */ + "GET /orgs/{org}/actions/runners": { + parameters: Endpoints["GET /orgs/{org}/actions/runners"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/runners"]["response"] & { + data: Endpoints["GET /orgs/{org}/actions/runners"]["response"]["data"]["runners"]; + }; + }; + /** + * @see https://docs.github.com/rest/actions/secrets#list-organization-secrets + */ + "GET /orgs/{org}/actions/secrets": { + parameters: Endpoints["GET /orgs/{org}/actions/secrets"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/secrets"]["response"] & { + data: Endpoints["GET /orgs/{org}/actions/secrets"]["response"]["data"]["secrets"]; + }; + }; + /** + * @see https://docs.github.com/rest/actions/secrets#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories": { + parameters: Endpoints["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"]["response"] & { + data: Endpoints["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"]["response"]["data"]["repositories"]; + }; + }; + /** + * @see https://docs.github.com/rest/actions/variables#list-organization-variables + */ + "GET /orgs/{org}/actions/variables": { + parameters: Endpoints["GET /orgs/{org}/actions/variables"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/variables"]["response"] & { + data: Endpoints["GET /orgs/{org}/actions/variables"]["response"]["data"]["variables"]; + }; + }; + /** + * @see https://docs.github.com/rest/actions/variables#list-selected-repositories-for-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}/repositories": { + parameters: Endpoints["GET /orgs/{org}/actions/variables/{name}/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/variables/{name}/repositories"]["response"] & { + data: Endpoints["GET /orgs/{org}/actions/variables/{name}/repositories"]["response"]["data"]["repositories"]; + }; + }; + /** + * @see https://docs.github.com/rest/orgs/blocking#list-users-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks": { + parameters: Endpoints["GET /orgs/{org}/blocks"]["parameters"]; + response: Endpoints["GET /orgs/{org}/blocks"]["response"]; + }; + /** + * @see https://docs.github.com/rest/code-scanning/code-scanning#list-code-scanning-alerts-for-an-organization + */ + "GET /orgs/{org}/code-scanning/alerts": { + parameters: Endpoints["GET /orgs/{org}/code-scanning/alerts"]["parameters"]; + response: Endpoints["GET /orgs/{org}/code-scanning/alerts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/codespaces/organizations#list-codespaces-for-the-organization + */ + "GET /orgs/{org}/codespaces": { + parameters: Endpoints["GET /orgs/{org}/codespaces"]["parameters"]; + response: Endpoints["GET /orgs/{org}/codespaces"]["response"] & { + data: Endpoints["GET /orgs/{org}/codespaces"]["response"]["data"]["codespaces"]; + }; + }; + /** + * @see https://docs.github.com/rest/codespaces/organization-secrets#list-organization-secrets + */ + "GET /orgs/{org}/codespaces/secrets": { + parameters: Endpoints["GET /orgs/{org}/codespaces/secrets"]["parameters"]; + response: Endpoints["GET /orgs/{org}/codespaces/secrets"]["response"] & { + data: Endpoints["GET /orgs/{org}/codespaces/secrets"]["response"]["data"]["secrets"]; + }; + }; + /** + * @see https://docs.github.com/rest/codespaces/organization-secrets#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories": { + parameters: Endpoints["GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories"]["response"] & { + data: Endpoints["GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories"]["response"]["data"]["repositories"]; + }; + }; + /** + * @see https://docs.github.com/rest/copilot/copilot-user-management#list-all-copilot-seat-assignments-for-an-organization + */ + "GET /orgs/{org}/copilot/billing/seats": { + parameters: Endpoints["GET /orgs/{org}/copilot/billing/seats"]["parameters"]; + response: Endpoints["GET /orgs/{org}/copilot/billing/seats"]["response"] & { + data: Endpoints["GET /orgs/{org}/copilot/billing/seats"]["response"]["data"]["seats"]; + }; + }; + /** + * @see https://docs.github.com/rest/copilot/copilot-usage#get-a-summary-of-copilot-usage-for-organization-members + */ + "GET /orgs/{org}/copilot/usage": { + parameters: Endpoints["GET /orgs/{org}/copilot/usage"]["parameters"]; + response: Endpoints["GET /orgs/{org}/copilot/usage"]["response"]; + }; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-organization + */ + "GET /orgs/{org}/dependabot/alerts": { + parameters: Endpoints["GET /orgs/{org}/dependabot/alerts"]["parameters"]; + response: Endpoints["GET /orgs/{org}/dependabot/alerts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/dependabot/secrets#list-organization-secrets + */ + "GET /orgs/{org}/dependabot/secrets": { + parameters: Endpoints["GET /orgs/{org}/dependabot/secrets"]["parameters"]; + response: Endpoints["GET /orgs/{org}/dependabot/secrets"]["response"] & { + data: Endpoints["GET /orgs/{org}/dependabot/secrets"]["response"]["data"]["secrets"]; + }; + }; + /** + * @see https://docs.github.com/rest/dependabot/secrets#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories": { + parameters: Endpoints["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"]["response"] & { + data: Endpoints["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"]["response"]["data"]["repositories"]; + }; + }; + /** + * @see https://docs.github.com/rest/activity/events#list-public-organization-events + */ + "GET /orgs/{org}/events": { + parameters: Endpoints["GET /orgs/{org}/events"]["parameters"]; + response: Endpoints["GET /orgs/{org}/events"]["response"]; + }; + /** + * @see https://docs.github.com/rest/orgs/members#list-failed-organization-invitations + */ + "GET /orgs/{org}/failed_invitations": { + parameters: Endpoints["GET /orgs/{org}/failed_invitations"]["parameters"]; + response: Endpoints["GET /orgs/{org}/failed_invitations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/orgs/webhooks#list-organization-webhooks + */ + "GET /orgs/{org}/hooks": { + parameters: Endpoints["GET /orgs/{org}/hooks"]["parameters"]; + response: Endpoints["GET /orgs/{org}/hooks"]["response"]; + }; + /** + * @see https://docs.github.com/rest/orgs/webhooks#list-deliveries-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries": { + parameters: Endpoints["GET /orgs/{org}/hooks/{hook_id}/deliveries"]["parameters"]; + response: Endpoints["GET /orgs/{org}/hooks/{hook_id}/deliveries"]["response"]; + }; + /** + * @see https://docs.github.com/rest/orgs/orgs#list-app-installations-for-an-organization + */ + "GET /orgs/{org}/installations": { + parameters: Endpoints["GET /orgs/{org}/installations"]["parameters"]; + response: Endpoints["GET /orgs/{org}/installations"]["response"] & { + data: Endpoints["GET /orgs/{org}/installations"]["response"]["data"]["installations"]; + }; + }; + /** + * @see https://docs.github.com/rest/orgs/members#list-pending-organization-invitations + */ + "GET /orgs/{org}/invitations": { + parameters: Endpoints["GET /orgs/{org}/invitations"]["parameters"]; + response: Endpoints["GET /orgs/{org}/invitations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/orgs/members#list-organization-invitation-teams + */ + "GET /orgs/{org}/invitations/{invitation_id}/teams": { + parameters: Endpoints["GET /orgs/{org}/invitations/{invitation_id}/teams"]["parameters"]; + response: Endpoints["GET /orgs/{org}/invitations/{invitation_id}/teams"]["response"]; + }; + /** + * @see https://docs.github.com/rest/issues/issues#list-organization-issues-assigned-to-the-authenticated-user + */ + "GET /orgs/{org}/issues": { + parameters: Endpoints["GET /orgs/{org}/issues"]["parameters"]; + response: Endpoints["GET /orgs/{org}/issues"]["response"]; + }; + /** + * @see https://docs.github.com/rest/orgs/members#list-organization-members + */ + "GET /orgs/{org}/members": { + parameters: Endpoints["GET /orgs/{org}/members"]["parameters"]; + response: Endpoints["GET /orgs/{org}/members"]["response"]; + }; + /** + * @see https://docs.github.com/rest/codespaces/organizations#list-codespaces-for-a-user-in-organization + */ + "GET /orgs/{org}/members/{username}/codespaces": { + parameters: Endpoints["GET /orgs/{org}/members/{username}/codespaces"]["parameters"]; + response: Endpoints["GET /orgs/{org}/members/{username}/codespaces"]["response"] & { + data: Endpoints["GET /orgs/{org}/members/{username}/codespaces"]["response"]["data"]["codespaces"]; + }; + }; + /** + * @see https://docs.github.com/rest/migrations/orgs#list-organization-migrations + */ + "GET /orgs/{org}/migrations": { + parameters: Endpoints["GET /orgs/{org}/migrations"]["parameters"]; + response: Endpoints["GET /orgs/{org}/migrations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/migrations/orgs#list-repositories-in-an-organization-migration + */ + "GET /orgs/{org}/migrations/{migration_id}/repositories": { + parameters: Endpoints["GET /orgs/{org}/migrations/{migration_id}/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/migrations/{migration_id}/repositories"]["response"]; + }; + /** + * @see https://docs.github.com/rest/orgs/organization-roles#list-teams-that-are-assigned-to-an-organization-role + */ + "GET /orgs/{org}/organization-roles/{role_id}/teams": { + parameters: Endpoints["GET /orgs/{org}/organization-roles/{role_id}/teams"]["parameters"]; + response: Endpoints["GET /orgs/{org}/organization-roles/{role_id}/teams"]["response"]; + }; + /** + * @see https://docs.github.com/rest/orgs/organization-roles#list-users-that-are-assigned-to-an-organization-role + */ + "GET /orgs/{org}/organization-roles/{role_id}/users": { + parameters: Endpoints["GET /orgs/{org}/organization-roles/{role_id}/users"]["parameters"]; + response: Endpoints["GET /orgs/{org}/organization-roles/{role_id}/users"]["response"]; + }; + /** + * @see https://docs.github.com/rest/orgs/outside-collaborators#list-outside-collaborators-for-an-organization + */ + "GET /orgs/{org}/outside_collaborators": { + parameters: Endpoints["GET /orgs/{org}/outside_collaborators"]["parameters"]; + response: Endpoints["GET /orgs/{org}/outside_collaborators"]["response"]; + }; + /** + * @see https://docs.github.com/rest/packages/packages#list-packages-for-an-organization + */ + "GET /orgs/{org}/packages": { + parameters: Endpoints["GET /orgs/{org}/packages"]["parameters"]; + response: Endpoints["GET /orgs/{org}/packages"]["response"]; + }; + /** + * @see https://docs.github.com/rest/packages/packages#list-package-versions-for-a-package-owned-by-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions": { + parameters: Endpoints["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"]["parameters"]; + response: Endpoints["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/orgs/personal-access-tokens#list-requests-to-access-organization-resources-with-fine-grained-personal-access-tokens + */ + "GET /orgs/{org}/personal-access-token-requests": { + parameters: Endpoints["GET /orgs/{org}/personal-access-token-requests"]["parameters"]; + response: Endpoints["GET /orgs/{org}/personal-access-token-requests"]["response"]; + }; + /** + * @see https://docs.github.com/rest/orgs/personal-access-tokens#list-repositories-requested-to-be-accessed-by-a-fine-grained-personal-access-token + */ + "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories": { + parameters: Endpoints["GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories"]["response"]; + }; + /** + * @see https://docs.github.com/rest/orgs/personal-access-tokens#list-fine-grained-personal-access-tokens-with-access-to-organization-resources + */ + "GET /orgs/{org}/personal-access-tokens": { + parameters: Endpoints["GET /orgs/{org}/personal-access-tokens"]["parameters"]; + response: Endpoints["GET /orgs/{org}/personal-access-tokens"]["response"]; + }; + /** + * @see https://docs.github.com/rest/orgs/personal-access-tokens#list-repositories-a-fine-grained-personal-access-token-has-access-to + */ + "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories": { + parameters: Endpoints["GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories"]["response"]; + }; + /** + * @see https://docs.github.com/rest/projects/projects#list-organization-projects + */ + "GET /orgs/{org}/projects": { + parameters: Endpoints["GET /orgs/{org}/projects"]["parameters"]; + response: Endpoints["GET /orgs/{org}/projects"]["response"]; + }; + /** + * @see https://docs.github.com/rest/orgs/custom-properties#list-custom-property-values-for-organization-repositories + */ + "GET /orgs/{org}/properties/values": { + parameters: Endpoints["GET /orgs/{org}/properties/values"]["parameters"]; + response: Endpoints["GET /orgs/{org}/properties/values"]["response"]; + }; + /** + * @see https://docs.github.com/rest/orgs/members#list-public-organization-members + */ + "GET /orgs/{org}/public_members": { + parameters: Endpoints["GET /orgs/{org}/public_members"]["parameters"]; + response: Endpoints["GET /orgs/{org}/public_members"]["response"]; + }; + /** + * @see https://docs.github.com/rest/repos/repos#list-organization-repositories + */ + "GET /orgs/{org}/repos": { + parameters: Endpoints["GET /orgs/{org}/repos"]["parameters"]; + response: Endpoints["GET /orgs/{org}/repos"]["response"]; + }; + /** + * @see https://docs.github.com/rest/orgs/rules#get-all-organization-repository-rulesets + */ + "GET /orgs/{org}/rulesets": { + parameters: Endpoints["GET /orgs/{org}/rulesets"]["parameters"]; + response: Endpoints["GET /orgs/{org}/rulesets"]["response"]; + }; + /** + * @see https://docs.github.com/rest/orgs/rule-suites#list-organization-rule-suites + */ + "GET /orgs/{org}/rulesets/rule-suites": { + parameters: Endpoints["GET /orgs/{org}/rulesets/rule-suites"]["parameters"]; + response: Endpoints["GET /orgs/{org}/rulesets/rule-suites"]["response"]; + }; + /** + * @see https://docs.github.com/rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-an-organization + */ + "GET /orgs/{org}/secret-scanning/alerts": { + parameters: Endpoints["GET /orgs/{org}/secret-scanning/alerts"]["parameters"]; + response: Endpoints["GET /orgs/{org}/secret-scanning/alerts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/security-advisories/repository-advisories#list-repository-security-advisories-for-an-organization + */ + "GET /orgs/{org}/security-advisories": { + parameters: Endpoints["GET /orgs/{org}/security-advisories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/security-advisories"]["response"]; + }; + /** + * @see https://docs.github.com/rest/copilot/copilot-usage#get-a-summary-of-copilot-usage-for-a-team + */ + "GET /orgs/{org}/team/{team_slug}/copilot/usage": { + parameters: Endpoints["GET /orgs/{org}/team/{team_slug}/copilot/usage"]["parameters"]; + response: Endpoints["GET /orgs/{org}/team/{team_slug}/copilot/usage"]["response"]; + }; + /** + * @see https://docs.github.com/rest/teams/teams#list-teams + */ + "GET /orgs/{org}/teams": { + parameters: Endpoints["GET /orgs/{org}/teams"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams"]["response"]; + }; + /** + * @see https://docs.github.com/rest/teams/discussions#list-discussions + */ + "GET /orgs/{org}/teams/{team_slug}/discussions": { + parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": { + parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": { + parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/teams/members#list-pending-team-invitations + */ + "GET /orgs/{org}/teams/{team_slug}/invitations": { + parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/invitations"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/invitations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/teams/members#list-team-members + */ + "GET /orgs/{org}/teams/{team_slug}/members": { + parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/members"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/members"]["response"]; + }; + /** + * @see https://docs.github.com/rest/teams/teams#list-team-projects + */ + "GET /orgs/{org}/teams/{team_slug}/projects": { + parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/projects"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/projects"]["response"]; + }; + /** + * @see https://docs.github.com/rest/teams/teams#list-team-repositories + */ + "GET /orgs/{org}/teams/{team_slug}/repos": { + parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/repos"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/repos"]["response"]; + }; + /** + * @see https://docs.github.com/rest/teams/teams#list-child-teams + */ + "GET /orgs/{org}/teams/{team_slug}/teams": { + parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/teams"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/teams"]["response"]; + }; + /** + * @see https://docs.github.com/rest/projects/cards#list-project-cards + */ + "GET /projects/columns/{column_id}/cards": { + parameters: Endpoints["GET /projects/columns/{column_id}/cards"]["parameters"]; + response: Endpoints["GET /projects/columns/{column_id}/cards"]["response"]; + }; + /** + * @see https://docs.github.com/rest/projects/collaborators#list-project-collaborators + */ + "GET /projects/{project_id}/collaborators": { + parameters: Endpoints["GET /projects/{project_id}/collaborators"]["parameters"]; + response: Endpoints["GET /projects/{project_id}/collaborators"]["response"]; + }; + /** + * @see https://docs.github.com/rest/projects/columns#list-project-columns + */ + "GET /projects/{project_id}/columns": { + parameters: Endpoints["GET /projects/{project_id}/columns"]["parameters"]; + response: Endpoints["GET /projects/{project_id}/columns"]["response"]; + }; + /** + * @see https://docs.github.com/rest/actions/artifacts#list-artifacts-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/artifacts": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/artifacts"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/artifacts"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/artifacts"]["response"]["data"]["artifacts"]; + }; + }; + /** + * @see https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/caches": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/caches"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/caches"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/caches"]["response"]["data"]["actions_caches"]; + }; + }; + /** + * @see https://docs.github.com/rest/actions/secrets#list-repository-organization-secrets + */ + "GET /repos/{owner}/{repo}/actions/organization-secrets": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/organization-secrets"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/organization-secrets"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/organization-secrets"]["response"]["data"]["secrets"]; + }; + }; + /** + * @see https://docs.github.com/rest/actions/variables#list-repository-organization-variables + */ + "GET /repos/{owner}/{repo}/actions/organization-variables": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/organization-variables"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/organization-variables"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/organization-variables"]["response"]["data"]["variables"]; + }; + }; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#list-self-hosted-runners-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/runners"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runners"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/runners"]["response"]["data"]["runners"]; + }; + }; + /** + * @see https://docs.github.com/rest/actions/workflow-runs#list-workflow-runs-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runs": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/runs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/runs"]["response"]["data"]["workflow_runs"]; + }; + }; + /** + * @see https://docs.github.com/rest/actions/artifacts#list-workflow-run-artifacts + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"]["response"]["data"]["artifacts"]; + }; + }; + /** + * @see https://docs.github.com/rest/actions/workflow-jobs#list-jobs-for-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"]["response"]["data"]["jobs"]; + }; + }; + /** + * @see https://docs.github.com/rest/actions/workflow-jobs#list-jobs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"]["response"]["data"]["jobs"]; + }; + }; + /** + * @see https://docs.github.com/rest/actions/secrets#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/actions/secrets": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/secrets"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/secrets"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/secrets"]["response"]["data"]["secrets"]; + }; + }; + /** + * @see https://docs.github.com/rest/actions/variables#list-repository-variables + */ + "GET /repos/{owner}/{repo}/actions/variables": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/variables"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/variables"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/variables"]["response"]["data"]["variables"]; + }; + }; + /** + * @see https://docs.github.com/rest/actions/workflows#list-repository-workflows + */ + "GET /repos/{owner}/{repo}/actions/workflows": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/workflows"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/workflows"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/workflows"]["response"]["data"]["workflows"]; + }; + }; + /** + * @see https://docs.github.com/rest/actions/workflow-runs#list-workflow-runs-for-a-workflow + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"]["response"]["data"]["workflow_runs"]; + }; + }; + /** + * @see https://docs.github.com/rest/repos/repos#list-repository-activities + */ + "GET /repos/{owner}/{repo}/activity": { + parameters: Endpoints["GET /repos/{owner}/{repo}/activity"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/activity"]["response"]; + }; + /** + * @see https://docs.github.com/rest/issues/assignees#list-assignees + */ + "GET /repos/{owner}/{repo}/assignees": { + parameters: Endpoints["GET /repos/{owner}/{repo}/assignees"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/assignees"]["response"]; + }; + /** + * @see https://docs.github.com/rest/branches/branches#list-branches + */ + "GET /repos/{owner}/{repo}/branches": { + parameters: Endpoints["GET /repos/{owner}/{repo}/branches"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/branches"]["response"]; + }; + /** + * @see https://docs.github.com/rest/checks/runs#list-check-run-annotations + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": { + parameters: Endpoints["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/checks/runs#list-check-runs-in-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": { + parameters: Endpoints["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"]["response"]["data"]["check_runs"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts": { + parameters: Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/code-scanning/code-scanning#list-instances-of-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": { + parameters: Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"]["response"]; + }; + /** + * @see https://docs.github.com/rest/code-scanning/code-scanning#list-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses": { + parameters: Endpoints["GET /repos/{owner}/{repo}/code-scanning/analyses"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/analyses"]["response"]; + }; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces": { + parameters: Endpoints["GET /repos/{owner}/{repo}/codespaces"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/codespaces"]["response"]["data"]["codespaces"]; + }; + }; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#list-devcontainer-configurations-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces/devcontainers": { + parameters: Endpoints["GET /repos/{owner}/{repo}/codespaces/devcontainers"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/devcontainers"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/codespaces/devcontainers"]["response"]["data"]["devcontainers"]; + }; + }; + /** + * @see https://docs.github.com/rest/codespaces/repository-secrets#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/codespaces/secrets": { + parameters: Endpoints["GET /repos/{owner}/{repo}/codespaces/secrets"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/secrets"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/codespaces/secrets"]["response"]["data"]["secrets"]; + }; + }; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#list-repository-collaborators + */ + "GET /repos/{owner}/{repo}/collaborators": { + parameters: Endpoints["GET /repos/{owner}/{repo}/collaborators"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/collaborators"]["response"]; + }; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/comments": { + parameters: Endpoints["GET /repos/{owner}/{repo}/comments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/comments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions": { + parameters: Endpoints["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/commits/commits#list-commits + */ + "GET /repos/{owner}/{repo}/commits": { + parameters: Endpoints["GET /repos/{owner}/{repo}/commits"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits"]["response"]; + }; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments": { + parameters: Endpoints["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/commits/commits#list-pull-requests-associated-with-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls": { + parameters: Endpoints["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"]["response"]; + }; + /** + * @see https://docs.github.com/rest/checks/runs#list-check-runs-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs": { + parameters: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"]["response"]["data"]["check_runs"]; + }; + }; + /** + * @see https://docs.github.com/rest/checks/suites#list-check-suites-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites": { + parameters: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"]["response"]["data"]["check_suites"]; + }; + }; + /** + * @see https://docs.github.com/rest/commits/statuses#get-the-combined-status-for-a-specific-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/status": { + parameters: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/status"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/status"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/status"]["response"]["data"]["statuses"]; + }; + }; + /** + * @see https://docs.github.com/rest/commits/statuses#list-commit-statuses-for-a-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses": { + parameters: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/statuses"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/statuses"]["response"]; + }; + /** + * @see https://docs.github.com/rest/repos/repos#list-repository-contributors + */ + "GET /repos/{owner}/{repo}/contributors": { + parameters: Endpoints["GET /repos/{owner}/{repo}/contributors"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/contributors"]["response"]; + }; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/dependabot/alerts": { + parameters: Endpoints["GET /repos/{owner}/{repo}/dependabot/alerts"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/dependabot/alerts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/dependabot/secrets#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/dependabot/secrets": { + parameters: Endpoints["GET /repos/{owner}/{repo}/dependabot/secrets"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/dependabot/secrets"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/dependabot/secrets"]["response"]["data"]["secrets"]; + }; + }; + /** + * @see https://docs.github.com/rest/deployments/deployments#list-deployments + */ + "GET /repos/{owner}/{repo}/deployments": { + parameters: Endpoints["GET /repos/{owner}/{repo}/deployments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/deployments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/deployments/statuses#list-deployment-statuses + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": { + parameters: Endpoints["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"]["response"]; + }; + /** + * @see https://docs.github.com/rest/deployments/environments#list-environments + */ + "GET /repos/{owner}/{repo}/environments": { + parameters: Endpoints["GET /repos/{owner}/{repo}/environments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/environments"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/environments"]["response"]["data"]["environments"]; + }; + }; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#list-deployment-branch-policies + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": { + parameters: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"]["response"]["data"]["branch_policies"]; + }; + }; + /** + * @see https://docs.github.com/rest/deployments/protection-rules#list-custom-deployment-rule-integrations-available-for-an-environment + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps": { + parameters: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps"]["response"]["data"]["available_custom_deployment_protection_rule_integrations"]; + }; + }; + /** + * @see https://docs.github.com/rest/actions/secrets#list-environment-secrets + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/secrets": { + parameters: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/secrets"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/secrets"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/secrets"]["response"]["data"]["secrets"]; + }; + }; + /** + * @see https://docs.github.com/rest/actions/variables#list-environment-variables + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/variables": { + parameters: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/variables"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/variables"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/variables"]["response"]["data"]["variables"]; + }; + }; + /** + * @see https://docs.github.com/rest/activity/events#list-repository-events + */ + "GET /repos/{owner}/{repo}/events": { + parameters: Endpoints["GET /repos/{owner}/{repo}/events"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/events"]["response"]; + }; + /** + * @see https://docs.github.com/rest/repos/forks#list-forks + */ + "GET /repos/{owner}/{repo}/forks": { + parameters: Endpoints["GET /repos/{owner}/{repo}/forks"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/forks"]["response"]; + }; + /** + * @see https://docs.github.com/rest/repos/webhooks#list-repository-webhooks + */ + "GET /repos/{owner}/{repo}/hooks": { + parameters: Endpoints["GET /repos/{owner}/{repo}/hooks"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/hooks"]["response"]; + }; + /** + * @see https://docs.github.com/rest/repos/webhooks#list-deliveries-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries": { + parameters: Endpoints["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"]["response"]; + }; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations + */ + "GET /repos/{owner}/{repo}/invitations": { + parameters: Endpoints["GET /repos/{owner}/{repo}/invitations"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/invitations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/issues/issues#list-repository-issues + */ + "GET /repos/{owner}/{repo}/issues": { + parameters: Endpoints["GET /repos/{owner}/{repo}/issues"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues"]["response"]; + }; + /** + * @see https://docs.github.com/rest/issues/comments#list-issue-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/comments": { + parameters: Endpoints["GET /repos/{owner}/{repo}/issues/comments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/comments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reactions/reactions#list-reactions-for-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": { + parameters: Endpoints["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/issues/events#list-issue-events-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/events": { + parameters: Endpoints["GET /repos/{owner}/{repo}/issues/events"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/events"]["response"]; + }; + /** + * @see https://docs.github.com/rest/issues/comments#list-issue-comments + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments": { + parameters: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/issues/events#list-issue-events + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/events": { + parameters: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/events"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/events"]["response"]; + }; + /** + * @see https://docs.github.com/rest/issues/labels#list-labels-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels": { + parameters: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reactions/reactions#list-reactions-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions": { + parameters: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/issues/timeline#list-timeline-events-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline": { + parameters: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"]["response"]; + }; + /** + * @see https://docs.github.com/rest/deploy-keys/deploy-keys#list-deploy-keys + */ + "GET /repos/{owner}/{repo}/keys": { + parameters: Endpoints["GET /repos/{owner}/{repo}/keys"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/keys"]["response"]; + }; + /** + * @see https://docs.github.com/rest/issues/labels#list-labels-for-a-repository + */ + "GET /repos/{owner}/{repo}/labels": { + parameters: Endpoints["GET /repos/{owner}/{repo}/labels"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/labels"]["response"]; + }; + /** + * @see https://docs.github.com/rest/issues/milestones#list-milestones + */ + "GET /repos/{owner}/{repo}/milestones": { + parameters: Endpoints["GET /repos/{owner}/{repo}/milestones"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/milestones"]["response"]; + }; + /** + * @see https://docs.github.com/rest/issues/labels#list-labels-for-issues-in-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels": { + parameters: Endpoints["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"]["response"]; + }; + /** + * @see https://docs.github.com/rest/activity/notifications#list-repository-notifications-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/notifications": { + parameters: Endpoints["GET /repos/{owner}/{repo}/notifications"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/notifications"]["response"]; + }; + /** + * @see https://docs.github.com/rest/pages/pages#list-apiname-pages-builds + */ + "GET /repos/{owner}/{repo}/pages/builds": { + parameters: Endpoints["GET /repos/{owner}/{repo}/pages/builds"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pages/builds"]["response"]; + }; + /** + * @see https://docs.github.com/rest/projects/projects#list-repository-projects + */ + "GET /repos/{owner}/{repo}/projects": { + parameters: Endpoints["GET /repos/{owner}/{repo}/projects"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/projects"]["response"]; + }; + /** + * @see https://docs.github.com/rest/pulls/pulls#list-pull-requests + */ + "GET /repos/{owner}/{repo}/pulls": { + parameters: Endpoints["GET /repos/{owner}/{repo}/pulls"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls"]["response"]; + }; + /** + * @see https://docs.github.com/rest/pulls/comments#list-review-comments-in-a-repository + */ + "GET /repos/{owner}/{repo}/pulls/comments": { + parameters: Endpoints["GET /repos/{owner}/{repo}/pulls/comments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/comments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-pull-request-review-comment + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": { + parameters: Endpoints["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/pulls/comments#list-review-comments-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments": { + parameters: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/pulls/pulls#list-commits-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits": { + parameters: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"]["response"]; + }; + /** + * @see https://docs.github.com/rest/pulls/pulls#list-pull-requests-files + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files": { + parameters: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"]["response"]; + }; + /** + * @see https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews": { + parameters: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"]["response"]; + }; + /** + * @see https://docs.github.com/rest/pulls/reviews#list-comments-for-a-pull-request-review + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": { + parameters: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/releases/releases#list-releases + */ + "GET /repos/{owner}/{repo}/releases": { + parameters: Endpoints["GET /repos/{owner}/{repo}/releases"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/releases"]["response"]; + }; + /** + * @see https://docs.github.com/rest/releases/assets#list-release-assets + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets": { + parameters: Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}/assets"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}/assets"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions": { + parameters: Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}/reactions"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}/reactions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/repos/rules#get-rules-for-a-branch + */ + "GET /repos/{owner}/{repo}/rules/branches/{branch}": { + parameters: Endpoints["GET /repos/{owner}/{repo}/rules/branches/{branch}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/rules/branches/{branch}"]["response"]; + }; + /** + * @see https://docs.github.com/rest/repos/rules#get-all-repository-rulesets + */ + "GET /repos/{owner}/{repo}/rulesets": { + parameters: Endpoints["GET /repos/{owner}/{repo}/rulesets"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/rulesets"]["response"]; + }; + /** + * @see https://docs.github.com/rest/repos/rule-suites#list-repository-rule-suites + */ + "GET /repos/{owner}/{repo}/rulesets/rule-suites": { + parameters: Endpoints["GET /repos/{owner}/{repo}/rulesets/rule-suites"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/rulesets/rule-suites"]["response"]; + }; + /** + * @see https://docs.github.com/rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts": { + parameters: Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/secret-scanning/secret-scanning#list-locations-for-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": { + parameters: Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/security-advisories/repository-advisories#list-repository-security-advisories + */ + "GET /repos/{owner}/{repo}/security-advisories": { + parameters: Endpoints["GET /repos/{owner}/{repo}/security-advisories"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/security-advisories"]["response"]; + }; + /** + * @see https://docs.github.com/rest/activity/starring#list-stargazers + */ + "GET /repos/{owner}/{repo}/stargazers": { + parameters: Endpoints["GET /repos/{owner}/{repo}/stargazers"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/stargazers"]["response"]; + }; + /** + * @see https://docs.github.com/rest/activity/watching#list-watchers + */ + "GET /repos/{owner}/{repo}/subscribers": { + parameters: Endpoints["GET /repos/{owner}/{repo}/subscribers"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/subscribers"]["response"]; + }; + /** + * @see https://docs.github.com/rest/repos/repos#list-repository-tags + */ + "GET /repos/{owner}/{repo}/tags": { + parameters: Endpoints["GET /repos/{owner}/{repo}/tags"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/tags"]["response"]; + }; + /** + * @see https://docs.github.com/rest/repos/repos#list-repository-teams + */ + "GET /repos/{owner}/{repo}/teams": { + parameters: Endpoints["GET /repos/{owner}/{repo}/teams"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/teams"]["response"]; + }; + /** + * @see https://docs.github.com/rest/repos/repos#get-all-repository-topics + */ + "GET /repos/{owner}/{repo}/topics": { + parameters: Endpoints["GET /repos/{owner}/{repo}/topics"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/topics"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/topics"]["response"]["data"]["names"]; + }; + }; + /** + * @see https://docs.github.com/rest/repos/repos#list-public-repositories + */ + "GET /repositories": { + parameters: Endpoints["GET /repositories"]["parameters"]; + response: Endpoints["GET /repositories"]["response"]; + }; + /** + * @see https://docs.github.com/rest/search/search#search-code + */ + "GET /search/code": { + parameters: Endpoints["GET /search/code"]["parameters"]; + response: Endpoints["GET /search/code"]["response"] & { + data: Endpoints["GET /search/code"]["response"]["data"]["items"]; + }; + }; + /** + * @see https://docs.github.com/rest/search/search#search-commits + */ + "GET /search/commits": { + parameters: Endpoints["GET /search/commits"]["parameters"]; + response: Endpoints["GET /search/commits"]["response"] & { + data: Endpoints["GET /search/commits"]["response"]["data"]["items"]; + }; + }; + /** + * @see https://docs.github.com/rest/search/search#search-issues-and-pull-requests + */ + "GET /search/issues": { + parameters: Endpoints["GET /search/issues"]["parameters"]; + response: Endpoints["GET /search/issues"]["response"] & { + data: Endpoints["GET /search/issues"]["response"]["data"]["items"]; + }; + }; + /** + * @see https://docs.github.com/rest/search/search#search-labels + */ + "GET /search/labels": { + parameters: Endpoints["GET /search/labels"]["parameters"]; + response: Endpoints["GET /search/labels"]["response"] & { + data: Endpoints["GET /search/labels"]["response"]["data"]["items"]; + }; + }; + /** + * @see https://docs.github.com/rest/search/search#search-repositories + */ + "GET /search/repositories": { + parameters: Endpoints["GET /search/repositories"]["parameters"]; + response: Endpoints["GET /search/repositories"]["response"] & { + data: Endpoints["GET /search/repositories"]["response"]["data"]["items"]; + }; + }; + /** + * @see https://docs.github.com/rest/search/search#search-topics + */ + "GET /search/topics": { + parameters: Endpoints["GET /search/topics"]["parameters"]; + response: Endpoints["GET /search/topics"]["response"] & { + data: Endpoints["GET /search/topics"]["response"]["data"]["items"]; + }; + }; + /** + * @see https://docs.github.com/rest/search/search#search-users + */ + "GET /search/users": { + parameters: Endpoints["GET /search/users"]["parameters"]; + response: Endpoints["GET /search/users"]["response"] & { + data: Endpoints["GET /search/users"]["response"]["data"]["items"]; + }; + }; + /** + * @see https://docs.github.com/rest/teams/discussions#list-discussions-legacy + */ + "GET /teams/{team_id}/discussions": { + parameters: Endpoints["GET /teams/{team_id}/discussions"]["parameters"]; + response: Endpoints["GET /teams/{team_id}/discussions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments": { + parameters: Endpoints["GET /teams/{team_id}/discussions/{discussion_number}/comments"]["parameters"]; + response: Endpoints["GET /teams/{team_id}/discussions/{discussion_number}/comments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + parameters: Endpoints["GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions"]["parameters"]; + response: Endpoints["GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/reactions": { + parameters: Endpoints["GET /teams/{team_id}/discussions/{discussion_number}/reactions"]["parameters"]; + response: Endpoints["GET /teams/{team_id}/discussions/{discussion_number}/reactions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/teams/members#list-pending-team-invitations-legacy + */ + "GET /teams/{team_id}/invitations": { + parameters: Endpoints["GET /teams/{team_id}/invitations"]["parameters"]; + response: Endpoints["GET /teams/{team_id}/invitations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/teams/members#list-team-members-legacy + */ + "GET /teams/{team_id}/members": { + parameters: Endpoints["GET /teams/{team_id}/members"]["parameters"]; + response: Endpoints["GET /teams/{team_id}/members"]["response"]; + }; + /** + * @see https://docs.github.com/rest/teams/teams#list-team-projects-legacy + */ + "GET /teams/{team_id}/projects": { + parameters: Endpoints["GET /teams/{team_id}/projects"]["parameters"]; + response: Endpoints["GET /teams/{team_id}/projects"]["response"]; + }; + /** + * @see https://docs.github.com/rest/teams/teams#list-team-repositories-legacy + */ + "GET /teams/{team_id}/repos": { + parameters: Endpoints["GET /teams/{team_id}/repos"]["parameters"]; + response: Endpoints["GET /teams/{team_id}/repos"]["response"]; + }; + /** + * @see https://docs.github.com/rest/teams/teams#list-child-teams-legacy + */ + "GET /teams/{team_id}/teams": { + parameters: Endpoints["GET /teams/{team_id}/teams"]["parameters"]; + response: Endpoints["GET /teams/{team_id}/teams"]["response"]; + }; + /** + * @see https://docs.github.com/rest/users/blocking#list-users-blocked-by-the-authenticated-user + */ + "GET /user/blocks": { + parameters: Endpoints["GET /user/blocks"]["parameters"]; + response: Endpoints["GET /user/blocks"]["response"]; + }; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#list-codespaces-for-the-authenticated-user + */ + "GET /user/codespaces": { + parameters: Endpoints["GET /user/codespaces"]["parameters"]; + response: Endpoints["GET /user/codespaces"]["response"] & { + data: Endpoints["GET /user/codespaces"]["response"]["data"]["codespaces"]; + }; + }; + /** + * @see https://docs.github.com/rest/codespaces/secrets#list-secrets-for-the-authenticated-user + */ + "GET /user/codespaces/secrets": { + parameters: Endpoints["GET /user/codespaces/secrets"]["parameters"]; + response: Endpoints["GET /user/codespaces/secrets"]["response"] & { + data: Endpoints["GET /user/codespaces/secrets"]["response"]["data"]["secrets"]; + }; + }; + /** + * @see https://docs.github.com/rest/users/emails#list-email-addresses-for-the-authenticated-user + */ + "GET /user/emails": { + parameters: Endpoints["GET /user/emails"]["parameters"]; + response: Endpoints["GET /user/emails"]["response"]; + }; + /** + * @see https://docs.github.com/rest/users/followers#list-followers-of-the-authenticated-user + */ + "GET /user/followers": { + parameters: Endpoints["GET /user/followers"]["parameters"]; + response: Endpoints["GET /user/followers"]["response"]; + }; + /** + * @see https://docs.github.com/rest/users/followers#list-the-people-the-authenticated-user-follows + */ + "GET /user/following": { + parameters: Endpoints["GET /user/following"]["parameters"]; + response: Endpoints["GET /user/following"]["response"]; + }; + /** + * @see https://docs.github.com/rest/users/gpg-keys#list-gpg-keys-for-the-authenticated-user + */ + "GET /user/gpg_keys": { + parameters: Endpoints["GET /user/gpg_keys"]["parameters"]; + response: Endpoints["GET /user/gpg_keys"]["response"]; + }; + /** + * @see https://docs.github.com/rest/apps/installations#list-app-installations-accessible-to-the-user-access-token + */ + "GET /user/installations": { + parameters: Endpoints["GET /user/installations"]["parameters"]; + response: Endpoints["GET /user/installations"]["response"] & { + data: Endpoints["GET /user/installations"]["response"]["data"]["installations"]; + }; + }; + /** + * @see https://docs.github.com/rest/apps/installations#list-repositories-accessible-to-the-user-access-token + */ + "GET /user/installations/{installation_id}/repositories": { + parameters: Endpoints["GET /user/installations/{installation_id}/repositories"]["parameters"]; + response: Endpoints["GET /user/installations/{installation_id}/repositories"]["response"] & { + data: Endpoints["GET /user/installations/{installation_id}/repositories"]["response"]["data"]["repositories"]; + }; + }; + /** + * @see https://docs.github.com/rest/issues/issues#list-user-account-issues-assigned-to-the-authenticated-user + */ + "GET /user/issues": { + parameters: Endpoints["GET /user/issues"]["parameters"]; + response: Endpoints["GET /user/issues"]["response"]; + }; + /** + * @see https://docs.github.com/rest/users/keys#list-public-ssh-keys-for-the-authenticated-user + */ + "GET /user/keys": { + parameters: Endpoints["GET /user/keys"]["parameters"]; + response: Endpoints["GET /user/keys"]["response"]; + }; + /** + * @see https://docs.github.com/rest/apps/marketplace#list-subscriptions-for-the-authenticated-user + */ + "GET /user/marketplace_purchases": { + parameters: Endpoints["GET /user/marketplace_purchases"]["parameters"]; + response: Endpoints["GET /user/marketplace_purchases"]["response"]; + }; + /** + * @see https://docs.github.com/rest/apps/marketplace#list-subscriptions-for-the-authenticated-user-stubbed + */ + "GET /user/marketplace_purchases/stubbed": { + parameters: Endpoints["GET /user/marketplace_purchases/stubbed"]["parameters"]; + response: Endpoints["GET /user/marketplace_purchases/stubbed"]["response"]; + }; + /** + * @see https://docs.github.com/rest/orgs/members#list-organization-memberships-for-the-authenticated-user + */ + "GET /user/memberships/orgs": { + parameters: Endpoints["GET /user/memberships/orgs"]["parameters"]; + response: Endpoints["GET /user/memberships/orgs"]["response"]; + }; + /** + * @see https://docs.github.com/rest/migrations/users#list-user-migrations + */ + "GET /user/migrations": { + parameters: Endpoints["GET /user/migrations"]["parameters"]; + response: Endpoints["GET /user/migrations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/migrations/users#list-repositories-for-a-user-migration + */ + "GET /user/migrations/{migration_id}/repositories": { + parameters: Endpoints["GET /user/migrations/{migration_id}/repositories"]["parameters"]; + response: Endpoints["GET /user/migrations/{migration_id}/repositories"]["response"]; + }; + /** + * @see https://docs.github.com/rest/orgs/orgs#list-organizations-for-the-authenticated-user + */ + "GET /user/orgs": { + parameters: Endpoints["GET /user/orgs"]["parameters"]; + response: Endpoints["GET /user/orgs"]["response"]; + }; + /** + * @see https://docs.github.com/rest/packages/packages#list-packages-for-the-authenticated-users-namespace + */ + "GET /user/packages": { + parameters: Endpoints["GET /user/packages"]["parameters"]; + response: Endpoints["GET /user/packages"]["response"]; + }; + /** + * @see https://docs.github.com/rest/packages/packages#list-package-versions-for-a-package-owned-by-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions": { + parameters: Endpoints["GET /user/packages/{package_type}/{package_name}/versions"]["parameters"]; + response: Endpoints["GET /user/packages/{package_type}/{package_name}/versions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/users/emails#list-public-email-addresses-for-the-authenticated-user + */ + "GET /user/public_emails": { + parameters: Endpoints["GET /user/public_emails"]["parameters"]; + response: Endpoints["GET /user/public_emails"]["response"]; + }; + /** + * @see https://docs.github.com/rest/repos/repos#list-repositories-for-the-authenticated-user + */ + "GET /user/repos": { + parameters: Endpoints["GET /user/repos"]["parameters"]; + response: Endpoints["GET /user/repos"]["response"]; + }; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations-for-the-authenticated-user + */ + "GET /user/repository_invitations": { + parameters: Endpoints["GET /user/repository_invitations"]["parameters"]; + response: Endpoints["GET /user/repository_invitations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/users/social-accounts#list-social-accounts-for-the-authenticated-user + */ + "GET /user/social_accounts": { + parameters: Endpoints["GET /user/social_accounts"]["parameters"]; + response: Endpoints["GET /user/social_accounts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/users/ssh-signing-keys#list-ssh-signing-keys-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys": { + parameters: Endpoints["GET /user/ssh_signing_keys"]["parameters"]; + response: Endpoints["GET /user/ssh_signing_keys"]["response"]; + }; + /** + * @see https://docs.github.com/rest/activity/starring#list-repositories-starred-by-the-authenticated-user + */ + "GET /user/starred": { + parameters: Endpoints["GET /user/starred"]["parameters"]; + response: Endpoints["GET /user/starred"]["response"]; + }; + /** + * @see https://docs.github.com/rest/activity/watching#list-repositories-watched-by-the-authenticated-user + */ + "GET /user/subscriptions": { + parameters: Endpoints["GET /user/subscriptions"]["parameters"]; + response: Endpoints["GET /user/subscriptions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/teams/teams#list-teams-for-the-authenticated-user + */ + "GET /user/teams": { + parameters: Endpoints["GET /user/teams"]["parameters"]; + response: Endpoints["GET /user/teams"]["response"]; + }; + /** + * @see https://docs.github.com/rest/users/users#list-users + */ + "GET /users": { + parameters: Endpoints["GET /users"]["parameters"]; + response: Endpoints["GET /users"]["response"]; + }; + /** + * @see https://docs.github.com/rest/activity/events#list-events-for-the-authenticated-user + */ + "GET /users/{username}/events": { + parameters: Endpoints["GET /users/{username}/events"]["parameters"]; + response: Endpoints["GET /users/{username}/events"]["response"]; + }; + /** + * @see https://docs.github.com/rest/activity/events#list-organization-events-for-the-authenticated-user + */ + "GET /users/{username}/events/orgs/{org}": { + parameters: Endpoints["GET /users/{username}/events/orgs/{org}"]["parameters"]; + response: Endpoints["GET /users/{username}/events/orgs/{org}"]["response"]; + }; + /** + * @see https://docs.github.com/rest/activity/events#list-public-events-for-a-user + */ + "GET /users/{username}/events/public": { + parameters: Endpoints["GET /users/{username}/events/public"]["parameters"]; + response: Endpoints["GET /users/{username}/events/public"]["response"]; + }; + /** + * @see https://docs.github.com/rest/users/followers#list-followers-of-a-user + */ + "GET /users/{username}/followers": { + parameters: Endpoints["GET /users/{username}/followers"]["parameters"]; + response: Endpoints["GET /users/{username}/followers"]["response"]; + }; + /** + * @see https://docs.github.com/rest/users/followers#list-the-people-a-user-follows + */ + "GET /users/{username}/following": { + parameters: Endpoints["GET /users/{username}/following"]["parameters"]; + response: Endpoints["GET /users/{username}/following"]["response"]; + }; + /** + * @see https://docs.github.com/rest/gists/gists#list-gists-for-a-user + */ + "GET /users/{username}/gists": { + parameters: Endpoints["GET /users/{username}/gists"]["parameters"]; + response: Endpoints["GET /users/{username}/gists"]["response"]; + }; + /** + * @see https://docs.github.com/rest/users/gpg-keys#list-gpg-keys-for-a-user + */ + "GET /users/{username}/gpg_keys": { + parameters: Endpoints["GET /users/{username}/gpg_keys"]["parameters"]; + response: Endpoints["GET /users/{username}/gpg_keys"]["response"]; + }; + /** + * @see https://docs.github.com/rest/users/keys#list-public-keys-for-a-user + */ + "GET /users/{username}/keys": { + parameters: Endpoints["GET /users/{username}/keys"]["parameters"]; + response: Endpoints["GET /users/{username}/keys"]["response"]; + }; + /** + * @see https://docs.github.com/rest/orgs/orgs#list-organizations-for-a-user + */ + "GET /users/{username}/orgs": { + parameters: Endpoints["GET /users/{username}/orgs"]["parameters"]; + response: Endpoints["GET /users/{username}/orgs"]["response"]; + }; + /** + * @see https://docs.github.com/rest/packages/packages#list-packages-for-a-user + */ + "GET /users/{username}/packages": { + parameters: Endpoints["GET /users/{username}/packages"]["parameters"]; + response: Endpoints["GET /users/{username}/packages"]["response"]; + }; + /** + * @see https://docs.github.com/rest/projects/projects#list-user-projects + */ + "GET /users/{username}/projects": { + parameters: Endpoints["GET /users/{username}/projects"]["parameters"]; + response: Endpoints["GET /users/{username}/projects"]["response"]; + }; + /** + * @see https://docs.github.com/rest/activity/events#list-events-received-by-the-authenticated-user + */ + "GET /users/{username}/received_events": { + parameters: Endpoints["GET /users/{username}/received_events"]["parameters"]; + response: Endpoints["GET /users/{username}/received_events"]["response"]; + }; + /** + * @see https://docs.github.com/rest/activity/events#list-public-events-received-by-a-user + */ + "GET /users/{username}/received_events/public": { + parameters: Endpoints["GET /users/{username}/received_events/public"]["parameters"]; + response: Endpoints["GET /users/{username}/received_events/public"]["response"]; + }; + /** + * @see https://docs.github.com/rest/repos/repos#list-repositories-for-a-user + */ + "GET /users/{username}/repos": { + parameters: Endpoints["GET /users/{username}/repos"]["parameters"]; + response: Endpoints["GET /users/{username}/repos"]["response"]; + }; + /** + * @see https://docs.github.com/rest/users/social-accounts#list-social-accounts-for-a-user + */ + "GET /users/{username}/social_accounts": { + parameters: Endpoints["GET /users/{username}/social_accounts"]["parameters"]; + response: Endpoints["GET /users/{username}/social_accounts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/users/ssh-signing-keys#list-ssh-signing-keys-for-a-user + */ + "GET /users/{username}/ssh_signing_keys": { + parameters: Endpoints["GET /users/{username}/ssh_signing_keys"]["parameters"]; + response: Endpoints["GET /users/{username}/ssh_signing_keys"]["response"]; + }; + /** + * @see https://docs.github.com/rest/activity/starring#list-repositories-starred-by-a-user + */ + "GET /users/{username}/starred": { + parameters: Endpoints["GET /users/{username}/starred"]["parameters"]; + response: Endpoints["GET /users/{username}/starred"]["response"]; + }; + /** + * @see https://docs.github.com/rest/activity/watching#list-repositories-watched-by-a-user + */ + "GET /users/{username}/subscriptions": { + parameters: Endpoints["GET /users/{username}/subscriptions"]["parameters"]; + response: Endpoints["GET /users/{username}/subscriptions"]["response"]; + }; +} +export declare const paginatingEndpoints: (keyof PaginatingEndpoints)[]; diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/index.d.ts b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/index.d.ts new file mode 100644 index 000000000..4a5c6a715 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/index.d.ts @@ -0,0 +1,15 @@ +import type { Octokit } from "@octokit/core"; +import type { PaginateInterface } from "./types.js"; +export type { PaginateInterface, PaginatingEndpoints } from "./types.js"; +export { composePaginateRest } from "./compose-paginate.js"; +export { isPaginatingEndpoint, paginatingEndpoints, } from "./paginating-endpoints.js"; +/** + * @param octokit Octokit instance + * @param options Options passed to Octokit constructor + */ +export declare function paginateRest(octokit: Octokit): { + paginate: PaginateInterface; +}; +export declare namespace paginateRest { + var VERSION: string; +} diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/iterator.d.ts b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/iterator.d.ts new file mode 100644 index 000000000..ac6a42bbc --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/iterator.d.ts @@ -0,0 +1,3 @@ +import type { Octokit } from "@octokit/core"; +import type { RequestInterface, RequestParameters, Route } from "./types.js"; +export declare function iterator(octokit: Octokit, route: Route | RequestInterface, parameters?: RequestParameters): AsyncIterable; diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/normalize-paginated-list-response.d.ts b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/normalize-paginated-list-response.d.ts new file mode 100644 index 000000000..4b15bf004 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/normalize-paginated-list-response.d.ts @@ -0,0 +1,18 @@ +/** + * Some “list” response that can be paginated have a different response structure + * + * They have a `total_count` key in the response (search also has `incomplete_results`, + * /installation/repositories also has `repository_selection`), as well as a key with + * the list of the items which name varies from endpoint to endpoint. + * + * Octokit normalizes these responses so that paginated results are always returned following + * the same structure. One challenge is that if the list response has only one page, no Link + * header is provided, so this header alone is not sufficient to check wether a response is + * paginated or not. + * + * We check if a "total_count" key is present in the response data, but also make sure that + * a "url" property is not, as the "Get the combined status for a specific ref" endpoint would + * otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref + */ +import type { OctokitResponse } from "./types.js"; +export declare function normalizePaginatedListResponse(response: OctokitResponse): OctokitResponse; diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/paginate.d.ts b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/paginate.d.ts new file mode 100644 index 000000000..4132a3050 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/paginate.d.ts @@ -0,0 +1,3 @@ +import type { Octokit } from "@octokit/core"; +import type { MapFunction, PaginationResults, RequestParameters, Route, RequestInterface } from "./types.js"; +export declare function paginate(octokit: Octokit, route: Route | RequestInterface, parameters?: RequestParameters, mapFn?: MapFunction): Promise; diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/paginating-endpoints.d.ts b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/paginating-endpoints.d.ts new file mode 100644 index 000000000..22cd65d88 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/paginating-endpoints.d.ts @@ -0,0 +1,3 @@ +import { type PaginatingEndpoints } from "./generated/paginating-endpoints.js"; +export { paginatingEndpoints } from "./generated/paginating-endpoints.js"; +export declare function isPaginatingEndpoint(arg: unknown): arg is keyof PaginatingEndpoints; diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/types.d.ts b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/types.d.ts new file mode 100644 index 000000000..991d1a05c --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/types.d.ts @@ -0,0 +1,242 @@ +import type { Octokit } from "@octokit/core"; +import type * as OctokitTypes from "@octokit/types"; +export type { EndpointOptions, RequestInterface, OctokitResponse, RequestParameters, Route, } from "@octokit/types"; +export type { PaginatingEndpoints } from "./generated/paginating-endpoints.js"; +import type { PaginatingEndpoints } from "./generated/paginating-endpoints.js"; +type KnownKeys = Extract<{ + [K in keyof T]: string extends K ? never : number extends K ? never : K; +} extends { + [_ in keyof T]: infer U; +} ? U : never, Exclude>; +type KeysMatching = { + [K in keyof T]: T[K] extends V ? K : never; +}[keyof T]; +type KnownKeysMatching = KeysMatching>, V>; +type GetResultsType = T extends { + data: any[]; +} ? T["data"] : T extends { + data: object; +} ? T["data"][KnownKeysMatching] : never; +type NormalizeResponse = Omit & { + data: GetResultsType; +}; +type DataType = "data" extends keyof T ? T["data"] : unknown; +export interface MapFunction>, M = unknown[]> { + (response: T, done: () => void): M; +} +export type PaginationResults = T[]; +export interface PaginateInterface { + /** + * Paginate a request using endpoint options and map each response to a custom array + * + * @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + * @param {function} mapFn Optional method to map each response to a custom array + */ + (options: OctokitTypes.EndpointOptions, mapFn: MapFunction>, M[]>): Promise>; + /** + * Paginate a request using endpoint options + * + * @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + */ + (options: OctokitTypes.EndpointOptions): Promise>; + /** + * Paginate a request using a known endpoint route string and map each response to a custom array + * + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {function} mapFn Optional method to map each response to a custom array + */ + (route: R, mapFn: MapFunction): Promise; + /** + * Paginate a request using a known endpoint route string and parameters, and map each response to a custom array + * + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} parameters URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + * @param {function} mapFn Optional method to map each response to a custom array + */ + (route: R, parameters: PaginatingEndpoints[R]["parameters"], mapFn: MapFunction): Promise; + /** + * Paginate a request using an known endpoint route string + * + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} parameters? URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + */ + (route: R, parameters?: PaginatingEndpoints[R]["parameters"]): Promise>; + /** + * Paginate a request using an unknown endpoint route string + * + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} parameters? URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + */ + (route: R, parameters?: R extends keyof PaginatingEndpoints ? PaginatingEndpoints[R]["parameters"] : OctokitTypes.RequestParameters): Promise; + /** + * Paginate a request using an endpoint method and a map function + * + * @param {string} request Request method (`octokit.request` or `@octokit/request`) + * @param {function} mapFn? Optional method to map each response to a custom array + */ + (request: R, mapFn: MapFunction>, M>): Promise; + /** + * Paginate a request using an endpoint method, parameters, and a map function + * + * @param {string} request Request method (`octokit.request` or `@octokit/request`) + * @param {object} parameters URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + * @param {function} mapFn? Optional method to map each response to a custom array + */ + (request: R, parameters: Parameters[0], mapFn: MapFunction>, M>): Promise; + /** + * Paginate a request using an endpoint method and parameters + * + * @param {string} request Request method (`octokit.request` or `@octokit/request`) + * @param {object} parameters? URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + */ + (request: R, parameters?: Parameters[0]): Promise>["data"]>; + iterator: { + /** + * Get an async iterator to paginate a request using endpoint options + * + * @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of + * @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + */ + (options: OctokitTypes.EndpointOptions): AsyncIterable>>; + /** + * Get an async iterator to paginate a request using a known endpoint route string and optional parameters + * + * @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + */ + (route: R, parameters?: PaginatingEndpoints[R]["parameters"]): AsyncIterable>>; + /** + * Get an async iterator to paginate a request using an unknown endpoint route string and optional parameters + * + * @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + */ + (route: R, parameters?: R extends keyof PaginatingEndpoints ? PaginatingEndpoints[R]["parameters"] : OctokitTypes.RequestParameters): AsyncIterable>>; + /** + * Get an async iterator to paginate a request using a request method and optional parameters + * + * @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of + * @param {string} request `@octokit/request` or `octokit.request` method + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + */ + (request: R, parameters?: Parameters[0]): AsyncIterable>>; + }; +} +export interface ComposePaginateInterface { + /** + * Paginate a request using endpoint options and map each response to a custom array + * + * @param {object} octokit Octokit instance + * @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + * @param {function} mapFn Optional method to map each response to a custom array + */ + (octokit: Octokit, options: OctokitTypes.EndpointOptions, mapFn: MapFunction>, M[]>): Promise>; + /** + * Paginate a request using endpoint options + * + * @param {object} octokit Octokit instance + * @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + */ + (octokit: Octokit, options: OctokitTypes.EndpointOptions): Promise>; + /** + * Paginate a request using a known endpoint route string and map each response to a custom array + * + * @param {object} octokit Octokit instance + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {function} mapFn Optional method to map each response to a custom array + */ + (octokit: Octokit, route: R, mapFn: MapFunction): Promise; + /** + * Paginate a request using a known endpoint route string and parameters, and map each response to a custom array + * + * @param {object} octokit Octokit instance + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} parameters URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + * @param {function} mapFn Optional method to map each response to a custom array + */ + (octokit: Octokit, route: R, parameters: PaginatingEndpoints[R]["parameters"], mapFn: MapFunction): Promise; + /** + * Paginate a request using an known endpoint route string + * + * @param {object} octokit Octokit instance + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} parameters? URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + */ + (octokit: Octokit, route: R, parameters?: PaginatingEndpoints[R]["parameters"]): Promise>; + /** + * Paginate a request using an unknown endpoint route string + * + * @param {object} octokit Octokit instance + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} parameters? URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + */ + (octokit: Octokit, route: R, parameters?: R extends keyof PaginatingEndpoints ? PaginatingEndpoints[R]["parameters"] : OctokitTypes.RequestParameters): Promise; + /** + * Paginate a request using an endpoint method and a map function + * + * @param {object} octokit Octokit instance + * @param {string} request Request method (`octokit.request` or `@octokit/request`) + * @param {function} mapFn? Optional method to map each response to a custom array + */ + (octokit: Octokit, request: R, mapFn: MapFunction>, M>): Promise; + /** + * Paginate a request using an endpoint method, parameters, and a map function + * + * @param {object} octokit Octokit instance + * @param {string} request Request method (`octokit.request` or `@octokit/request`) + * @param {object} parameters URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + * @param {function} mapFn? Optional method to map each response to a custom array + */ + (octokit: Octokit, request: R, parameters: Parameters[0], mapFn: MapFunction>, M>): Promise; + /** + * Paginate a request using an endpoint method and parameters + * + * @param {object} octokit Octokit instance + * @param {string} request Request method (`octokit.request` or `@octokit/request`) + * @param {object} parameters? URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + */ + (octokit: Octokit, request: R, parameters?: Parameters[0]): Promise>["data"]>; + iterator: { + /** + * Get an async iterator to paginate a request using endpoint options + * + * @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of + * + * @param {object} octokit Octokit instance + * @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + */ + (octokit: Octokit, options: OctokitTypes.EndpointOptions): AsyncIterable>>; + /** + * Get an async iterator to paginate a request using a known endpoint route string and optional parameters + * + * @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of + * + * @param {object} octokit Octokit instance + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + */ + (octokit: Octokit, route: R, parameters?: PaginatingEndpoints[R]["parameters"]): AsyncIterable>>; + /** + * Get an async iterator to paginate a request using an unknown endpoint route string and optional parameters + * + * @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of + * + * @param {object} octokit Octokit instance + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + */ + (octokit: Octokit, route: R, parameters?: R extends keyof PaginatingEndpoints ? PaginatingEndpoints[R]["parameters"] : OctokitTypes.RequestParameters): AsyncIterable>>; + /** + * Get an async iterator to paginate a request using a request method and optional parameters + * + * @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of + * + * @param {object} octokit Octokit instance + * @param {string} request `@octokit/request` or `octokit.request` method + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.format`, `request`, or `baseUrl`. + */ + (octokit: Octokit, request: R, parameters?: Parameters[0]): AsyncIterable>>; + }; +} diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts new file mode 100644 index 000000000..6d1e426bb --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "11.3.5"; diff --git a/.github/octokit/node_modules/@octokit/plugin-paginate-rest/package.json b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/package.json new file mode 100644 index 000000000..bac9f107e --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-paginate-rest/package.json @@ -0,0 +1,60 @@ +{ + "name": "@octokit/plugin-paginate-rest", + "publishConfig": { + "access": "public", + "provenance": true + }, + "type": "module", + "version": "11.3.5", + "description": "Octokit plugin to paginate REST API endpoint responses", + "repository": "github:octokit/plugin-paginate-rest.js", + "keywords": [ + "github", + "api", + "sdk", + "toolkit" + ], + "license": "MIT", + "dependencies": { + "@octokit/types": "^13.6.0" + }, + "peerDependencies": { + "@octokit/core": ">=6" + }, + "devDependencies": { + "@octokit/core": "^6.0.1", + "@octokit/plugin-rest-endpoint-methods": "^13.0.0", + "@octokit/tsconfig": "^3.0.0", + "@types/fetch-mock": "^7.3.1", + "@types/node": "^20.0.0", + "@vitest/coverage-v8": "^2.0.2", + "esbuild": "^0.24.0", + "fetch-mock": "^11.0.0", + "github-openapi-graphql-query": "^4.0.0", + "glob": "^11.0.0", + "npm-run-all2": "^6.0.0", + "prettier": "3.3.3", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "typescript": "^5.0.0", + "vitest": "^2.0.2" + }, + "engines": { + "node": ">= 18" + }, + "files": [ + "dist-*/**", + "bin/**" + ], + "types": "dist-types/index.d.ts", + "exports": { + ".": { + "types": "./dist-types/index.d.ts", + "import": "./dist-bundle/index.js", + "default": "./dist-bundle/index.js" + }, + "./types": { + "types": "./dist-types/.d.ts" + } + }, + "sideEffects": false +} diff --git a/.github/octokit/node_modules/@octokit/plugin-request-log/LICENSE b/.github/octokit/node_modules/@octokit/plugin-request-log/LICENSE new file mode 100644 index 000000000..d7d59275c --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-request-log/LICENSE @@ -0,0 +1,7 @@ +MIT License Copyright (c) 2020 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/.github/octokit/node_modules/@octokit/plugin-request-log/README.md b/.github/octokit/node_modules/@octokit/plugin-request-log/README.md new file mode 100644 index 000000000..7ce854c6a --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-request-log/README.md @@ -0,0 +1,76 @@ +# plugin-request-log.js + +> Log all requests and request errors + +[![@latest](https://img.shields.io/npm/v/@octokit/plugin-request-log.svg)](https://www.npmjs.com/package/@octokit/plugin-request-log) +[![Build Status](https://github.com/octokit/plugin-request-log.js/workflows/Test/badge.svg)](https://github.com/octokit/plugin-request-log.js/actions?workflow=Test) + +## Usage + + + + + + +
+Browsers + + +Load `@octokit/plugin-request-log` and [`@octokit/core`](https://github.com/octokit/core.js) (or core-compatible module) directly from [esm.sh](https://esm.sh) + +```html + +``` + +
+Node + + +Install with `npm install @octokit/core @octokit/plugin-request-log`. Optionally replace `@octokit/core` with a core-compatible module + +```js +import { Octokit } from "@octokit/core"; +import { requestLog } from "@octokit/plugin-request-log"; +``` + +
+ +> [!IMPORTANT] +> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json` by setting `"moduleResolution": "node16", "module": "node16"`. +> +> See the TypeScript docs on [package.json "exports"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports).
+> See this [helpful guide on transitioning to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) from [@sindresorhus](https://github.com/sindresorhus) + +```js +const MyOctokit = Octokit.plugin(requestLog); +const octokit = new MyOctokit({ auth: "secret123" }); + +octokit.request("GET /"); +// logs "GET / - 200 in 123ms + +octokit.request("GET /oops"); +// logs "GET / - 404 in 123ms +``` + +In order to log all request options, the `log.debug` option needs to be set. We recommend the [console-log-level](https://github.com/watson/console-log-level) package for a configurable log level + +```js +import consoleLogLevel from "console-log-level"; +const octokit = new MyOctokit({ + log: consoleLogLevel({ + auth: "secret123", + level: "info", + }), +}); +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/.github/octokit/node_modules/@octokit/plugin-request-log/dist-src/index.js b/.github/octokit/node_modules/@octokit/plugin-request-log/dist-src/index.js new file mode 100644 index 000000000..13e99f025 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-request-log/dist-src/index.js @@ -0,0 +1,26 @@ +import { VERSION } from "./version.js"; +function requestLog(octokit) { + octokit.hook.wrap("request", (request, options) => { + octokit.log.debug("request", options); + const start = Date.now(); + const requestOptions = octokit.request.endpoint.parse(options); + const path = requestOptions.url.replace(options.baseUrl, ""); + return request(options).then((response) => { + const requestId = response.headers["x-github-request-id"]; + octokit.log.info( + `${requestOptions.method} ${path} - ${response.status} with id ${requestId} in ${Date.now() - start}ms` + ); + return response; + }).catch((error) => { + const requestId = error.response?.headers["x-github-request-id"] || "UNKNOWN"; + octokit.log.error( + `${requestOptions.method} ${path} - ${error.status} with id ${requestId} in ${Date.now() - start}ms` + ); + throw error; + }); + }); +} +requestLog.VERSION = VERSION; +export { + requestLog +}; diff --git a/.github/octokit/node_modules/@octokit/plugin-request-log/dist-src/version.js b/.github/octokit/node_modules/@octokit/plugin-request-log/dist-src/version.js new file mode 100644 index 000000000..41573e710 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-request-log/dist-src/version.js @@ -0,0 +1,4 @@ +const VERSION = "5.3.1"; +export { + VERSION +}; diff --git a/.github/octokit/node_modules/@octokit/plugin-request-log/dist-types/index.d.ts b/.github/octokit/node_modules/@octokit/plugin-request-log/dist-types/index.d.ts new file mode 100644 index 000000000..dc62f632a --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-request-log/dist-types/index.d.ts @@ -0,0 +1,9 @@ +import type { Octokit } from "@octokit/core"; +/** + * @param octokit Octokit instance + * @param options Options passed to Octokit constructor + */ +export declare function requestLog(octokit: Octokit): void; +export declare namespace requestLog { + var VERSION: string; +} diff --git a/.github/octokit/node_modules/@octokit/plugin-request-log/dist-types/version.d.ts b/.github/octokit/node_modules/@octokit/plugin-request-log/dist-types/version.d.ts new file mode 100644 index 000000000..c32c7ab0a --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-request-log/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "5.3.1"; diff --git a/.github/octokit/node_modules/@octokit/plugin-request-log/package.json b/.github/octokit/node_modules/@octokit/plugin-request-log/package.json new file mode 100644 index 000000000..9ba1ca7ef --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-request-log/package.json @@ -0,0 +1,53 @@ +{ + "name": "@octokit/plugin-request-log", + "version": "5.3.1", + "description": "Log all requests and request errors", + "type": "module", + "repository": "github:octokit/plugin-request-log.js", + "keywords": [ + "github", + "api", + "sdk", + "toolkit" + ], + "author": "Gregor Martynus (https://twitter.com/gr2m)", + "license": "MIT", + "peerDependencies": { + "@octokit/core": ">=6" + }, + "devDependencies": { + "@octokit/core": "^6.0.0", + "@octokit/tsconfig": "^3.0.0", + "@types/fetch-mock": "^7.3.2", + "@types/jest": "^29.0.0", + "@types/node": "^20.0.0", + "esbuild": "^0.23.0", + "fetch-mock": "npm:@gr2m/fetch-mock@9.11.0-pull-request-644.1", + "glob": "^11.0.0", + "jest": "^29.0.0", + "prettier": "3.3.3", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^29.0.0", + "typescript": "^5.0.0" + }, + "publishConfig": { + "access": "public", + "provenance": true + }, + "engines": { + "node": ">= 18" + }, + "files": [ + "dist-*/**", + "bin/**" + ], + "types": "dist-types/index.d.ts", + "exports": { + ".": { + "types": "./dist-types/index.d.ts", + "import": "./dist-src/index.js", + "default": "./dist-src/index.js" + } + }, + "sideEffects": false +} diff --git a/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/LICENSE b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/LICENSE new file mode 100644 index 000000000..57bee5f18 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/LICENSE @@ -0,0 +1,7 @@ +MIT License Copyright (c) 2019 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/README.md b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/README.md new file mode 100644 index 000000000..4ece5a43f --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/README.md @@ -0,0 +1,80 @@ +# plugin-rest-endpoint-methods.js + +> Octokit plugin adding one method for all of api.github.com REST API endpoints + +[![@latest](https://img.shields.io/npm/v/@octokit/plugin-rest-endpoint-methods.svg)](https://www.npmjs.com/package/@octokit/plugin-rest-endpoint-methods) +[![Build Status](https://github.com/octokit/plugin-rest-endpoint-methods.js/workflows/Test/badge.svg)](https://github.com/octokit/plugin-rest-endpoint-methods.js/actions?workflow=Test) + +## Usage + + + + + + +
+Browsers + + +Load `@octokit/plugin-rest-endpoint-methods` and [`@octokit/core`](https://github.com/octokit/core.js) (or core-compatible module) directly from [esm.sh](https://esm.sh) + +```html + +``` + +
+Node + + +Install with `npm install @octokit/core @octokit/plugin-rest-endpoint-methods`. Optionally replace `@octokit/core` with a compatible module + +```js +import { Octokit } from "@octokit/core"; +import { restEndpointMethods } from "@octokit/plugin-rest-endpoint-methods"; +``` + +
+ +```js +const MyOctokit = Octokit.plugin(restEndpointMethods); +const octokit = new MyOctokit({ auth: "secret123" }); + +// https://developer.github.com/v3/users/#get-the-authenticated-user +octokit.rest.users.getAuthenticated(); +``` + +There is one method for each REST API endpoint documented at [https://developer.github.com/v3](https://developer.github.com/v3). All endpoint methods are documented in the [docs/](docs/) folder, e.g. [docs/users/getAuthenticated.md](docs/users/getAuthenticated.md) + +## TypeScript + +> [!IMPORTANT] +> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json` by setting `"moduleResolution": "node16", "module": "node16"`. +> +> See the TypeScript docs on [package.json "exports"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports).
+> See this [helpful guide on transitioning to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) from [@sindresorhus](https://github.com/sindresorhus) + +Parameter and response types for all endpoint methods exported as `{ RestEndpointMethodTypes }`. + +Example + +```ts +import { RestEndpointMethodTypes } from "@octokit/plugin-rest-endpoint-methods"; + +type UpdateLabelParameters = + RestEndpointMethodTypes["issues"]["updateLabel"]["parameters"]; +type UpdateLabelResponse = + RestEndpointMethodTypes["issues"]["updateLabel"]["response"]; +``` + +In order to get types beyond parameters and responses, check out [`@octokit/openapi-types`](https://github.com/octokit/openapi-types.ts/#readme), which is a direct transpilation from GitHub's official OpenAPI specification. + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js new file mode 100644 index 000000000..d6b61c96f --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js @@ -0,0 +1,126 @@ +import ENDPOINTS from "./generated/endpoints.js"; +const endpointMethodsMap = /* @__PURE__ */ new Map(); +for (const [scope, endpoints] of Object.entries(ENDPOINTS)) { + for (const [methodName, endpoint] of Object.entries(endpoints)) { + const [route, defaults, decorations] = endpoint; + const [method, url] = route.split(/ /); + const endpointDefaults = Object.assign( + { + method, + url + }, + defaults + ); + if (!endpointMethodsMap.has(scope)) { + endpointMethodsMap.set(scope, /* @__PURE__ */ new Map()); + } + endpointMethodsMap.get(scope).set(methodName, { + scope, + methodName, + endpointDefaults, + decorations + }); + } +} +const handler = { + has({ scope }, methodName) { + return endpointMethodsMap.get(scope).has(methodName); + }, + getOwnPropertyDescriptor(target, methodName) { + return { + value: this.get(target, methodName), + // ensures method is in the cache + configurable: true, + writable: true, + enumerable: true + }; + }, + defineProperty(target, methodName, descriptor) { + Object.defineProperty(target.cache, methodName, descriptor); + return true; + }, + deleteProperty(target, methodName) { + delete target.cache[methodName]; + return true; + }, + ownKeys({ scope }) { + return [...endpointMethodsMap.get(scope).keys()]; + }, + set(target, methodName, value) { + return target.cache[methodName] = value; + }, + get({ octokit, scope, cache }, methodName) { + if (cache[methodName]) { + return cache[methodName]; + } + const method = endpointMethodsMap.get(scope).get(methodName); + if (!method) { + return void 0; + } + const { endpointDefaults, decorations } = method; + if (decorations) { + cache[methodName] = decorate( + octokit, + scope, + methodName, + endpointDefaults, + decorations + ); + } else { + cache[methodName] = octokit.request.defaults(endpointDefaults); + } + return cache[methodName]; + } +}; +function endpointsToMethods(octokit) { + const newMethods = {}; + for (const scope of endpointMethodsMap.keys()) { + newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler); + } + return newMethods; +} +function decorate(octokit, scope, methodName, defaults, decorations) { + const requestWithDefaults = octokit.request.defaults(defaults); + function withDecorations(...args) { + let options = requestWithDefaults.endpoint.merge(...args); + if (decorations.mapToData) { + options = Object.assign({}, options, { + data: options[decorations.mapToData], + [decorations.mapToData]: void 0 + }); + return requestWithDefaults(options); + } + if (decorations.renamed) { + const [newScope, newMethodName] = decorations.renamed; + octokit.log.warn( + `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()` + ); + } + if (decorations.deprecated) { + octokit.log.warn(decorations.deprecated); + } + if (decorations.renamedParameters) { + const options2 = requestWithDefaults.endpoint.merge(...args); + for (const [name, alias] of Object.entries( + decorations.renamedParameters + )) { + if (name in options2) { + octokit.log.warn( + `"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead` + ); + if (!(alias in options2)) { + options2[alias] = options2[name]; + } + delete options2[name]; + } + } + return requestWithDefaults(options2); + } + return requestWithDefaults(...args); + } + return Object.assign(withDecorations, requestWithDefaults); +} +export { + endpointsToMethods +}; +//# sourceMappingURL=endpoints-to-methods.js.map diff --git a/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js.map b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js.map new file mode 100644 index 000000000..5f4c3aff3 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../src/endpoints-to-methods.ts"], + "sourcesContent": ["import type { Octokit } from \"@octokit/core\";\nimport type { EndpointOptions, RequestParameters, Route } from \"@octokit/types\";\nimport ENDPOINTS from \"./generated/endpoints.js\";\nimport type { RestEndpointMethods } from \"./generated/method-types.js\";\nimport type { EndpointDecorations } from \"./types.js\";\n\n// The following code was refactored in: https://github.com/octokit/plugin-rest-endpoint-methods.js/pull/622\n// to optimise the runtime performance of Octokit initialization.\n//\n// This optimization involves two key changes:\n// 1. Pre-Computation: The endpoint methods are pre-computed once at module load\n// time instead of each invocation of `endpointsToMethods()`.\n// 2. Lazy initialization and caching: We use a Proxy for each scope to only\n// initialize methods that are actually called. This reduces runtime overhead\n// as the initialization involves deep merging of objects. The initialized\n// methods are then cached for future use.\n\nconst endpointMethodsMap = new Map();\nfor (const [scope, endpoints] of Object.entries(ENDPOINTS)) {\n for (const [methodName, endpoint] of Object.entries(endpoints)) {\n const [route, defaults, decorations] = endpoint;\n const [method, url] = route.split(/ /);\n const endpointDefaults = Object.assign(\n {\n method,\n url,\n },\n defaults,\n );\n\n if (!endpointMethodsMap.has(scope)) {\n endpointMethodsMap.set(scope, new Map());\n }\n\n endpointMethodsMap.get(scope).set(methodName, {\n scope,\n methodName,\n endpointDefaults,\n decorations,\n });\n }\n}\n\ntype ProxyTarget = {\n octokit: Octokit;\n scope: string;\n cache: Record any>;\n};\n\nconst handler = {\n has({ scope }: ProxyTarget, methodName: string) {\n return endpointMethodsMap.get(scope).has(methodName);\n },\n getOwnPropertyDescriptor(target: ProxyTarget, methodName: string) {\n return {\n value: this.get(target, methodName), // ensures method is in the cache\n configurable: true,\n writable: true,\n enumerable: true,\n };\n },\n defineProperty(\n target: ProxyTarget,\n methodName: string,\n descriptor: PropertyDescriptor,\n ) {\n Object.defineProperty(target.cache, methodName, descriptor);\n return true;\n },\n deleteProperty(target: ProxyTarget, methodName: string) {\n delete target.cache[methodName];\n return true;\n },\n ownKeys({ scope }: ProxyTarget) {\n return [...endpointMethodsMap.get(scope).keys()];\n },\n set(target: ProxyTarget, methodName: string, value: any) {\n return (target.cache[methodName] = value);\n },\n get({ octokit, scope, cache }: ProxyTarget, methodName: string) {\n if (cache[methodName]) {\n return cache[methodName];\n }\n\n const method = endpointMethodsMap.get(scope).get(methodName);\n if (!method) {\n return undefined;\n }\n\n const { endpointDefaults, decorations } = method;\n\n if (decorations) {\n cache[methodName] = decorate(\n octokit,\n scope,\n methodName,\n endpointDefaults,\n decorations,\n );\n } else {\n cache[methodName] = octokit.request.defaults(endpointDefaults);\n }\n\n return cache[methodName];\n },\n};\n\nexport function endpointsToMethods(octokit: Octokit): RestEndpointMethods {\n const newMethods = {} as { [key: string]: object };\n\n for (const scope of endpointMethodsMap.keys()) {\n newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler);\n }\n\n return newMethods as RestEndpointMethods;\n}\n\nfunction decorate(\n octokit: Octokit,\n scope: string,\n methodName: string,\n defaults: EndpointOptions,\n decorations: EndpointDecorations,\n) {\n const requestWithDefaults = octokit.request.defaults(defaults);\n\n /* istanbul ignore next */\n function withDecorations(\n ...args: [Route, RequestParameters?] | [EndpointOptions]\n ) {\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n let options = requestWithDefaults.endpoint.merge(...args);\n\n // There are currently no other decorations than `.mapToData`\n if (decorations.mapToData) {\n options = Object.assign({}, options, {\n data: options[decorations.mapToData],\n [decorations.mapToData]: undefined,\n });\n return requestWithDefaults(options);\n }\n\n if (decorations.renamed) {\n const [newScope, newMethodName] = decorations.renamed;\n octokit.log.warn(\n `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`,\n );\n }\n if (decorations.deprecated) {\n octokit.log.warn(decorations.deprecated);\n }\n\n if (decorations.renamedParameters) {\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n const options = requestWithDefaults.endpoint.merge(...args);\n\n for (const [name, alias] of Object.entries(\n decorations.renamedParameters,\n )) {\n if (name in options) {\n octokit.log.warn(\n `\"${name}\" parameter is deprecated for \"octokit.${scope}.${methodName}()\". Use \"${alias}\" instead`,\n );\n if (!(alias in options)) {\n options[alias] = options[name];\n }\n delete options[name];\n }\n }\n return requestWithDefaults(options);\n }\n\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n return requestWithDefaults(...args);\n }\n return Object.assign(withDecorations, requestWithDefaults);\n}\n"], + "mappings": "AAEA,OAAO,eAAe;AAetB,MAAM,qBAAqB,oBAAI,IAAI;AACnC,WAAW,CAAC,OAAO,SAAS,KAAK,OAAO,QAAQ,SAAS,GAAG;AAC1D,aAAW,CAAC,YAAY,QAAQ,KAAK,OAAO,QAAQ,SAAS,GAAG;AAC9D,UAAM,CAAC,OAAO,UAAU,WAAW,IAAI;AACvC,UAAM,CAAC,QAAQ,GAAG,IAAI,MAAM,MAAM,GAAG;AACrC,UAAM,mBAAmB,OAAO;AAAA,MAC9B;AAAA,QACE;AAAA,QACA;AAAA,MACF;AAAA,MACA;AAAA,IACF;AAEA,QAAI,CAAC,mBAAmB,IAAI,KAAK,GAAG;AAClC,yBAAmB,IAAI,OAAO,oBAAI,IAAI,CAAC;AAAA,IACzC;AAEA,uBAAmB,IAAI,KAAK,EAAE,IAAI,YAAY;AAAA,MAC5C;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH;AACF;AAQA,MAAM,UAAU;AAAA,EACd,IAAI,EAAE,MAAM,GAAgB,YAAoB;AAC9C,WAAO,mBAAmB,IAAI,KAAK,EAAE,IAAI,UAAU;AAAA,EACrD;AAAA,EACA,yBAAyB,QAAqB,YAAoB;AAChE,WAAO;AAAA,MACL,OAAO,KAAK,IAAI,QAAQ,UAAU;AAAA;AAAA,MAClC,cAAc;AAAA,MACd,UAAU;AAAA,MACV,YAAY;AAAA,IACd;AAAA,EACF;AAAA,EACA,eACE,QACA,YACA,YACA;AACA,WAAO,eAAe,OAAO,OAAO,YAAY,UAAU;AAC1D,WAAO;AAAA,EACT;AAAA,EACA,eAAe,QAAqB,YAAoB;AACtD,WAAO,OAAO,MAAM,UAAU;AAC9B,WAAO;AAAA,EACT;AAAA,EACA,QAAQ,EAAE,MAAM,GAAgB;AAC9B,WAAO,CAAC,GAAG,mBAAmB,IAAI,KAAK,EAAE,KAAK,CAAC;AAAA,EACjD;AAAA,EACA,IAAI,QAAqB,YAAoB,OAAY;AACvD,WAAQ,OAAO,MAAM,UAAU,IAAI;AAAA,EACrC;AAAA,EACA,IAAI,EAAE,SAAS,OAAO,MAAM,GAAgB,YAAoB;AAC9D,QAAI,MAAM,UAAU,GAAG;AACrB,aAAO,MAAM,UAAU;AAAA,IACzB;AAEA,UAAM,SAAS,mBAAmB,IAAI,KAAK,EAAE,IAAI,UAAU;AAC3D,QAAI,CAAC,QAAQ;AACX,aAAO;AAAA,IACT;AAEA,UAAM,EAAE,kBAAkB,YAAY,IAAI;AAE1C,QAAI,aAAa;AACf,YAAM,UAAU,IAAI;AAAA,QAClB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF,OAAO;AACL,YAAM,UAAU,IAAI,QAAQ,QAAQ,SAAS,gBAAgB;AAAA,IAC/D;AAEA,WAAO,MAAM,UAAU;AAAA,EACzB;AACF;AAEO,SAAS,mBAAmB,SAAuC;AACxE,QAAM,aAAa,CAAC;AAEpB,aAAW,SAAS,mBAAmB,KAAK,GAAG;AAC7C,eAAW,KAAK,IAAI,IAAI,MAAM,EAAE,SAAS,OAAO,OAAO,CAAC,EAAE,GAAG,OAAO;AAAA,EACtE;AAEA,SAAO;AACT;AAEA,SAAS,SACP,SACA,OACA,YACA,UACA,aACA;AACA,QAAM,sBAAsB,QAAQ,QAAQ,SAAS,QAAQ;AAG7D,WAAS,mBACJ,MACH;AAEA,QAAI,UAAU,oBAAoB,SAAS,MAAM,GAAG,IAAI;AAGxD,QAAI,YAAY,WAAW;AACzB,gBAAU,OAAO,OAAO,CAAC,GAAG,SAAS;AAAA,QACnC,MAAM,QAAQ,YAAY,SAAS;AAAA,QACnC,CAAC,YAAY,SAAS,GAAG;AAAA,MAC3B,CAAC;AACD,aAAO,oBAAoB,OAAO;AAAA,IACpC;AAEA,QAAI,YAAY,SAAS;AACvB,YAAM,CAAC,UAAU,aAAa,IAAI,YAAY;AAC9C,cAAQ,IAAI;AAAA,QACV,WAAW,KAAK,IAAI,UAAU,kCAAkC,QAAQ,IAAI,aAAa;AAAA,MAC3F;AAAA,IACF;AACA,QAAI,YAAY,YAAY;AAC1B,cAAQ,IAAI,KAAK,YAAY,UAAU;AAAA,IACzC;AAEA,QAAI,YAAY,mBAAmB;AAEjC,YAAMA,WAAU,oBAAoB,SAAS,MAAM,GAAG,IAAI;AAE1D,iBAAW,CAAC,MAAM,KAAK,KAAK,OAAO;AAAA,QACjC,YAAY;AAAA,MACd,GAAG;AACD,YAAI,QAAQA,UAAS;AACnB,kBAAQ,IAAI;AAAA,YACV,IAAI,IAAI,0CAA0C,KAAK,IAAI,UAAU,aAAa,KAAK;AAAA,UACzF;AACA,cAAI,EAAE,SAASA,WAAU;AACvB,YAAAA,SAAQ,KAAK,IAAIA,SAAQ,IAAI;AAAA,UAC/B;AACA,iBAAOA,SAAQ,IAAI;AAAA,QACrB;AAAA,MACF;AACA,aAAO,oBAAoBA,QAAO;AAAA,IACpC;AAGA,WAAO,oBAAoB,GAAG,IAAI;AAAA,EACpC;AACA,SAAO,OAAO,OAAO,iBAAiB,mBAAmB;AAC3D;", + "names": ["options"] +} diff --git a/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js new file mode 100644 index 000000000..eb5e5efb3 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js @@ -0,0 +1,1943 @@ +const Endpoints = { + actions: { + addCustomLabelsToSelfHostedRunnerForOrg: [ + "POST /orgs/{org}/actions/runners/{runner_id}/labels" + ], + addCustomLabelsToSelfHostedRunnerForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}" + ], + addSelectedRepoToOrgVariable: [ + "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}" + ], + approveWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve" + ], + cancelWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel" + ], + createEnvironmentVariable: [ + "POST /repos/{owner}/{repo}/environments/{environment_name}/variables" + ], + createOrUpdateEnvironmentSecret: [ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}" + ], + createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}" + ], + createOrgVariable: ["POST /orgs/{org}/actions/variables"], + createRegistrationTokenForOrg: [ + "POST /orgs/{org}/actions/runners/registration-token" + ], + createRegistrationTokenForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/registration-token" + ], + createRemoveTokenForOrg: ["POST /orgs/{org}/actions/runners/remove-token"], + createRemoveTokenForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/remove-token" + ], + createRepoVariable: ["POST /repos/{owner}/{repo}/actions/variables"], + createWorkflowDispatch: [ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches" + ], + deleteActionsCacheById: [ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}" + ], + deleteActionsCacheByKey: [ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}" + ], + deleteArtifact: [ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}" + ], + deleteEnvironmentSecret: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}" + ], + deleteEnvironmentVariable: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}" + ], + deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"], + deleteOrgVariable: ["DELETE /orgs/{org}/actions/variables/{name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}" + ], + deleteRepoVariable: [ + "DELETE /repos/{owner}/{repo}/actions/variables/{name}" + ], + deleteSelfHostedRunnerFromOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}" + ], + deleteSelfHostedRunnerFromRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}" + ], + deleteWorkflowRun: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"], + deleteWorkflowRunLogs: [ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs" + ], + disableSelectedRepositoryGithubActionsOrganization: [ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}" + ], + disableWorkflow: [ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable" + ], + downloadArtifact: [ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}" + ], + downloadJobLogsForWorkflowRun: [ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs" + ], + downloadWorkflowRunAttemptLogs: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs" + ], + downloadWorkflowRunLogs: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs" + ], + enableSelectedRepositoryGithubActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}" + ], + enableWorkflow: [ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable" + ], + forceCancelWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel" + ], + generateRunnerJitconfigForOrg: [ + "POST /orgs/{org}/actions/runners/generate-jitconfig" + ], + generateRunnerJitconfigForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig" + ], + getActionsCacheList: ["GET /repos/{owner}/{repo}/actions/caches"], + getActionsCacheUsage: ["GET /repos/{owner}/{repo}/actions/cache/usage"], + getActionsCacheUsageByRepoForOrg: [ + "GET /orgs/{org}/actions/cache/usage-by-repository" + ], + getActionsCacheUsageForOrg: ["GET /orgs/{org}/actions/cache/usage"], + getAllowedActionsOrganization: [ + "GET /orgs/{org}/actions/permissions/selected-actions" + ], + getAllowedActionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions" + ], + getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], + getCustomOidcSubClaimForRepo: [ + "GET /repos/{owner}/{repo}/actions/oidc/customization/sub" + ], + getEnvironmentPublicKey: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key" + ], + getEnvironmentSecret: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}" + ], + getEnvironmentVariable: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}" + ], + getGithubActionsDefaultWorkflowPermissionsOrganization: [ + "GET /orgs/{org}/actions/permissions/workflow" + ], + getGithubActionsDefaultWorkflowPermissionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/workflow" + ], + getGithubActionsPermissionsOrganization: [ + "GET /orgs/{org}/actions/permissions" + ], + getGithubActionsPermissionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions" + ], + getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"], + getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"], + getOrgVariable: ["GET /orgs/{org}/actions/variables/{name}"], + getPendingDeploymentsForRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments" + ], + getRepoPermissions: [ + "GET /repos/{owner}/{repo}/actions/permissions", + {}, + { renamed: ["actions", "getGithubActionsPermissionsRepository"] } + ], + getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"], + getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"], + getRepoVariable: ["GET /repos/{owner}/{repo}/actions/variables/{name}"], + getReviewsForRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals" + ], + getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"], + getSelfHostedRunnerForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}" + ], + getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"], + getWorkflowAccessToRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/access" + ], + getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"], + getWorkflowRunAttempt: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}" + ], + getWorkflowRunUsage: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing" + ], + getWorkflowUsage: [ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing" + ], + listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"], + listEnvironmentSecrets: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/secrets" + ], + listEnvironmentVariables: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/variables" + ], + listJobsForWorkflowRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs" + ], + listJobsForWorkflowRunAttempt: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs" + ], + listLabelsForSelfHostedRunnerForOrg: [ + "GET /orgs/{org}/actions/runners/{runner_id}/labels" + ], + listLabelsForSelfHostedRunnerForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + listOrgSecrets: ["GET /orgs/{org}/actions/secrets"], + listOrgVariables: ["GET /orgs/{org}/actions/variables"], + listRepoOrganizationSecrets: [ + "GET /repos/{owner}/{repo}/actions/organization-secrets" + ], + listRepoOrganizationVariables: [ + "GET /repos/{owner}/{repo}/actions/organization-variables" + ], + listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"], + listRepoVariables: ["GET /repos/{owner}/{repo}/actions/variables"], + listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"], + listRunnerApplicationsForOrg: ["GET /orgs/{org}/actions/runners/downloads"], + listRunnerApplicationsForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/downloads" + ], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories" + ], + listSelectedReposForOrgVariable: [ + "GET /orgs/{org}/actions/variables/{name}/repositories" + ], + listSelectedRepositoriesEnabledGithubActionsOrganization: [ + "GET /orgs/{org}/actions/permissions/repositories" + ], + listSelfHostedRunnersForOrg: ["GET /orgs/{org}/actions/runners"], + listSelfHostedRunnersForRepo: ["GET /repos/{owner}/{repo}/actions/runners"], + listWorkflowRunArtifacts: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts" + ], + listWorkflowRuns: [ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs" + ], + listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"], + reRunJobForWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun" + ], + reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"], + reRunWorkflowFailedJobs: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs" + ], + removeAllCustomLabelsFromSelfHostedRunnerForOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels" + ], + removeAllCustomLabelsFromSelfHostedRunnerForRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + removeCustomLabelFromSelfHostedRunnerForOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}" + ], + removeCustomLabelFromSelfHostedRunnerForRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}" + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}" + ], + removeSelectedRepoFromOrgVariable: [ + "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}" + ], + reviewCustomGatesForRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule" + ], + reviewPendingDeploymentsForRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments" + ], + setAllowedActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/selected-actions" + ], + setAllowedActionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions" + ], + setCustomLabelsForSelfHostedRunnerForOrg: [ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels" + ], + setCustomLabelsForSelfHostedRunnerForRepo: [ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + setCustomOidcSubClaimForRepo: [ + "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub" + ], + setGithubActionsDefaultWorkflowPermissionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/workflow" + ], + setGithubActionsDefaultWorkflowPermissionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow" + ], + setGithubActionsPermissionsOrganization: [ + "PUT /orgs/{org}/actions/permissions" + ], + setGithubActionsPermissionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions" + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories" + ], + setSelectedReposForOrgVariable: [ + "PUT /orgs/{org}/actions/variables/{name}/repositories" + ], + setSelectedRepositoriesEnabledGithubActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/repositories" + ], + setWorkflowAccessToRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/access" + ], + updateEnvironmentVariable: [ + "PATCH /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}" + ], + updateOrgVariable: ["PATCH /orgs/{org}/actions/variables/{name}"], + updateRepoVariable: [ + "PATCH /repos/{owner}/{repo}/actions/variables/{name}" + ] + }, + activity: { + checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"], + deleteRepoSubscription: ["DELETE /repos/{owner}/{repo}/subscription"], + deleteThreadSubscription: [ + "DELETE /notifications/threads/{thread_id}/subscription" + ], + getFeeds: ["GET /feeds"], + getRepoSubscription: ["GET /repos/{owner}/{repo}/subscription"], + getThread: ["GET /notifications/threads/{thread_id}"], + getThreadSubscriptionForAuthenticatedUser: [ + "GET /notifications/threads/{thread_id}/subscription" + ], + listEventsForAuthenticatedUser: ["GET /users/{username}/events"], + listNotificationsForAuthenticatedUser: ["GET /notifications"], + listOrgEventsForAuthenticatedUser: [ + "GET /users/{username}/events/orgs/{org}" + ], + listPublicEvents: ["GET /events"], + listPublicEventsForRepoNetwork: ["GET /networks/{owner}/{repo}/events"], + listPublicEventsForUser: ["GET /users/{username}/events/public"], + listPublicOrgEvents: ["GET /orgs/{org}/events"], + listReceivedEventsForUser: ["GET /users/{username}/received_events"], + listReceivedPublicEventsForUser: [ + "GET /users/{username}/received_events/public" + ], + listRepoEvents: ["GET /repos/{owner}/{repo}/events"], + listRepoNotificationsForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/notifications" + ], + listReposStarredByAuthenticatedUser: ["GET /user/starred"], + listReposStarredByUser: ["GET /users/{username}/starred"], + listReposWatchedByUser: ["GET /users/{username}/subscriptions"], + listStargazersForRepo: ["GET /repos/{owner}/{repo}/stargazers"], + listWatchedReposForAuthenticatedUser: ["GET /user/subscriptions"], + listWatchersForRepo: ["GET /repos/{owner}/{repo}/subscribers"], + markNotificationsAsRead: ["PUT /notifications"], + markRepoNotificationsAsRead: ["PUT /repos/{owner}/{repo}/notifications"], + markThreadAsDone: ["DELETE /notifications/threads/{thread_id}"], + markThreadAsRead: ["PATCH /notifications/threads/{thread_id}"], + setRepoSubscription: ["PUT /repos/{owner}/{repo}/subscription"], + setThreadSubscription: [ + "PUT /notifications/threads/{thread_id}/subscription" + ], + starRepoForAuthenticatedUser: ["PUT /user/starred/{owner}/{repo}"], + unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"] + }, + apps: { + addRepoToInstallation: [ + "PUT /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"] } + ], + addRepoToInstallationForAuthenticatedUser: [ + "PUT /user/installations/{installation_id}/repositories/{repository_id}" + ], + checkToken: ["POST /applications/{client_id}/token"], + createFromManifest: ["POST /app-manifests/{code}/conversions"], + createInstallationAccessToken: [ + "POST /app/installations/{installation_id}/access_tokens" + ], + deleteAuthorization: ["DELETE /applications/{client_id}/grant"], + deleteInstallation: ["DELETE /app/installations/{installation_id}"], + deleteToken: ["DELETE /applications/{client_id}/token"], + getAuthenticated: ["GET /app"], + getBySlug: ["GET /apps/{app_slug}"], + getInstallation: ["GET /app/installations/{installation_id}"], + getOrgInstallation: ["GET /orgs/{org}/installation"], + getRepoInstallation: ["GET /repos/{owner}/{repo}/installation"], + getSubscriptionPlanForAccount: [ + "GET /marketplace_listing/accounts/{account_id}" + ], + getSubscriptionPlanForAccountStubbed: [ + "GET /marketplace_listing/stubbed/accounts/{account_id}" + ], + getUserInstallation: ["GET /users/{username}/installation"], + getWebhookConfigForApp: ["GET /app/hook/config"], + getWebhookDelivery: ["GET /app/hook/deliveries/{delivery_id}"], + listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"], + listAccountsForPlanStubbed: [ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts" + ], + listInstallationReposForAuthenticatedUser: [ + "GET /user/installations/{installation_id}/repositories" + ], + listInstallationRequestsForAuthenticatedApp: [ + "GET /app/installation-requests" + ], + listInstallations: ["GET /app/installations"], + listInstallationsForAuthenticatedUser: ["GET /user/installations"], + listPlans: ["GET /marketplace_listing/plans"], + listPlansStubbed: ["GET /marketplace_listing/stubbed/plans"], + listReposAccessibleToInstallation: ["GET /installation/repositories"], + listSubscriptionsForAuthenticatedUser: ["GET /user/marketplace_purchases"], + listSubscriptionsForAuthenticatedUserStubbed: [ + "GET /user/marketplace_purchases/stubbed" + ], + listWebhookDeliveries: ["GET /app/hook/deliveries"], + redeliverWebhookDelivery: [ + "POST /app/hook/deliveries/{delivery_id}/attempts" + ], + removeRepoFromInstallation: [ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"] } + ], + removeRepoFromInstallationForAuthenticatedUser: [ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}" + ], + resetToken: ["PATCH /applications/{client_id}/token"], + revokeInstallationAccessToken: ["DELETE /installation/token"], + scopeToken: ["POST /applications/{client_id}/token/scoped"], + suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"], + unsuspendInstallation: [ + "DELETE /app/installations/{installation_id}/suspended" + ], + updateWebhookConfigForApp: ["PATCH /app/hook/config"] + }, + billing: { + getGithubActionsBillingOrg: ["GET /orgs/{org}/settings/billing/actions"], + getGithubActionsBillingUser: [ + "GET /users/{username}/settings/billing/actions" + ], + getGithubPackagesBillingOrg: ["GET /orgs/{org}/settings/billing/packages"], + getGithubPackagesBillingUser: [ + "GET /users/{username}/settings/billing/packages" + ], + getSharedStorageBillingOrg: [ + "GET /orgs/{org}/settings/billing/shared-storage" + ], + getSharedStorageBillingUser: [ + "GET /users/{username}/settings/billing/shared-storage" + ] + }, + checks: { + create: ["POST /repos/{owner}/{repo}/check-runs"], + createSuite: ["POST /repos/{owner}/{repo}/check-suites"], + get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"], + getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"], + listAnnotations: [ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations" + ], + listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"], + listForSuite: [ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs" + ], + listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"], + rerequestRun: [ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest" + ], + rerequestSuite: [ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest" + ], + setSuitesPreferences: [ + "PATCH /repos/{owner}/{repo}/check-suites/preferences" + ], + update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"] + }, + codeScanning: { + deleteAnalysis: [ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}" + ], + getAlert: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", + {}, + { renamedParameters: { alert_id: "alert_number" } } + ], + getAnalysis: [ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}" + ], + getCodeqlDatabase: [ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}" + ], + getDefaultSetup: ["GET /repos/{owner}/{repo}/code-scanning/default-setup"], + getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"], + listAlertInstances: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances" + ], + listAlertsForOrg: ["GET /orgs/{org}/code-scanning/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"], + listAlertsInstances: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + {}, + { renamed: ["codeScanning", "listAlertInstances"] } + ], + listCodeqlDatabases: [ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases" + ], + listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}" + ], + updateDefaultSetup: [ + "PATCH /repos/{owner}/{repo}/code-scanning/default-setup" + ], + uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"] + }, + codesOfConduct: { + getAllCodesOfConduct: ["GET /codes_of_conduct"], + getConductCode: ["GET /codes_of_conduct/{key}"] + }, + codespaces: { + addRepositoryForSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + checkPermissionsForDevcontainer: [ + "GET /repos/{owner}/{repo}/codespaces/permissions_check" + ], + codespaceMachinesForAuthenticatedUser: [ + "GET /user/codespaces/{codespace_name}/machines" + ], + createForAuthenticatedUser: ["POST /user/codespaces"], + createOrUpdateOrgSecret: [ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}" + ], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" + ], + createOrUpdateSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}" + ], + createWithPrForAuthenticatedUser: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces" + ], + createWithRepoForAuthenticatedUser: [ + "POST /repos/{owner}/{repo}/codespaces" + ], + deleteForAuthenticatedUser: ["DELETE /user/codespaces/{codespace_name}"], + deleteFromOrganization: [ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}" + ], + deleteOrgSecret: ["DELETE /orgs/{org}/codespaces/secrets/{secret_name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" + ], + deleteSecretForAuthenticatedUser: [ + "DELETE /user/codespaces/secrets/{secret_name}" + ], + exportForAuthenticatedUser: [ + "POST /user/codespaces/{codespace_name}/exports" + ], + getCodespacesForUserInOrg: [ + "GET /orgs/{org}/members/{username}/codespaces" + ], + getExportDetailsForAuthenticatedUser: [ + "GET /user/codespaces/{codespace_name}/exports/{export_id}" + ], + getForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}"], + getOrgPublicKey: ["GET /orgs/{org}/codespaces/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/codespaces/secrets/{secret_name}"], + getPublicKeyForAuthenticatedUser: [ + "GET /user/codespaces/secrets/public-key" + ], + getRepoPublicKey: [ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key" + ], + getRepoSecret: [ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" + ], + getSecretForAuthenticatedUser: [ + "GET /user/codespaces/secrets/{secret_name}" + ], + listDevcontainersInRepositoryForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/devcontainers" + ], + listForAuthenticatedUser: ["GET /user/codespaces"], + listInOrganization: [ + "GET /orgs/{org}/codespaces", + {}, + { renamedParameters: { org_id: "org" } } + ], + listInRepositoryForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces" + ], + listOrgSecrets: ["GET /orgs/{org}/codespaces/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/codespaces/secrets"], + listRepositoriesForSecretForAuthenticatedUser: [ + "GET /user/codespaces/secrets/{secret_name}/repositories" + ], + listSecretsForAuthenticatedUser: ["GET /user/codespaces/secrets"], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories" + ], + preFlightWithRepoForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/new" + ], + publishForAuthenticatedUser: [ + "POST /user/codespaces/{codespace_name}/publish" + ], + removeRepositoryForSecretForAuthenticatedUser: [ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + repoMachinesForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/machines" + ], + setRepositoriesForSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}/repositories" + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories" + ], + startForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/start"], + stopForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/stop"], + stopInOrganization: [ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop" + ], + updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"] + }, + copilot: { + addCopilotSeatsForTeams: [ + "POST /orgs/{org}/copilot/billing/selected_teams" + ], + addCopilotSeatsForUsers: [ + "POST /orgs/{org}/copilot/billing/selected_users" + ], + cancelCopilotSeatAssignmentForTeams: [ + "DELETE /orgs/{org}/copilot/billing/selected_teams" + ], + cancelCopilotSeatAssignmentForUsers: [ + "DELETE /orgs/{org}/copilot/billing/selected_users" + ], + getCopilotOrganizationDetails: ["GET /orgs/{org}/copilot/billing"], + getCopilotSeatDetailsForUser: [ + "GET /orgs/{org}/members/{username}/copilot" + ], + listCopilotSeats: ["GET /orgs/{org}/copilot/billing/seats"], + usageMetricsForEnterprise: ["GET /enterprises/{enterprise}/copilot/usage"], + usageMetricsForOrg: ["GET /orgs/{org}/copilot/usage"], + usageMetricsForTeam: ["GET /orgs/{org}/team/{team_slug}/copilot/usage"] + }, + dependabot: { + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}" + ], + createOrUpdateOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}" + ], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" + ], + deleteOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" + ], + getAlert: ["GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"], + getOrgPublicKey: ["GET /orgs/{org}/dependabot/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}"], + getRepoPublicKey: [ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key" + ], + getRepoSecret: [ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" + ], + listAlertsForEnterprise: [ + "GET /enterprises/{enterprise}/dependabot/alerts" + ], + listAlertsForOrg: ["GET /orgs/{org}/dependabot/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/dependabot/alerts"], + listOrgSecrets: ["GET /orgs/{org}/dependabot/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/dependabot/secrets"], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories" + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}" + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories" + ], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}" + ] + }, + dependencyGraph: { + createRepositorySnapshot: [ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots" + ], + diffRange: [ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}" + ], + exportSbom: ["GET /repos/{owner}/{repo}/dependency-graph/sbom"] + }, + emojis: { get: ["GET /emojis"] }, + gists: { + checkIsStarred: ["GET /gists/{gist_id}/star"], + create: ["POST /gists"], + createComment: ["POST /gists/{gist_id}/comments"], + delete: ["DELETE /gists/{gist_id}"], + deleteComment: ["DELETE /gists/{gist_id}/comments/{comment_id}"], + fork: ["POST /gists/{gist_id}/forks"], + get: ["GET /gists/{gist_id}"], + getComment: ["GET /gists/{gist_id}/comments/{comment_id}"], + getRevision: ["GET /gists/{gist_id}/{sha}"], + list: ["GET /gists"], + listComments: ["GET /gists/{gist_id}/comments"], + listCommits: ["GET /gists/{gist_id}/commits"], + listForUser: ["GET /users/{username}/gists"], + listForks: ["GET /gists/{gist_id}/forks"], + listPublic: ["GET /gists/public"], + listStarred: ["GET /gists/starred"], + star: ["PUT /gists/{gist_id}/star"], + unstar: ["DELETE /gists/{gist_id}/star"], + update: ["PATCH /gists/{gist_id}"], + updateComment: ["PATCH /gists/{gist_id}/comments/{comment_id}"] + }, + git: { + createBlob: ["POST /repos/{owner}/{repo}/git/blobs"], + createCommit: ["POST /repos/{owner}/{repo}/git/commits"], + createRef: ["POST /repos/{owner}/{repo}/git/refs"], + createTag: ["POST /repos/{owner}/{repo}/git/tags"], + createTree: ["POST /repos/{owner}/{repo}/git/trees"], + deleteRef: ["DELETE /repos/{owner}/{repo}/git/refs/{ref}"], + getBlob: ["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"], + getCommit: ["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"], + getRef: ["GET /repos/{owner}/{repo}/git/ref/{ref}"], + getTag: ["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"], + getTree: ["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"], + listMatchingRefs: ["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"], + updateRef: ["PATCH /repos/{owner}/{repo}/git/refs/{ref}"] + }, + gitignore: { + getAllTemplates: ["GET /gitignore/templates"], + getTemplate: ["GET /gitignore/templates/{name}"] + }, + interactions: { + getRestrictionsForAuthenticatedUser: ["GET /user/interaction-limits"], + getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits"], + getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits"], + getRestrictionsForYourPublicRepos: [ + "GET /user/interaction-limits", + {}, + { renamed: ["interactions", "getRestrictionsForAuthenticatedUser"] } + ], + removeRestrictionsForAuthenticatedUser: ["DELETE /user/interaction-limits"], + removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits"], + removeRestrictionsForRepo: [ + "DELETE /repos/{owner}/{repo}/interaction-limits" + ], + removeRestrictionsForYourPublicRepos: [ + "DELETE /user/interaction-limits", + {}, + { renamed: ["interactions", "removeRestrictionsForAuthenticatedUser"] } + ], + setRestrictionsForAuthenticatedUser: ["PUT /user/interaction-limits"], + setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits"], + setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits"], + setRestrictionsForYourPublicRepos: [ + "PUT /user/interaction-limits", + {}, + { renamed: ["interactions", "setRestrictionsForAuthenticatedUser"] } + ] + }, + issues: { + addAssignees: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees" + ], + addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"], + checkUserCanBeAssigned: ["GET /repos/{owner}/{repo}/assignees/{assignee}"], + checkUserCanBeAssignedToIssue: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}" + ], + create: ["POST /repos/{owner}/{repo}/issues"], + createComment: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments" + ], + createLabel: ["POST /repos/{owner}/{repo}/labels"], + createMilestone: ["POST /repos/{owner}/{repo}/milestones"], + deleteComment: [ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}" + ], + deleteLabel: ["DELETE /repos/{owner}/{repo}/labels/{name}"], + deleteMilestone: [ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}" + ], + get: ["GET /repos/{owner}/{repo}/issues/{issue_number}"], + getComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"], + getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"], + getLabel: ["GET /repos/{owner}/{repo}/labels/{name}"], + getMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}"], + list: ["GET /issues"], + listAssignees: ["GET /repos/{owner}/{repo}/assignees"], + listComments: ["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"], + listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"], + listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"], + listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"], + listEventsForTimeline: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline" + ], + listForAuthenticatedUser: ["GET /user/issues"], + listForOrg: ["GET /orgs/{org}/issues"], + listForRepo: ["GET /repos/{owner}/{repo}/issues"], + listLabelsForMilestone: [ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels" + ], + listLabelsForRepo: ["GET /repos/{owner}/{repo}/labels"], + listLabelsOnIssue: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels" + ], + listMilestones: ["GET /repos/{owner}/{repo}/milestones"], + lock: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"], + removeAllLabels: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels" + ], + removeAssignees: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees" + ], + removeLabel: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}" + ], + setLabels: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"], + unlock: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"], + update: ["PATCH /repos/{owner}/{repo}/issues/{issue_number}"], + updateComment: ["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"], + updateLabel: ["PATCH /repos/{owner}/{repo}/labels/{name}"], + updateMilestone: [ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}" + ] + }, + licenses: { + get: ["GET /licenses/{license}"], + getAllCommonlyUsed: ["GET /licenses"], + getForRepo: ["GET /repos/{owner}/{repo}/license"] + }, + markdown: { + render: ["POST /markdown"], + renderRaw: [ + "POST /markdown/raw", + { headers: { "content-type": "text/plain; charset=utf-8" } } + ] + }, + meta: { + get: ["GET /meta"], + getAllVersions: ["GET /versions"], + getOctocat: ["GET /octocat"], + getZen: ["GET /zen"], + root: ["GET /"] + }, + migrations: { + deleteArchiveForAuthenticatedUser: [ + "DELETE /user/migrations/{migration_id}/archive" + ], + deleteArchiveForOrg: [ + "DELETE /orgs/{org}/migrations/{migration_id}/archive" + ], + downloadArchiveForOrg: [ + "GET /orgs/{org}/migrations/{migration_id}/archive" + ], + getArchiveForAuthenticatedUser: [ + "GET /user/migrations/{migration_id}/archive" + ], + getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"], + getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"], + listForAuthenticatedUser: ["GET /user/migrations"], + listForOrg: ["GET /orgs/{org}/migrations"], + listReposForAuthenticatedUser: [ + "GET /user/migrations/{migration_id}/repositories" + ], + listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"], + listReposForUser: [ + "GET /user/migrations/{migration_id}/repositories", + {}, + { renamed: ["migrations", "listReposForAuthenticatedUser"] } + ], + startForAuthenticatedUser: ["POST /user/migrations"], + startForOrg: ["POST /orgs/{org}/migrations"], + unlockRepoForAuthenticatedUser: [ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock" + ], + unlockRepoForOrg: [ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock" + ] + }, + oidc: { + getOidcCustomSubTemplateForOrg: [ + "GET /orgs/{org}/actions/oidc/customization/sub" + ], + updateOidcCustomSubTemplateForOrg: [ + "PUT /orgs/{org}/actions/oidc/customization/sub" + ] + }, + orgs: { + addSecurityManagerTeam: [ + "PUT /orgs/{org}/security-managers/teams/{team_slug}" + ], + assignTeamToOrgRole: [ + "PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}" + ], + assignUserToOrgRole: [ + "PUT /orgs/{org}/organization-roles/users/{username}/{role_id}" + ], + blockUser: ["PUT /orgs/{org}/blocks/{username}"], + cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"], + checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"], + checkMembershipForUser: ["GET /orgs/{org}/members/{username}"], + checkPublicMembershipForUser: ["GET /orgs/{org}/public_members/{username}"], + convertMemberToOutsideCollaborator: [ + "PUT /orgs/{org}/outside_collaborators/{username}" + ], + createCustomOrganizationRole: ["POST /orgs/{org}/organization-roles"], + createInvitation: ["POST /orgs/{org}/invitations"], + createOrUpdateCustomProperties: ["PATCH /orgs/{org}/properties/schema"], + createOrUpdateCustomPropertiesValuesForRepos: [ + "PATCH /orgs/{org}/properties/values" + ], + createOrUpdateCustomProperty: [ + "PUT /orgs/{org}/properties/schema/{custom_property_name}" + ], + createWebhook: ["POST /orgs/{org}/hooks"], + delete: ["DELETE /orgs/{org}"], + deleteCustomOrganizationRole: [ + "DELETE /orgs/{org}/organization-roles/{role_id}" + ], + deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"], + enableOrDisableSecurityProductOnAllOrgRepos: [ + "POST /orgs/{org}/{security_product}/{enablement}" + ], + get: ["GET /orgs/{org}"], + getAllCustomProperties: ["GET /orgs/{org}/properties/schema"], + getCustomProperty: [ + "GET /orgs/{org}/properties/schema/{custom_property_name}" + ], + getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"], + getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"], + getOrgRole: ["GET /orgs/{org}/organization-roles/{role_id}"], + getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"], + getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"], + getWebhookDelivery: [ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}" + ], + list: ["GET /organizations"], + listAppInstallations: ["GET /orgs/{org}/installations"], + listBlockedUsers: ["GET /orgs/{org}/blocks"], + listCustomPropertiesValuesForRepos: ["GET /orgs/{org}/properties/values"], + listFailedInvitations: ["GET /orgs/{org}/failed_invitations"], + listForAuthenticatedUser: ["GET /user/orgs"], + listForUser: ["GET /users/{username}/orgs"], + listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"], + listMembers: ["GET /orgs/{org}/members"], + listMembershipsForAuthenticatedUser: ["GET /user/memberships/orgs"], + listOrgRoleTeams: ["GET /orgs/{org}/organization-roles/{role_id}/teams"], + listOrgRoleUsers: ["GET /orgs/{org}/organization-roles/{role_id}/users"], + listOrgRoles: ["GET /orgs/{org}/organization-roles"], + listOrganizationFineGrainedPermissions: [ + "GET /orgs/{org}/organization-fine-grained-permissions" + ], + listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"], + listPatGrantRepositories: [ + "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories" + ], + listPatGrantRequestRepositories: [ + "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories" + ], + listPatGrantRequests: ["GET /orgs/{org}/personal-access-token-requests"], + listPatGrants: ["GET /orgs/{org}/personal-access-tokens"], + listPendingInvitations: ["GET /orgs/{org}/invitations"], + listPublicMembers: ["GET /orgs/{org}/public_members"], + listSecurityManagerTeams: ["GET /orgs/{org}/security-managers"], + listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"], + listWebhooks: ["GET /orgs/{org}/hooks"], + patchCustomOrganizationRole: [ + "PATCH /orgs/{org}/organization-roles/{role_id}" + ], + pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: [ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts" + ], + removeCustomProperty: [ + "DELETE /orgs/{org}/properties/schema/{custom_property_name}" + ], + removeMember: ["DELETE /orgs/{org}/members/{username}"], + removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"], + removeOutsideCollaborator: [ + "DELETE /orgs/{org}/outside_collaborators/{username}" + ], + removePublicMembershipForAuthenticatedUser: [ + "DELETE /orgs/{org}/public_members/{username}" + ], + removeSecurityManagerTeam: [ + "DELETE /orgs/{org}/security-managers/teams/{team_slug}" + ], + reviewPatGrantRequest: [ + "POST /orgs/{org}/personal-access-token-requests/{pat_request_id}" + ], + reviewPatGrantRequestsInBulk: [ + "POST /orgs/{org}/personal-access-token-requests" + ], + revokeAllOrgRolesTeam: [ + "DELETE /orgs/{org}/organization-roles/teams/{team_slug}" + ], + revokeAllOrgRolesUser: [ + "DELETE /orgs/{org}/organization-roles/users/{username}" + ], + revokeOrgRoleTeam: [ + "DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}" + ], + revokeOrgRoleUser: [ + "DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}" + ], + setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"], + setPublicMembershipForAuthenticatedUser: [ + "PUT /orgs/{org}/public_members/{username}" + ], + unblockUser: ["DELETE /orgs/{org}/blocks/{username}"], + update: ["PATCH /orgs/{org}"], + updateMembershipForAuthenticatedUser: [ + "PATCH /user/memberships/orgs/{org}" + ], + updatePatAccess: ["POST /orgs/{org}/personal-access-tokens/{pat_id}"], + updatePatAccesses: ["POST /orgs/{org}/personal-access-tokens"], + updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"], + updateWebhookConfigForOrg: ["PATCH /orgs/{org}/hooks/{hook_id}/config"] + }, + packages: { + deletePackageForAuthenticatedUser: [ + "DELETE /user/packages/{package_type}/{package_name}" + ], + deletePackageForOrg: [ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}" + ], + deletePackageForUser: [ + "DELETE /users/{username}/packages/{package_type}/{package_name}" + ], + deletePackageVersionForAuthenticatedUser: [ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + deletePackageVersionForOrg: [ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + deletePackageVersionForUser: [ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + getAllPackageVersionsForAPackageOwnedByAnOrg: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + {}, + { renamed: ["packages", "getAllPackageVersionsForPackageOwnedByOrg"] } + ], + getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions", + {}, + { + renamed: [ + "packages", + "getAllPackageVersionsForPackageOwnedByAuthenticatedUser" + ] + } + ], + getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions" + ], + getAllPackageVersionsForPackageOwnedByOrg: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions" + ], + getAllPackageVersionsForPackageOwnedByUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}/versions" + ], + getPackageForAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}" + ], + getPackageForOrganization: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}" + ], + getPackageForUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}" + ], + getPackageVersionForAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + getPackageVersionForOrganization: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + getPackageVersionForUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + listDockerMigrationConflictingPackagesForAuthenticatedUser: [ + "GET /user/docker/conflicts" + ], + listDockerMigrationConflictingPackagesForOrganization: [ + "GET /orgs/{org}/docker/conflicts" + ], + listDockerMigrationConflictingPackagesForUser: [ + "GET /users/{username}/docker/conflicts" + ], + listPackagesForAuthenticatedUser: ["GET /user/packages"], + listPackagesForOrganization: ["GET /orgs/{org}/packages"], + listPackagesForUser: ["GET /users/{username}/packages"], + restorePackageForAuthenticatedUser: [ + "POST /user/packages/{package_type}/{package_name}/restore{?token}" + ], + restorePackageForOrg: [ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}" + ], + restorePackageForUser: [ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}" + ], + restorePackageVersionForAuthenticatedUser: [ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" + ], + restorePackageVersionForOrg: [ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" + ], + restorePackageVersionForUser: [ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" + ] + }, + projects: { + addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}"], + createCard: ["POST /projects/columns/{column_id}/cards"], + createColumn: ["POST /projects/{project_id}/columns"], + createForAuthenticatedUser: ["POST /user/projects"], + createForOrg: ["POST /orgs/{org}/projects"], + createForRepo: ["POST /repos/{owner}/{repo}/projects"], + delete: ["DELETE /projects/{project_id}"], + deleteCard: ["DELETE /projects/columns/cards/{card_id}"], + deleteColumn: ["DELETE /projects/columns/{column_id}"], + get: ["GET /projects/{project_id}"], + getCard: ["GET /projects/columns/cards/{card_id}"], + getColumn: ["GET /projects/columns/{column_id}"], + getPermissionForUser: [ + "GET /projects/{project_id}/collaborators/{username}/permission" + ], + listCards: ["GET /projects/columns/{column_id}/cards"], + listCollaborators: ["GET /projects/{project_id}/collaborators"], + listColumns: ["GET /projects/{project_id}/columns"], + listForOrg: ["GET /orgs/{org}/projects"], + listForRepo: ["GET /repos/{owner}/{repo}/projects"], + listForUser: ["GET /users/{username}/projects"], + moveCard: ["POST /projects/columns/cards/{card_id}/moves"], + moveColumn: ["POST /projects/columns/{column_id}/moves"], + removeCollaborator: [ + "DELETE /projects/{project_id}/collaborators/{username}" + ], + update: ["PATCH /projects/{project_id}"], + updateCard: ["PATCH /projects/columns/cards/{card_id}"], + updateColumn: ["PATCH /projects/columns/{column_id}"] + }, + pulls: { + checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"], + create: ["POST /repos/{owner}/{repo}/pulls"], + createReplyForReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies" + ], + createReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], + createReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments" + ], + deletePendingReview: [ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" + ], + deleteReviewComment: [ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}" + ], + dismissReview: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals" + ], + get: ["GET /repos/{owner}/{repo}/pulls/{pull_number}"], + getReview: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" + ], + getReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"], + list: ["GET /repos/{owner}/{repo}/pulls"], + listCommentsForReview: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments" + ], + listCommits: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"], + listFiles: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"], + listRequestedReviewers: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" + ], + listReviewComments: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments" + ], + listReviewCommentsForRepo: ["GET /repos/{owner}/{repo}/pulls/comments"], + listReviews: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], + merge: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"], + removeRequestedReviewers: [ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" + ], + requestReviewers: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" + ], + submitReview: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events" + ], + update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"], + updateBranch: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch" + ], + updateReview: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" + ], + updateReviewComment: [ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}" + ] + }, + rateLimit: { get: ["GET /rate_limit"] }, + reactions: { + createForCommitComment: [ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions" + ], + createForIssue: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions" + ], + createForIssueComment: [ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions" + ], + createForPullRequestReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions" + ], + createForRelease: [ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions" + ], + createForTeamDiscussionCommentInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions" + ], + createForTeamDiscussionInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions" + ], + deleteForCommitComment: [ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}" + ], + deleteForIssue: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}" + ], + deleteForIssueComment: [ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}" + ], + deleteForPullRequestComment: [ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}" + ], + deleteForRelease: [ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}" + ], + deleteForTeamDiscussion: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}" + ], + deleteForTeamDiscussionComment: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}" + ], + listForCommitComment: [ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions" + ], + listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"], + listForIssueComment: [ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions" + ], + listForPullRequestReviewComment: [ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions" + ], + listForRelease: [ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions" + ], + listForTeamDiscussionCommentInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions" + ], + listForTeamDiscussionInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions" + ] + }, + repos: { + acceptInvitation: [ + "PATCH /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "acceptInvitationForAuthenticatedUser"] } + ], + acceptInvitationForAuthenticatedUser: [ + "PATCH /user/repository_invitations/{invitation_id}" + ], + addAppAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" } + ], + addCollaborator: ["PUT /repos/{owner}/{repo}/collaborators/{username}"], + addStatusCheckContexts: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" } + ], + addTeamAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" } + ], + addUserAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" } + ], + cancelPagesDeployment: [ + "POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel" + ], + checkAutomatedSecurityFixes: [ + "GET /repos/{owner}/{repo}/automated-security-fixes" + ], + checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"], + checkPrivateVulnerabilityReporting: [ + "GET /repos/{owner}/{repo}/private-vulnerability-reporting" + ], + checkVulnerabilityAlerts: [ + "GET /repos/{owner}/{repo}/vulnerability-alerts" + ], + codeownersErrors: ["GET /repos/{owner}/{repo}/codeowners/errors"], + compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"], + compareCommitsWithBasehead: [ + "GET /repos/{owner}/{repo}/compare/{basehead}" + ], + createAutolink: ["POST /repos/{owner}/{repo}/autolinks"], + createCommitComment: [ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments" + ], + createCommitSignatureProtection: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" + ], + createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"], + createDeployKey: ["POST /repos/{owner}/{repo}/keys"], + createDeployment: ["POST /repos/{owner}/{repo}/deployments"], + createDeploymentBranchPolicy: [ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies" + ], + createDeploymentProtectionRule: [ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules" + ], + createDeploymentStatus: [ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses" + ], + createDispatchEvent: ["POST /repos/{owner}/{repo}/dispatches"], + createForAuthenticatedUser: ["POST /user/repos"], + createFork: ["POST /repos/{owner}/{repo}/forks"], + createInOrg: ["POST /orgs/{org}/repos"], + createOrUpdateCustomPropertiesValues: [ + "PATCH /repos/{owner}/{repo}/properties/values" + ], + createOrUpdateEnvironment: [ + "PUT /repos/{owner}/{repo}/environments/{environment_name}" + ], + createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"], + createOrgRuleset: ["POST /orgs/{org}/rulesets"], + createPagesDeployment: ["POST /repos/{owner}/{repo}/pages/deployments"], + createPagesSite: ["POST /repos/{owner}/{repo}/pages"], + createRelease: ["POST /repos/{owner}/{repo}/releases"], + createRepoRuleset: ["POST /repos/{owner}/{repo}/rulesets"], + createTagProtection: ["POST /repos/{owner}/{repo}/tags/protection"], + createUsingTemplate: [ + "POST /repos/{template_owner}/{template_repo}/generate" + ], + createWebhook: ["POST /repos/{owner}/{repo}/hooks"], + declineInvitation: [ + "DELETE /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "declineInvitationForAuthenticatedUser"] } + ], + declineInvitationForAuthenticatedUser: [ + "DELETE /user/repository_invitations/{invitation_id}" + ], + delete: ["DELETE /repos/{owner}/{repo}"], + deleteAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions" + ], + deleteAdminBranchProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" + ], + deleteAnEnvironment: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}" + ], + deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"], + deleteBranchProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection" + ], + deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"], + deleteCommitSignatureProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" + ], + deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"], + deleteDeployment: [ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}" + ], + deleteDeploymentBranchPolicy: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" + ], + deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"], + deleteInvitation: [ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}" + ], + deleteOrgRuleset: ["DELETE /orgs/{org}/rulesets/{ruleset_id}"], + deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"], + deletePullRequestReviewProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" + ], + deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"], + deleteReleaseAsset: [ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}" + ], + deleteRepoRuleset: ["DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}"], + deleteTagProtection: [ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}" + ], + deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"], + disableAutomatedSecurityFixes: [ + "DELETE /repos/{owner}/{repo}/automated-security-fixes" + ], + disableDeploymentProtectionRule: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}" + ], + disablePrivateVulnerabilityReporting: [ + "DELETE /repos/{owner}/{repo}/private-vulnerability-reporting" + ], + disableVulnerabilityAlerts: [ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts" + ], + downloadArchive: [ + "GET /repos/{owner}/{repo}/zipball/{ref}", + {}, + { renamed: ["repos", "downloadZipballArchive"] } + ], + downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"], + downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"], + enableAutomatedSecurityFixes: [ + "PUT /repos/{owner}/{repo}/automated-security-fixes" + ], + enablePrivateVulnerabilityReporting: [ + "PUT /repos/{owner}/{repo}/private-vulnerability-reporting" + ], + enableVulnerabilityAlerts: [ + "PUT /repos/{owner}/{repo}/vulnerability-alerts" + ], + generateReleaseNotes: [ + "POST /repos/{owner}/{repo}/releases/generate-notes" + ], + get: ["GET /repos/{owner}/{repo}"], + getAccessRestrictions: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions" + ], + getAdminBranchProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" + ], + getAllDeploymentProtectionRules: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules" + ], + getAllEnvironments: ["GET /repos/{owner}/{repo}/environments"], + getAllStatusCheckContexts: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts" + ], + getAllTopics: ["GET /repos/{owner}/{repo}/topics"], + getAppsWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps" + ], + getAutolink: ["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"], + getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"], + getBranchProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection" + ], + getBranchRules: ["GET /repos/{owner}/{repo}/rules/branches/{branch}"], + getClones: ["GET /repos/{owner}/{repo}/traffic/clones"], + getCodeFrequencyStats: ["GET /repos/{owner}/{repo}/stats/code_frequency"], + getCollaboratorPermissionLevel: [ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission" + ], + getCombinedStatusForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/status"], + getCommit: ["GET /repos/{owner}/{repo}/commits/{ref}"], + getCommitActivityStats: ["GET /repos/{owner}/{repo}/stats/commit_activity"], + getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"], + getCommitSignatureProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" + ], + getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"], + getContent: ["GET /repos/{owner}/{repo}/contents/{path}"], + getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"], + getCustomDeploymentProtectionRule: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}" + ], + getCustomPropertiesValues: ["GET /repos/{owner}/{repo}/properties/values"], + getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"], + getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"], + getDeploymentBranchPolicy: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" + ], + getDeploymentStatus: [ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}" + ], + getEnvironment: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}" + ], + getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"], + getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"], + getOrgRuleSuite: ["GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}"], + getOrgRuleSuites: ["GET /orgs/{org}/rulesets/rule-suites"], + getOrgRuleset: ["GET /orgs/{org}/rulesets/{ruleset_id}"], + getOrgRulesets: ["GET /orgs/{org}/rulesets"], + getPages: ["GET /repos/{owner}/{repo}/pages"], + getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"], + getPagesDeployment: [ + "GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}" + ], + getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"], + getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"], + getPullRequestReviewProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" + ], + getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"], + getReadme: ["GET /repos/{owner}/{repo}/readme"], + getReadmeInDirectory: ["GET /repos/{owner}/{repo}/readme/{dir}"], + getRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}"], + getReleaseAsset: ["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"], + getReleaseByTag: ["GET /repos/{owner}/{repo}/releases/tags/{tag}"], + getRepoRuleSuite: [ + "GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}" + ], + getRepoRuleSuites: ["GET /repos/{owner}/{repo}/rulesets/rule-suites"], + getRepoRuleset: ["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"], + getRepoRulesets: ["GET /repos/{owner}/{repo}/rulesets"], + getStatusChecksProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" + ], + getTeamsWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams" + ], + getTopPaths: ["GET /repos/{owner}/{repo}/traffic/popular/paths"], + getTopReferrers: ["GET /repos/{owner}/{repo}/traffic/popular/referrers"], + getUsersWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users" + ], + getViews: ["GET /repos/{owner}/{repo}/traffic/views"], + getWebhook: ["GET /repos/{owner}/{repo}/hooks/{hook_id}"], + getWebhookConfigForRepo: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config" + ], + getWebhookDelivery: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}" + ], + listActivities: ["GET /repos/{owner}/{repo}/activity"], + listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"], + listBranches: ["GET /repos/{owner}/{repo}/branches"], + listBranchesForHeadCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head" + ], + listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"], + listCommentsForCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments" + ], + listCommitCommentsForRepo: ["GET /repos/{owner}/{repo}/comments"], + listCommitStatusesForRef: [ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses" + ], + listCommits: ["GET /repos/{owner}/{repo}/commits"], + listContributors: ["GET /repos/{owner}/{repo}/contributors"], + listCustomDeploymentRuleIntegrations: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps" + ], + listDeployKeys: ["GET /repos/{owner}/{repo}/keys"], + listDeploymentBranchPolicies: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies" + ], + listDeploymentStatuses: [ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses" + ], + listDeployments: ["GET /repos/{owner}/{repo}/deployments"], + listForAuthenticatedUser: ["GET /user/repos"], + listForOrg: ["GET /orgs/{org}/repos"], + listForUser: ["GET /users/{username}/repos"], + listForks: ["GET /repos/{owner}/{repo}/forks"], + listInvitations: ["GET /repos/{owner}/{repo}/invitations"], + listInvitationsForAuthenticatedUser: ["GET /user/repository_invitations"], + listLanguages: ["GET /repos/{owner}/{repo}/languages"], + listPagesBuilds: ["GET /repos/{owner}/{repo}/pages/builds"], + listPublic: ["GET /repositories"], + listPullRequestsAssociatedWithCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls" + ], + listReleaseAssets: [ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets" + ], + listReleases: ["GET /repos/{owner}/{repo}/releases"], + listTagProtection: ["GET /repos/{owner}/{repo}/tags/protection"], + listTags: ["GET /repos/{owner}/{repo}/tags"], + listTeams: ["GET /repos/{owner}/{repo}/teams"], + listWebhookDeliveries: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries" + ], + listWebhooks: ["GET /repos/{owner}/{repo}/hooks"], + merge: ["POST /repos/{owner}/{repo}/merges"], + mergeUpstream: ["POST /repos/{owner}/{repo}/merge-upstream"], + pingWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: [ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts" + ], + removeAppAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" } + ], + removeCollaborator: [ + "DELETE /repos/{owner}/{repo}/collaborators/{username}" + ], + removeStatusCheckContexts: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" } + ], + removeStatusCheckProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" + ], + removeTeamAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" } + ], + removeUserAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" } + ], + renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"], + replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics"], + requestPagesBuild: ["POST /repos/{owner}/{repo}/pages/builds"], + setAdminBranchProtection: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" + ], + setAppAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" } + ], + setStatusCheckContexts: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" } + ], + setTeamAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" } + ], + setUserAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" } + ], + testPushWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"], + transfer: ["POST /repos/{owner}/{repo}/transfer"], + update: ["PATCH /repos/{owner}/{repo}"], + updateBranchProtection: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection" + ], + updateCommitComment: ["PATCH /repos/{owner}/{repo}/comments/{comment_id}"], + updateDeploymentBranchPolicy: [ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" + ], + updateInformationAboutPagesSite: ["PUT /repos/{owner}/{repo}/pages"], + updateInvitation: [ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}" + ], + updateOrgRuleset: ["PUT /orgs/{org}/rulesets/{ruleset_id}"], + updatePullRequestReviewProtection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" + ], + updateRelease: ["PATCH /repos/{owner}/{repo}/releases/{release_id}"], + updateReleaseAsset: [ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}" + ], + updateRepoRuleset: ["PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}"], + updateStatusCheckPotection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", + {}, + { renamed: ["repos", "updateStatusCheckProtection"] } + ], + updateStatusCheckProtection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" + ], + updateWebhook: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"], + updateWebhookConfigForRepo: [ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config" + ], + uploadReleaseAsset: [ + "POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}", + { baseUrl: "https://uploads.github.com" } + ] + }, + search: { + code: ["GET /search/code"], + commits: ["GET /search/commits"], + issuesAndPullRequests: ["GET /search/issues"], + labels: ["GET /search/labels"], + repos: ["GET /search/repositories"], + topics: ["GET /search/topics"], + users: ["GET /search/users"] + }, + secretScanning: { + getAlert: [ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" + ], + listAlertsForEnterprise: [ + "GET /enterprises/{enterprise}/secret-scanning/alerts" + ], + listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"], + listLocationsForAlert: [ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations" + ], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" + ] + }, + securityAdvisories: { + createFork: [ + "POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks" + ], + createPrivateVulnerabilityReport: [ + "POST /repos/{owner}/{repo}/security-advisories/reports" + ], + createRepositoryAdvisory: [ + "POST /repos/{owner}/{repo}/security-advisories" + ], + createRepositoryAdvisoryCveRequest: [ + "POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve" + ], + getGlobalAdvisory: ["GET /advisories/{ghsa_id}"], + getRepositoryAdvisory: [ + "GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}" + ], + listGlobalAdvisories: ["GET /advisories"], + listOrgRepositoryAdvisories: ["GET /orgs/{org}/security-advisories"], + listRepositoryAdvisories: ["GET /repos/{owner}/{repo}/security-advisories"], + updateRepositoryAdvisory: [ + "PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}" + ] + }, + teams: { + addOrUpdateMembershipForUserInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}" + ], + addOrUpdateProjectPermissionsInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}" + ], + addOrUpdateRepoPermissionsInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" + ], + checkPermissionsForProjectInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}" + ], + checkPermissionsForRepoInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" + ], + create: ["POST /orgs/{org}/teams"], + createDiscussionCommentInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments" + ], + createDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions"], + deleteDiscussionCommentInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" + ], + deleteDiscussionInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" + ], + deleteInOrg: ["DELETE /orgs/{org}/teams/{team_slug}"], + getByName: ["GET /orgs/{org}/teams/{team_slug}"], + getDiscussionCommentInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" + ], + getDiscussionInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" + ], + getMembershipForUserInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}" + ], + list: ["GET /orgs/{org}/teams"], + listChildInOrg: ["GET /orgs/{org}/teams/{team_slug}/teams"], + listDiscussionCommentsInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments" + ], + listDiscussionsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions"], + listForAuthenticatedUser: ["GET /user/teams"], + listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"], + listPendingInvitationsInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/invitations" + ], + listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects"], + listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"], + removeMembershipForUserInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}" + ], + removeProjectInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}" + ], + removeRepoInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" + ], + updateDiscussionCommentInOrg: [ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" + ], + updateDiscussionInOrg: [ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" + ], + updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"] + }, + users: { + addEmailForAuthenticated: [ + "POST /user/emails", + {}, + { renamed: ["users", "addEmailForAuthenticatedUser"] } + ], + addEmailForAuthenticatedUser: ["POST /user/emails"], + addSocialAccountForAuthenticatedUser: ["POST /user/social_accounts"], + block: ["PUT /user/blocks/{username}"], + checkBlocked: ["GET /user/blocks/{username}"], + checkFollowingForUser: ["GET /users/{username}/following/{target_user}"], + checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"], + createGpgKeyForAuthenticated: [ + "POST /user/gpg_keys", + {}, + { renamed: ["users", "createGpgKeyForAuthenticatedUser"] } + ], + createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"], + createPublicSshKeyForAuthenticated: [ + "POST /user/keys", + {}, + { renamed: ["users", "createPublicSshKeyForAuthenticatedUser"] } + ], + createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"], + createSshSigningKeyForAuthenticatedUser: ["POST /user/ssh_signing_keys"], + deleteEmailForAuthenticated: [ + "DELETE /user/emails", + {}, + { renamed: ["users", "deleteEmailForAuthenticatedUser"] } + ], + deleteEmailForAuthenticatedUser: ["DELETE /user/emails"], + deleteGpgKeyForAuthenticated: [ + "DELETE /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "deleteGpgKeyForAuthenticatedUser"] } + ], + deleteGpgKeyForAuthenticatedUser: ["DELETE /user/gpg_keys/{gpg_key_id}"], + deletePublicSshKeyForAuthenticated: [ + "DELETE /user/keys/{key_id}", + {}, + { renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"] } + ], + deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"], + deleteSocialAccountForAuthenticatedUser: ["DELETE /user/social_accounts"], + deleteSshSigningKeyForAuthenticatedUser: [ + "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}" + ], + follow: ["PUT /user/following/{username}"], + getAuthenticated: ["GET /user"], + getByUsername: ["GET /users/{username}"], + getContextForUser: ["GET /users/{username}/hovercard"], + getGpgKeyForAuthenticated: [ + "GET /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "getGpgKeyForAuthenticatedUser"] } + ], + getGpgKeyForAuthenticatedUser: ["GET /user/gpg_keys/{gpg_key_id}"], + getPublicSshKeyForAuthenticated: [ + "GET /user/keys/{key_id}", + {}, + { renamed: ["users", "getPublicSshKeyForAuthenticatedUser"] } + ], + getPublicSshKeyForAuthenticatedUser: ["GET /user/keys/{key_id}"], + getSshSigningKeyForAuthenticatedUser: [ + "GET /user/ssh_signing_keys/{ssh_signing_key_id}" + ], + list: ["GET /users"], + listBlockedByAuthenticated: [ + "GET /user/blocks", + {}, + { renamed: ["users", "listBlockedByAuthenticatedUser"] } + ], + listBlockedByAuthenticatedUser: ["GET /user/blocks"], + listEmailsForAuthenticated: [ + "GET /user/emails", + {}, + { renamed: ["users", "listEmailsForAuthenticatedUser"] } + ], + listEmailsForAuthenticatedUser: ["GET /user/emails"], + listFollowedByAuthenticated: [ + "GET /user/following", + {}, + { renamed: ["users", "listFollowedByAuthenticatedUser"] } + ], + listFollowedByAuthenticatedUser: ["GET /user/following"], + listFollowersForAuthenticatedUser: ["GET /user/followers"], + listFollowersForUser: ["GET /users/{username}/followers"], + listFollowingForUser: ["GET /users/{username}/following"], + listGpgKeysForAuthenticated: [ + "GET /user/gpg_keys", + {}, + { renamed: ["users", "listGpgKeysForAuthenticatedUser"] } + ], + listGpgKeysForAuthenticatedUser: ["GET /user/gpg_keys"], + listGpgKeysForUser: ["GET /users/{username}/gpg_keys"], + listPublicEmailsForAuthenticated: [ + "GET /user/public_emails", + {}, + { renamed: ["users", "listPublicEmailsForAuthenticatedUser"] } + ], + listPublicEmailsForAuthenticatedUser: ["GET /user/public_emails"], + listPublicKeysForUser: ["GET /users/{username}/keys"], + listPublicSshKeysForAuthenticated: [ + "GET /user/keys", + {}, + { renamed: ["users", "listPublicSshKeysForAuthenticatedUser"] } + ], + listPublicSshKeysForAuthenticatedUser: ["GET /user/keys"], + listSocialAccountsForAuthenticatedUser: ["GET /user/social_accounts"], + listSocialAccountsForUser: ["GET /users/{username}/social_accounts"], + listSshSigningKeysForAuthenticatedUser: ["GET /user/ssh_signing_keys"], + listSshSigningKeysForUser: ["GET /users/{username}/ssh_signing_keys"], + setPrimaryEmailVisibilityForAuthenticated: [ + "PATCH /user/email/visibility", + {}, + { renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"] } + ], + setPrimaryEmailVisibilityForAuthenticatedUser: [ + "PATCH /user/email/visibility" + ], + unblock: ["DELETE /user/blocks/{username}"], + unfollow: ["DELETE /user/following/{username}"], + updateAuthenticated: ["PATCH /user"] + } +}; +var endpoints_default = Endpoints; +export { + endpoints_default as default +}; +//# sourceMappingURL=endpoints.js.map diff --git a/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js.map b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js.map new file mode 100644 index 000000000..1a9083024 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../../src/generated/endpoints.ts"], + "sourcesContent": ["import type { EndpointsDefaultsAndDecorations } from \"../types.js\";\nconst Endpoints: EndpointsDefaultsAndDecorations = {\n actions: {\n addCustomLabelsToSelfHostedRunnerForOrg: [\n \"POST /orgs/{org}/actions/runners/{runner_id}/labels\",\n ],\n addCustomLabelsToSelfHostedRunnerForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\",\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n addSelectedRepoToOrgVariable: [\n \"PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}\",\n ],\n approveWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve\",\n ],\n cancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel\",\n ],\n createEnvironmentVariable: [\n \"POST /repos/{owner}/{repo}/environments/{environment_name}/variables\",\n ],\n createOrUpdateEnvironmentSecret: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}\",\n ],\n createOrUpdateOrgSecret: [\"PUT /orgs/{org}/actions/secrets/{secret_name}\"],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}\",\n ],\n createOrgVariable: [\"POST /orgs/{org}/actions/variables\"],\n createRegistrationTokenForOrg: [\n \"POST /orgs/{org}/actions/runners/registration-token\",\n ],\n createRegistrationTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/registration-token\",\n ],\n createRemoveTokenForOrg: [\"POST /orgs/{org}/actions/runners/remove-token\"],\n createRemoveTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/remove-token\",\n ],\n createRepoVariable: [\"POST /repos/{owner}/{repo}/actions/variables\"],\n createWorkflowDispatch: [\n \"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches\",\n ],\n deleteActionsCacheById: [\n \"DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}\",\n ],\n deleteActionsCacheByKey: [\n \"DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}\",\n ],\n deleteArtifact: [\n \"DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\",\n ],\n deleteEnvironmentSecret: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}\",\n ],\n deleteEnvironmentVariable: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}\",\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/actions/secrets/{secret_name}\"],\n deleteOrgVariable: [\"DELETE /orgs/{org}/actions/variables/{name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}\",\n ],\n deleteRepoVariable: [\n \"DELETE /repos/{owner}/{repo}/actions/variables/{name}\",\n ],\n deleteSelfHostedRunnerFromOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}\",\n ],\n deleteSelfHostedRunnerFromRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}\",\n ],\n deleteWorkflowRun: [\"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n deleteWorkflowRunLogs: [\n \"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs\",\n ],\n disableSelectedRepositoryGithubActionsOrganization: [\n \"DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}\",\n ],\n disableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable\",\n ],\n downloadArtifact: [\n \"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}\",\n ],\n downloadJobLogsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs\",\n ],\n downloadWorkflowRunAttemptLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs\",\n ],\n downloadWorkflowRunLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs\",\n ],\n enableSelectedRepositoryGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories/{repository_id}\",\n ],\n enableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable\",\n ],\n forceCancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel\",\n ],\n generateRunnerJitconfigForOrg: [\n \"POST /orgs/{org}/actions/runners/generate-jitconfig\",\n ],\n generateRunnerJitconfigForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig\",\n ],\n getActionsCacheList: [\"GET /repos/{owner}/{repo}/actions/caches\"],\n getActionsCacheUsage: [\"GET /repos/{owner}/{repo}/actions/cache/usage\"],\n getActionsCacheUsageByRepoForOrg: [\n \"GET /orgs/{org}/actions/cache/usage-by-repository\",\n ],\n getActionsCacheUsageForOrg: [\"GET /orgs/{org}/actions/cache/usage\"],\n getAllowedActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/selected-actions\",\n ],\n getAllowedActionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/selected-actions\",\n ],\n getArtifact: [\"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"],\n getCustomOidcSubClaimForRepo: [\n \"GET /repos/{owner}/{repo}/actions/oidc/customization/sub\",\n ],\n getEnvironmentPublicKey: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key\",\n ],\n getEnvironmentSecret: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}\",\n ],\n getEnvironmentVariable: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}\",\n ],\n getGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/workflow\",\n ],\n getGithubActionsDefaultWorkflowPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/workflow\",\n ],\n getGithubActionsPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions\",\n ],\n getGithubActionsPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n ],\n getJobForWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/jobs/{job_id}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/actions/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/actions/secrets/{secret_name}\"],\n getOrgVariable: [\"GET /orgs/{org}/actions/variables/{name}\"],\n getPendingDeploymentsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\",\n ],\n getRepoPermissions: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n {},\n { renamed: [\"actions\", \"getGithubActionsPermissionsRepository\"] },\n ],\n getRepoPublicKey: [\"GET /repos/{owner}/{repo}/actions/secrets/public-key\"],\n getRepoSecret: [\"GET /repos/{owner}/{repo}/actions/secrets/{secret_name}\"],\n getRepoVariable: [\"GET /repos/{owner}/{repo}/actions/variables/{name}\"],\n getReviewsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals\",\n ],\n getSelfHostedRunnerForOrg: [\"GET /orgs/{org}/actions/runners/{runner_id}\"],\n getSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}\",\n ],\n getWorkflow: [\"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}\"],\n getWorkflowAccessToRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/access\",\n ],\n getWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n getWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}\",\n ],\n getWorkflowRunUsage: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing\",\n ],\n getWorkflowUsage: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing\",\n ],\n listArtifactsForRepo: [\"GET /repos/{owner}/{repo}/actions/artifacts\"],\n listEnvironmentSecrets: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/secrets\",\n ],\n listEnvironmentVariables: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/variables\",\n ],\n listJobsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\",\n ],\n listJobsForWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\",\n ],\n listLabelsForSelfHostedRunnerForOrg: [\n \"GET /orgs/{org}/actions/runners/{runner_id}/labels\",\n ],\n listLabelsForSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\",\n ],\n listOrgSecrets: [\"GET /orgs/{org}/actions/secrets\"],\n listOrgVariables: [\"GET /orgs/{org}/actions/variables\"],\n listRepoOrganizationSecrets: [\n \"GET /repos/{owner}/{repo}/actions/organization-secrets\",\n ],\n listRepoOrganizationVariables: [\n \"GET /repos/{owner}/{repo}/actions/organization-variables\",\n ],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/actions/secrets\"],\n listRepoVariables: [\"GET /repos/{owner}/{repo}/actions/variables\"],\n listRepoWorkflows: [\"GET /repos/{owner}/{repo}/actions/workflows\"],\n listRunnerApplicationsForOrg: [\"GET /orgs/{org}/actions/runners/downloads\"],\n listRunnerApplicationsForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/downloads\",\n ],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n ],\n listSelectedReposForOrgVariable: [\n \"GET /orgs/{org}/actions/variables/{name}/repositories\",\n ],\n listSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/repositories\",\n ],\n listSelfHostedRunnersForOrg: [\"GET /orgs/{org}/actions/runners\"],\n listSelfHostedRunnersForRepo: [\"GET /repos/{owner}/{repo}/actions/runners\"],\n listWorkflowRunArtifacts: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\",\n ],\n listWorkflowRuns: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\",\n ],\n listWorkflowRunsForRepo: [\"GET /repos/{owner}/{repo}/actions/runs\"],\n reRunJobForWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun\",\n ],\n reRunWorkflow: [\"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun\"],\n reRunWorkflowFailedJobs: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs\",\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels\",\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\",\n ],\n removeCustomLabelFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}\",\n ],\n removeCustomLabelFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}\",\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n removeSelectedRepoFromOrgVariable: [\n \"DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}\",\n ],\n reviewCustomGatesForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule\",\n ],\n reviewPendingDeploymentsForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\",\n ],\n setAllowedActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/selected-actions\",\n ],\n setAllowedActionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/selected-actions\",\n ],\n setCustomLabelsForSelfHostedRunnerForOrg: [\n \"PUT /orgs/{org}/actions/runners/{runner_id}/labels\",\n ],\n setCustomLabelsForSelfHostedRunnerForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\",\n ],\n setCustomOidcSubClaimForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/oidc/customization/sub\",\n ],\n setGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/workflow\",\n ],\n setGithubActionsDefaultWorkflowPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/workflow\",\n ],\n setGithubActionsPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions\",\n ],\n setGithubActionsPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions\",\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n ],\n setSelectedReposForOrgVariable: [\n \"PUT /orgs/{org}/actions/variables/{name}/repositories\",\n ],\n setSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories\",\n ],\n setWorkflowAccessToRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/access\",\n ],\n updateEnvironmentVariable: [\n \"PATCH /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}\",\n ],\n updateOrgVariable: [\"PATCH /orgs/{org}/actions/variables/{name}\"],\n updateRepoVariable: [\n \"PATCH /repos/{owner}/{repo}/actions/variables/{name}\",\n ],\n },\n activity: {\n checkRepoIsStarredByAuthenticatedUser: [\"GET /user/starred/{owner}/{repo}\"],\n deleteRepoSubscription: [\"DELETE /repos/{owner}/{repo}/subscription\"],\n deleteThreadSubscription: [\n \"DELETE /notifications/threads/{thread_id}/subscription\",\n ],\n getFeeds: [\"GET /feeds\"],\n getRepoSubscription: [\"GET /repos/{owner}/{repo}/subscription\"],\n getThread: [\"GET /notifications/threads/{thread_id}\"],\n getThreadSubscriptionForAuthenticatedUser: [\n \"GET /notifications/threads/{thread_id}/subscription\",\n ],\n listEventsForAuthenticatedUser: [\"GET /users/{username}/events\"],\n listNotificationsForAuthenticatedUser: [\"GET /notifications\"],\n listOrgEventsForAuthenticatedUser: [\n \"GET /users/{username}/events/orgs/{org}\",\n ],\n listPublicEvents: [\"GET /events\"],\n listPublicEventsForRepoNetwork: [\"GET /networks/{owner}/{repo}/events\"],\n listPublicEventsForUser: [\"GET /users/{username}/events/public\"],\n listPublicOrgEvents: [\"GET /orgs/{org}/events\"],\n listReceivedEventsForUser: [\"GET /users/{username}/received_events\"],\n listReceivedPublicEventsForUser: [\n \"GET /users/{username}/received_events/public\",\n ],\n listRepoEvents: [\"GET /repos/{owner}/{repo}/events\"],\n listRepoNotificationsForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/notifications\",\n ],\n listReposStarredByAuthenticatedUser: [\"GET /user/starred\"],\n listReposStarredByUser: [\"GET /users/{username}/starred\"],\n listReposWatchedByUser: [\"GET /users/{username}/subscriptions\"],\n listStargazersForRepo: [\"GET /repos/{owner}/{repo}/stargazers\"],\n listWatchedReposForAuthenticatedUser: [\"GET /user/subscriptions\"],\n listWatchersForRepo: [\"GET /repos/{owner}/{repo}/subscribers\"],\n markNotificationsAsRead: [\"PUT /notifications\"],\n markRepoNotificationsAsRead: [\"PUT /repos/{owner}/{repo}/notifications\"],\n markThreadAsDone: [\"DELETE /notifications/threads/{thread_id}\"],\n markThreadAsRead: [\"PATCH /notifications/threads/{thread_id}\"],\n setRepoSubscription: [\"PUT /repos/{owner}/{repo}/subscription\"],\n setThreadSubscription: [\n \"PUT /notifications/threads/{thread_id}/subscription\",\n ],\n starRepoForAuthenticatedUser: [\"PUT /user/starred/{owner}/{repo}\"],\n unstarRepoForAuthenticatedUser: [\"DELETE /user/starred/{owner}/{repo}\"],\n },\n apps: {\n addRepoToInstallation: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"addRepoToInstallationForAuthenticatedUser\"] },\n ],\n addRepoToInstallationForAuthenticatedUser: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\",\n ],\n checkToken: [\"POST /applications/{client_id}/token\"],\n createFromManifest: [\"POST /app-manifests/{code}/conversions\"],\n createInstallationAccessToken: [\n \"POST /app/installations/{installation_id}/access_tokens\",\n ],\n deleteAuthorization: [\"DELETE /applications/{client_id}/grant\"],\n deleteInstallation: [\"DELETE /app/installations/{installation_id}\"],\n deleteToken: [\"DELETE /applications/{client_id}/token\"],\n getAuthenticated: [\"GET /app\"],\n getBySlug: [\"GET /apps/{app_slug}\"],\n getInstallation: [\"GET /app/installations/{installation_id}\"],\n getOrgInstallation: [\"GET /orgs/{org}/installation\"],\n getRepoInstallation: [\"GET /repos/{owner}/{repo}/installation\"],\n getSubscriptionPlanForAccount: [\n \"GET /marketplace_listing/accounts/{account_id}\",\n ],\n getSubscriptionPlanForAccountStubbed: [\n \"GET /marketplace_listing/stubbed/accounts/{account_id}\",\n ],\n getUserInstallation: [\"GET /users/{username}/installation\"],\n getWebhookConfigForApp: [\"GET /app/hook/config\"],\n getWebhookDelivery: [\"GET /app/hook/deliveries/{delivery_id}\"],\n listAccountsForPlan: [\"GET /marketplace_listing/plans/{plan_id}/accounts\"],\n listAccountsForPlanStubbed: [\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n ],\n listInstallationReposForAuthenticatedUser: [\n \"GET /user/installations/{installation_id}/repositories\",\n ],\n listInstallationRequestsForAuthenticatedApp: [\n \"GET /app/installation-requests\",\n ],\n listInstallations: [\"GET /app/installations\"],\n listInstallationsForAuthenticatedUser: [\"GET /user/installations\"],\n listPlans: [\"GET /marketplace_listing/plans\"],\n listPlansStubbed: [\"GET /marketplace_listing/stubbed/plans\"],\n listReposAccessibleToInstallation: [\"GET /installation/repositories\"],\n listSubscriptionsForAuthenticatedUser: [\"GET /user/marketplace_purchases\"],\n listSubscriptionsForAuthenticatedUserStubbed: [\n \"GET /user/marketplace_purchases/stubbed\",\n ],\n listWebhookDeliveries: [\"GET /app/hook/deliveries\"],\n redeliverWebhookDelivery: [\n \"POST /app/hook/deliveries/{delivery_id}/attempts\",\n ],\n removeRepoFromInstallation: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"removeRepoFromInstallationForAuthenticatedUser\"] },\n ],\n removeRepoFromInstallationForAuthenticatedUser: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\",\n ],\n resetToken: [\"PATCH /applications/{client_id}/token\"],\n revokeInstallationAccessToken: [\"DELETE /installation/token\"],\n scopeToken: [\"POST /applications/{client_id}/token/scoped\"],\n suspendInstallation: [\"PUT /app/installations/{installation_id}/suspended\"],\n unsuspendInstallation: [\n \"DELETE /app/installations/{installation_id}/suspended\",\n ],\n updateWebhookConfigForApp: [\"PATCH /app/hook/config\"],\n },\n billing: {\n getGithubActionsBillingOrg: [\"GET /orgs/{org}/settings/billing/actions\"],\n getGithubActionsBillingUser: [\n \"GET /users/{username}/settings/billing/actions\",\n ],\n getGithubPackagesBillingOrg: [\"GET /orgs/{org}/settings/billing/packages\"],\n getGithubPackagesBillingUser: [\n \"GET /users/{username}/settings/billing/packages\",\n ],\n getSharedStorageBillingOrg: [\n \"GET /orgs/{org}/settings/billing/shared-storage\",\n ],\n getSharedStorageBillingUser: [\n \"GET /users/{username}/settings/billing/shared-storage\",\n ],\n },\n checks: {\n create: [\"POST /repos/{owner}/{repo}/check-runs\"],\n createSuite: [\"POST /repos/{owner}/{repo}/check-suites\"],\n get: [\"GET /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n getSuite: [\"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}\"],\n listAnnotations: [\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\",\n ],\n listForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\"],\n listForSuite: [\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\",\n ],\n listSuitesForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\"],\n rerequestRun: [\n \"POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest\",\n ],\n rerequestSuite: [\n \"POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest\",\n ],\n setSuitesPreferences: [\n \"PATCH /repos/{owner}/{repo}/check-suites/preferences\",\n ],\n update: [\"PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n },\n codeScanning: {\n deleteAnalysis: [\n \"DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}\",\n ],\n getAlert: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n {},\n { renamedParameters: { alert_id: \"alert_number\" } },\n ],\n getAnalysis: [\n \"GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}\",\n ],\n getCodeqlDatabase: [\n \"GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}\",\n ],\n getDefaultSetup: [\"GET /repos/{owner}/{repo}/code-scanning/default-setup\"],\n getSarif: [\"GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}\"],\n listAlertInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/code-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/code-scanning/alerts\"],\n listAlertsInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n {},\n { renamed: [\"codeScanning\", \"listAlertInstances\"] },\n ],\n listCodeqlDatabases: [\n \"GET /repos/{owner}/{repo}/code-scanning/codeql/databases\",\n ],\n listRecentAnalyses: [\"GET /repos/{owner}/{repo}/code-scanning/analyses\"],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n ],\n updateDefaultSetup: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/default-setup\",\n ],\n uploadSarif: [\"POST /repos/{owner}/{repo}/code-scanning/sarifs\"],\n },\n codesOfConduct: {\n getAllCodesOfConduct: [\"GET /codes_of_conduct\"],\n getConductCode: [\"GET /codes_of_conduct/{key}\"],\n },\n codespaces: {\n addRepositoryForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n checkPermissionsForDevcontainer: [\n \"GET /repos/{owner}/{repo}/codespaces/permissions_check\",\n ],\n codespaceMachinesForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/machines\",\n ],\n createForAuthenticatedUser: [\"POST /user/codespaces\"],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}\",\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\",\n ],\n createOrUpdateSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}\",\n ],\n createWithPrForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces\",\n ],\n createWithRepoForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/codespaces\",\n ],\n deleteForAuthenticatedUser: [\"DELETE /user/codespaces/{codespace_name}\"],\n deleteFromOrganization: [\n \"DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}\",\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/codespaces/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\",\n ],\n deleteSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}\",\n ],\n exportForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/exports\",\n ],\n getCodespacesForUserInOrg: [\n \"GET /orgs/{org}/members/{username}/codespaces\",\n ],\n getExportDetailsForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/exports/{export_id}\",\n ],\n getForAuthenticatedUser: [\"GET /user/codespaces/{codespace_name}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/codespaces/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/codespaces/secrets/{secret_name}\"],\n getPublicKeyForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/public-key\",\n ],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/public-key\",\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\",\n ],\n getSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}\",\n ],\n listDevcontainersInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\",\n ],\n listForAuthenticatedUser: [\"GET /user/codespaces\"],\n listInOrganization: [\n \"GET /orgs/{org}/codespaces\",\n {},\n { renamedParameters: { org_id: \"org\" } },\n ],\n listInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces\",\n ],\n listOrgSecrets: [\"GET /orgs/{org}/codespaces/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/codespaces/secrets\"],\n listRepositoriesForSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}/repositories\",\n ],\n listSecretsForAuthenticatedUser: [\"GET /user/codespaces/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories\",\n ],\n preFlightWithRepoForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/new\",\n ],\n publishForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/publish\",\n ],\n removeRepositoryForSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n repoMachinesForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/machines\",\n ],\n setRepositoriesForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories\",\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories\",\n ],\n startForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/start\"],\n stopForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/stop\"],\n stopInOrganization: [\n \"POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop\",\n ],\n updateForAuthenticatedUser: [\"PATCH /user/codespaces/{codespace_name}\"],\n },\n copilot: {\n addCopilotSeatsForTeams: [\n \"POST /orgs/{org}/copilot/billing/selected_teams\",\n ],\n addCopilotSeatsForUsers: [\n \"POST /orgs/{org}/copilot/billing/selected_users\",\n ],\n cancelCopilotSeatAssignmentForTeams: [\n \"DELETE /orgs/{org}/copilot/billing/selected_teams\",\n ],\n cancelCopilotSeatAssignmentForUsers: [\n \"DELETE /orgs/{org}/copilot/billing/selected_users\",\n ],\n getCopilotOrganizationDetails: [\"GET /orgs/{org}/copilot/billing\"],\n getCopilotSeatDetailsForUser: [\n \"GET /orgs/{org}/members/{username}/copilot\",\n ],\n listCopilotSeats: [\"GET /orgs/{org}/copilot/billing/seats\"],\n usageMetricsForEnterprise: [\"GET /enterprises/{enterprise}/copilot/usage\"],\n usageMetricsForOrg: [\"GET /orgs/{org}/copilot/usage\"],\n usageMetricsForTeam: [\"GET /orgs/{org}/team/{team_slug}/copilot/usage\"],\n },\n dependabot: {\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}\",\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\",\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/dependabot/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\",\n ],\n getAlert: [\"GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/dependabot/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/dependabot/secrets/{secret_name}\"],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/public-key\",\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\",\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/dependabot/alerts\",\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/dependabot/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/dependabot/alerts\"],\n listOrgSecrets: [\"GET /orgs/{org}/dependabot/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/dependabot/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}\",\n ],\n },\n dependencyGraph: {\n createRepositorySnapshot: [\n \"POST /repos/{owner}/{repo}/dependency-graph/snapshots\",\n ],\n diffRange: [\n \"GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}\",\n ],\n exportSbom: [\"GET /repos/{owner}/{repo}/dependency-graph/sbom\"],\n },\n emojis: { get: [\"GET /emojis\"] },\n gists: {\n checkIsStarred: [\"GET /gists/{gist_id}/star\"],\n create: [\"POST /gists\"],\n createComment: [\"POST /gists/{gist_id}/comments\"],\n delete: [\"DELETE /gists/{gist_id}\"],\n deleteComment: [\"DELETE /gists/{gist_id}/comments/{comment_id}\"],\n fork: [\"POST /gists/{gist_id}/forks\"],\n get: [\"GET /gists/{gist_id}\"],\n getComment: [\"GET /gists/{gist_id}/comments/{comment_id}\"],\n getRevision: [\"GET /gists/{gist_id}/{sha}\"],\n list: [\"GET /gists\"],\n listComments: [\"GET /gists/{gist_id}/comments\"],\n listCommits: [\"GET /gists/{gist_id}/commits\"],\n listForUser: [\"GET /users/{username}/gists\"],\n listForks: [\"GET /gists/{gist_id}/forks\"],\n listPublic: [\"GET /gists/public\"],\n listStarred: [\"GET /gists/starred\"],\n star: [\"PUT /gists/{gist_id}/star\"],\n unstar: [\"DELETE /gists/{gist_id}/star\"],\n update: [\"PATCH /gists/{gist_id}\"],\n updateComment: [\"PATCH /gists/{gist_id}/comments/{comment_id}\"],\n },\n git: {\n createBlob: [\"POST /repos/{owner}/{repo}/git/blobs\"],\n createCommit: [\"POST /repos/{owner}/{repo}/git/commits\"],\n createRef: [\"POST /repos/{owner}/{repo}/git/refs\"],\n createTag: [\"POST /repos/{owner}/{repo}/git/tags\"],\n createTree: [\"POST /repos/{owner}/{repo}/git/trees\"],\n deleteRef: [\"DELETE /repos/{owner}/{repo}/git/refs/{ref}\"],\n getBlob: [\"GET /repos/{owner}/{repo}/git/blobs/{file_sha}\"],\n getCommit: [\"GET /repos/{owner}/{repo}/git/commits/{commit_sha}\"],\n getRef: [\"GET /repos/{owner}/{repo}/git/ref/{ref}\"],\n getTag: [\"GET /repos/{owner}/{repo}/git/tags/{tag_sha}\"],\n getTree: [\"GET /repos/{owner}/{repo}/git/trees/{tree_sha}\"],\n listMatchingRefs: [\"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\"],\n updateRef: [\"PATCH /repos/{owner}/{repo}/git/refs/{ref}\"],\n },\n gitignore: {\n getAllTemplates: [\"GET /gitignore/templates\"],\n getTemplate: [\"GET /gitignore/templates/{name}\"],\n },\n interactions: {\n getRestrictionsForAuthenticatedUser: [\"GET /user/interaction-limits\"],\n getRestrictionsForOrg: [\"GET /orgs/{org}/interaction-limits\"],\n getRestrictionsForRepo: [\"GET /repos/{owner}/{repo}/interaction-limits\"],\n getRestrictionsForYourPublicRepos: [\n \"GET /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"getRestrictionsForAuthenticatedUser\"] },\n ],\n removeRestrictionsForAuthenticatedUser: [\"DELETE /user/interaction-limits\"],\n removeRestrictionsForOrg: [\"DELETE /orgs/{org}/interaction-limits\"],\n removeRestrictionsForRepo: [\n \"DELETE /repos/{owner}/{repo}/interaction-limits\",\n ],\n removeRestrictionsForYourPublicRepos: [\n \"DELETE /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"removeRestrictionsForAuthenticatedUser\"] },\n ],\n setRestrictionsForAuthenticatedUser: [\"PUT /user/interaction-limits\"],\n setRestrictionsForOrg: [\"PUT /orgs/{org}/interaction-limits\"],\n setRestrictionsForRepo: [\"PUT /repos/{owner}/{repo}/interaction-limits\"],\n setRestrictionsForYourPublicRepos: [\n \"PUT /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"setRestrictionsForAuthenticatedUser\"] },\n ],\n },\n issues: {\n addAssignees: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees\",\n ],\n addLabels: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n checkUserCanBeAssigned: [\"GET /repos/{owner}/{repo}/assignees/{assignee}\"],\n checkUserCanBeAssignedToIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}\",\n ],\n create: [\"POST /repos/{owner}/{repo}/issues\"],\n createComment: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/comments\",\n ],\n createLabel: [\"POST /repos/{owner}/{repo}/labels\"],\n createMilestone: [\"POST /repos/{owner}/{repo}/milestones\"],\n deleteComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}\",\n ],\n deleteLabel: [\"DELETE /repos/{owner}/{repo}/labels/{name}\"],\n deleteMilestone: [\n \"DELETE /repos/{owner}/{repo}/milestones/{milestone_number}\",\n ],\n get: [\"GET /repos/{owner}/{repo}/issues/{issue_number}\"],\n getComment: [\"GET /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n getEvent: [\"GET /repos/{owner}/{repo}/issues/events/{event_id}\"],\n getLabel: [\"GET /repos/{owner}/{repo}/labels/{name}\"],\n getMilestone: [\"GET /repos/{owner}/{repo}/milestones/{milestone_number}\"],\n list: [\"GET /issues\"],\n listAssignees: [\"GET /repos/{owner}/{repo}/assignees\"],\n listComments: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\"],\n listCommentsForRepo: [\"GET /repos/{owner}/{repo}/issues/comments\"],\n listEvents: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/events\"],\n listEventsForRepo: [\"GET /repos/{owner}/{repo}/issues/events\"],\n listEventsForTimeline: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\",\n ],\n listForAuthenticatedUser: [\"GET /user/issues\"],\n listForOrg: [\"GET /orgs/{org}/issues\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/issues\"],\n listLabelsForMilestone: [\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\",\n ],\n listLabelsForRepo: [\"GET /repos/{owner}/{repo}/labels\"],\n listLabelsOnIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n ],\n listMilestones: [\"GET /repos/{owner}/{repo}/milestones\"],\n lock: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n removeAllLabels: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n ],\n removeAssignees: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees\",\n ],\n removeLabel: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}\",\n ],\n setLabels: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n unlock: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n update: [\"PATCH /repos/{owner}/{repo}/issues/{issue_number}\"],\n updateComment: [\"PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n updateLabel: [\"PATCH /repos/{owner}/{repo}/labels/{name}\"],\n updateMilestone: [\n \"PATCH /repos/{owner}/{repo}/milestones/{milestone_number}\",\n ],\n },\n licenses: {\n get: [\"GET /licenses/{license}\"],\n getAllCommonlyUsed: [\"GET /licenses\"],\n getForRepo: [\"GET /repos/{owner}/{repo}/license\"],\n },\n markdown: {\n render: [\"POST /markdown\"],\n renderRaw: [\n \"POST /markdown/raw\",\n { headers: { \"content-type\": \"text/plain; charset=utf-8\" } },\n ],\n },\n meta: {\n get: [\"GET /meta\"],\n getAllVersions: [\"GET /versions\"],\n getOctocat: [\"GET /octocat\"],\n getZen: [\"GET /zen\"],\n root: [\"GET /\"],\n },\n migrations: {\n deleteArchiveForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/archive\",\n ],\n deleteArchiveForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/archive\",\n ],\n downloadArchiveForOrg: [\n \"GET /orgs/{org}/migrations/{migration_id}/archive\",\n ],\n getArchiveForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/archive\",\n ],\n getStatusForAuthenticatedUser: [\"GET /user/migrations/{migration_id}\"],\n getStatusForOrg: [\"GET /orgs/{org}/migrations/{migration_id}\"],\n listForAuthenticatedUser: [\"GET /user/migrations\"],\n listForOrg: [\"GET /orgs/{org}/migrations\"],\n listReposForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/repositories\",\n ],\n listReposForOrg: [\"GET /orgs/{org}/migrations/{migration_id}/repositories\"],\n listReposForUser: [\n \"GET /user/migrations/{migration_id}/repositories\",\n {},\n { renamed: [\"migrations\", \"listReposForAuthenticatedUser\"] },\n ],\n startForAuthenticatedUser: [\"POST /user/migrations\"],\n startForOrg: [\"POST /orgs/{org}/migrations\"],\n unlockRepoForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock\",\n ],\n unlockRepoForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock\",\n ],\n },\n oidc: {\n getOidcCustomSubTemplateForOrg: [\n \"GET /orgs/{org}/actions/oidc/customization/sub\",\n ],\n updateOidcCustomSubTemplateForOrg: [\n \"PUT /orgs/{org}/actions/oidc/customization/sub\",\n ],\n },\n orgs: {\n addSecurityManagerTeam: [\n \"PUT /orgs/{org}/security-managers/teams/{team_slug}\",\n ],\n assignTeamToOrgRole: [\n \"PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}\",\n ],\n assignUserToOrgRole: [\n \"PUT /orgs/{org}/organization-roles/users/{username}/{role_id}\",\n ],\n blockUser: [\"PUT /orgs/{org}/blocks/{username}\"],\n cancelInvitation: [\"DELETE /orgs/{org}/invitations/{invitation_id}\"],\n checkBlockedUser: [\"GET /orgs/{org}/blocks/{username}\"],\n checkMembershipForUser: [\"GET /orgs/{org}/members/{username}\"],\n checkPublicMembershipForUser: [\"GET /orgs/{org}/public_members/{username}\"],\n convertMemberToOutsideCollaborator: [\n \"PUT /orgs/{org}/outside_collaborators/{username}\",\n ],\n createCustomOrganizationRole: [\"POST /orgs/{org}/organization-roles\"],\n createInvitation: [\"POST /orgs/{org}/invitations\"],\n createOrUpdateCustomProperties: [\"PATCH /orgs/{org}/properties/schema\"],\n createOrUpdateCustomPropertiesValuesForRepos: [\n \"PATCH /orgs/{org}/properties/values\",\n ],\n createOrUpdateCustomProperty: [\n \"PUT /orgs/{org}/properties/schema/{custom_property_name}\",\n ],\n createWebhook: [\"POST /orgs/{org}/hooks\"],\n delete: [\"DELETE /orgs/{org}\"],\n deleteCustomOrganizationRole: [\n \"DELETE /orgs/{org}/organization-roles/{role_id}\",\n ],\n deleteWebhook: [\"DELETE /orgs/{org}/hooks/{hook_id}\"],\n enableOrDisableSecurityProductOnAllOrgRepos: [\n \"POST /orgs/{org}/{security_product}/{enablement}\",\n ],\n get: [\"GET /orgs/{org}\"],\n getAllCustomProperties: [\"GET /orgs/{org}/properties/schema\"],\n getCustomProperty: [\n \"GET /orgs/{org}/properties/schema/{custom_property_name}\",\n ],\n getMembershipForAuthenticatedUser: [\"GET /user/memberships/orgs/{org}\"],\n getMembershipForUser: [\"GET /orgs/{org}/memberships/{username}\"],\n getOrgRole: [\"GET /orgs/{org}/organization-roles/{role_id}\"],\n getWebhook: [\"GET /orgs/{org}/hooks/{hook_id}\"],\n getWebhookConfigForOrg: [\"GET /orgs/{org}/hooks/{hook_id}/config\"],\n getWebhookDelivery: [\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}\",\n ],\n list: [\"GET /organizations\"],\n listAppInstallations: [\"GET /orgs/{org}/installations\"],\n listBlockedUsers: [\"GET /orgs/{org}/blocks\"],\n listCustomPropertiesValuesForRepos: [\"GET /orgs/{org}/properties/values\"],\n listFailedInvitations: [\"GET /orgs/{org}/failed_invitations\"],\n listForAuthenticatedUser: [\"GET /user/orgs\"],\n listForUser: [\"GET /users/{username}/orgs\"],\n listInvitationTeams: [\"GET /orgs/{org}/invitations/{invitation_id}/teams\"],\n listMembers: [\"GET /orgs/{org}/members\"],\n listMembershipsForAuthenticatedUser: [\"GET /user/memberships/orgs\"],\n listOrgRoleTeams: [\"GET /orgs/{org}/organization-roles/{role_id}/teams\"],\n listOrgRoleUsers: [\"GET /orgs/{org}/organization-roles/{role_id}/users\"],\n listOrgRoles: [\"GET /orgs/{org}/organization-roles\"],\n listOrganizationFineGrainedPermissions: [\n \"GET /orgs/{org}/organization-fine-grained-permissions\",\n ],\n listOutsideCollaborators: [\"GET /orgs/{org}/outside_collaborators\"],\n listPatGrantRepositories: [\n \"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories\",\n ],\n listPatGrantRequestRepositories: [\n \"GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories\",\n ],\n listPatGrantRequests: [\"GET /orgs/{org}/personal-access-token-requests\"],\n listPatGrants: [\"GET /orgs/{org}/personal-access-tokens\"],\n listPendingInvitations: [\"GET /orgs/{org}/invitations\"],\n listPublicMembers: [\"GET /orgs/{org}/public_members\"],\n listSecurityManagerTeams: [\"GET /orgs/{org}/security-managers\"],\n listWebhookDeliveries: [\"GET /orgs/{org}/hooks/{hook_id}/deliveries\"],\n listWebhooks: [\"GET /orgs/{org}/hooks\"],\n patchCustomOrganizationRole: [\n \"PATCH /orgs/{org}/organization-roles/{role_id}\",\n ],\n pingWebhook: [\"POST /orgs/{org}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\",\n ],\n removeCustomProperty: [\n \"DELETE /orgs/{org}/properties/schema/{custom_property_name}\",\n ],\n removeMember: [\"DELETE /orgs/{org}/members/{username}\"],\n removeMembershipForUser: [\"DELETE /orgs/{org}/memberships/{username}\"],\n removeOutsideCollaborator: [\n \"DELETE /orgs/{org}/outside_collaborators/{username}\",\n ],\n removePublicMembershipForAuthenticatedUser: [\n \"DELETE /orgs/{org}/public_members/{username}\",\n ],\n removeSecurityManagerTeam: [\n \"DELETE /orgs/{org}/security-managers/teams/{team_slug}\",\n ],\n reviewPatGrantRequest: [\n \"POST /orgs/{org}/personal-access-token-requests/{pat_request_id}\",\n ],\n reviewPatGrantRequestsInBulk: [\n \"POST /orgs/{org}/personal-access-token-requests\",\n ],\n revokeAllOrgRolesTeam: [\n \"DELETE /orgs/{org}/organization-roles/teams/{team_slug}\",\n ],\n revokeAllOrgRolesUser: [\n \"DELETE /orgs/{org}/organization-roles/users/{username}\",\n ],\n revokeOrgRoleTeam: [\n \"DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}\",\n ],\n revokeOrgRoleUser: [\n \"DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}\",\n ],\n setMembershipForUser: [\"PUT /orgs/{org}/memberships/{username}\"],\n setPublicMembershipForAuthenticatedUser: [\n \"PUT /orgs/{org}/public_members/{username}\",\n ],\n unblockUser: [\"DELETE /orgs/{org}/blocks/{username}\"],\n update: [\"PATCH /orgs/{org}\"],\n updateMembershipForAuthenticatedUser: [\n \"PATCH /user/memberships/orgs/{org}\",\n ],\n updatePatAccess: [\"POST /orgs/{org}/personal-access-tokens/{pat_id}\"],\n updatePatAccesses: [\"POST /orgs/{org}/personal-access-tokens\"],\n updateWebhook: [\"PATCH /orgs/{org}/hooks/{hook_id}\"],\n updateWebhookConfigForOrg: [\"PATCH /orgs/{org}/hooks/{hook_id}/config\"],\n },\n packages: {\n deletePackageForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}\",\n ],\n deletePackageForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}\",\n ],\n deletePackageForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}\",\n ],\n deletePackageVersionForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n deletePackageVersionForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n deletePackageVersionForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n getAllPackageVersionsForAPackageOwnedByAnOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n {},\n { renamed: [\"packages\", \"getAllPackageVersionsForPackageOwnedByOrg\"] },\n ],\n getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n {},\n {\n renamed: [\n \"packages\",\n \"getAllPackageVersionsForPackageOwnedByAuthenticatedUser\",\n ],\n },\n ],\n getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n ],\n getAllPackageVersionsForPackageOwnedByOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n ],\n getAllPackageVersionsForPackageOwnedByUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions\",\n ],\n getPackageForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}\",\n ],\n getPackageForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}\",\n ],\n getPackageForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}\",\n ],\n getPackageVersionForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n getPackageVersionForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n getPackageVersionForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n listDockerMigrationConflictingPackagesForAuthenticatedUser: [\n \"GET /user/docker/conflicts\",\n ],\n listDockerMigrationConflictingPackagesForOrganization: [\n \"GET /orgs/{org}/docker/conflicts\",\n ],\n listDockerMigrationConflictingPackagesForUser: [\n \"GET /users/{username}/docker/conflicts\",\n ],\n listPackagesForAuthenticatedUser: [\"GET /user/packages\"],\n listPackagesForOrganization: [\"GET /orgs/{org}/packages\"],\n listPackagesForUser: [\"GET /users/{username}/packages\"],\n restorePackageForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/restore{?token}\",\n ],\n restorePackageForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}\",\n ],\n restorePackageForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}\",\n ],\n restorePackageVersionForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\",\n ],\n restorePackageVersionForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\",\n ],\n restorePackageVersionForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\",\n ],\n },\n projects: {\n addCollaborator: [\"PUT /projects/{project_id}/collaborators/{username}\"],\n createCard: [\"POST /projects/columns/{column_id}/cards\"],\n createColumn: [\"POST /projects/{project_id}/columns\"],\n createForAuthenticatedUser: [\"POST /user/projects\"],\n createForOrg: [\"POST /orgs/{org}/projects\"],\n createForRepo: [\"POST /repos/{owner}/{repo}/projects\"],\n delete: [\"DELETE /projects/{project_id}\"],\n deleteCard: [\"DELETE /projects/columns/cards/{card_id}\"],\n deleteColumn: [\"DELETE /projects/columns/{column_id}\"],\n get: [\"GET /projects/{project_id}\"],\n getCard: [\"GET /projects/columns/cards/{card_id}\"],\n getColumn: [\"GET /projects/columns/{column_id}\"],\n getPermissionForUser: [\n \"GET /projects/{project_id}/collaborators/{username}/permission\",\n ],\n listCards: [\"GET /projects/columns/{column_id}/cards\"],\n listCollaborators: [\"GET /projects/{project_id}/collaborators\"],\n listColumns: [\"GET /projects/{project_id}/columns\"],\n listForOrg: [\"GET /orgs/{org}/projects\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/projects\"],\n listForUser: [\"GET /users/{username}/projects\"],\n moveCard: [\"POST /projects/columns/cards/{card_id}/moves\"],\n moveColumn: [\"POST /projects/columns/{column_id}/moves\"],\n removeCollaborator: [\n \"DELETE /projects/{project_id}/collaborators/{username}\",\n ],\n update: [\"PATCH /projects/{project_id}\"],\n updateCard: [\"PATCH /projects/columns/cards/{card_id}\"],\n updateColumn: [\"PATCH /projects/columns/{column_id}\"],\n },\n pulls: {\n checkIfMerged: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n create: [\"POST /repos/{owner}/{repo}/pulls\"],\n createReplyForReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies\",\n ],\n createReview: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n createReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n ],\n deletePendingReview: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\",\n ],\n deleteReviewComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}\",\n ],\n dismissReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals\",\n ],\n get: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}\"],\n getReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\",\n ],\n getReviewComment: [\"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}\"],\n list: [\"GET /repos/{owner}/{repo}/pulls\"],\n listCommentsForReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\",\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\"],\n listFiles: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\"],\n listRequestedReviewers: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n ],\n listReviewComments: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n ],\n listReviewCommentsForRepo: [\"GET /repos/{owner}/{repo}/pulls/comments\"],\n listReviews: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n merge: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n removeRequestedReviewers: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n ],\n requestReviewers: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n ],\n submitReview: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events\",\n ],\n update: [\"PATCH /repos/{owner}/{repo}/pulls/{pull_number}\"],\n updateBranch: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch\",\n ],\n updateReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\",\n ],\n updateReviewComment: [\n \"PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}\",\n ],\n },\n rateLimit: { get: [\"GET /rate_limit\"] },\n reactions: {\n createForCommitComment: [\n \"POST /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n ],\n createForIssue: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n ],\n createForIssueComment: [\n \"POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n ],\n createForPullRequestReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n ],\n createForRelease: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n ],\n createForTeamDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n ],\n createForTeamDiscussionInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n ],\n deleteForCommitComment: [\n \"DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}\",\n ],\n deleteForIssue: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}\",\n ],\n deleteForIssueComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}\",\n ],\n deleteForPullRequestComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}\",\n ],\n deleteForRelease: [\n \"DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}\",\n ],\n deleteForTeamDiscussion: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}\",\n ],\n deleteForTeamDiscussionComment: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}\",\n ],\n listForCommitComment: [\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n ],\n listForIssue: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\"],\n listForIssueComment: [\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n ],\n listForPullRequestReviewComment: [\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n ],\n listForRelease: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n ],\n listForTeamDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n ],\n listForTeamDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n ],\n },\n repos: {\n acceptInvitation: [\n \"PATCH /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"acceptInvitationForAuthenticatedUser\"] },\n ],\n acceptInvitationForAuthenticatedUser: [\n \"PATCH /user/repository_invitations/{invitation_id}\",\n ],\n addAppAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" },\n ],\n addCollaborator: [\"PUT /repos/{owner}/{repo}/collaborators/{username}\"],\n addStatusCheckContexts: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" },\n ],\n addTeamAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" },\n ],\n addUserAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" },\n ],\n cancelPagesDeployment: [\n \"POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel\",\n ],\n checkAutomatedSecurityFixes: [\n \"GET /repos/{owner}/{repo}/automated-security-fixes\",\n ],\n checkCollaborator: [\"GET /repos/{owner}/{repo}/collaborators/{username}\"],\n checkPrivateVulnerabilityReporting: [\n \"GET /repos/{owner}/{repo}/private-vulnerability-reporting\",\n ],\n checkVulnerabilityAlerts: [\n \"GET /repos/{owner}/{repo}/vulnerability-alerts\",\n ],\n codeownersErrors: [\"GET /repos/{owner}/{repo}/codeowners/errors\"],\n compareCommits: [\"GET /repos/{owner}/{repo}/compare/{base}...{head}\"],\n compareCommitsWithBasehead: [\n \"GET /repos/{owner}/{repo}/compare/{basehead}\",\n ],\n createAutolink: [\"POST /repos/{owner}/{repo}/autolinks\"],\n createCommitComment: [\n \"POST /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n ],\n createCommitSignatureProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\",\n ],\n createCommitStatus: [\"POST /repos/{owner}/{repo}/statuses/{sha}\"],\n createDeployKey: [\"POST /repos/{owner}/{repo}/keys\"],\n createDeployment: [\"POST /repos/{owner}/{repo}/deployments\"],\n createDeploymentBranchPolicy: [\n \"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\",\n ],\n createDeploymentProtectionRule: [\n \"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules\",\n ],\n createDeploymentStatus: [\n \"POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n ],\n createDispatchEvent: [\"POST /repos/{owner}/{repo}/dispatches\"],\n createForAuthenticatedUser: [\"POST /user/repos\"],\n createFork: [\"POST /repos/{owner}/{repo}/forks\"],\n createInOrg: [\"POST /orgs/{org}/repos\"],\n createOrUpdateCustomPropertiesValues: [\n \"PATCH /repos/{owner}/{repo}/properties/values\",\n ],\n createOrUpdateEnvironment: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}\",\n ],\n createOrUpdateFileContents: [\"PUT /repos/{owner}/{repo}/contents/{path}\"],\n createOrgRuleset: [\"POST /orgs/{org}/rulesets\"],\n createPagesDeployment: [\"POST /repos/{owner}/{repo}/pages/deployments\"],\n createPagesSite: [\"POST /repos/{owner}/{repo}/pages\"],\n createRelease: [\"POST /repos/{owner}/{repo}/releases\"],\n createRepoRuleset: [\"POST /repos/{owner}/{repo}/rulesets\"],\n createTagProtection: [\"POST /repos/{owner}/{repo}/tags/protection\"],\n createUsingTemplate: [\n \"POST /repos/{template_owner}/{template_repo}/generate\",\n ],\n createWebhook: [\"POST /repos/{owner}/{repo}/hooks\"],\n declineInvitation: [\n \"DELETE /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"declineInvitationForAuthenticatedUser\"] },\n ],\n declineInvitationForAuthenticatedUser: [\n \"DELETE /user/repository_invitations/{invitation_id}\",\n ],\n delete: [\"DELETE /repos/{owner}/{repo}\"],\n deleteAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\",\n ],\n deleteAdminBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\",\n ],\n deleteAnEnvironment: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}\",\n ],\n deleteAutolink: [\"DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n deleteBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection\",\n ],\n deleteCommitComment: [\"DELETE /repos/{owner}/{repo}/comments/{comment_id}\"],\n deleteCommitSignatureProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\",\n ],\n deleteDeployKey: [\"DELETE /repos/{owner}/{repo}/keys/{key_id}\"],\n deleteDeployment: [\n \"DELETE /repos/{owner}/{repo}/deployments/{deployment_id}\",\n ],\n deleteDeploymentBranchPolicy: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\",\n ],\n deleteFile: [\"DELETE /repos/{owner}/{repo}/contents/{path}\"],\n deleteInvitation: [\n \"DELETE /repos/{owner}/{repo}/invitations/{invitation_id}\",\n ],\n deleteOrgRuleset: [\"DELETE /orgs/{org}/rulesets/{ruleset_id}\"],\n deletePagesSite: [\"DELETE /repos/{owner}/{repo}/pages\"],\n deletePullRequestReviewProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\",\n ],\n deleteRelease: [\"DELETE /repos/{owner}/{repo}/releases/{release_id}\"],\n deleteReleaseAsset: [\n \"DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}\",\n ],\n deleteRepoRuleset: [\"DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n deleteTagProtection: [\n \"DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}\",\n ],\n deleteWebhook: [\"DELETE /repos/{owner}/{repo}/hooks/{hook_id}\"],\n disableAutomatedSecurityFixes: [\n \"DELETE /repos/{owner}/{repo}/automated-security-fixes\",\n ],\n disableDeploymentProtectionRule: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}\",\n ],\n disablePrivateVulnerabilityReporting: [\n \"DELETE /repos/{owner}/{repo}/private-vulnerability-reporting\",\n ],\n disableVulnerabilityAlerts: [\n \"DELETE /repos/{owner}/{repo}/vulnerability-alerts\",\n ],\n downloadArchive: [\n \"GET /repos/{owner}/{repo}/zipball/{ref}\",\n {},\n { renamed: [\"repos\", \"downloadZipballArchive\"] },\n ],\n downloadTarballArchive: [\"GET /repos/{owner}/{repo}/tarball/{ref}\"],\n downloadZipballArchive: [\"GET /repos/{owner}/{repo}/zipball/{ref}\"],\n enableAutomatedSecurityFixes: [\n \"PUT /repos/{owner}/{repo}/automated-security-fixes\",\n ],\n enablePrivateVulnerabilityReporting: [\n \"PUT /repos/{owner}/{repo}/private-vulnerability-reporting\",\n ],\n enableVulnerabilityAlerts: [\n \"PUT /repos/{owner}/{repo}/vulnerability-alerts\",\n ],\n generateReleaseNotes: [\n \"POST /repos/{owner}/{repo}/releases/generate-notes\",\n ],\n get: [\"GET /repos/{owner}/{repo}\"],\n getAccessRestrictions: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\",\n ],\n getAdminBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\",\n ],\n getAllDeploymentProtectionRules: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules\",\n ],\n getAllEnvironments: [\"GET /repos/{owner}/{repo}/environments\"],\n getAllStatusCheckContexts: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n ],\n getAllTopics: [\"GET /repos/{owner}/{repo}/topics\"],\n getAppsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n ],\n getAutolink: [\"GET /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n getBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}\"],\n getBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection\",\n ],\n getBranchRules: [\"GET /repos/{owner}/{repo}/rules/branches/{branch}\"],\n getClones: [\"GET /repos/{owner}/{repo}/traffic/clones\"],\n getCodeFrequencyStats: [\"GET /repos/{owner}/{repo}/stats/code_frequency\"],\n getCollaboratorPermissionLevel: [\n \"GET /repos/{owner}/{repo}/collaborators/{username}/permission\",\n ],\n getCombinedStatusForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/status\"],\n getCommit: [\"GET /repos/{owner}/{repo}/commits/{ref}\"],\n getCommitActivityStats: [\"GET /repos/{owner}/{repo}/stats/commit_activity\"],\n getCommitComment: [\"GET /repos/{owner}/{repo}/comments/{comment_id}\"],\n getCommitSignatureProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\",\n ],\n getCommunityProfileMetrics: [\"GET /repos/{owner}/{repo}/community/profile\"],\n getContent: [\"GET /repos/{owner}/{repo}/contents/{path}\"],\n getContributorsStats: [\"GET /repos/{owner}/{repo}/stats/contributors\"],\n getCustomDeploymentProtectionRule: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}\",\n ],\n getCustomPropertiesValues: [\"GET /repos/{owner}/{repo}/properties/values\"],\n getDeployKey: [\"GET /repos/{owner}/{repo}/keys/{key_id}\"],\n getDeployment: [\"GET /repos/{owner}/{repo}/deployments/{deployment_id}\"],\n getDeploymentBranchPolicy: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\",\n ],\n getDeploymentStatus: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}\",\n ],\n getEnvironment: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}\",\n ],\n getLatestPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/latest\"],\n getLatestRelease: [\"GET /repos/{owner}/{repo}/releases/latest\"],\n getOrgRuleSuite: [\"GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}\"],\n getOrgRuleSuites: [\"GET /orgs/{org}/rulesets/rule-suites\"],\n getOrgRuleset: [\"GET /orgs/{org}/rulesets/{ruleset_id}\"],\n getOrgRulesets: [\"GET /orgs/{org}/rulesets\"],\n getPages: [\"GET /repos/{owner}/{repo}/pages\"],\n getPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/{build_id}\"],\n getPagesDeployment: [\n \"GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}\",\n ],\n getPagesHealthCheck: [\"GET /repos/{owner}/{repo}/pages/health\"],\n getParticipationStats: [\"GET /repos/{owner}/{repo}/stats/participation\"],\n getPullRequestReviewProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\",\n ],\n getPunchCardStats: [\"GET /repos/{owner}/{repo}/stats/punch_card\"],\n getReadme: [\"GET /repos/{owner}/{repo}/readme\"],\n getReadmeInDirectory: [\"GET /repos/{owner}/{repo}/readme/{dir}\"],\n getRelease: [\"GET /repos/{owner}/{repo}/releases/{release_id}\"],\n getReleaseAsset: [\"GET /repos/{owner}/{repo}/releases/assets/{asset_id}\"],\n getReleaseByTag: [\"GET /repos/{owner}/{repo}/releases/tags/{tag}\"],\n getRepoRuleSuite: [\n \"GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}\",\n ],\n getRepoRuleSuites: [\"GET /repos/{owner}/{repo}/rulesets/rule-suites\"],\n getRepoRuleset: [\"GET /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n getRepoRulesets: [\"GET /repos/{owner}/{repo}/rulesets\"],\n getStatusChecksProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n ],\n getTeamsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n ],\n getTopPaths: [\"GET /repos/{owner}/{repo}/traffic/popular/paths\"],\n getTopReferrers: [\"GET /repos/{owner}/{repo}/traffic/popular/referrers\"],\n getUsersWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n ],\n getViews: [\"GET /repos/{owner}/{repo}/traffic/views\"],\n getWebhook: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}\"],\n getWebhookConfigForRepo: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/config\",\n ],\n getWebhookDelivery: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}\",\n ],\n listActivities: [\"GET /repos/{owner}/{repo}/activity\"],\n listAutolinks: [\"GET /repos/{owner}/{repo}/autolinks\"],\n listBranches: [\"GET /repos/{owner}/{repo}/branches\"],\n listBranchesForHeadCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head\",\n ],\n listCollaborators: [\"GET /repos/{owner}/{repo}/collaborators\"],\n listCommentsForCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n ],\n listCommitCommentsForRepo: [\"GET /repos/{owner}/{repo}/comments\"],\n listCommitStatusesForRef: [\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\",\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/commits\"],\n listContributors: [\"GET /repos/{owner}/{repo}/contributors\"],\n listCustomDeploymentRuleIntegrations: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps\",\n ],\n listDeployKeys: [\"GET /repos/{owner}/{repo}/keys\"],\n listDeploymentBranchPolicies: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\",\n ],\n listDeploymentStatuses: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n ],\n listDeployments: [\"GET /repos/{owner}/{repo}/deployments\"],\n listForAuthenticatedUser: [\"GET /user/repos\"],\n listForOrg: [\"GET /orgs/{org}/repos\"],\n listForUser: [\"GET /users/{username}/repos\"],\n listForks: [\"GET /repos/{owner}/{repo}/forks\"],\n listInvitations: [\"GET /repos/{owner}/{repo}/invitations\"],\n listInvitationsForAuthenticatedUser: [\"GET /user/repository_invitations\"],\n listLanguages: [\"GET /repos/{owner}/{repo}/languages\"],\n listPagesBuilds: [\"GET /repos/{owner}/{repo}/pages/builds\"],\n listPublic: [\"GET /repositories\"],\n listPullRequestsAssociatedWithCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\",\n ],\n listReleaseAssets: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\",\n ],\n listReleases: [\"GET /repos/{owner}/{repo}/releases\"],\n listTagProtection: [\"GET /repos/{owner}/{repo}/tags/protection\"],\n listTags: [\"GET /repos/{owner}/{repo}/tags\"],\n listTeams: [\"GET /repos/{owner}/{repo}/teams\"],\n listWebhookDeliveries: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\",\n ],\n listWebhooks: [\"GET /repos/{owner}/{repo}/hooks\"],\n merge: [\"POST /repos/{owner}/{repo}/merges\"],\n mergeUpstream: [\"POST /repos/{owner}/{repo}/merge-upstream\"],\n pingWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\",\n ],\n removeAppAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" },\n ],\n removeCollaborator: [\n \"DELETE /repos/{owner}/{repo}/collaborators/{username}\",\n ],\n removeStatusCheckContexts: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" },\n ],\n removeStatusCheckProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n ],\n removeTeamAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" },\n ],\n removeUserAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" },\n ],\n renameBranch: [\"POST /repos/{owner}/{repo}/branches/{branch}/rename\"],\n replaceAllTopics: [\"PUT /repos/{owner}/{repo}/topics\"],\n requestPagesBuild: [\"POST /repos/{owner}/{repo}/pages/builds\"],\n setAdminBranchProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\",\n ],\n setAppAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" },\n ],\n setStatusCheckContexts: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" },\n ],\n setTeamAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" },\n ],\n setUserAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" },\n ],\n testPushWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/tests\"],\n transfer: [\"POST /repos/{owner}/{repo}/transfer\"],\n update: [\"PATCH /repos/{owner}/{repo}\"],\n updateBranchProtection: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection\",\n ],\n updateCommitComment: [\"PATCH /repos/{owner}/{repo}/comments/{comment_id}\"],\n updateDeploymentBranchPolicy: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\",\n ],\n updateInformationAboutPagesSite: [\"PUT /repos/{owner}/{repo}/pages\"],\n updateInvitation: [\n \"PATCH /repos/{owner}/{repo}/invitations/{invitation_id}\",\n ],\n updateOrgRuleset: [\"PUT /orgs/{org}/rulesets/{ruleset_id}\"],\n updatePullRequestReviewProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\",\n ],\n updateRelease: [\"PATCH /repos/{owner}/{repo}/releases/{release_id}\"],\n updateReleaseAsset: [\n \"PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}\",\n ],\n updateRepoRuleset: [\"PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n updateStatusCheckPotection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n {},\n { renamed: [\"repos\", \"updateStatusCheckProtection\"] },\n ],\n updateStatusCheckProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n ],\n updateWebhook: [\"PATCH /repos/{owner}/{repo}/hooks/{hook_id}\"],\n updateWebhookConfigForRepo: [\n \"PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config\",\n ],\n uploadReleaseAsset: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}\",\n { baseUrl: \"https://uploads.github.com\" },\n ],\n },\n search: {\n code: [\"GET /search/code\"],\n commits: [\"GET /search/commits\"],\n issuesAndPullRequests: [\"GET /search/issues\"],\n labels: [\"GET /search/labels\"],\n repos: [\"GET /search/repositories\"],\n topics: [\"GET /search/topics\"],\n users: [\"GET /search/users\"],\n },\n secretScanning: {\n getAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\",\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\",\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/secret-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/secret-scanning/alerts\"],\n listLocationsForAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\",\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\",\n ],\n },\n securityAdvisories: {\n createFork: [\n \"POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks\",\n ],\n createPrivateVulnerabilityReport: [\n \"POST /repos/{owner}/{repo}/security-advisories/reports\",\n ],\n createRepositoryAdvisory: [\n \"POST /repos/{owner}/{repo}/security-advisories\",\n ],\n createRepositoryAdvisoryCveRequest: [\n \"POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve\",\n ],\n getGlobalAdvisory: [\"GET /advisories/{ghsa_id}\"],\n getRepositoryAdvisory: [\n \"GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}\",\n ],\n listGlobalAdvisories: [\"GET /advisories\"],\n listOrgRepositoryAdvisories: [\"GET /orgs/{org}/security-advisories\"],\n listRepositoryAdvisories: [\"GET /repos/{owner}/{repo}/security-advisories\"],\n updateRepositoryAdvisory: [\n \"PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}\",\n ],\n },\n teams: {\n addOrUpdateMembershipForUserInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/memberships/{username}\",\n ],\n addOrUpdateProjectPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}\",\n ],\n addOrUpdateRepoPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\",\n ],\n checkPermissionsForProjectInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/projects/{project_id}\",\n ],\n checkPermissionsForRepoInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\",\n ],\n create: [\"POST /orgs/{org}/teams\"],\n createDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n ],\n createDiscussionInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions\"],\n deleteDiscussionCommentInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\",\n ],\n deleteDiscussionInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\",\n ],\n deleteInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}\"],\n getByName: [\"GET /orgs/{org}/teams/{team_slug}\"],\n getDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\",\n ],\n getDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\",\n ],\n getMembershipForUserInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/memberships/{username}\",\n ],\n list: [\"GET /orgs/{org}/teams\"],\n listChildInOrg: [\"GET /orgs/{org}/teams/{team_slug}/teams\"],\n listDiscussionCommentsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n ],\n listDiscussionsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions\"],\n listForAuthenticatedUser: [\"GET /user/teams\"],\n listMembersInOrg: [\"GET /orgs/{org}/teams/{team_slug}/members\"],\n listPendingInvitationsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/invitations\",\n ],\n listProjectsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/projects\"],\n listReposInOrg: [\"GET /orgs/{org}/teams/{team_slug}/repos\"],\n removeMembershipForUserInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}\",\n ],\n removeProjectInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}\",\n ],\n removeRepoInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\",\n ],\n updateDiscussionCommentInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\",\n ],\n updateDiscussionInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\",\n ],\n updateInOrg: [\"PATCH /orgs/{org}/teams/{team_slug}\"],\n },\n users: {\n addEmailForAuthenticated: [\n \"POST /user/emails\",\n {},\n { renamed: [\"users\", \"addEmailForAuthenticatedUser\"] },\n ],\n addEmailForAuthenticatedUser: [\"POST /user/emails\"],\n addSocialAccountForAuthenticatedUser: [\"POST /user/social_accounts\"],\n block: [\"PUT /user/blocks/{username}\"],\n checkBlocked: [\"GET /user/blocks/{username}\"],\n checkFollowingForUser: [\"GET /users/{username}/following/{target_user}\"],\n checkPersonIsFollowedByAuthenticated: [\"GET /user/following/{username}\"],\n createGpgKeyForAuthenticated: [\n \"POST /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"createGpgKeyForAuthenticatedUser\"] },\n ],\n createGpgKeyForAuthenticatedUser: [\"POST /user/gpg_keys\"],\n createPublicSshKeyForAuthenticated: [\n \"POST /user/keys\",\n {},\n { renamed: [\"users\", \"createPublicSshKeyForAuthenticatedUser\"] },\n ],\n createPublicSshKeyForAuthenticatedUser: [\"POST /user/keys\"],\n createSshSigningKeyForAuthenticatedUser: [\"POST /user/ssh_signing_keys\"],\n deleteEmailForAuthenticated: [\n \"DELETE /user/emails\",\n {},\n { renamed: [\"users\", \"deleteEmailForAuthenticatedUser\"] },\n ],\n deleteEmailForAuthenticatedUser: [\"DELETE /user/emails\"],\n deleteGpgKeyForAuthenticated: [\n \"DELETE /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"deleteGpgKeyForAuthenticatedUser\"] },\n ],\n deleteGpgKeyForAuthenticatedUser: [\"DELETE /user/gpg_keys/{gpg_key_id}\"],\n deletePublicSshKeyForAuthenticated: [\n \"DELETE /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"deletePublicSshKeyForAuthenticatedUser\"] },\n ],\n deletePublicSshKeyForAuthenticatedUser: [\"DELETE /user/keys/{key_id}\"],\n deleteSocialAccountForAuthenticatedUser: [\"DELETE /user/social_accounts\"],\n deleteSshSigningKeyForAuthenticatedUser: [\n \"DELETE /user/ssh_signing_keys/{ssh_signing_key_id}\",\n ],\n follow: [\"PUT /user/following/{username}\"],\n getAuthenticated: [\"GET /user\"],\n getByUsername: [\"GET /users/{username}\"],\n getContextForUser: [\"GET /users/{username}/hovercard\"],\n getGpgKeyForAuthenticated: [\n \"GET /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"getGpgKeyForAuthenticatedUser\"] },\n ],\n getGpgKeyForAuthenticatedUser: [\"GET /user/gpg_keys/{gpg_key_id}\"],\n getPublicSshKeyForAuthenticated: [\n \"GET /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"getPublicSshKeyForAuthenticatedUser\"] },\n ],\n getPublicSshKeyForAuthenticatedUser: [\"GET /user/keys/{key_id}\"],\n getSshSigningKeyForAuthenticatedUser: [\n \"GET /user/ssh_signing_keys/{ssh_signing_key_id}\",\n ],\n list: [\"GET /users\"],\n listBlockedByAuthenticated: [\n \"GET /user/blocks\",\n {},\n { renamed: [\"users\", \"listBlockedByAuthenticatedUser\"] },\n ],\n listBlockedByAuthenticatedUser: [\"GET /user/blocks\"],\n listEmailsForAuthenticated: [\n \"GET /user/emails\",\n {},\n { renamed: [\"users\", \"listEmailsForAuthenticatedUser\"] },\n ],\n listEmailsForAuthenticatedUser: [\"GET /user/emails\"],\n listFollowedByAuthenticated: [\n \"GET /user/following\",\n {},\n { renamed: [\"users\", \"listFollowedByAuthenticatedUser\"] },\n ],\n listFollowedByAuthenticatedUser: [\"GET /user/following\"],\n listFollowersForAuthenticatedUser: [\"GET /user/followers\"],\n listFollowersForUser: [\"GET /users/{username}/followers\"],\n listFollowingForUser: [\"GET /users/{username}/following\"],\n listGpgKeysForAuthenticated: [\n \"GET /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"listGpgKeysForAuthenticatedUser\"] },\n ],\n listGpgKeysForAuthenticatedUser: [\"GET /user/gpg_keys\"],\n listGpgKeysForUser: [\"GET /users/{username}/gpg_keys\"],\n listPublicEmailsForAuthenticated: [\n \"GET /user/public_emails\",\n {},\n { renamed: [\"users\", \"listPublicEmailsForAuthenticatedUser\"] },\n ],\n listPublicEmailsForAuthenticatedUser: [\"GET /user/public_emails\"],\n listPublicKeysForUser: [\"GET /users/{username}/keys\"],\n listPublicSshKeysForAuthenticated: [\n \"GET /user/keys\",\n {},\n { renamed: [\"users\", \"listPublicSshKeysForAuthenticatedUser\"] },\n ],\n listPublicSshKeysForAuthenticatedUser: [\"GET /user/keys\"],\n listSocialAccountsForAuthenticatedUser: [\"GET /user/social_accounts\"],\n listSocialAccountsForUser: [\"GET /users/{username}/social_accounts\"],\n listSshSigningKeysForAuthenticatedUser: [\"GET /user/ssh_signing_keys\"],\n listSshSigningKeysForUser: [\"GET /users/{username}/ssh_signing_keys\"],\n setPrimaryEmailVisibilityForAuthenticated: [\n \"PATCH /user/email/visibility\",\n {},\n { renamed: [\"users\", \"setPrimaryEmailVisibilityForAuthenticatedUser\"] },\n ],\n setPrimaryEmailVisibilityForAuthenticatedUser: [\n \"PATCH /user/email/visibility\",\n ],\n unblock: [\"DELETE /user/blocks/{username}\"],\n unfollow: [\"DELETE /user/following/{username}\"],\n updateAuthenticated: [\"PATCH /user\"],\n },\n};\n\nexport default Endpoints;\n"], + "mappings": "AACA,MAAM,YAA6C;AAAA,EACjD,SAAS;AAAA,IACP,yCAAyC;AAAA,MACvC;AAAA,IACF;AAAA,IACA,0CAA0C;AAAA,MACxC;AAAA,IACF;AAAA,IACA,4BAA4B;AAAA,MAC1B;AAAA,IACF;AAAA,IACA,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,IACF;AAAA,IACA,iCAAiC;AAAA,MAC/B;AAAA,IACF;AAAA,IACA,yBAAyB,CAAC,+CAA+C;AAAA,IACzE,0BAA0B;AAAA,MACxB;AAAA,IACF;AAAA,IACA,mBAAmB,CAAC,oCAAoC;AAAA,IACxD,+BAA+B;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,gCAAgC;AAAA,MAC9B;AAAA,IACF;AAAA,IACA,yBAAyB,CAAC,+CAA+C;AAAA,IACzE,0BAA0B;AAAA,MACxB;AAAA,IACF;AAAA,IACA,oBAAoB,CAAC,8CAA8C;AAAA,IACnE,wBAAwB;AAAA,MACtB;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,IACF;AAAA,IACA,gBAAgB;AAAA,MACd;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,IACF;AAAA,IACA,iBAAiB,CAAC,kDAAkD;AAAA,IACpE,mBAAmB,CAAC,6CAA6C;AAAA,IACjE,kBAAkB;AAAA,MAChB;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,IACF;AAAA,IACA,+BAA+B;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,gCAAgC;AAAA,MAC9B;AAAA,IACF;AAAA,IACA,mBAAmB,CAAC,oDAAoD;AAAA,IACxE,uBAAuB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,oDAAoD;AAAA,MAClD;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,IACF;AAAA,IACA,+BAA+B;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,gCAAgC;AAAA,MAC9B;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,IACF;AAAA,IACA,mDAAmD;AAAA,MACjD;AAAA,IACF;AAAA,IACA,gBAAgB;AAAA,MACd;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,IACF;AAAA,IACA,+BAA+B;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,gCAAgC;AAAA,MAC9B;AAAA,IACF;AAAA,IACA,qBAAqB,CAAC,0CAA0C;AAAA,IAChE,sBAAsB,CAAC,+CAA+C;AAAA,IACtE,kCAAkC;AAAA,MAChC;AAAA,IACF;AAAA,IACA,4BAA4B,CAAC,qCAAqC;AAAA,IAClE,+BAA+B;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,6BAA6B;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,aAAa,CAAC,2DAA2D;AAAA,IACzE,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,IACF;AAAA,IACA,wDAAwD;AAAA,MACtD;AAAA,IACF;AAAA,IACA,sDAAsD;AAAA,MACpD;AAAA,IACF;AAAA,IACA,yCAAyC;AAAA,MACvC;AAAA,IACF;AAAA,IACA,uCAAuC;AAAA,MACrC;AAAA,IACF;AAAA,IACA,sBAAsB,CAAC,iDAAiD;AAAA,IACxE,iBAAiB,CAAC,4CAA4C;AAAA,IAC9D,cAAc,CAAC,+CAA+C;AAAA,IAC9D,gBAAgB,CAAC,0CAA0C;AAAA,IAC3D,6BAA6B;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,WAAW,uCAAuC,EAAE;AAAA,IAClE;AAAA,IACA,kBAAkB,CAAC,sDAAsD;AAAA,IACzE,eAAe,CAAC,yDAAyD;AAAA,IACzE,iBAAiB,CAAC,oDAAoD;AAAA,IACtE,kBAAkB;AAAA,MAChB;AAAA,IACF;AAAA,IACA,2BAA2B,CAAC,6CAA6C;AAAA,IACzE,4BAA4B;AAAA,MAC1B;AAAA,IACF;AAAA,IACA,aAAa,CAAC,2DAA2D;AAAA,IACzE,+BAA+B;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,gBAAgB,CAAC,iDAAiD;AAAA,IAClE,uBAAuB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,IACF;AAAA,IACA,sBAAsB,CAAC,6CAA6C;AAAA,IACpE,wBAAwB;AAAA,MACtB;AAAA,IACF;AAAA,IACA,0BAA0B;AAAA,MACxB;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,IACF;AAAA,IACA,+BAA+B;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,qCAAqC;AAAA,MACnC;AAAA,IACF;AAAA,IACA,sCAAsC;AAAA,MACpC;AAAA,IACF;AAAA,IACA,gBAAgB,CAAC,iCAAiC;AAAA,IAClD,kBAAkB,CAAC,mCAAmC;AAAA,IACtD,6BAA6B;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,+BAA+B;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,iBAAiB,CAAC,2CAA2C;AAAA,IAC7D,mBAAmB,CAAC,6CAA6C;AAAA,IACjE,mBAAmB,CAAC,6CAA6C;AAAA,IACjE,8BAA8B,CAAC,2CAA2C;AAAA,IAC1E,+BAA+B;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,+BAA+B;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,iCAAiC;AAAA,MAC/B;AAAA,IACF;AAAA,IACA,0DAA0D;AAAA,MACxD;AAAA,IACF;AAAA,IACA,6BAA6B,CAAC,iCAAiC;AAAA,IAC/D,8BAA8B,CAAC,2CAA2C;AAAA,IAC1E,0BAA0B;AAAA,MACxB;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,IACF;AAAA,IACA,yBAAyB,CAAC,wCAAwC;AAAA,IAClE,wBAAwB;AAAA,MACtB;AAAA,IACF;AAAA,IACA,eAAe,CAAC,wDAAwD;AAAA,IACxE,yBAAyB;AAAA,MACvB;AAAA,IACF;AAAA,IACA,iDAAiD;AAAA,MAC/C;AAAA,IACF;AAAA,IACA,kDAAkD;AAAA,MAChD;AAAA,IACF;AAAA,IACA,6CAA6C;AAAA,MAC3C;AAAA,IACF;AAAA,IACA,8CAA8C;AAAA,MAC5C;AAAA,IACF;AAAA,IACA,iCAAiC;AAAA,MAC/B;AAAA,IACF;AAAA,IACA,mCAAmC;AAAA,MACjC;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,IACF;AAAA,IACA,gCAAgC;AAAA,MAC9B;AAAA,IACF;AAAA,IACA,+BAA+B;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,6BAA6B;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,0CAA0C;AAAA,MACxC;AAAA,IACF;AAAA,IACA,2CAA2C;AAAA,MACzC;AAAA,IACF;AAAA,IACA,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,wDAAwD;AAAA,MACtD;AAAA,IACF;AAAA,IACA,sDAAsD;AAAA,MACpD;AAAA,IACF;AAAA,IACA,yCAAyC;AAAA,MACvC;AAAA,IACF;AAAA,IACA,uCAAuC;AAAA,MACrC;AAAA,IACF;AAAA,IACA,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,gCAAgC;AAAA,MAC9B;AAAA,IACF;AAAA,IACA,yDAAyD;AAAA,MACvD;AAAA,IACF;AAAA,IACA,+BAA+B;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,IACF;AAAA,IACA,mBAAmB,CAAC,4CAA4C;AAAA,IAChE,oBAAoB;AAAA,MAClB;AAAA,IACF;AAAA,EACF;AAAA,EACA,UAAU;AAAA,IACR,uCAAuC,CAAC,kCAAkC;AAAA,IAC1E,wBAAwB,CAAC,2CAA2C;AAAA,IACpE,0BAA0B;AAAA,MACxB;AAAA,IACF;AAAA,IACA,UAAU,CAAC,YAAY;AAAA,IACvB,qBAAqB,CAAC,wCAAwC;AAAA,IAC9D,WAAW,CAAC,wCAAwC;AAAA,IACpD,2CAA2C;AAAA,MACzC;AAAA,IACF;AAAA,IACA,gCAAgC,CAAC,8BAA8B;AAAA,IAC/D,uCAAuC,CAAC,oBAAoB;AAAA,IAC5D,mCAAmC;AAAA,MACjC;AAAA,IACF;AAAA,IACA,kBAAkB,CAAC,aAAa;AAAA,IAChC,gCAAgC,CAAC,qCAAqC;AAAA,IACtE,yBAAyB,CAAC,qCAAqC;AAAA,IAC/D,qBAAqB,CAAC,wBAAwB;AAAA,IAC9C,2BAA2B,CAAC,uCAAuC;AAAA,IACnE,iCAAiC;AAAA,MAC/B;AAAA,IACF;AAAA,IACA,gBAAgB,CAAC,kCAAkC;AAAA,IACnD,2CAA2C;AAAA,MACzC;AAAA,IACF;AAAA,IACA,qCAAqC,CAAC,mBAAmB;AAAA,IACzD,wBAAwB,CAAC,+BAA+B;AAAA,IACxD,wBAAwB,CAAC,qCAAqC;AAAA,IAC9D,uBAAuB,CAAC,sCAAsC;AAAA,IAC9D,sCAAsC,CAAC,yBAAyB;AAAA,IAChE,qBAAqB,CAAC,uCAAuC;AAAA,IAC7D,yBAAyB,CAAC,oBAAoB;AAAA,IAC9C,6BAA6B,CAAC,yCAAyC;AAAA,IACvE,kBAAkB,CAAC,2CAA2C;AAAA,IAC9D,kBAAkB,CAAC,0CAA0C;AAAA,IAC7D,qBAAqB,CAAC,wCAAwC;AAAA,IAC9D,uBAAuB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,8BAA8B,CAAC,kCAAkC;AAAA,IACjE,gCAAgC,CAAC,qCAAqC;AAAA,EACxE;AAAA,EACA,MAAM;AAAA,IACJ,uBAAuB;AAAA,MACrB;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,QAAQ,2CAA2C,EAAE;AAAA,IACnE;AAAA,IACA,2CAA2C;AAAA,MACzC;AAAA,IACF;AAAA,IACA,YAAY,CAAC,sCAAsC;AAAA,IACnD,oBAAoB,CAAC,wCAAwC;AAAA,IAC7D,+BAA+B;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,qBAAqB,CAAC,wCAAwC;AAAA,IAC9D,oBAAoB,CAAC,6CAA6C;AAAA,IAClE,aAAa,CAAC,wCAAwC;AAAA,IACtD,kBAAkB,CAAC,UAAU;AAAA,IAC7B,WAAW,CAAC,sBAAsB;AAAA,IAClC,iBAAiB,CAAC,0CAA0C;AAAA,IAC5D,oBAAoB,CAAC,8BAA8B;AAAA,IACnD,qBAAqB,CAAC,wCAAwC;AAAA,IAC9D,+BAA+B;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,sCAAsC;AAAA,MACpC;AAAA,IACF;AAAA,IACA,qBAAqB,CAAC,oCAAoC;AAAA,IAC1D,wBAAwB,CAAC,sBAAsB;AAAA,IAC/C,oBAAoB,CAAC,wCAAwC;AAAA,IAC7D,qBAAqB,CAAC,mDAAmD;AAAA,IACzE,4BAA4B;AAAA,MAC1B;AAAA,IACF;AAAA,IACA,2CAA2C;AAAA,MACzC;AAAA,IACF;AAAA,IACA,6CAA6C;AAAA,MAC3C;AAAA,IACF;AAAA,IACA,mBAAmB,CAAC,wBAAwB;AAAA,IAC5C,uCAAuC,CAAC,yBAAyB;AAAA,IACjE,WAAW,CAAC,gCAAgC;AAAA,IAC5C,kBAAkB,CAAC,wCAAwC;AAAA,IAC3D,mCAAmC,CAAC,gCAAgC;AAAA,IACpE,uCAAuC,CAAC,iCAAiC;AAAA,IACzE,8CAA8C;AAAA,MAC5C;AAAA,IACF;AAAA,IACA,uBAAuB,CAAC,0BAA0B;AAAA,IAClD,0BAA0B;AAAA,MACxB;AAAA,IACF;AAAA,IACA,4BAA4B;AAAA,MAC1B;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,QAAQ,gDAAgD,EAAE;AAAA,IACxE;AAAA,IACA,gDAAgD;AAAA,MAC9C;AAAA,IACF;AAAA,IACA,YAAY,CAAC,uCAAuC;AAAA,IACpD,+BAA+B,CAAC,4BAA4B;AAAA,IAC5D,YAAY,CAAC,6CAA6C;AAAA,IAC1D,qBAAqB,CAAC,oDAAoD;AAAA,IAC1E,uBAAuB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,2BAA2B,CAAC,wBAAwB;AAAA,EACtD;AAAA,EACA,SAAS;AAAA,IACP,4BAA4B,CAAC,0CAA0C;AAAA,IACvE,6BAA6B;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,6BAA6B,CAAC,2CAA2C;AAAA,IACzE,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,4BAA4B;AAAA,MAC1B;AAAA,IACF;AAAA,IACA,6BAA6B;AAAA,MAC3B;AAAA,IACF;AAAA,EACF;AAAA,EACA,QAAQ;AAAA,IACN,QAAQ,CAAC,uCAAuC;AAAA,IAChD,aAAa,CAAC,yCAAyC;AAAA,IACvD,KAAK,CAAC,qDAAqD;AAAA,IAC3D,UAAU,CAAC,yDAAyD;AAAA,IACpE,iBAAiB;AAAA,MACf;AAAA,IACF;AAAA,IACA,YAAY,CAAC,oDAAoD;AAAA,IACjE,cAAc;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB,CAAC,sDAAsD;AAAA,IACzE,cAAc;AAAA,MACZ;AAAA,IACF;AAAA,IACA,gBAAgB;AAAA,MACd;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,IACF;AAAA,IACA,QAAQ,CAAC,uDAAuD;AAAA,EAClE;AAAA,EACA,cAAc;AAAA,IACZ,gBAAgB;AAAA,MACd;AAAA,IACF;AAAA,IACA,UAAU;AAAA,MACR;AAAA,MACA,CAAC;AAAA,MACD,EAAE,mBAAmB,EAAE,UAAU,eAAe,EAAE;AAAA,IACpD;AAAA,IACA,aAAa;AAAA,MACX;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,IACF;AAAA,IACA,iBAAiB,CAAC,uDAAuD;AAAA,IACzE,UAAU,CAAC,2DAA2D;AAAA,IACtE,oBAAoB;AAAA,MAClB;AAAA,IACF;AAAA,IACA,kBAAkB,CAAC,sCAAsC;AAAA,IACzD,mBAAmB,CAAC,gDAAgD;AAAA,IACpE,qBAAqB;AAAA,MACnB;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,gBAAgB,oBAAoB,EAAE;AAAA,IACpD;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,oBAAoB,CAAC,kDAAkD;AAAA,IACvE,aAAa;AAAA,MACX;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,IACF;AAAA,IACA,aAAa,CAAC,iDAAiD;AAAA,EACjE;AAAA,EACA,gBAAgB;AAAA,IACd,sBAAsB,CAAC,uBAAuB;AAAA,IAC9C,gBAAgB,CAAC,6BAA6B;AAAA,EAChD;AAAA,EACA,YAAY;AAAA,IACV,4CAA4C;AAAA,MAC1C;AAAA,IACF;AAAA,IACA,4BAA4B;AAAA,MAC1B;AAAA,IACF;AAAA,IACA,iCAAiC;AAAA,MAC/B;AAAA,IACF;AAAA,IACA,uCAAuC;AAAA,MACrC;AAAA,IACF;AAAA,IACA,4BAA4B,CAAC,uBAAuB;AAAA,IACpD,yBAAyB;AAAA,MACvB;AAAA,IACF;AAAA,IACA,0BAA0B;AAAA,MACxB;AAAA,IACF;AAAA,IACA,0CAA0C;AAAA,MACxC;AAAA,IACF;AAAA,IACA,kCAAkC;AAAA,MAChC;AAAA,IACF;AAAA,IACA,oCAAoC;AAAA,MAClC;AAAA,IACF;AAAA,IACA,4BAA4B,CAAC,0CAA0C;AAAA,IACvE,wBAAwB;AAAA,MACtB;AAAA,IACF;AAAA,IACA,iBAAiB,CAAC,qDAAqD;AAAA,IACvE,kBAAkB;AAAA,MAChB;AAAA,IACF;AAAA,IACA,kCAAkC;AAAA,MAChC;AAAA,IACF;AAAA,IACA,4BAA4B;AAAA,MAC1B;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,IACF;AAAA,IACA,sCAAsC;AAAA,MACpC;AAAA,IACF;AAAA,IACA,yBAAyB,CAAC,uCAAuC;AAAA,IACjE,iBAAiB,CAAC,+CAA+C;AAAA,IACjE,cAAc,CAAC,kDAAkD;AAAA,IACjE,kCAAkC;AAAA,MAChC;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,IACF;AAAA,IACA,eAAe;AAAA,MACb;AAAA,IACF;AAAA,IACA,+BAA+B;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,mDAAmD;AAAA,MACjD;AAAA,IACF;AAAA,IACA,0BAA0B,CAAC,sBAAsB;AAAA,IACjD,oBAAoB;AAAA,MAClB;AAAA,MACA,CAAC;AAAA,MACD,EAAE,mBAAmB,EAAE,QAAQ,MAAM,EAAE;AAAA,IACzC;AAAA,IACA,sCAAsC;AAAA,MACpC;AAAA,IACF;AAAA,IACA,gBAAgB,CAAC,oCAAoC;AAAA,IACrD,iBAAiB,CAAC,8CAA8C;AAAA,IAChE,+CAA+C;AAAA,MAC7C;AAAA,IACF;AAAA,IACA,iCAAiC,CAAC,8BAA8B;AAAA,IAChE,+BAA+B;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,uCAAuC;AAAA,MACrC;AAAA,IACF;AAAA,IACA,6BAA6B;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,+CAA+C;AAAA,MAC7C;AAAA,IACF;AAAA,IACA,iCAAiC;AAAA,MAC/B;AAAA,IACF;AAAA,IACA,kCAAkC;AAAA,MAChC;AAAA,IACF;AAAA,IACA,8CAA8C;AAAA,MAC5C;AAAA,IACF;AAAA,IACA,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,2BAA2B,CAAC,8CAA8C;AAAA,IAC1E,0BAA0B,CAAC,6CAA6C;AAAA,IACxE,oBAAoB;AAAA,MAClB;AAAA,IACF;AAAA,IACA,4BAA4B,CAAC,yCAAyC;AAAA,EACxE;AAAA,EACA,SAAS;AAAA,IACP,yBAAyB;AAAA,MACvB;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,IACF;AAAA,IACA,qCAAqC;AAAA,MACnC;AAAA,IACF;AAAA,IACA,qCAAqC;AAAA,MACnC;AAAA,IACF;AAAA,IACA,+BAA+B,CAAC,iCAAiC;AAAA,IACjE,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,kBAAkB,CAAC,uCAAuC;AAAA,IAC1D,2BAA2B,CAAC,6CAA6C;AAAA,IACzE,oBAAoB,CAAC,+BAA+B;AAAA,IACpD,qBAAqB,CAAC,gDAAgD;AAAA,EACxE;AAAA,EACA,YAAY;AAAA,IACV,4BAA4B;AAAA,MAC1B;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,IACF;AAAA,IACA,0BAA0B;AAAA,MACxB;AAAA,IACF;AAAA,IACA,iBAAiB,CAAC,qDAAqD;AAAA,IACvE,kBAAkB;AAAA,MAChB;AAAA,IACF;AAAA,IACA,UAAU,CAAC,4DAA4D;AAAA,IACvE,iBAAiB,CAAC,+CAA+C;AAAA,IACjE,cAAc,CAAC,kDAAkD;AAAA,IACjE,kBAAkB;AAAA,MAChB;AAAA,IACF;AAAA,IACA,eAAe;AAAA,MACb;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,IACF;AAAA,IACA,kBAAkB,CAAC,mCAAmC;AAAA,IACtD,mBAAmB,CAAC,6CAA6C;AAAA,IACjE,gBAAgB,CAAC,oCAAoC;AAAA,IACrD,iBAAiB,CAAC,8CAA8C;AAAA,IAChE,+BAA+B;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,iCAAiC;AAAA,MAC/B;AAAA,IACF;AAAA,IACA,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,aAAa;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,0BAA0B;AAAA,MACxB;AAAA,IACF;AAAA,IACA,WAAW;AAAA,MACT;AAAA,IACF;AAAA,IACA,YAAY,CAAC,iDAAiD;AAAA,EAChE;AAAA,EACA,QAAQ,EAAE,KAAK,CAAC,aAAa,EAAE;AAAA,EAC/B,OAAO;AAAA,IACL,gBAAgB,CAAC,2BAA2B;AAAA,IAC5C,QAAQ,CAAC,aAAa;AAAA,IACtB,eAAe,CAAC,gCAAgC;AAAA,IAChD,QAAQ,CAAC,yBAAyB;AAAA,IAClC,eAAe,CAAC,+CAA+C;AAAA,IAC/D,MAAM,CAAC,6BAA6B;AAAA,IACpC,KAAK,CAAC,sBAAsB;AAAA,IAC5B,YAAY,CAAC,4CAA4C;AAAA,IACzD,aAAa,CAAC,4BAA4B;AAAA,IAC1C,MAAM,CAAC,YAAY;AAAA,IACnB,cAAc,CAAC,+BAA+B;AAAA,IAC9C,aAAa,CAAC,8BAA8B;AAAA,IAC5C,aAAa,CAAC,6BAA6B;AAAA,IAC3C,WAAW,CAAC,4BAA4B;AAAA,IACxC,YAAY,CAAC,mBAAmB;AAAA,IAChC,aAAa,CAAC,oBAAoB;AAAA,IAClC,MAAM,CAAC,2BAA2B;AAAA,IAClC,QAAQ,CAAC,8BAA8B;AAAA,IACvC,QAAQ,CAAC,wBAAwB;AAAA,IACjC,eAAe,CAAC,8CAA8C;AAAA,EAChE;AAAA,EACA,KAAK;AAAA,IACH,YAAY,CAAC,sCAAsC;AAAA,IACnD,cAAc,CAAC,wCAAwC;AAAA,IACvD,WAAW,CAAC,qCAAqC;AAAA,IACjD,WAAW,CAAC,qCAAqC;AAAA,IACjD,YAAY,CAAC,sCAAsC;AAAA,IACnD,WAAW,CAAC,6CAA6C;AAAA,IACzD,SAAS,CAAC,gDAAgD;AAAA,IAC1D,WAAW,CAAC,oDAAoD;AAAA,IAChE,QAAQ,CAAC,yCAAyC;AAAA,IAClD,QAAQ,CAAC,8CAA8C;AAAA,IACvD,SAAS,CAAC,gDAAgD;AAAA,IAC1D,kBAAkB,CAAC,mDAAmD;AAAA,IACtE,WAAW,CAAC,4CAA4C;AAAA,EAC1D;AAAA,EACA,WAAW;AAAA,IACT,iBAAiB,CAAC,0BAA0B;AAAA,IAC5C,aAAa,CAAC,iCAAiC;AAAA,EACjD;AAAA,EACA,cAAc;AAAA,IACZ,qCAAqC,CAAC,8BAA8B;AAAA,IACpE,uBAAuB,CAAC,oCAAoC;AAAA,IAC5D,wBAAwB,CAAC,8CAA8C;AAAA,IACvE,mCAAmC;AAAA,MACjC;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,gBAAgB,qCAAqC,EAAE;AAAA,IACrE;AAAA,IACA,wCAAwC,CAAC,iCAAiC;AAAA,IAC1E,0BAA0B,CAAC,uCAAuC;AAAA,IAClE,2BAA2B;AAAA,MACzB;AAAA,IACF;AAAA,IACA,sCAAsC;AAAA,MACpC;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,gBAAgB,wCAAwC,EAAE;AAAA,IACxE;AAAA,IACA,qCAAqC,CAAC,8BAA8B;AAAA,IACpE,uBAAuB,CAAC,oCAAoC;AAAA,IAC5D,wBAAwB,CAAC,8CAA8C;AAAA,IACvE,mCAAmC;AAAA,MACjC;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,gBAAgB,qCAAqC,EAAE;AAAA,IACrE;AAAA,EACF;AAAA,EACA,QAAQ;AAAA,IACN,cAAc;AAAA,MACZ;AAAA,IACF;AAAA,IACA,WAAW,CAAC,yDAAyD;AAAA,IACrE,wBAAwB,CAAC,gDAAgD;AAAA,IACzE,+BAA+B;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,QAAQ,CAAC,mCAAmC;AAAA,IAC5C,eAAe;AAAA,MACb;AAAA,IACF;AAAA,IACA,aAAa,CAAC,mCAAmC;AAAA,IACjD,iBAAiB,CAAC,uCAAuC;AAAA,IACzD,eAAe;AAAA,MACb;AAAA,IACF;AAAA,IACA,aAAa,CAAC,4CAA4C;AAAA,IAC1D,iBAAiB;AAAA,MACf;AAAA,IACF;AAAA,IACA,KAAK,CAAC,iDAAiD;AAAA,IACvD,YAAY,CAAC,wDAAwD;AAAA,IACrE,UAAU,CAAC,oDAAoD;AAAA,IAC/D,UAAU,CAAC,yCAAyC;AAAA,IACpD,cAAc,CAAC,yDAAyD;AAAA,IACxE,MAAM,CAAC,aAAa;AAAA,IACpB,eAAe,CAAC,qCAAqC;AAAA,IACrD,cAAc,CAAC,0DAA0D;AAAA,IACzE,qBAAqB,CAAC,2CAA2C;AAAA,IACjE,YAAY,CAAC,wDAAwD;AAAA,IACrE,mBAAmB,CAAC,yCAAyC;AAAA,IAC7D,uBAAuB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,0BAA0B,CAAC,kBAAkB;AAAA,IAC7C,YAAY,CAAC,wBAAwB;AAAA,IACrC,aAAa,CAAC,kCAAkC;AAAA,IAChD,wBAAwB;AAAA,MACtB;AAAA,IACF;AAAA,IACA,mBAAmB,CAAC,kCAAkC;AAAA,IACtD,mBAAmB;AAAA,MACjB;AAAA,IACF;AAAA,IACA,gBAAgB,CAAC,sCAAsC;AAAA,IACvD,MAAM,CAAC,sDAAsD;AAAA,IAC7D,iBAAiB;AAAA,MACf;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf;AAAA,IACF;AAAA,IACA,aAAa;AAAA,MACX;AAAA,IACF;AAAA,IACA,WAAW,CAAC,wDAAwD;AAAA,IACpE,QAAQ,CAAC,yDAAyD;AAAA,IAClE,QAAQ,CAAC,mDAAmD;AAAA,IAC5D,eAAe,CAAC,0DAA0D;AAAA,IAC1E,aAAa,CAAC,2CAA2C;AAAA,IACzD,iBAAiB;AAAA,MACf;AAAA,IACF;AAAA,EACF;AAAA,EACA,UAAU;AAAA,IACR,KAAK,CAAC,yBAAyB;AAAA,IAC/B,oBAAoB,CAAC,eAAe;AAAA,IACpC,YAAY,CAAC,mCAAmC;AAAA,EAClD;AAAA,EACA,UAAU;AAAA,IACR,QAAQ,CAAC,gBAAgB;AAAA,IACzB,WAAW;AAAA,MACT;AAAA,MACA,EAAE,SAAS,EAAE,gBAAgB,4BAA4B,EAAE;AAAA,IAC7D;AAAA,EACF;AAAA,EACA,MAAM;AAAA,IACJ,KAAK,CAAC,WAAW;AAAA,IACjB,gBAAgB,CAAC,eAAe;AAAA,IAChC,YAAY,CAAC,cAAc;AAAA,IAC3B,QAAQ,CAAC,UAAU;AAAA,IACnB,MAAM,CAAC,OAAO;AAAA,EAChB;AAAA,EACA,YAAY;AAAA,IACV,mCAAmC;AAAA,MACjC;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,uBAAuB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,gCAAgC;AAAA,MAC9B;AAAA,IACF;AAAA,IACA,+BAA+B,CAAC,qCAAqC;AAAA,IACrE,iBAAiB,CAAC,2CAA2C;AAAA,IAC7D,0BAA0B,CAAC,sBAAsB;AAAA,IACjD,YAAY,CAAC,4BAA4B;AAAA,IACzC,+BAA+B;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,iBAAiB,CAAC,wDAAwD;AAAA,IAC1E,kBAAkB;AAAA,MAChB;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,cAAc,+BAA+B,EAAE;AAAA,IAC7D;AAAA,IACA,2BAA2B,CAAC,uBAAuB;AAAA,IACnD,aAAa,CAAC,6BAA6B;AAAA,IAC3C,gCAAgC;AAAA,MAC9B;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,IACF;AAAA,EACF;AAAA,EACA,MAAM;AAAA,IACJ,gCAAgC;AAAA,MAC9B;AAAA,IACF;AAAA,IACA,mCAAmC;AAAA,MACjC;AAAA,IACF;AAAA,EACF;AAAA,EACA,MAAM;AAAA,IACJ,wBAAwB;AAAA,MACtB;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,WAAW,CAAC,mCAAmC;AAAA,IAC/C,kBAAkB,CAAC,gDAAgD;AAAA,IACnE,kBAAkB,CAAC,mCAAmC;AAAA,IACtD,wBAAwB,CAAC,oCAAoC;AAAA,IAC7D,8BAA8B,CAAC,2CAA2C;AAAA,IAC1E,oCAAoC;AAAA,MAClC;AAAA,IACF;AAAA,IACA,8BAA8B,CAAC,qCAAqC;AAAA,IACpE,kBAAkB,CAAC,8BAA8B;AAAA,IACjD,gCAAgC,CAAC,qCAAqC;AAAA,IACtE,8CAA8C;AAAA,MAC5C;AAAA,IACF;AAAA,IACA,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,eAAe,CAAC,wBAAwB;AAAA,IACxC,QAAQ,CAAC,oBAAoB;AAAA,IAC7B,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,eAAe,CAAC,oCAAoC;AAAA,IACpD,6CAA6C;AAAA,MAC3C;AAAA,IACF;AAAA,IACA,KAAK,CAAC,iBAAiB;AAAA,IACvB,wBAAwB,CAAC,mCAAmC;AAAA,IAC5D,mBAAmB;AAAA,MACjB;AAAA,IACF;AAAA,IACA,mCAAmC,CAAC,kCAAkC;AAAA,IACtE,sBAAsB,CAAC,wCAAwC;AAAA,IAC/D,YAAY,CAAC,8CAA8C;AAAA,IAC3D,YAAY,CAAC,iCAAiC;AAAA,IAC9C,wBAAwB,CAAC,wCAAwC;AAAA,IACjE,oBAAoB;AAAA,MAClB;AAAA,IACF;AAAA,IACA,MAAM,CAAC,oBAAoB;AAAA,IAC3B,sBAAsB,CAAC,+BAA+B;AAAA,IACtD,kBAAkB,CAAC,wBAAwB;AAAA,IAC3C,oCAAoC,CAAC,mCAAmC;AAAA,IACxE,uBAAuB,CAAC,oCAAoC;AAAA,IAC5D,0BAA0B,CAAC,gBAAgB;AAAA,IAC3C,aAAa,CAAC,4BAA4B;AAAA,IAC1C,qBAAqB,CAAC,mDAAmD;AAAA,IACzE,aAAa,CAAC,yBAAyB;AAAA,IACvC,qCAAqC,CAAC,4BAA4B;AAAA,IAClE,kBAAkB,CAAC,oDAAoD;AAAA,IACvE,kBAAkB,CAAC,oDAAoD;AAAA,IACvE,cAAc,CAAC,oCAAoC;AAAA,IACnD,wCAAwC;AAAA,MACtC;AAAA,IACF;AAAA,IACA,0BAA0B,CAAC,uCAAuC;AAAA,IAClE,0BAA0B;AAAA,MACxB;AAAA,IACF;AAAA,IACA,iCAAiC;AAAA,MAC/B;AAAA,IACF;AAAA,IACA,sBAAsB,CAAC,gDAAgD;AAAA,IACvE,eAAe,CAAC,wCAAwC;AAAA,IACxD,wBAAwB,CAAC,6BAA6B;AAAA,IACtD,mBAAmB,CAAC,gCAAgC;AAAA,IACpD,0BAA0B,CAAC,mCAAmC;AAAA,IAC9D,uBAAuB,CAAC,4CAA4C;AAAA,IACpE,cAAc,CAAC,uBAAuB;AAAA,IACtC,6BAA6B;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,aAAa,CAAC,wCAAwC;AAAA,IACtD,0BAA0B;AAAA,MACxB;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,IACF;AAAA,IACA,cAAc,CAAC,uCAAuC;AAAA,IACtD,yBAAyB,CAAC,2CAA2C;AAAA,IACrE,2BAA2B;AAAA,MACzB;AAAA,IACF;AAAA,IACA,4CAA4C;AAAA,MAC1C;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,IACF;AAAA,IACA,uBAAuB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,uBAAuB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,uBAAuB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,IACF;AAAA,IACA,sBAAsB,CAAC,wCAAwC;AAAA,IAC/D,yCAAyC;AAAA,MACvC;AAAA,IACF;AAAA,IACA,aAAa,CAAC,sCAAsC;AAAA,IACpD,QAAQ,CAAC,mBAAmB;AAAA,IAC5B,sCAAsC;AAAA,MACpC;AAAA,IACF;AAAA,IACA,iBAAiB,CAAC,kDAAkD;AAAA,IACpE,mBAAmB,CAAC,yCAAyC;AAAA,IAC7D,eAAe,CAAC,mCAAmC;AAAA,IACnD,2BAA2B,CAAC,0CAA0C;AAAA,EACxE;AAAA,EACA,UAAU;AAAA,IACR,mCAAmC;AAAA,MACjC;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,IACF;AAAA,IACA,0CAA0C;AAAA,MACxC;AAAA,IACF;AAAA,IACA,4BAA4B;AAAA,MAC1B;AAAA,IACF;AAAA,IACA,6BAA6B;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,8CAA8C;AAAA,MAC5C;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,YAAY,2CAA2C,EAAE;AAAA,IACvE;AAAA,IACA,6DAA6D;AAAA,MAC3D;AAAA,MACA,CAAC;AAAA,MACD;AAAA,QACE,SAAS;AAAA,UACP;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA,yDAAyD;AAAA,MACvD;AAAA,IACF;AAAA,IACA,2CAA2C;AAAA,MACzC;AAAA,IACF;AAAA,IACA,4CAA4C;AAAA,MAC1C;AAAA,IACF;AAAA,IACA,gCAAgC;AAAA,MAC9B;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,IACF;AAAA,IACA,uCAAuC;AAAA,MACrC;AAAA,IACF;AAAA,IACA,kCAAkC;AAAA,MAChC;AAAA,IACF;AAAA,IACA,0BAA0B;AAAA,MACxB;AAAA,IACF;AAAA,IACA,4DAA4D;AAAA,MAC1D;AAAA,IACF;AAAA,IACA,uDAAuD;AAAA,MACrD;AAAA,IACF;AAAA,IACA,+CAA+C;AAAA,MAC7C;AAAA,IACF;AAAA,IACA,kCAAkC,CAAC,oBAAoB;AAAA,IACvD,6BAA6B,CAAC,0BAA0B;AAAA,IACxD,qBAAqB,CAAC,gCAAgC;AAAA,IACtD,oCAAoC;AAAA,MAClC;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,IACF;AAAA,IACA,uBAAuB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,2CAA2C;AAAA,MACzC;AAAA,IACF;AAAA,IACA,6BAA6B;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,EACF;AAAA,EACA,UAAU;AAAA,IACR,iBAAiB,CAAC,qDAAqD;AAAA,IACvE,YAAY,CAAC,0CAA0C;AAAA,IACvD,cAAc,CAAC,qCAAqC;AAAA,IACpD,4BAA4B,CAAC,qBAAqB;AAAA,IAClD,cAAc,CAAC,2BAA2B;AAAA,IAC1C,eAAe,CAAC,qCAAqC;AAAA,IACrD,QAAQ,CAAC,+BAA+B;AAAA,IACxC,YAAY,CAAC,0CAA0C;AAAA,IACvD,cAAc,CAAC,sCAAsC;AAAA,IACrD,KAAK,CAAC,4BAA4B;AAAA,IAClC,SAAS,CAAC,uCAAuC;AAAA,IACjD,WAAW,CAAC,mCAAmC;AAAA,IAC/C,sBAAsB;AAAA,MACpB;AAAA,IACF;AAAA,IACA,WAAW,CAAC,yCAAyC;AAAA,IACrD,mBAAmB,CAAC,0CAA0C;AAAA,IAC9D,aAAa,CAAC,oCAAoC;AAAA,IAClD,YAAY,CAAC,0BAA0B;AAAA,IACvC,aAAa,CAAC,oCAAoC;AAAA,IAClD,aAAa,CAAC,gCAAgC;AAAA,IAC9C,UAAU,CAAC,8CAA8C;AAAA,IACzD,YAAY,CAAC,0CAA0C;AAAA,IACvD,oBAAoB;AAAA,MAClB;AAAA,IACF;AAAA,IACA,QAAQ,CAAC,8BAA8B;AAAA,IACvC,YAAY,CAAC,yCAAyC;AAAA,IACtD,cAAc,CAAC,qCAAqC;AAAA,EACtD;AAAA,EACA,OAAO;AAAA,IACL,eAAe,CAAC,qDAAqD;AAAA,IACrE,QAAQ,CAAC,kCAAkC;AAAA,IAC3C,6BAA6B;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,cAAc,CAAC,wDAAwD;AAAA,IACvE,qBAAqB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,eAAe;AAAA,MACb;AAAA,IACF;AAAA,IACA,KAAK,CAAC,+CAA+C;AAAA,IACrD,WAAW;AAAA,MACT;AAAA,IACF;AAAA,IACA,kBAAkB,CAAC,uDAAuD;AAAA,IAC1E,MAAM,CAAC,iCAAiC;AAAA,IACxC,uBAAuB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,aAAa,CAAC,uDAAuD;AAAA,IACrE,WAAW,CAAC,qDAAqD;AAAA,IACjE,wBAAwB;AAAA,MACtB;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,IACF;AAAA,IACA,2BAA2B,CAAC,0CAA0C;AAAA,IACtE,aAAa,CAAC,uDAAuD;AAAA,IACrE,OAAO,CAAC,qDAAqD;AAAA,IAC7D,0BAA0B;AAAA,MACxB;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,IACF;AAAA,IACA,QAAQ,CAAC,iDAAiD;AAAA,IAC1D,cAAc;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,IACF;AAAA,EACF;AAAA,EACA,WAAW,EAAE,KAAK,CAAC,iBAAiB,EAAE;AAAA,EACtC,WAAW;AAAA,IACT,wBAAwB;AAAA,MACtB;AAAA,IACF;AAAA,IACA,gBAAgB;AAAA,MACd;AAAA,IACF;AAAA,IACA,uBAAuB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,mCAAmC;AAAA,MACjC;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,IACF;AAAA,IACA,qCAAqC;AAAA,MACnC;AAAA,IACF;AAAA,IACA,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,IACF;AAAA,IACA,gBAAgB;AAAA,MACd;AAAA,IACF;AAAA,IACA,uBAAuB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,6BAA6B;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,IACF;AAAA,IACA,gCAAgC;AAAA,MAC9B;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,IACF;AAAA,IACA,cAAc,CAAC,2DAA2D;AAAA,IAC1E,qBAAqB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,iCAAiC;AAAA,MAC/B;AAAA,IACF;AAAA,IACA,gBAAgB;AAAA,MACd;AAAA,IACF;AAAA,IACA,mCAAmC;AAAA,MACjC;AAAA,IACF;AAAA,IACA,4BAA4B;AAAA,MAC1B;AAAA,IACF;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IACL,kBAAkB;AAAA,MAChB;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,SAAS,sCAAsC,EAAE;AAAA,IAC/D;AAAA,IACA,sCAAsC;AAAA,MACpC;AAAA,IACF;AAAA,IACA,0BAA0B;AAAA,MACxB;AAAA,MACA,CAAC;AAAA,MACD,EAAE,WAAW,OAAO;AAAA,IACtB;AAAA,IACA,iBAAiB,CAAC,oDAAoD;AAAA,IACtE,wBAAwB;AAAA,MACtB;AAAA,MACA,CAAC;AAAA,MACD,EAAE,WAAW,WAAW;AAAA,IAC1B;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,MACA,CAAC;AAAA,MACD,EAAE,WAAW,QAAQ;AAAA,IACvB;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,MACA,CAAC;AAAA,MACD,EAAE,WAAW,QAAQ;AAAA,IACvB;AAAA,IACA,uBAAuB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,6BAA6B;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,mBAAmB,CAAC,oDAAoD;AAAA,IACxE,oCAAoC;AAAA,MAClC;AAAA,IACF;AAAA,IACA,0BAA0B;AAAA,MACxB;AAAA,IACF;AAAA,IACA,kBAAkB,CAAC,6CAA6C;AAAA,IAChE,gBAAgB,CAAC,mDAAmD;AAAA,IACpE,4BAA4B;AAAA,MAC1B;AAAA,IACF;AAAA,IACA,gBAAgB,CAAC,sCAAsC;AAAA,IACvD,qBAAqB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,iCAAiC;AAAA,MAC/B;AAAA,IACF;AAAA,IACA,oBAAoB,CAAC,2CAA2C;AAAA,IAChE,iBAAiB,CAAC,iCAAiC;AAAA,IACnD,kBAAkB,CAAC,wCAAwC;AAAA,IAC3D,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,gCAAgC;AAAA,MAC9B;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,IACF;AAAA,IACA,qBAAqB,CAAC,uCAAuC;AAAA,IAC7D,4BAA4B,CAAC,kBAAkB;AAAA,IAC/C,YAAY,CAAC,kCAAkC;AAAA,IAC/C,aAAa,CAAC,wBAAwB;AAAA,IACtC,sCAAsC;AAAA,MACpC;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,IACF;AAAA,IACA,4BAA4B,CAAC,2CAA2C;AAAA,IACxE,kBAAkB,CAAC,2BAA2B;AAAA,IAC9C,uBAAuB,CAAC,8CAA8C;AAAA,IACtE,iBAAiB,CAAC,kCAAkC;AAAA,IACpD,eAAe,CAAC,qCAAqC;AAAA,IACrD,mBAAmB,CAAC,qCAAqC;AAAA,IACzD,qBAAqB,CAAC,4CAA4C;AAAA,IAClE,qBAAqB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,eAAe,CAAC,kCAAkC;AAAA,IAClD,mBAAmB;AAAA,MACjB;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,SAAS,uCAAuC,EAAE;AAAA,IAChE;AAAA,IACA,uCAAuC;AAAA,MACrC;AAAA,IACF;AAAA,IACA,QAAQ,CAAC,8BAA8B;AAAA,IACvC,0BAA0B;AAAA,MACxB;AAAA,IACF;AAAA,IACA,6BAA6B;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,gBAAgB,CAAC,sDAAsD;AAAA,IACvE,wBAAwB;AAAA,MACtB;AAAA,IACF;AAAA,IACA,qBAAqB,CAAC,oDAAoD;AAAA,IAC1E,iCAAiC;AAAA,MAC/B;AAAA,IACF;AAAA,IACA,iBAAiB,CAAC,4CAA4C;AAAA,IAC9D,kBAAkB;AAAA,MAChB;AAAA,IACF;AAAA,IACA,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,YAAY,CAAC,8CAA8C;AAAA,IAC3D,kBAAkB;AAAA,MAChB;AAAA,IACF;AAAA,IACA,kBAAkB,CAAC,0CAA0C;AAAA,IAC7D,iBAAiB,CAAC,oCAAoC;AAAA,IACtD,mCAAmC;AAAA,MACjC;AAAA,IACF;AAAA,IACA,eAAe,CAAC,oDAAoD;AAAA,IACpE,oBAAoB;AAAA,MAClB;AAAA,IACF;AAAA,IACA,mBAAmB,CAAC,oDAAoD;AAAA,IACxE,qBAAqB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,eAAe,CAAC,8CAA8C;AAAA,IAC9D,+BAA+B;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,iCAAiC;AAAA,MAC/B;AAAA,IACF;AAAA,IACA,sCAAsC;AAAA,MACpC;AAAA,IACF;AAAA,IACA,4BAA4B;AAAA,MAC1B;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,SAAS,wBAAwB,EAAE;AAAA,IACjD;AAAA,IACA,wBAAwB,CAAC,yCAAyC;AAAA,IAClE,wBAAwB,CAAC,yCAAyC;AAAA,IAClE,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,qCAAqC;AAAA,MACnC;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,IACF;AAAA,IACA,KAAK,CAAC,2BAA2B;AAAA,IACjC,uBAAuB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,0BAA0B;AAAA,MACxB;AAAA,IACF;AAAA,IACA,iCAAiC;AAAA,MAC/B;AAAA,IACF;AAAA,IACA,oBAAoB,CAAC,wCAAwC;AAAA,IAC7D,2BAA2B;AAAA,MACzB;AAAA,IACF;AAAA,IACA,cAAc,CAAC,kCAAkC;AAAA,IACjD,oCAAoC;AAAA,MAClC;AAAA,IACF;AAAA,IACA,aAAa,CAAC,mDAAmD;AAAA,IACjE,WAAW,CAAC,6CAA6C;AAAA,IACzD,qBAAqB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,gBAAgB,CAAC,mDAAmD;AAAA,IACpE,WAAW,CAAC,0CAA0C;AAAA,IACtD,uBAAuB,CAAC,gDAAgD;AAAA,IACxE,gCAAgC;AAAA,MAC9B;AAAA,IACF;AAAA,IACA,yBAAyB,CAAC,gDAAgD;AAAA,IAC1E,WAAW,CAAC,yCAAyC;AAAA,IACrD,wBAAwB,CAAC,iDAAiD;AAAA,IAC1E,kBAAkB,CAAC,iDAAiD;AAAA,IACpE,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,4BAA4B,CAAC,6CAA6C;AAAA,IAC1E,YAAY,CAAC,2CAA2C;AAAA,IACxD,sBAAsB,CAAC,8CAA8C;AAAA,IACrE,mCAAmC;AAAA,MACjC;AAAA,IACF;AAAA,IACA,2BAA2B,CAAC,6CAA6C;AAAA,IACzE,cAAc,CAAC,yCAAyC;AAAA,IACxD,eAAe,CAAC,uDAAuD;AAAA,IACvE,2BAA2B;AAAA,MACzB;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,gBAAgB;AAAA,MACd;AAAA,IACF;AAAA,IACA,qBAAqB,CAAC,+CAA+C;AAAA,IACrE,kBAAkB,CAAC,2CAA2C;AAAA,IAC9D,iBAAiB,CAAC,sDAAsD;AAAA,IACxE,kBAAkB,CAAC,sCAAsC;AAAA,IACzD,eAAe,CAAC,uCAAuC;AAAA,IACvD,gBAAgB,CAAC,0BAA0B;AAAA,IAC3C,UAAU,CAAC,iCAAiC;AAAA,IAC5C,eAAe,CAAC,mDAAmD;AAAA,IACnE,oBAAoB;AAAA,MAClB;AAAA,IACF;AAAA,IACA,qBAAqB,CAAC,wCAAwC;AAAA,IAC9D,uBAAuB,CAAC,+CAA+C;AAAA,IACvE,gCAAgC;AAAA,MAC9B;AAAA,IACF;AAAA,IACA,mBAAmB,CAAC,4CAA4C;AAAA,IAChE,WAAW,CAAC,kCAAkC;AAAA,IAC9C,sBAAsB,CAAC,wCAAwC;AAAA,IAC/D,YAAY,CAAC,iDAAiD;AAAA,IAC9D,iBAAiB,CAAC,sDAAsD;AAAA,IACxE,iBAAiB,CAAC,+CAA+C;AAAA,IACjE,kBAAkB;AAAA,MAChB;AAAA,IACF;AAAA,IACA,mBAAmB,CAAC,gDAAgD;AAAA,IACpE,gBAAgB,CAAC,iDAAiD;AAAA,IAClE,iBAAiB,CAAC,oCAAoC;AAAA,IACtD,2BAA2B;AAAA,MACzB;AAAA,IACF;AAAA,IACA,qCAAqC;AAAA,MACnC;AAAA,IACF;AAAA,IACA,aAAa,CAAC,iDAAiD;AAAA,IAC/D,iBAAiB,CAAC,qDAAqD;AAAA,IACvE,qCAAqC;AAAA,MACnC;AAAA,IACF;AAAA,IACA,UAAU,CAAC,yCAAyC;AAAA,IACpD,YAAY,CAAC,2CAA2C;AAAA,IACxD,yBAAyB;AAAA,MACvB;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,IACF;AAAA,IACA,gBAAgB,CAAC,oCAAoC;AAAA,IACrD,eAAe,CAAC,qCAAqC;AAAA,IACrD,cAAc,CAAC,oCAAoC;AAAA,IACnD,2BAA2B;AAAA,MACzB;AAAA,IACF;AAAA,IACA,mBAAmB,CAAC,yCAAyC;AAAA,IAC7D,uBAAuB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,2BAA2B,CAAC,oCAAoC;AAAA,IAChE,0BAA0B;AAAA,MACxB;AAAA,IACF;AAAA,IACA,aAAa,CAAC,mCAAmC;AAAA,IACjD,kBAAkB,CAAC,wCAAwC;AAAA,IAC3D,sCAAsC;AAAA,MACpC;AAAA,IACF;AAAA,IACA,gBAAgB,CAAC,gCAAgC;AAAA,IACjD,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,IACF;AAAA,IACA,iBAAiB,CAAC,uCAAuC;AAAA,IACzD,0BAA0B,CAAC,iBAAiB;AAAA,IAC5C,YAAY,CAAC,uBAAuB;AAAA,IACpC,aAAa,CAAC,6BAA6B;AAAA,IAC3C,WAAW,CAAC,iCAAiC;AAAA,IAC7C,iBAAiB,CAAC,uCAAuC;AAAA,IACzD,qCAAqC,CAAC,kCAAkC;AAAA,IACxE,eAAe,CAAC,qCAAqC;AAAA,IACrD,iBAAiB,CAAC,wCAAwC;AAAA,IAC1D,YAAY,CAAC,mBAAmB;AAAA,IAChC,sCAAsC;AAAA,MACpC;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,IACF;AAAA,IACA,cAAc,CAAC,oCAAoC;AAAA,IACnD,mBAAmB,CAAC,2CAA2C;AAAA,IAC/D,UAAU,CAAC,gCAAgC;AAAA,IAC3C,WAAW,CAAC,iCAAiC;AAAA,IAC7C,uBAAuB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,cAAc,CAAC,iCAAiC;AAAA,IAChD,OAAO,CAAC,mCAAmC;AAAA,IAC3C,eAAe,CAAC,2CAA2C;AAAA,IAC3D,aAAa,CAAC,kDAAkD;AAAA,IAChE,0BAA0B;AAAA,MACxB;AAAA,IACF;AAAA,IACA,6BAA6B;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,MACD,EAAE,WAAW,OAAO;AAAA,IACtB;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,MACA,CAAC;AAAA,MACD,EAAE,WAAW,WAAW;AAAA,IAC1B;AAAA,IACA,6BAA6B;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,8BAA8B;AAAA,MAC5B;AAAA,MACA,CAAC;AAAA,MACD,EAAE,WAAW,QAAQ;AAAA,IACvB;AAAA,IACA,8BAA8B;AAAA,MAC5B;AAAA,MACA,CAAC;AAAA,MACD,EAAE,WAAW,QAAQ;AAAA,IACvB;AAAA,IACA,cAAc,CAAC,qDAAqD;AAAA,IACpE,kBAAkB,CAAC,kCAAkC;AAAA,IACrD,mBAAmB,CAAC,yCAAyC;AAAA,IAC7D,0BAA0B;AAAA,MACxB;AAAA,IACF;AAAA,IACA,0BAA0B;AAAA,MACxB;AAAA,MACA,CAAC;AAAA,MACD,EAAE,WAAW,OAAO;AAAA,IACtB;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,MACA,CAAC;AAAA,MACD,EAAE,WAAW,WAAW;AAAA,IAC1B;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,MACA,CAAC;AAAA,MACD,EAAE,WAAW,QAAQ;AAAA,IACvB;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,MACA,CAAC;AAAA,MACD,EAAE,WAAW,QAAQ;AAAA,IACvB;AAAA,IACA,iBAAiB,CAAC,kDAAkD;AAAA,IACpE,UAAU,CAAC,qCAAqC;AAAA,IAChD,QAAQ,CAAC,6BAA6B;AAAA,IACtC,wBAAwB;AAAA,MACtB;AAAA,IACF;AAAA,IACA,qBAAqB,CAAC,mDAAmD;AAAA,IACzE,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,iCAAiC,CAAC,iCAAiC;AAAA,IACnE,kBAAkB;AAAA,MAChB;AAAA,IACF;AAAA,IACA,kBAAkB,CAAC,uCAAuC;AAAA,IAC1D,mCAAmC;AAAA,MACjC;AAAA,IACF;AAAA,IACA,eAAe,CAAC,mDAAmD;AAAA,IACnE,oBAAoB;AAAA,MAClB;AAAA,IACF;AAAA,IACA,mBAAmB,CAAC,iDAAiD;AAAA,IACrE,4BAA4B;AAAA,MAC1B;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,SAAS,6BAA6B,EAAE;AAAA,IACtD;AAAA,IACA,6BAA6B;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,eAAe,CAAC,6CAA6C;AAAA,IAC7D,4BAA4B;AAAA,MAC1B;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,MACA,EAAE,SAAS,6BAA6B;AAAA,IAC1C;AAAA,EACF;AAAA,EACA,QAAQ;AAAA,IACN,MAAM,CAAC,kBAAkB;AAAA,IACzB,SAAS,CAAC,qBAAqB;AAAA,IAC/B,uBAAuB,CAAC,oBAAoB;AAAA,IAC5C,QAAQ,CAAC,oBAAoB;AAAA,IAC7B,OAAO,CAAC,0BAA0B;AAAA,IAClC,QAAQ,CAAC,oBAAoB;AAAA,IAC7B,OAAO,CAAC,mBAAmB;AAAA,EAC7B;AAAA,EACA,gBAAgB;AAAA,IACd,UAAU;AAAA,MACR;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,IACF;AAAA,IACA,kBAAkB,CAAC,wCAAwC;AAAA,IAC3D,mBAAmB,CAAC,kDAAkD;AAAA,IACtE,uBAAuB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,aAAa;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA,EACA,oBAAoB;AAAA,IAClB,YAAY;AAAA,MACV;AAAA,IACF;AAAA,IACA,kCAAkC;AAAA,MAChC;AAAA,IACF;AAAA,IACA,0BAA0B;AAAA,MACxB;AAAA,IACF;AAAA,IACA,oCAAoC;AAAA,MAClC;AAAA,IACF;AAAA,IACA,mBAAmB,CAAC,2BAA2B;AAAA,IAC/C,uBAAuB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,sBAAsB,CAAC,iBAAiB;AAAA,IACxC,6BAA6B,CAAC,qCAAqC;AAAA,IACnE,0BAA0B,CAAC,+CAA+C;AAAA,IAC1E,0BAA0B;AAAA,MACxB;AAAA,IACF;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IACL,mCAAmC;AAAA,MACjC;AAAA,IACF;AAAA,IACA,oCAAoC;AAAA,MAClC;AAAA,IACF;AAAA,IACA,iCAAiC;AAAA,MAC/B;AAAA,IACF;AAAA,IACA,iCAAiC;AAAA,MAC/B;AAAA,IACF;AAAA,IACA,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,QAAQ,CAAC,wBAAwB;AAAA,IACjC,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,uBAAuB,CAAC,gDAAgD;AAAA,IACxE,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,uBAAuB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,aAAa,CAAC,sCAAsC;AAAA,IACpD,WAAW,CAAC,mCAAmC;AAAA,IAC/C,2BAA2B;AAAA,MACzB;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,IACF;AAAA,IACA,MAAM,CAAC,uBAAuB;AAAA,IAC9B,gBAAgB,CAAC,yCAAyC;AAAA,IAC1D,6BAA6B;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,sBAAsB,CAAC,+CAA+C;AAAA,IACtE,0BAA0B,CAAC,iBAAiB;AAAA,IAC5C,kBAAkB,CAAC,2CAA2C;AAAA,IAC9D,6BAA6B;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,mBAAmB,CAAC,4CAA4C;AAAA,IAChE,gBAAgB,CAAC,yCAAyC;AAAA,IAC1D,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf;AAAA,IACF;AAAA,IACA,8BAA8B;AAAA,MAC5B;AAAA,IACF;AAAA,IACA,uBAAuB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,aAAa,CAAC,qCAAqC;AAAA,EACrD;AAAA,EACA,OAAO;AAAA,IACL,0BAA0B;AAAA,MACxB;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,SAAS,8BAA8B,EAAE;AAAA,IACvD;AAAA,IACA,8BAA8B,CAAC,mBAAmB;AAAA,IAClD,sCAAsC,CAAC,4BAA4B;AAAA,IACnE,OAAO,CAAC,6BAA6B;AAAA,IACrC,cAAc,CAAC,6BAA6B;AAAA,IAC5C,uBAAuB,CAAC,+CAA+C;AAAA,IACvE,sCAAsC,CAAC,gCAAgC;AAAA,IACvE,8BAA8B;AAAA,MAC5B;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,SAAS,kCAAkC,EAAE;AAAA,IAC3D;AAAA,IACA,kCAAkC,CAAC,qBAAqB;AAAA,IACxD,oCAAoC;AAAA,MAClC;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,SAAS,wCAAwC,EAAE;AAAA,IACjE;AAAA,IACA,wCAAwC,CAAC,iBAAiB;AAAA,IAC1D,yCAAyC,CAAC,6BAA6B;AAAA,IACvE,6BAA6B;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,SAAS,iCAAiC,EAAE;AAAA,IAC1D;AAAA,IACA,iCAAiC,CAAC,qBAAqB;AAAA,IACvD,8BAA8B;AAAA,MAC5B;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,SAAS,kCAAkC,EAAE;AAAA,IAC3D;AAAA,IACA,kCAAkC,CAAC,oCAAoC;AAAA,IACvE,oCAAoC;AAAA,MAClC;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,SAAS,wCAAwC,EAAE;AAAA,IACjE;AAAA,IACA,wCAAwC,CAAC,4BAA4B;AAAA,IACrE,yCAAyC,CAAC,8BAA8B;AAAA,IACxE,yCAAyC;AAAA,MACvC;AAAA,IACF;AAAA,IACA,QAAQ,CAAC,gCAAgC;AAAA,IACzC,kBAAkB,CAAC,WAAW;AAAA,IAC9B,eAAe,CAAC,uBAAuB;AAAA,IACvC,mBAAmB,CAAC,iCAAiC;AAAA,IACrD,2BAA2B;AAAA,MACzB;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,SAAS,+BAA+B,EAAE;AAAA,IACxD;AAAA,IACA,+BAA+B,CAAC,iCAAiC;AAAA,IACjE,iCAAiC;AAAA,MAC/B;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,SAAS,qCAAqC,EAAE;AAAA,IAC9D;AAAA,IACA,qCAAqC,CAAC,yBAAyB;AAAA,IAC/D,sCAAsC;AAAA,MACpC;AAAA,IACF;AAAA,IACA,MAAM,CAAC,YAAY;AAAA,IACnB,4BAA4B;AAAA,MAC1B;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,SAAS,gCAAgC,EAAE;AAAA,IACzD;AAAA,IACA,gCAAgC,CAAC,kBAAkB;AAAA,IACnD,4BAA4B;AAAA,MAC1B;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,SAAS,gCAAgC,EAAE;AAAA,IACzD;AAAA,IACA,gCAAgC,CAAC,kBAAkB;AAAA,IACnD,6BAA6B;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,SAAS,iCAAiC,EAAE;AAAA,IAC1D;AAAA,IACA,iCAAiC,CAAC,qBAAqB;AAAA,IACvD,mCAAmC,CAAC,qBAAqB;AAAA,IACzD,sBAAsB,CAAC,iCAAiC;AAAA,IACxD,sBAAsB,CAAC,iCAAiC;AAAA,IACxD,6BAA6B;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,SAAS,iCAAiC,EAAE;AAAA,IAC1D;AAAA,IACA,iCAAiC,CAAC,oBAAoB;AAAA,IACtD,oBAAoB,CAAC,gCAAgC;AAAA,IACrD,kCAAkC;AAAA,MAChC;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,SAAS,sCAAsC,EAAE;AAAA,IAC/D;AAAA,IACA,sCAAsC,CAAC,yBAAyB;AAAA,IAChE,uBAAuB,CAAC,4BAA4B;AAAA,IACpD,mCAAmC;AAAA,MACjC;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,SAAS,uCAAuC,EAAE;AAAA,IAChE;AAAA,IACA,uCAAuC,CAAC,gBAAgB;AAAA,IACxD,wCAAwC,CAAC,2BAA2B;AAAA,IACpE,2BAA2B,CAAC,uCAAuC;AAAA,IACnE,wCAAwC,CAAC,4BAA4B;AAAA,IACrE,2BAA2B,CAAC,wCAAwC;AAAA,IACpE,2CAA2C;AAAA,MACzC;AAAA,MACA,CAAC;AAAA,MACD,EAAE,SAAS,CAAC,SAAS,+CAA+C,EAAE;AAAA,IACxE;AAAA,IACA,+CAA+C;AAAA,MAC7C;AAAA,IACF;AAAA,IACA,SAAS,CAAC,gCAAgC;AAAA,IAC1C,UAAU,CAAC,mCAAmC;AAAA,IAC9C,qBAAqB,CAAC,aAAa;AAAA,EACrC;AACF;AAEA,IAAO,oBAAQ;", + "names": [] +} diff --git a/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js new file mode 100644 index 000000000..2a4f01838 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js @@ -0,0 +1,22 @@ +import { VERSION } from "./version.js"; +import { endpointsToMethods } from "./endpoints-to-methods.js"; +function restEndpointMethods(octokit) { + const api = endpointsToMethods(octokit); + return { + rest: api + }; +} +restEndpointMethods.VERSION = VERSION; +function legacyRestEndpointMethods(octokit) { + const api = endpointsToMethods(octokit); + return { + ...api, + rest: api + }; +} +legacyRestEndpointMethods.VERSION = VERSION; +export { + legacyRestEndpointMethods, + restEndpointMethods +}; +//# sourceMappingURL=index.js.map diff --git a/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js.map b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js.map new file mode 100644 index 000000000..2c3f8263e --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../src/index.ts"], + "sourcesContent": ["import type { Octokit } from \"@octokit/core\";\n\nexport type { RestEndpointMethodTypes } from \"./generated/parameters-and-response-types.js\";\nimport { VERSION } from \"./version.js\";\nimport type { Api } from \"./types.js\";\nimport { endpointsToMethods } from \"./endpoints-to-methods.js\";\n\n// Export the type for downstream users in order to fix a TypeScript error\n// The inferred type of 'Octokit' cannot be named without a reference to '../node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/types.js'. This is likely not portable. A type annotation is necessary.\nexport type { Api };\n\nexport function restEndpointMethods(octokit: Octokit): Api {\n const api = endpointsToMethods(octokit);\n return {\n rest: api,\n };\n}\nrestEndpointMethods.VERSION = VERSION;\n\nexport function legacyRestEndpointMethods(octokit: Octokit): Api[\"rest\"] & Api {\n const api = endpointsToMethods(octokit);\n return {\n ...api,\n rest: api,\n };\n}\nlegacyRestEndpointMethods.VERSION = VERSION;\n"], + "mappings": "AAGA,SAAS,eAAe;AAExB,SAAS,0BAA0B;AAM5B,SAAS,oBAAoB,SAAuB;AACzD,QAAM,MAAM,mBAAmB,OAAO;AACtC,SAAO;AAAA,IACL,MAAM;AAAA,EACR;AACF;AACA,oBAAoB,UAAU;AAEvB,SAAS,0BAA0B,SAAqC;AAC7E,QAAM,MAAM,mBAAmB,OAAO;AACtC,SAAO;AAAA,IACL,GAAG;AAAA,IACH,MAAM;AAAA,EACR;AACF;AACA,0BAA0B,UAAU;", + "names": [] +} diff --git a/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js new file mode 100644 index 000000000..da09a4fb4 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js @@ -0,0 +1,5 @@ +const VERSION = "13.2.6"; +export { + VERSION +}; +//# sourceMappingURL=version.js.map diff --git a/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js.map b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js.map new file mode 100644 index 000000000..346f35c17 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../src/version.ts"], + "sourcesContent": ["export const VERSION = \"13.2.6\";\n"], + "mappings": "AAAO,MAAM,UAAU;", + "names": [] +} diff --git a/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/endpoints-to-methods.d.ts b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/endpoints-to-methods.d.ts new file mode 100644 index 000000000..c46d15bf3 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/endpoints-to-methods.d.ts @@ -0,0 +1,3 @@ +import type { Octokit } from "@octokit/core"; +import type { RestEndpointMethods } from "./generated/method-types.js"; +export declare function endpointsToMethods(octokit: Octokit): RestEndpointMethods; diff --git a/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/endpoints.d.ts b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/endpoints.d.ts new file mode 100644 index 000000000..c2f1e81ad --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/endpoints.d.ts @@ -0,0 +1,3 @@ +import type { EndpointsDefaultsAndDecorations } from "../types.js"; +declare const Endpoints: EndpointsDefaultsAndDecorations; +export default Endpoints; diff --git a/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types.d.ts b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types.d.ts new file mode 100644 index 000000000..b8d03db8f --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types.d.ts @@ -0,0 +1,12341 @@ +import type { EndpointInterface, RequestInterface } from "@octokit/types"; +import type { RestEndpointMethodTypes } from "./parameters-and-response-types.js"; +export type RestEndpointMethods = { + actions: { + /** + * 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. + * + * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + addCustomLabelsToSelfHostedRunnerForOrg: { + (params?: RestEndpointMethodTypes["actions"]["addCustomLabelsToSelfHostedRunnerForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Adds custom labels to a self-hosted runner configured in a repository. + * + * 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. + */ + addCustomLabelsToSelfHostedRunnerForRepo: { + (params?: RestEndpointMethodTypes["actions"]["addCustomLabelsToSelfHostedRunnerForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Adds a repository to an organization secret when the `visibility` for + * 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). + * + * 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. + */ + addSelectedRepoToOrgSecret: { + (params?: RestEndpointMethodTypes["actions"]["addSelectedRepoToOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + * + * 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. + */ + addSelectedRepoToOrgVariable: { + (params?: RestEndpointMethodTypes["actions"]["addSelectedRepoToOrgVariable"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + approveWorkflowRun: { + (params?: RestEndpointMethodTypes["actions"]["approveWorkflowRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Cancels a workflow run using its `id`. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + cancelWorkflowRun: { + (params?: RestEndpointMethodTypes["actions"]["cancelWorkflowRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + createEnvironmentVariable: { + (params?: RestEndpointMethodTypes["actions"]["createEnvironmentVariable"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + createOrUpdateEnvironmentSecret: { + (params?: RestEndpointMethodTypes["actions"]["createOrUpdateEnvironmentSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + createOrUpdateOrgSecret: { + (params?: RestEndpointMethodTypes["actions"]["createOrUpdateOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * 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. + */ + createOrUpdateRepoSecret: { + (params?: RestEndpointMethodTypes["actions"]["createOrUpdateRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates an organization 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`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. + */ + createOrgVariable: { + (params?: RestEndpointMethodTypes["actions"]["createOrgVariable"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + createRegistrationTokenForOrg: { + (params?: RestEndpointMethodTypes["actions"]["createRegistrationTokenForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + createRegistrationTokenForRepo: { + (params?: RestEndpointMethodTypes["actions"]["createRegistrationTokenForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * 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. + */ + createRemoveTokenForOrg: { + (params?: RestEndpointMethodTypes["actions"]["createRemoveTokenForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * 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 repository to use this endpoint. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + createRemoveTokenForRepo: { + (params?: RestEndpointMethodTypes["actions"]["createRemoveTokenForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a repository 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. + */ + createRepoVariable: { + (params?: RestEndpointMethodTypes["actions"]["createRepoVariable"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + createWorkflowDispatch: { + (params?: RestEndpointMethodTypes["actions"]["createWorkflowDispatch"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a GitHub Actions cache for a repository, using a cache ID. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + deleteActionsCacheById: { + (params?: RestEndpointMethodTypes["actions"]["deleteActionsCacheById"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + deleteActionsCacheByKey: { + (params?: RestEndpointMethodTypes["actions"]["deleteActionsCacheByKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes an artifact for a workflow run. + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + deleteArtifact: { + (params?: RestEndpointMethodTypes["actions"]["deleteArtifact"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + deleteEnvironmentSecret: { + (params?: RestEndpointMethodTypes["actions"]["deleteEnvironmentSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + deleteEnvironmentVariable: { + (params?: RestEndpointMethodTypes["actions"]["deleteEnvironmentVariable"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a secret in an organization 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`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. + */ + deleteOrgSecret: { + (params?: RestEndpointMethodTypes["actions"]["deleteOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes an organization 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`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. + */ + deleteOrgVariable: { + (params?: RestEndpointMethodTypes["actions"]["deleteOrgVariable"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a secret in a repository 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. + */ + deleteRepoSecret: { + (params?: RestEndpointMethodTypes["actions"]["deleteRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a repository 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. + */ + deleteRepoVariable: { + (params?: RestEndpointMethodTypes["actions"]["deleteRepoVariable"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * 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. + */ + deleteSelfHostedRunnerFromOrg: { + (params?: RestEndpointMethodTypes["actions"]["deleteSelfHostedRunnerFromOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * 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. + */ + deleteSelfHostedRunnerFromRepo: { + (params?: RestEndpointMethodTypes["actions"]["deleteSelfHostedRunnerFromRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + deleteWorkflowRun: { + (params?: RestEndpointMethodTypes["actions"]["deleteWorkflowRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes all logs for a workflow run. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + deleteWorkflowRunLogs: { + (params?: RestEndpointMethodTypes["actions"]["deleteWorkflowRunLogs"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + disableSelectedRepositoryGithubActionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["disableSelectedRepositoryGithubActionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + disableWorkflow: { + (params?: RestEndpointMethodTypes["actions"]["disableWorkflow"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + downloadArtifact: { + (params?: RestEndpointMethodTypes["actions"]["downloadArtifact"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + downloadJobLogsForWorkflowRun: { + (params?: RestEndpointMethodTypes["actions"]["downloadJobLogsForWorkflowRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + downloadWorkflowRunAttemptLogs: { + (params?: RestEndpointMethodTypes["actions"]["downloadWorkflowRunAttemptLogs"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + downloadWorkflowRunLogs: { + (params?: RestEndpointMethodTypes["actions"]["downloadWorkflowRunLogs"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + enableSelectedRepositoryGithubActionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["enableSelectedRepositoryGithubActionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + enableWorkflow: { + (params?: RestEndpointMethodTypes["actions"]["enableWorkflow"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + forceCancelWorkflowRun: { + (params?: RestEndpointMethodTypes["actions"]["forceCancelWorkflowRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Generates a configuration that can be passed to the runner application at startup. + * + * 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. + */ + generateRunnerJitconfigForOrg: { + (params?: RestEndpointMethodTypes["actions"]["generateRunnerJitconfigForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Generates a configuration that can be passed to the runner application at startup. + * + * 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. + */ + generateRunnerJitconfigForRepo: { + (params?: RestEndpointMethodTypes["actions"]["generateRunnerJitconfigForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the GitHub Actions caches for a repository. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + getActionsCacheList: { + (params?: RestEndpointMethodTypes["actions"]["getActionsCacheList"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + getActionsCacheUsage: { + (params?: RestEndpointMethodTypes["actions"]["getActionsCacheUsage"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * OAuth tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. + */ + getActionsCacheUsageByRepoForOrg: { + (params?: RestEndpointMethodTypes["actions"]["getActionsCacheUsageByRepoForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * OAuth tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. + */ + getActionsCacheUsageForOrg: { + (params?: RestEndpointMethodTypes["actions"]["getActionsCacheUsageForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + getAllowedActionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["getAllowedActionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + getAllowedActionsRepository: { + (params?: RestEndpointMethodTypes["actions"]["getAllowedActionsRepository"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getArtifact: { + (params?: RestEndpointMethodTypes["actions"]["getArtifact"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + getCustomOidcSubClaimForRepo: { + (params?: RestEndpointMethodTypes["actions"]["getCustomOidcSubClaimForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getEnvironmentPublicKey: { + (params?: RestEndpointMethodTypes["actions"]["getEnvironmentPublicKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getEnvironmentSecret: { + (params?: RestEndpointMethodTypes["actions"]["getEnvironmentSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getEnvironmentVariable: { + (params?: RestEndpointMethodTypes["actions"]["getEnvironmentVariable"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + getGithubActionsDefaultWorkflowPermissionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["getGithubActionsDefaultWorkflowPermissionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/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)." + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + getGithubActionsDefaultWorkflowPermissionsRepository: { + (params?: RestEndpointMethodTypes["actions"]["getGithubActionsDefaultWorkflowPermissionsRepository"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + getGithubActionsPermissionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["getGithubActionsPermissionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + getGithubActionsPermissionsRepository: { + (params?: RestEndpointMethodTypes["actions"]["getGithubActionsPermissionsRepository"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getJobForWorkflowRun: { + (params?: RestEndpointMethodTypes["actions"]["getJobForWorkflowRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets your public key, which you need to encrypt secrets. You need to + * encrypt a secret before you can create or update 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. + */ + getOrgPublicKey: { + (params?: RestEndpointMethodTypes["actions"]["getOrgPublicKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a single organization secret without revealing its encrypted value. + * + * 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. + */ + getOrgSecret: { + (params?: RestEndpointMethodTypes["actions"]["getOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a specific variable in an organization. + * + * 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. + */ + getOrgVariable: { + (params?: RestEndpointMethodTypes["actions"]["getOrgVariable"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + getPendingDeploymentsForRun: { + (params?: RestEndpointMethodTypes["actions"]["getPendingDeploymentsForRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + * @deprecated octokit.rest.actions.getRepoPermissions() has been renamed to octokit.rest.actions.getGithubActionsPermissionsRepository() (2020-11-10) + */ + getRepoPermissions: { + (params?: RestEndpointMethodTypes["actions"]["getRepoPermissions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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 tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + getRepoPublicKey: { + (params?: RestEndpointMethodTypes["actions"]["getRepoPublicKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a single repository secret without revealing its encrypted value. + * + * 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. + */ + getRepoSecret: { + (params?: RestEndpointMethodTypes["actions"]["getRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a specific variable in a repository. + * + * 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. + */ + getRepoVariable: { + (params?: RestEndpointMethodTypes["actions"]["getRepoVariable"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getReviewsForRun: { + (params?: RestEndpointMethodTypes["actions"]["getReviewsForRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a specific self-hosted runner configured in an organization. + * + * 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. + */ + getSelfHostedRunnerForOrg: { + (params?: RestEndpointMethodTypes["actions"]["getSelfHostedRunnerForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a specific self-hosted runner configured in a repository. + * + * 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. + */ + getSelfHostedRunnerForRepo: { + (params?: RestEndpointMethodTypes["actions"]["getSelfHostedRunnerForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getWorkflow: { + (params?: RestEndpointMethodTypes["actions"]["getWorkflow"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + getWorkflowAccessToRepository: { + (params?: RestEndpointMethodTypes["actions"]["getWorkflowAccessToRepository"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getWorkflowRun: { + (params?: RestEndpointMethodTypes["actions"]["getWorkflowRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getWorkflowRunAttempt: { + (params?: RestEndpointMethodTypes["actions"]["getWorkflowRunAttempt"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + */ + getWorkflowRunUsage: { + (params?: RestEndpointMethodTypes["actions"]["getWorkflowRunUsage"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + */ + getWorkflowUsage: { + (params?: RestEndpointMethodTypes["actions"]["getWorkflowUsage"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listArtifactsForRepo: { + (params?: RestEndpointMethodTypes["actions"]["listArtifactsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listEnvironmentSecrets: { + (params?: RestEndpointMethodTypes["actions"]["listEnvironmentSecrets"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listEnvironmentVariables: { + (params?: RestEndpointMethodTypes["actions"]["listEnvironmentVariables"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listJobsForWorkflowRun: { + (params?: RestEndpointMethodTypes["actions"]["listJobsForWorkflowRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listJobsForWorkflowRunAttempt: { + (params?: RestEndpointMethodTypes["actions"]["listJobsForWorkflowRunAttempt"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * 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. + */ + listLabelsForSelfHostedRunnerForOrg: { + (params?: RestEndpointMethodTypes["actions"]["listLabelsForSelfHostedRunnerForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * 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. + */ + listLabelsForSelfHostedRunnerForRepo: { + (params?: RestEndpointMethodTypes["actions"]["listLabelsForSelfHostedRunnerForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all secrets available in an organization 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 `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. + */ + listOrgSecrets: { + (params?: RestEndpointMethodTypes["actions"]["listOrgSecrets"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all organization 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. + */ + listOrgVariables: { + (params?: RestEndpointMethodTypes["actions"]["listOrgVariables"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all organization secrets shared with a repository 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. + */ + listRepoOrganizationSecrets: { + (params?: RestEndpointMethodTypes["actions"]["listRepoOrganizationSecrets"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all organization variables shared with a repository. + * + * 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. + */ + listRepoOrganizationVariables: { + (params?: RestEndpointMethodTypes["actions"]["listRepoOrganizationVariables"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all secrets available in a repository 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. + */ + listRepoSecrets: { + (params?: RestEndpointMethodTypes["actions"]["listRepoSecrets"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all repository 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. + */ + listRepoVariables: { + (params?: RestEndpointMethodTypes["actions"]["listRepoVariables"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listRepoWorkflows: { + (params?: RestEndpointMethodTypes["actions"]["listRepoWorkflows"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * 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. + */ + listRunnerApplicationsForOrg: { + (params?: RestEndpointMethodTypes["actions"]["listRunnerApplicationsForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * 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. + */ + listRunnerApplicationsForRepo: { + (params?: RestEndpointMethodTypes["actions"]["listRunnerApplicationsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all repositories that have been selected when the `visibility` + * for repository access to a secret is set to `selected`. + * + * 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. + */ + listSelectedReposForOrgSecret: { + (params?: RestEndpointMethodTypes["actions"]["listSelectedReposForOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all repositories that can access an organization variable + * that is available to selected repositories. + * + * 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. + */ + listSelectedReposForOrgVariable: { + (params?: RestEndpointMethodTypes["actions"]["listSelectedReposForOrgVariable"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + listSelectedRepositoriesEnabledGithubActionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["listSelectedRepositoriesEnabledGithubActionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all self-hosted runners configured in an organization. + * + * 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. + */ + listSelfHostedRunnersForOrg: { + (params?: RestEndpointMethodTypes["actions"]["listSelfHostedRunnersForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all self-hosted runners configured in a repository. + * + * 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. + */ + listSelfHostedRunnersForRepo: { + (params?: RestEndpointMethodTypes["actions"]["listSelfHostedRunnersForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listWorkflowRunArtifacts: { + (params?: RestEndpointMethodTypes["actions"]["listWorkflowRunArtifacts"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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 + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + */ + listWorkflowRuns: { + (params?: RestEndpointMethodTypes["actions"]["listWorkflowRuns"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * 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`. + */ + listWorkflowRunsForRepo: { + (params?: RestEndpointMethodTypes["actions"]["listWorkflowRunsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Re-run a job and its dependent jobs in a workflow run. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + reRunJobForWorkflowRun: { + (params?: RestEndpointMethodTypes["actions"]["reRunJobForWorkflowRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Re-runs your workflow run using its `id`. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + reRunWorkflow: { + (params?: RestEndpointMethodTypes["actions"]["reRunWorkflow"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + reRunWorkflowFailedJobs: { + (params?: RestEndpointMethodTypes["actions"]["reRunWorkflowFailedJobs"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * 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. + */ + removeAllCustomLabelsFromSelfHostedRunnerForOrg: { + (params?: RestEndpointMethodTypes["actions"]["removeAllCustomLabelsFromSelfHostedRunnerForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * 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. + */ + removeAllCustomLabelsFromSelfHostedRunnerForRepo: { + (params?: RestEndpointMethodTypes["actions"]["removeAllCustomLabelsFromSelfHostedRunnerForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * 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. + */ + removeCustomLabelFromSelfHostedRunnerForOrg: { + (params?: RestEndpointMethodTypes["actions"]["removeCustomLabelFromSelfHostedRunnerForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * 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. + */ + removeCustomLabelFromSelfHostedRunnerForRepo: { + (params?: RestEndpointMethodTypes["actions"]["removeCustomLabelFromSelfHostedRunnerForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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/actions/secrets#create-or-update-an-organization-secret). + * + * 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. + */ + removeSelectedRepoFromOrgSecret: { + (params?: RestEndpointMethodTypes["actions"]["removeSelectedRepoFromOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes a repository from an organization variable that is + * available to selected repositories. Organization variables that are available to + * selected repositories have their `visibility` field set to `selected`. + * + * 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. + */ + removeSelectedRepoFromOrgVariable: { + (params?: RestEndpointMethodTypes["actions"]["removeSelectedRepoFromOrgVariable"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." + * + * **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). + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + */ + reviewCustomGatesForRun: { + (params?: RestEndpointMethodTypes["actions"]["reviewCustomGatesForRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + reviewPendingDeploymentsForRun: { + (params?: RestEndpointMethodTypes["actions"]["reviewPendingDeploymentsForRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + setAllowedActionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["setAllowedActionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + setAllowedActionsRepository: { + (params?: RestEndpointMethodTypes["actions"]["setAllowedActionsRepository"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * 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. + */ + setCustomLabelsForSelfHostedRunnerForOrg: { + (params?: RestEndpointMethodTypes["actions"]["setCustomLabelsForSelfHostedRunnerForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * 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. + */ + setCustomLabelsForSelfHostedRunnerForRepo: { + (params?: RestEndpointMethodTypes["actions"]["setCustomLabelsForSelfHostedRunnerForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the customization template and `opt-in` or `opt-out` flag for an OpenID Connect (OIDC) subject claim for a repository. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + setCustomOidcSubClaimForRepo: { + (params?: RestEndpointMethodTypes["actions"]["setCustomOidcSubClaimForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + setGithubActionsDefaultWorkflowPermissionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["setGithubActionsDefaultWorkflowPermissionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/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)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + setGithubActionsDefaultWorkflowPermissionsRepository: { + (params?: RestEndpointMethodTypes["actions"]["setGithubActionsDefaultWorkflowPermissionsRepository"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + setGithubActionsPermissionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["setGithubActionsPermissionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + setGithubActionsPermissionsRepository: { + (params?: RestEndpointMethodTypes["actions"]["setGithubActionsPermissionsRepository"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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/actions/secrets#create-or-update-an-organization-secret). + * + * 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. + */ + setSelectedReposForOrgSecret: { + (params?: RestEndpointMethodTypes["actions"]["setSelectedReposForOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Replaces all repositories for an organization variable that is available + * to selected repositories. Organization variables that are available to selected + * repositories have their `visibility` field set to `selected`. + * + * 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. + */ + setSelectedReposForOrgVariable: { + (params?: RestEndpointMethodTypes["actions"]["setSelectedReposForOrgVariable"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + setSelectedRepositoriesEnabledGithubActionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["setSelectedRepositoriesEnabledGithubActionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to 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)". + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + setWorkflowAccessToRepository: { + (params?: RestEndpointMethodTypes["actions"]["setWorkflowAccessToRepository"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + updateEnvironmentVariable: { + (params?: RestEndpointMethodTypes["actions"]["updateEnvironmentVariable"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates an organization 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 `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. + */ + updateOrgVariable: { + (params?: RestEndpointMethodTypes["actions"]["updateOrgVariable"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates a repository 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. + */ + updateRepoVariable: { + (params?: RestEndpointMethodTypes["actions"]["updateRepoVariable"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + activity: { + /** + * Whether the authenticated user has starred the repository. + */ + checkRepoIsStarredByAuthenticatedUser: { + (params?: RestEndpointMethodTypes["activity"]["checkRepoIsStarredByAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://docs.github.com/rest/activity/watching#set-a-repository-subscription). + */ + deleteRepoSubscription: { + (params?: RestEndpointMethodTypes["activity"]["deleteRepoSubscription"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/activity/notifications#set-a-thread-subscription) endpoint and set `ignore` to `true`. + */ + deleteThreadSubscription: { + (params?: RestEndpointMethodTypes["activity"]["deleteThreadSubscription"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. 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. + */ + getFeeds: { + (params?: RestEndpointMethodTypes["activity"]["getFeeds"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets information about whether the authenticated user is subscribed to the repository. + */ + getRepoSubscription: { + (params?: RestEndpointMethodTypes["activity"]["getRepoSubscription"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets information about a notification thread. + */ + getThread: { + (params?: RestEndpointMethodTypes["activity"]["getThread"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/activity/watching#get-a-repository-subscription). + * + * Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread. + */ + getThreadSubscriptionForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["activity"]["getThreadSubscriptionForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. + */ + listEventsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["activity"]["listEventsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List all notifications for the current user, sorted by most recently updated. + */ + listNotificationsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["activity"]["listNotificationsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This is the user's organization dashboard. You must be authenticated as the user to view this. + */ + listOrgEventsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["activity"]["listOrgEventsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. + */ + listPublicEvents: { + (params?: RestEndpointMethodTypes["activity"]["listPublicEvents"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listPublicEventsForRepoNetwork: { + (params?: RestEndpointMethodTypes["activity"]["listPublicEventsForRepoNetwork"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listPublicEventsForUser: { + (params?: RestEndpointMethodTypes["activity"]["listPublicEventsForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listPublicOrgEvents: { + (params?: RestEndpointMethodTypes["activity"]["listPublicOrgEvents"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listReceivedEventsForUser: { + (params?: RestEndpointMethodTypes["activity"]["listReceivedEventsForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listReceivedPublicEventsForUser: { + (params?: RestEndpointMethodTypes["activity"]["listReceivedPublicEventsForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note**: This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + */ + listRepoEvents: { + (params?: RestEndpointMethodTypes["activity"]["listRepoEvents"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all notifications for the current user in the specified repository. + */ + listRepoNotificationsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["activity"]["listRepoNotificationsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists repositories the authenticated user has starred. + * + * 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. + */ + listReposStarredByAuthenticatedUser: { + (params?: RestEndpointMethodTypes["activity"]["listReposStarredByAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists repositories a user has starred. + * + * 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. + */ + listReposStarredByUser: { + (params?: RestEndpointMethodTypes["activity"]["listReposStarredByUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists repositories a user is watching. + */ + listReposWatchedByUser: { + (params?: RestEndpointMethodTypes["activity"]["listReposWatchedByUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the people that have starred the repository. + * + * 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. + */ + listStargazersForRepo: { + (params?: RestEndpointMethodTypes["activity"]["listStargazersForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists repositories the authenticated user is watching. + */ + listWatchedReposForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["activity"]["listWatchedReposForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the people watching the specified repository. + */ + listWatchersForRepo: { + (params?: RestEndpointMethodTypes["activity"]["listWatchersForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Marks all notifications as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/rest/activity/notifications#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. + */ + markNotificationsAsRead: { + (params?: RestEndpointMethodTypes["activity"]["markNotificationsAsRead"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Marks all notifications in a repository as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List repository notifications for the authenticated user](https://docs.github.com/rest/activity/notifications#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. + */ + markRepoNotificationsAsRead: { + (params?: RestEndpointMethodTypes["activity"]["markRepoNotificationsAsRead"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + markThreadAsDone: { + (params?: RestEndpointMethodTypes["activity"]["markThreadAsDone"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications. + */ + markThreadAsRead: { + (params?: RestEndpointMethodTypes["activity"]["markThreadAsRead"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/activity/watching#delete-a-repository-subscription) completely. + */ + setRepoSubscription: { + (params?: RestEndpointMethodTypes["activity"]["setRepoSubscription"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/activity/notifications#delete-a-thread-subscription) endpoint. + */ + setThreadSubscription: { + (params?: RestEndpointMethodTypes["activity"]["setThreadSubscription"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + */ + starRepoForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["activity"]["starRepoForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Unstar a repository that the authenticated user has previously starred. + */ + unstarRepoForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["activity"]["unstarRepoForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + apps: { + /** + * Add a single repository to an installation. The authenticated user must have admin access to the repository. + * @deprecated octokit.rest.apps.addRepoToInstallation() has been renamed to octokit.rest.apps.addRepoToInstallationForAuthenticatedUser() (2021-10-05) + */ + addRepoToInstallation: { + (params?: RestEndpointMethodTypes["apps"]["addRepoToInstallation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Add a single repository to an installation. The authenticated user must have admin access to the repository. + */ + addRepoToInstallationForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["apps"]["addRepoToInstallationForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. + */ + checkToken: { + (params?: RestEndpointMethodTypes["apps"]["checkToken"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`. + */ + createFromManifest: { + (params?: RestEndpointMethodTypes["apps"]["createFromManifest"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. + * + * Optionally, 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. + * + * Optionally, 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. + * + * When 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. + * + * 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. + */ + createInstallationAccessToken: { + (params?: RestEndpointMethodTypes["apps"]["createInstallationAccessToken"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. + * Deleting an application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). + */ + deleteAuthorization: { + (params?: RestEndpointMethodTypes["apps"]["deleteAuthorization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/apps/apps#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + deleteInstallation: { + (params?: RestEndpointMethodTypes["apps"]["deleteInstallation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. + */ + deleteToken: { + (params?: RestEndpointMethodTypes["apps"]["deleteToken"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations for the authenticated app](https://docs.github.com/rest/apps/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getAuthenticated: { + (params?: RestEndpointMethodTypes["apps"]["getAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **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`). + */ + getBySlug: { + (params?: RestEndpointMethodTypes["apps"]["getBySlug"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getInstallation: { + (params?: RestEndpointMethodTypes["apps"]["getInstallation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getOrgInstallation: { + (params?: RestEndpointMethodTypes["apps"]["getOrgInstallation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getRepoInstallation: { + (params?: RestEndpointMethodTypes["apps"]["getRepoInstallation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + getSubscriptionPlanForAccount: { + (params?: RestEndpointMethodTypes["apps"]["getSubscriptionPlanForAccount"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + getSubscriptionPlanForAccountStubbed: { + (params?: RestEndpointMethodTypes["apps"]["getSubscriptionPlanForAccountStubbed"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getUserInstallation: { + (params?: RestEndpointMethodTypes["apps"]["getUserInstallation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getWebhookConfigForApp: { + (params?: RestEndpointMethodTypes["apps"]["getWebhookConfigForApp"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getWebhookDelivery: { + (params?: RestEndpointMethodTypes["apps"]["getWebhookDelivery"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listAccountsForPlan: { + (params?: RestEndpointMethodTypes["apps"]["listAccountsForPlan"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listAccountsForPlanStubbed: { + (params?: RestEndpointMethodTypes["apps"]["listAccountsForPlanStubbed"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * The access the user has to each repository is included in the hash under the `permissions` key. + */ + listInstallationReposForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["apps"]["listInstallationReposForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all the pending installation requests for the authenticated GitHub App. + */ + listInstallationRequestsForAuthenticatedApp: { + (params?: RestEndpointMethodTypes["apps"]["listInstallationRequestsForAuthenticatedApp"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * You must use a [JWT](https://docs.github.com/enterprise-server@3.9/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. + */ + listInstallations: { + (params?: RestEndpointMethodTypes["apps"]["listInstallations"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * You can find the permissions for the installation under the `permissions` key. + */ + listInstallationsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["apps"]["listInstallationsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listPlans: { + (params?: RestEndpointMethodTypes["apps"]["listPlans"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listPlansStubbed: { + (params?: RestEndpointMethodTypes["apps"]["listPlansStubbed"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List repositories that an app installation can access. + */ + listReposAccessibleToInstallation: { + (params?: RestEndpointMethodTypes["apps"]["listReposAccessibleToInstallation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the active subscriptions for the authenticated user. + */ + listSubscriptionsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["apps"]["listSubscriptionsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the active subscriptions for the authenticated user. + */ + listSubscriptionsForAuthenticatedUserStubbed: { + (params?: RestEndpointMethodTypes["apps"]["listSubscriptionsForAuthenticatedUserStubbed"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + listWebhookDeliveries: { + (params?: RestEndpointMethodTypes["apps"]["listWebhookDeliveries"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + redeliverWebhookDelivery: { + (params?: RestEndpointMethodTypes["apps"]["redeliverWebhookDelivery"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + * @deprecated octokit.rest.apps.removeRepoFromInstallation() has been renamed to octokit.rest.apps.removeRepoFromInstallationForAuthenticatedUser() (2021-10-05) + */ + removeRepoFromInstallation: { + (params?: RestEndpointMethodTypes["apps"]["removeRepoFromInstallation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + removeRepoFromInstallationForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["apps"]["removeRepoFromInstallationForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + */ + resetToken: { + (params?: RestEndpointMethodTypes["apps"]["resetToken"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + revokeInstallationAccessToken: { + (params?: RestEndpointMethodTypes["apps"]["revokeInstallationAccessToken"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + scopeToken: { + (params?: RestEndpointMethodTypes["apps"]["scopeToken"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + suspendInstallation: { + (params?: RestEndpointMethodTypes["apps"]["suspendInstallation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + unsuspendInstallation: { + (params?: RestEndpointMethodTypes["apps"]["unsuspendInstallation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + updateWebhookConfigForApp: { + (params?: RestEndpointMethodTypes["apps"]["updateWebhookConfigForApp"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + billing: { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint. + */ + getGithubActionsBillingOrg: { + (params?: RestEndpointMethodTypes["billing"]["getGithubActionsBillingOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. + */ + getGithubActionsBillingUser: { + (params?: RestEndpointMethodTypes["billing"]["getGithubActionsBillingUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint. + */ + getGithubPackagesBillingOrg: { + (params?: RestEndpointMethodTypes["billing"]["getGithubPackagesBillingOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. + */ + getGithubPackagesBillingUser: { + (params?: RestEndpointMethodTypes["billing"]["getGithubPackagesBillingUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint. + */ + getSharedStorageBillingOrg: { + (params?: RestEndpointMethodTypes["billing"]["getSharedStorageBillingOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. + */ + getSharedStorageBillingUser: { + (params?: RestEndpointMethodTypes["billing"]["getSharedStorageBillingUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + checks: { + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Creates a new check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to create check runs. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + create: { + (params?: RestEndpointMethodTypes["checks"]["create"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + * + * OAuth apps and personal access tokens (classic) cannot use this endpoint. + */ + createSuite: { + (params?: RestEndpointMethodTypes["checks"]["createSuite"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. + */ + get: { + (params?: RestEndpointMethodTypes["checks"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. + */ + getSuite: { + (params?: RestEndpointMethodTypes["checks"]["getSuite"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listAnnotations: { + (params?: RestEndpointMethodTypes["checks"]["listAnnotations"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * 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. + */ + listForRef: { + (params?: RestEndpointMethodTypes["checks"]["listForRef"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists check runs for a check suite using its `id`. + * + * **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. + */ + listForSuite: { + (params?: RestEndpointMethodTypes["checks"]["listForSuite"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists check suites 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 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. + */ + listSuitesForRef: { + (params?: RestEndpointMethodTypes["checks"]["listSuitesForRef"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * 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. + */ + rerequestRun: { + (params?: RestEndpointMethodTypes["checks"]["rerequestRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * OAuth apps and personal access tokens (classic) cannot use this endpoint. + */ + rerequestSuite: { + (params?: RestEndpointMethodTypes["checks"]["rerequestSuite"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://docs.github.com/rest/checks/suites#create-a-check-suite). + * You must have admin permissions in the repository to set preferences for check suites. + */ + setSuitesPreferences: { + (params?: RestEndpointMethodTypes["checks"]["setSuitesPreferences"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates a check run for a specific commit in a 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 apps and personal access tokens (classic) cannot use this endpoint. + */ + update: { + (params?: RestEndpointMethodTypes["checks"]["update"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + codeScanning: { + /** + * 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. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `category` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + * + * 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. + */ + deleteAnalysis: { + (params?: RestEndpointMethodTypes["codeScanning"]["deleteAnalysis"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getAlert: { + (params?: RestEndpointMethodTypes["codeScanning"]["getAlert"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a specified code scanning analysis for a repository. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * 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. + */ + getAnalysis: { + (params?: RestEndpointMethodTypes["codeScanning"]["getAnalysis"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a CodeQL database for a language in a repository. + * + * By default this endpoint returns JSON metadata about the CodeQL database. To + * download the CodeQL database binary content, set the `Accept` header of the request + * to [`application/zip`](https://docs.github.com/rest/overview/media-types), and make sure + * your HTTP client is configured to follow redirects or use the `Location` header + * to make a second request to get the redirect URL. + * + * 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. + */ + getCodeqlDatabase: { + (params?: RestEndpointMethodTypes["codeScanning"]["getCodeqlDatabase"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a code scanning default setup configuration. + * + * 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. + */ + getDefaultSetup: { + (params?: RestEndpointMethodTypes["codeScanning"]["getDefaultSetup"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/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. + */ + getSarif: { + (params?: RestEndpointMethodTypes["codeScanning"]["getSarif"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all instances of the specified 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. + */ + listAlertInstances: { + (params?: RestEndpointMethodTypes["codeScanning"]["listAlertInstances"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * 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 `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. + */ + listAlertsForOrg: { + (params?: RestEndpointMethodTypes["codeScanning"]["listAlertsForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + listAlertsForRepo: { + (params?: RestEndpointMethodTypes["codeScanning"]["listAlertsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all instances of the specified 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. + * @deprecated octokit.rest.codeScanning.listAlertsInstances() has been renamed to octokit.rest.codeScanning.listAlertInstances() (2021-04-30) + */ + listAlertsInstances: { + (params?: RestEndpointMethodTypes["codeScanning"]["listAlertsInstances"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the CodeQL databases that are available in 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. + */ + listCodeqlDatabases: { + (params?: RestEndpointMethodTypes["codeScanning"]["listCodeqlDatabases"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * **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. + */ + listRecentAnalyses: { + (params?: RestEndpointMethodTypes["codeScanning"]["listRecentAnalyses"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + updateAlert: { + (params?: RestEndpointMethodTypes["codeScanning"]["updateAlert"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates a code scanning default setup configuration. + * + * 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. + */ + updateDefaultSetup: { + (params?: RestEndpointMethodTypes["codeScanning"]["updateDefaultSetup"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Uploads SARIF data containing the results of a code scanning analysis 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)." + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + * + * SARIF upload supports a maximum 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 the most important entries whenever applicable. + * To get the most out of your analysis when it includes data above the supported limits, try to optimize the analysis configuration. For example, for the CodeQL tool, identify and remove the most noisy queries. For more information, see "[SARIF results exceed one or more limits](https://docs.github.com/code-security/code-scanning/troubleshooting-sarif/results-exceed-limit)." + * + * + * | **SARIF data** | **Maximum values** | **Additional limits** | + * |----------------------------------|:------------------:|----------------------------------------------------------------------------------| + * | Runs per file | 20 | | + * | Results per run | 25,000 | Only the top 5,000 results will be included, prioritized by severity. | + * | Rules per run | 25,000 | | + * | Tool extensions per run | 100 | | + * | Thread Flow Locations per result | 10,000 | Only the top 1,000 Thread Flow Locations will be included, using prioritization. | + * | Location per result | 1,000 | Only 100 locations will be included. | + * | Tags per rule | 20 | Only 10 tags will be included. | + * + * + * The `202 Accepted` response includes an `id` value. + * You can use this ID to check the status of the upload by using it in the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/code-scanning/code-scanning#get-information-about-a-sarif-upload)." + * + * 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. + */ + uploadSarif: { + (params?: RestEndpointMethodTypes["codeScanning"]["uploadSarif"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + codesOfConduct: { + /** + * Returns array of all GitHub's codes of conduct. + */ + getAllCodesOfConduct: { + (params?: RestEndpointMethodTypes["codesOfConduct"]["getAllCodesOfConduct"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns information about the specified GitHub code of conduct. + */ + getConductCode: { + (params?: RestEndpointMethodTypes["codesOfConduct"]["getConductCode"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + codespaces: { + /** + * 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. + */ + addRepositoryForSecretForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["addRepositoryForSecretForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + addSelectedRepoToOrgSecret: { + (params?: RestEndpointMethodTypes["codespaces"]["addSelectedRepoToOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + checkPermissionsForDevcontainer: { + (params?: RestEndpointMethodTypes["codespaces"]["checkPermissionsForDevcontainer"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the machine types a codespace can transition to use. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + codespaceMachinesForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["codespaceMachinesForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + createForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["createForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + createOrUpdateOrgSecret: { + (params?: RestEndpointMethodTypes["codespaces"]["createOrUpdateOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + createOrUpdateRepoSecret: { + (params?: RestEndpointMethodTypes["codespaces"]["createOrUpdateRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * 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. + */ + createOrUpdateSecretForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["createOrUpdateSecretForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a codespace owned by the authenticated user for the specified pull request. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + createWithPrForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["createWithPrForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + createWithRepoForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["createWithRepoForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a user's codespace. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + deleteForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["deleteForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a user's codespace. + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + deleteFromOrganization: { + (params?: RestEndpointMethodTypes["codespaces"]["deleteFromOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + deleteOrgSecret: { + (params?: RestEndpointMethodTypes["codespaces"]["deleteOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + deleteRepoSecret: { + (params?: RestEndpointMethodTypes["codespaces"]["deleteRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * 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. + */ + deleteSecretForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["deleteSecretForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * If changes cannot be pushed to the codespace's repository, they will be pushed to a new or previously-existing fork instead. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + exportForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["exportForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the codespaces that a member of an organization has for repositories in that organization. + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + getCodespacesForUserInOrg: { + (params?: RestEndpointMethodTypes["codespaces"]["getCodespacesForUserInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets information about an export of a codespace. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + getExportDetailsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["getExportDetailsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets information about a user's codespace. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + getForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["getForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getOrgPublicKey: { + (params?: RestEndpointMethodTypes["codespaces"]["getOrgPublicKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getOrgSecret: { + (params?: RestEndpointMethodTypes["codespaces"]["getOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * 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. + */ + getPublicKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["getPublicKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getRepoPublicKey: { + (params?: RestEndpointMethodTypes["codespaces"]["getRepoPublicKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getRepoSecret: { + (params?: RestEndpointMethodTypes["codespaces"]["getRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a development environment secret available to a user's codespaces without revealing its encrypted value. + * + * 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. + */ + getSecretForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["getSecretForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + listDevcontainersInRepositoryForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["listDevcontainersInRepositoryForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the authenticated user's codespaces. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + listForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["listForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the codespaces associated to a specified organization. + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + listInOrganization: { + (params?: RestEndpointMethodTypes["codespaces"]["listInOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the codespaces associated to a specified repository and the authenticated user. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + listInRepositoryForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["listInRepositoryForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listOrgSecrets: { + (params?: RestEndpointMethodTypes["codespaces"]["listOrgSecrets"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listRepoSecrets: { + (params?: RestEndpointMethodTypes["codespaces"]["listRepoSecrets"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the repositories that have been granted the ability to use 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. + */ + listRepositoriesForSecretForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["listRepositoriesForSecretForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all development environment secrets available for a user's codespaces without revealing their + * encrypted values. + * + * 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. + */ + listSecretsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["listSecretsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listSelectedReposForOrgSecret: { + (params?: RestEndpointMethodTypes["codespaces"]["listSelectedReposForOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the default attributes for codespaces created by the user with the repository. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + preFlightWithRepoForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["preFlightWithRepoForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Publishes an unpublished codespace, creating a new repository and assigning it to the codespace. + * + * The codespace's token is granted write permissions to the repository, allowing the user to push their changes. + * + * This will fail for a codespace that is already published, meaning it has an associated repository. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + publishForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["publishForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + removeRepositoryForSecretForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["removeRepositoryForSecretForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + removeSelectedRepoFromOrgSecret: { + (params?: RestEndpointMethodTypes["codespaces"]["removeSelectedRepoFromOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the machine types available for a given repository based on its configuration. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + repoMachinesForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["repoMachinesForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Select the repositories that will use 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. + */ + setRepositoriesForSecretForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["setRepositoriesForSecretForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + setSelectedReposForOrgSecret: { + (params?: RestEndpointMethodTypes["codespaces"]["setSelectedReposForOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Starts a user's codespace. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + startForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["startForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Stops a user's codespace. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + stopForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["stopForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Stops a user's codespace. + * + * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + */ + stopInOrganization: { + (params?: RestEndpointMethodTypes["codespaces"]["stopInOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + */ + updateForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["updateForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + copilot: { + /** + * **Note**: This endpoint is in beta and is subject to change. + * + * 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 can configure GitHub Copilot in their 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. + */ + addCopilotSeatsForTeams: { + (params?: RestEndpointMethodTypes["copilot"]["addCopilotSeatsForTeams"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note**: This endpoint is in beta and is subject to change. + * + * 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 can configure GitHub Copilot in their 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. + */ + addCopilotSeatsForUsers: { + (params?: RestEndpointMethodTypes["copilot"]["addCopilotSeatsForUsers"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note**: This endpoint is in beta and is subject to change. + * + * 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 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)". + * + * Only organization owners can configure GitHub Copilot in their organization. + * + * OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + */ + cancelCopilotSeatAssignmentForTeams: { + (params?: RestEndpointMethodTypes["copilot"]["cancelCopilotSeatAssignmentForTeams"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note**: This endpoint is in beta and is subject to change. + * + * 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 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)". + * + * Only organization owners can configure GitHub Copilot in their organization. + * + * OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + */ + cancelCopilotSeatAssignmentForUsers: { + (params?: RestEndpointMethodTypes["copilot"]["cancelCopilotSeatAssignmentForUsers"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note**: This endpoint is in beta and is subject to change. + * + * 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 "[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 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. + */ + getCopilotOrganizationDetails: { + (params?: RestEndpointMethodTypes["copilot"]["getCopilotOrganizationDetails"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note**: This endpoint is in beta and is subject to change. + * + * Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. + * + * 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. + */ + getCopilotSeatDetailsForUser: { + (params?: RestEndpointMethodTypes["copilot"]["getCopilotSeatDetailsForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note**: This endpoint is in beta and is subject to change. + * + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. + */ + listCopilotSeats: { + (params?: RestEndpointMethodTypes["copilot"]["listCopilotSeats"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note**: This endpoint is in beta and is subject to change. + * + * You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE + * for all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances, + * and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions. + * + * The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day, + * and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + * they must have telemetry enabled in their IDE. + * + * Only the owners and billing managers of enterprises with a Copilot Business or Enterprise subscription can view Copilot usage + * metrics for the enterprise. + * + * OAuth app tokens and personal access tokens (classic) need the `copilot`, `manage_billing:copilot`, `admin:enterprise`, or `manage_billing:enterprise` scope to use this endpoint. + */ + usageMetricsForEnterprise: { + (params?: RestEndpointMethodTypes["copilot"]["usageMetricsForEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note**: This endpoint is in beta and is subject to change. + * + * You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE + * across an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. + * See the response schema tab for detailed metrics definitions. + * + * The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day, + * and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + * they must have telemetry enabled in their IDE. + * + * Copilot Business or Copilot Enterprise organization owners, and owners and billing managers of their parent enterprises, can view + * Copilot usage metrics. + * + * OAuth app tokens and personal access tokens (classic) need the `copilot`, `manage_billing:copilot`, `admin:org`, `admin:enterprise`, or `manage_billing:enterprise` scope to use this endpoint. + */ + usageMetricsForOrg: { + (params?: RestEndpointMethodTypes["copilot"]["usageMetricsForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note**: This endpoint is in beta and is subject to change. + * + * You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE + * for users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. + * See the response schema tab for detailed metrics definitions. + * + * The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day, + * and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics, + * they must have telemetry enabled in their IDE. + * + * **Note**: This endpoint will only return results for a given day if the team had five or more members on that day. + * + * Copilot Business or Copilot Enterprise organization owners for the organization that contains this team, + * and owners and billing managers of their parent enterprises, can view Copilot usage metrics for a team. + * + * OAuth app tokens and personal access tokens (classic) need the `copilot`, `manage_billing:copilot`, `admin:org`, `admin:enterprise`, or `manage_billing:enterprise` scope to use this endpoint. + */ + usageMetricsForTeam: { + (params?: RestEndpointMethodTypes["copilot"]["usageMetricsForTeam"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + dependabot: { + /** + * 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. + */ + addSelectedRepoToOrgSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["addSelectedRepoToOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + createOrUpdateOrgSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["createOrUpdateOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + createOrUpdateRepoSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["createOrUpdateRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + deleteOrgSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["deleteOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + deleteRepoSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["deleteRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getAlert: { + (params?: RestEndpointMethodTypes["dependabot"]["getAlert"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getOrgPublicKey: { + (params?: RestEndpointMethodTypes["dependabot"]["getOrgPublicKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getOrgSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["getOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getRepoPublicKey: { + (params?: RestEndpointMethodTypes["dependabot"]["getRepoPublicKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getRepoSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["getRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists Dependabot alerts for repositories that are owned by the specified enterprise. + * + * 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. + */ + listAlertsForEnterprise: { + (params?: RestEndpointMethodTypes["dependabot"]["listAlertsForEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists Dependabot alerts for an organization. + * + * 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 `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. + */ + listAlertsForOrg: { + (params?: RestEndpointMethodTypes["dependabot"]["listAlertsForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listAlertsForRepo: { + (params?: RestEndpointMethodTypes["dependabot"]["listAlertsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listOrgSecrets: { + (params?: RestEndpointMethodTypes["dependabot"]["listOrgSecrets"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listRepoSecrets: { + (params?: RestEndpointMethodTypes["dependabot"]["listRepoSecrets"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listSelectedReposForOrgSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["listSelectedReposForOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + removeSelectedRepoFromOrgSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["removeSelectedRepoFromOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + setSelectedReposForOrgSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["setSelectedReposForOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * 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. + */ + updateAlert: { + (params?: RestEndpointMethodTypes["dependabot"]["updateAlert"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + dependencyGraph: { + /** + * 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. + */ + createRepositorySnapshot: { + (params?: RestEndpointMethodTypes["dependencyGraph"]["createRepositorySnapshot"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. + */ + diffRange: { + (params?: RestEndpointMethodTypes["dependencyGraph"]["diffRange"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Exports the software bill of materials (SBOM) for a repository in SPDX JSON format. + */ + exportSbom: { + (params?: RestEndpointMethodTypes["dependencyGraph"]["exportSbom"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + emojis: { + /** + * Lists all the emojis available to use on GitHub. + */ + get: { + (params?: RestEndpointMethodTypes["emojis"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + gists: { + checkIsStarred: { + (params?: RestEndpointMethodTypes["gists"]["checkIsStarred"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Allows you to add a new gist with one or more files. + * + * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + */ + create: { + (params?: RestEndpointMethodTypes["gists"]["create"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + createComment: { + (params?: RestEndpointMethodTypes["gists"]["createComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + delete: { + (params?: RestEndpointMethodTypes["gists"]["delete"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + deleteComment: { + (params?: RestEndpointMethodTypes["gists"]["deleteComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + fork: { + (params?: RestEndpointMethodTypes["gists"]["fork"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + get: { + (params?: RestEndpointMethodTypes["gists"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getComment: { + (params?: RestEndpointMethodTypes["gists"]["getComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getRevision: { + (params?: RestEndpointMethodTypes["gists"]["getRevision"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: + */ + list: { + (params?: RestEndpointMethodTypes["gists"]["list"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listComments: { + (params?: RestEndpointMethodTypes["gists"]["listComments"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listCommits: { + (params?: RestEndpointMethodTypes["gists"]["listCommits"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists public gists for the specified user: + */ + listForUser: { + (params?: RestEndpointMethodTypes["gists"]["listForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listForks: { + (params?: RestEndpointMethodTypes["gists"]["listForks"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List public gists sorted by most recently updated to least recently updated. + * + * 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. + */ + listPublic: { + (params?: RestEndpointMethodTypes["gists"]["listPublic"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the authenticated user's starred gists: + */ + listStarred: { + (params?: RestEndpointMethodTypes["gists"]["listStarred"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + */ + star: { + (params?: RestEndpointMethodTypes["gists"]["star"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + unstar: { + (params?: RestEndpointMethodTypes["gists"]["unstar"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + update: { + (params?: RestEndpointMethodTypes["gists"]["update"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + updateComment: { + (params?: RestEndpointMethodTypes["gists"]["updateComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + git: { + createBlob: { + (params?: RestEndpointMethodTypes["git"]["createBlob"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects). + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + createCommit: { + (params?: RestEndpointMethodTypes["git"]["createCommit"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches. + */ + createRef: { + (params?: RestEndpointMethodTypes["git"]["createRef"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/rest/git/refs#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + createTag: { + (params?: RestEndpointMethodTypes["git"]["createTag"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/git/commits#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/git/refs#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + createTree: { + (params?: RestEndpointMethodTypes["git"]["createTree"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes the provided reference. + */ + deleteRef: { + (params?: RestEndpointMethodTypes["git"]["deleteRef"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * The `content` in the response will always be Base64 encoded. + * + * 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. + */ + getBlob: { + (params?: RestEndpointMethodTypes["git"]["getBlob"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects). + * + * To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)." + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + getCommit: { + (params?: RestEndpointMethodTypes["git"]["getCommit"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + getRef: { + (params?: RestEndpointMethodTypes["git"]["getRef"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + getTag: { + (params?: RestEndpointMethodTypes["git"]["getTag"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a single tree using the SHA1 value or ref name for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + getTree: { + (params?: RestEndpointMethodTypes["git"]["getTree"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + listMatchingRefs: { + (params?: RestEndpointMethodTypes["git"]["listMatchingRefs"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + updateRef: { + (params?: RestEndpointMethodTypes["git"]["updateRef"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + gitignore: { + /** + * List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/repos/repos#create-a-repository-for-the-authenticated-user). + */ + getAllTemplates: { + (params?: RestEndpointMethodTypes["gitignore"]["getAllTemplates"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getTemplate: { + (params?: RestEndpointMethodTypes["gitignore"]["getTemplate"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + interactions: { + /** + * Shows which type of GitHub user can interact with your public repositories and when the restriction expires. + */ + getRestrictionsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["interactions"]["getRestrictionsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. + */ + getRestrictionsForOrg: { + (params?: RestEndpointMethodTypes["interactions"]["getRestrictionsForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. + */ + getRestrictionsForRepo: { + (params?: RestEndpointMethodTypes["interactions"]["getRestrictionsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Shows which type of GitHub user can interact with your public repositories and when the restriction expires. + * @deprecated octokit.rest.interactions.getRestrictionsForYourPublicRepos() has been renamed to octokit.rest.interactions.getRestrictionsForAuthenticatedUser() (2021-02-02) + */ + getRestrictionsForYourPublicRepos: { + (params?: RestEndpointMethodTypes["interactions"]["getRestrictionsForYourPublicRepos"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes any interaction restrictions from your public repositories. + */ + removeRestrictionsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["interactions"]["removeRestrictionsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. + */ + removeRestrictionsForOrg: { + (params?: RestEndpointMethodTypes["interactions"]["removeRestrictionsForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. + */ + removeRestrictionsForRepo: { + (params?: RestEndpointMethodTypes["interactions"]["removeRestrictionsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes any interaction restrictions from your public repositories. + * @deprecated octokit.rest.interactions.removeRestrictionsForYourPublicRepos() has been renamed to octokit.rest.interactions.removeRestrictionsForAuthenticatedUser() (2021-02-02) + */ + removeRestrictionsForYourPublicRepos: { + (params?: RestEndpointMethodTypes["interactions"]["removeRestrictionsForYourPublicRepos"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. + */ + setRestrictionsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["interactions"]["setRestrictionsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. + */ + setRestrictionsForOrg: { + (params?: RestEndpointMethodTypes["interactions"]["setRestrictionsForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. + */ + setRestrictionsForRepo: { + (params?: RestEndpointMethodTypes["interactions"]["setRestrictionsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. + * @deprecated octokit.rest.interactions.setRestrictionsForYourPublicRepos() has been renamed to octokit.rest.interactions.setRestrictionsForAuthenticatedUser() (2021-02-02) + */ + setRestrictionsForYourPublicRepos: { + (params?: RestEndpointMethodTypes["interactions"]["setRestrictionsForYourPublicRepos"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + issues: { + /** + * Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. + */ + addAssignees: { + (params?: RestEndpointMethodTypes["issues"]["addAssignees"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Adds labels to an issue. If you provide an empty array of labels, all labels are removed from the issue. + */ + addLabels: { + (params?: RestEndpointMethodTypes["issues"]["addLabels"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Checks if a user has permission to be assigned to an issue in this repository. + * + * If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + checkUserCanBeAssigned: { + (params?: RestEndpointMethodTypes["issues"]["checkUserCanBeAssigned"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Checks if a user has permission to be assigned to a specific issue. + * + * If the `assignee` can be assigned to this issue, a `204` status code with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + checkUserCanBeAssignedToIssue: { + (params?: RestEndpointMethodTypes["issues"]["checkUserCanBeAssignedToIssue"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. 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`. + */ + create: { + (params?: RestEndpointMethodTypes["issues"]["create"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * 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`. + */ + createComment: { + (params?: RestEndpointMethodTypes["issues"]["createComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a label for the specified repository with the given name and color. The name and color parameters are required. The color must be a valid [hexadecimal color code](http://www.color-hex.com/). + */ + createLabel: { + (params?: RestEndpointMethodTypes["issues"]["createLabel"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a milestone. + */ + createMilestone: { + (params?: RestEndpointMethodTypes["issues"]["createMilestone"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * You can use the REST API to delete comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request. + */ + deleteComment: { + (params?: RestEndpointMethodTypes["issues"]["deleteComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a label using the given label name. + */ + deleteLabel: { + (params?: RestEndpointMethodTypes["issues"]["deleteLabel"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a milestone using the given milestone number. + */ + deleteMilestone: { + (params?: RestEndpointMethodTypes["issues"]["deleteMilestone"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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 + * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe + * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. + * + * **Note**: GitHub's REST API 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`. + */ + get: { + (params?: RestEndpointMethodTypes["issues"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + getComment: { + (params?: RestEndpointMethodTypes["issues"]["getComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a single event by the event id. + */ + getEvent: { + (params?: RestEndpointMethodTypes["issues"]["getEvent"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a label using the given name. + */ + getLabel: { + (params?: RestEndpointMethodTypes["issues"]["getLabel"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a milestone using the given milestone number. + */ + getMilestone: { + (params?: RestEndpointMethodTypes["issues"]["getMilestone"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * **Note**: GitHub's REST API 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`. + */ + list: { + (params?: RestEndpointMethodTypes["issues"]["list"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. + */ + listAssignees: { + (params?: RestEndpointMethodTypes["issues"]["listAssignees"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + listComments: { + (params?: RestEndpointMethodTypes["issues"]["listComments"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + listCommentsForRepo: { + (params?: RestEndpointMethodTypes["issues"]["listCommentsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all events for an issue. + */ + listEvents: { + (params?: RestEndpointMethodTypes["issues"]["listEvents"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists events for a repository. + */ + listEventsForRepo: { + (params?: RestEndpointMethodTypes["issues"]["listEventsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List all timeline events for an issue. + */ + listEventsForTimeline: { + (params?: RestEndpointMethodTypes["issues"]["listEventsForTimeline"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **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`. + */ + listForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["issues"]["listForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List issues in an organization assigned to the authenticated user. + * + * **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`. + */ + listForOrg: { + (params?: RestEndpointMethodTypes["issues"]["listForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List issues in a repository. Only open issues will be listed. + * + * **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`. + */ + listForRepo: { + (params?: RestEndpointMethodTypes["issues"]["listForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists labels for issues in a milestone. + */ + listLabelsForMilestone: { + (params?: RestEndpointMethodTypes["issues"]["listLabelsForMilestone"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all labels for a repository. + */ + listLabelsForRepo: { + (params?: RestEndpointMethodTypes["issues"]["listLabelsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all labels for an issue. + */ + listLabelsOnIssue: { + (params?: RestEndpointMethodTypes["issues"]["listLabelsOnIssue"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists milestones for a repository. + */ + listMilestones: { + (params?: RestEndpointMethodTypes["issues"]["listMilestones"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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 method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." + */ + lock: { + (params?: RestEndpointMethodTypes["issues"]["lock"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes all labels from an issue. + */ + removeAllLabels: { + (params?: RestEndpointMethodTypes["issues"]["removeAllLabels"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes one or more assignees from an issue. + */ + removeAssignees: { + (params?: RestEndpointMethodTypes["issues"]["removeAssignees"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist. + */ + removeLabel: { + (params?: RestEndpointMethodTypes["issues"]["removeLabel"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes any previous labels and sets the new labels for an issue. + */ + setLabels: { + (params?: RestEndpointMethodTypes["issues"]["setLabels"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with push access can unlock an issue's conversation. + */ + unlock: { + (params?: RestEndpointMethodTypes["issues"]["unlock"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + update: { + (params?: RestEndpointMethodTypes["issues"]["update"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + updateComment: { + (params?: RestEndpointMethodTypes["issues"]["updateComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates a label using the given label name. + */ + updateLabel: { + (params?: RestEndpointMethodTypes["issues"]["updateLabel"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + updateMilestone: { + (params?: RestEndpointMethodTypes["issues"]["updateMilestone"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + licenses: { + /** + * Gets information about a specific license. For more information, see "[Licensing a repository ](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)." + */ + get: { + (params?: RestEndpointMethodTypes["licenses"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the most commonly used licenses on GitHub. For more information, see "[Licensing a repository ](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)." + */ + getAllCommonlyUsed: { + (params?: RestEndpointMethodTypes["licenses"]["getAllCommonlyUsed"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * 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). + */ + getForRepo: { + (params?: RestEndpointMethodTypes["licenses"]["getForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + markdown: { + render: { + (params?: RestEndpointMethodTypes["markdown"]["render"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. + */ + renderRaw: { + (params?: RestEndpointMethodTypes["markdown"]["renderRaw"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + meta: { + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * The API's response also includes a list of GitHub's domain names. + * + * The values shown in the documentation's response are example values. You must always query the API directly to get the latest values. + * + * **Note:** This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. + */ + get: { + (params?: RestEndpointMethodTypes["meta"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get all supported GitHub API versions. + */ + getAllVersions: { + (params?: RestEndpointMethodTypes["meta"]["getAllVersions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get the octocat as ASCII art + */ + getOctocat: { + (params?: RestEndpointMethodTypes["meta"]["getOctocat"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get a random sentence from the Zen of GitHub + */ + getZen: { + (params?: RestEndpointMethodTypes["meta"]["getZen"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get Hypermedia links to resources accessible in GitHub's REST API + */ + root: { + (params?: RestEndpointMethodTypes["meta"]["root"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + migrations: { + /** + * Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/migrations/users#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/migrations/users#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. + */ + deleteArchiveForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["migrations"]["deleteArchiveForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a previous migration archive. Migration archives are automatically deleted after seven days. + */ + deleteArchiveForOrg: { + (params?: RestEndpointMethodTypes["migrations"]["deleteArchiveForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Fetches the URL to a migration archive. + */ + downloadArchiveForOrg: { + (params?: RestEndpointMethodTypes["migrations"]["downloadArchiveForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects: + * + * * attachments + * * bases + * * commit\_comments + * * issue\_comments + * * issue\_events + * * issues + * * milestones + * * organizations + * * projects + * * protected\_branches + * * pull\_request\_reviews + * * pull\_requests + * * releases + * * repositories + * * review\_comments + * * schema + * * users + * + * The archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data. + */ + getArchiveForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["migrations"]["getArchiveForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values: + * + * * `pending` - the migration hasn't started yet. + * * `exporting` - the migration is in progress. + * * `exported` - the migration finished successfully. + * * `failed` - the migration failed. + * + * Once the migration has been `exported` you can [download the migration archive](https://docs.github.com/rest/migrations/users#download-a-user-migration-archive). + */ + getStatusForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["migrations"]["getStatusForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Fetches the status of a migration. + * + * The `state` of a migration can be one of the following values: + * + * * `pending`, which means the migration hasn't started yet. + * * `exporting`, which means the migration is in progress. + * * `exported`, which means the migration finished successfully. + * * `failed`, which means the migration failed. + */ + getStatusForOrg: { + (params?: RestEndpointMethodTypes["migrations"]["getStatusForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all migrations a user has started. + */ + listForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["migrations"]["listForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the most recent migrations, including both exports (which can be started through the REST API) and imports (which cannot be started using the REST API). + * + * A list of `repositories` is only returned for export migrations. + */ + listForOrg: { + (params?: RestEndpointMethodTypes["migrations"]["listForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all the repositories for this user migration. + */ + listReposForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["migrations"]["listReposForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List all the repositories for this organization migration. + */ + listReposForOrg: { + (params?: RestEndpointMethodTypes["migrations"]["listReposForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all the repositories for this user migration. + * @deprecated octokit.rest.migrations.listReposForUser() has been renamed to octokit.rest.migrations.listReposForAuthenticatedUser() (2021-10-05) + */ + listReposForUser: { + (params?: RestEndpointMethodTypes["migrations"]["listReposForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Initiates the generation of a user migration archive. + */ + startForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["migrations"]["startForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Initiates the generation of a migration archive. + */ + startForOrg: { + (params?: RestEndpointMethodTypes["migrations"]["startForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/migrations/users#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/repos/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. + */ + unlockRepoForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["migrations"]["unlockRepoForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/repos/repos#delete-a-repository) when the migration is complete and you no longer need the source data. + */ + unlockRepoForOrg: { + (params?: RestEndpointMethodTypes["migrations"]["unlockRepoForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + oidc: { + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * + * OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. + */ + getOidcCustomSubTemplateForOrg: { + (params?: RestEndpointMethodTypes["oidc"]["getOidcCustomSubTemplateForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates or updates the customization template for an OpenID Connect (OIDC) subject claim. + * + * OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + */ + updateOidcCustomSubTemplateForOrg: { + (params?: RestEndpointMethodTypes["oidc"]["updateOidcCustomSubTemplateForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + orgs: { + /** + * 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." + * + * The authenticated user must be an administrator for the organization to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + */ + addSecurityManagerTeam: { + (params?: RestEndpointMethodTypes["orgs"]["addSecurityManagerTeam"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + assignTeamToOrgRole: { + (params?: RestEndpointMethodTypes["orgs"]["assignTeamToOrgRole"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + assignUserToOrgRole: { + (params?: RestEndpointMethodTypes["orgs"]["assignUserToOrgRole"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Blocks the given user on behalf of the specified organization and returns a 204. If the organization cannot block the given user a 422 is returned. + */ + blockUser: { + (params?: RestEndpointMethodTypes["orgs"]["blockUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + cancelInvitation: { + (params?: RestEndpointMethodTypes["orgs"]["cancelInvitation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a 204 if the given user is blocked by the given organization. Returns a 404 if the organization is not blocking the user, or if the user account has been identified as spam by GitHub. + */ + checkBlockedUser: { + (params?: RestEndpointMethodTypes["orgs"]["checkBlockedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Check if a user is, publicly or privately, a member of the organization. + */ + checkMembershipForUser: { + (params?: RestEndpointMethodTypes["orgs"]["checkMembershipForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Check if the provided user is a public member of the organization. + */ + checkPublicMembershipForUser: { + (params?: RestEndpointMethodTypes["orgs"]["checkPublicMembershipForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + */ + convertMemberToOutsideCollaborator: { + (params?: RestEndpointMethodTypes["orgs"]["convertMemberToOutsideCollaborator"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + createCustomOrganizationRole: { + (params?: RestEndpointMethodTypes["orgs"]["createCustomOrganizationRole"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. 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)." + */ + createInvitation: { + (params?: RestEndpointMethodTypes["orgs"]["createInvitation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + createOrUpdateCustomProperties: { + (params?: RestEndpointMethodTypes["orgs"]["createOrUpdateCustomProperties"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + createOrUpdateCustomPropertiesValuesForRepos: { + (params?: RestEndpointMethodTypes["orgs"]["createOrUpdateCustomPropertiesValuesForRepos"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + createOrUpdateCustomProperty: { + (params?: RestEndpointMethodTypes["orgs"]["createOrUpdateCustomProperty"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Create a hook that posts payloads in JSON format. + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or + * edit webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + createWebhook: { + (params?: RestEndpointMethodTypes["orgs"]["createWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes an organization and all its repositories. + * + * The organization login will be unavailable for 90 days after deletion. + * + * Please review the Terms of Service regarding account deletion before using this endpoint: + * + * https://docs.github.com/site-policy/github-terms/github-terms-of-service + */ + delete: { + (params?: RestEndpointMethodTypes["orgs"]["delete"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + deleteCustomOrganizationRole: { + (params?: RestEndpointMethodTypes["orgs"]["deleteCustomOrganizationRole"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + deleteWebhook: { + (params?: RestEndpointMethodTypes["orgs"]["deleteWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + */ + enableOrDisableSecurityProductOnAllOrgRepos: { + (params?: RestEndpointMethodTypes["orgs"]["enableOrDisableSecurityProductOnAllOrgRepos"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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 + * + * 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. + */ + get: { + (params?: RestEndpointMethodTypes["orgs"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets all custom properties defined for an organization. + * Organization members can read these properties. + */ + getAllCustomProperties: { + (params?: RestEndpointMethodTypes["orgs"]["getAllCustomProperties"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a custom property that is defined for an organization. + * Organization members can read these properties. + */ + getCustomProperty: { + (params?: RestEndpointMethodTypes["orgs"]["getCustomProperty"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * If the authenticated user is an active or pending member of the organization, this endpoint will return the user's membership. If the authenticated user is not affiliated with the organization, a `404` is returned. This endpoint will return a `403` if the request is made by a GitHub App that is blocked by the organization. + */ + getMembershipForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["orgs"]["getMembershipForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. + */ + getMembershipForUser: { + (params?: RestEndpointMethodTypes["orgs"]["getMembershipForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getOrgRole: { + (params?: RestEndpointMethodTypes["orgs"]["getOrgRole"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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). + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + getWebhook: { + (params?: RestEndpointMethodTypes["orgs"]["getWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/orgs/webhooks#get-an-organization-webhook)." + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + getWebhookConfigForOrg: { + (params?: RestEndpointMethodTypes["orgs"]["getWebhookConfigForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a delivery for a webhook configured in an organization. + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + getWebhookDelivery: { + (params?: RestEndpointMethodTypes["orgs"]["getWebhookDelivery"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + list: { + (params?: RestEndpointMethodTypes["orgs"]["list"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listAppInstallations: { + (params?: RestEndpointMethodTypes["orgs"]["listAppInstallations"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the users blocked by an organization. + */ + listBlockedUsers: { + (params?: RestEndpointMethodTypes["orgs"]["listBlockedUsers"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists organization repositories with all of their custom property values. + * Organization members can read these properties. + */ + listCustomPropertiesValuesForRepos: { + (params?: RestEndpointMethodTypes["orgs"]["listCustomPropertiesValuesForRepos"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. + */ + listFailedInvitations: { + (params?: RestEndpointMethodTypes["orgs"]["listFailedInvitations"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List organizations for the authenticated user. + * + * 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. + */ + listForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["orgs"]["listForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. + * + * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/orgs/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + listForUser: { + (params?: RestEndpointMethodTypes["orgs"]["listForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. + */ + listInvitationTeams: { + (params?: RestEndpointMethodTypes["orgs"]["listInvitationTeams"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. + */ + listMembers: { + (params?: RestEndpointMethodTypes["orgs"]["listMembers"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all of the authenticated user's organization memberships. + */ + listMembershipsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["orgs"]["listMembershipsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listOrgRoleTeams: { + (params?: RestEndpointMethodTypes["orgs"]["listOrgRoleTeams"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listOrgRoleUsers: { + (params?: RestEndpointMethodTypes["orgs"]["listOrgRoleUsers"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listOrgRoles: { + (params?: RestEndpointMethodTypes["orgs"]["listOrgRoles"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listOrganizationFineGrainedPermissions: { + (params?: RestEndpointMethodTypes["orgs"]["listOrganizationFineGrainedPermissions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List all users who are outside collaborators of an organization. + */ + listOutsideCollaborators: { + (params?: RestEndpointMethodTypes["orgs"]["listOutsideCollaborators"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the repositories a fine-grained personal access token has access to. + * + * Only GitHub Apps can use this endpoint. + */ + listPatGrantRepositories: { + (params?: RestEndpointMethodTypes["orgs"]["listPatGrantRepositories"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the repositories a fine-grained personal access token request is requesting access to. + * + * Only GitHub Apps can use this endpoint. + */ + listPatGrantRequestRepositories: { + (params?: RestEndpointMethodTypes["orgs"]["listPatGrantRequestRepositories"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists requests from organization members to access organization resources with a fine-grained personal access token. + * + * Only GitHub Apps can use this endpoint. + */ + listPatGrantRequests: { + (params?: RestEndpointMethodTypes["orgs"]["listPatGrantRequests"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists approved fine-grained personal access tokens owned by organization members that can access organization resources. + * + * Only GitHub Apps can use this endpoint. + */ + listPatGrants: { + (params?: RestEndpointMethodTypes["orgs"]["listPatGrants"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, or `hiring_manager`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + */ + listPendingInvitations: { + (params?: RestEndpointMethodTypes["orgs"]["listPendingInvitations"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Members of an organization can choose to have their membership publicized or not. + */ + listPublicMembers: { + (params?: RestEndpointMethodTypes["orgs"]["listPublicMembers"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * 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 `read:org` scope to use this endpoint. + */ + listSecurityManagerTeams: { + (params?: RestEndpointMethodTypes["orgs"]["listSecurityManagerTeams"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a list of webhook deliveries for a webhook configured in an organization. + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + listWebhookDeliveries: { + (params?: RestEndpointMethodTypes["orgs"]["listWebhookDeliveries"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + listWebhooks: { + (params?: RestEndpointMethodTypes["orgs"]["listWebhooks"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + patchCustomOrganizationRole: { + (params?: RestEndpointMethodTypes["orgs"]["patchCustomOrganizationRole"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) + * to be sent to the hook. + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + pingWebhook: { + (params?: RestEndpointMethodTypes["orgs"]["pingWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Redeliver a delivery for a webhook configured in an organization. + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + redeliverWebhookDelivery: { + (params?: RestEndpointMethodTypes["orgs"]["redeliverWebhookDelivery"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + removeCustomProperty: { + (params?: RestEndpointMethodTypes["orgs"]["removeCustomProperty"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. + */ + removeMember: { + (params?: RestEndpointMethodTypes["orgs"]["removeMember"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * In order to remove a user's membership with an organization, the authenticated user must be an organization owner. + * + * If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. + */ + removeMembershipForUser: { + (params?: RestEndpointMethodTypes["orgs"]["removeMembershipForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removing a user from this list will remove them from all the organization's repositories. + */ + removeOutsideCollaborator: { + (params?: RestEndpointMethodTypes["orgs"]["removeOutsideCollaborator"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes the public membership for the authenticated user from the specified organization, unless public visibility is enforced by default. + */ + removePublicMembershipForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["orgs"]["removePublicMembershipForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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." + * + * 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. + */ + removeSecurityManagerTeam: { + (params?: RestEndpointMethodTypes["orgs"]["removeSecurityManagerTeam"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Approves or denies a pending request to access organization resources via a fine-grained personal access token. + * + * Only GitHub Apps can use this endpoint. + */ + reviewPatGrantRequest: { + (params?: RestEndpointMethodTypes["orgs"]["reviewPatGrantRequest"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Approves or denies multiple pending requests to access organization resources via a fine-grained personal access token. + * + * Only GitHub Apps can use this endpoint. + */ + reviewPatGrantRequestsInBulk: { + (params?: RestEndpointMethodTypes["orgs"]["reviewPatGrantRequestsInBulk"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + revokeAllOrgRolesTeam: { + (params?: RestEndpointMethodTypes["orgs"]["revokeAllOrgRolesTeam"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + revokeAllOrgRolesUser: { + (params?: RestEndpointMethodTypes["orgs"]["revokeAllOrgRolesUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + revokeOrgRoleTeam: { + (params?: RestEndpointMethodTypes["orgs"]["revokeOrgRoleTeam"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + revokeOrgRoleUser: { + (params?: RestEndpointMethodTypes["orgs"]["revokeOrgRoleUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Only authenticated organization owners can add a member to the organization or update the member's role. + * + * * If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/orgs/members#get-organization-membership-for-a-user) will be `pending` until they accept the invitation. + * + * * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent. + * + * **Rate limits** + * + * To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. + */ + setMembershipForUser: { + (params?: RestEndpointMethodTypes["orgs"]["setMembershipForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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 method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." + */ + setPublicMembershipForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["orgs"]["setPublicMembershipForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Unblocks the given user on behalf of the specified organization. + */ + unblockUser: { + (params?: RestEndpointMethodTypes["orgs"]["unblockUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **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). + * + * 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. + */ + update: { + (params?: RestEndpointMethodTypes["orgs"]["update"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Converts the authenticated user to an active member of the organization, if that user has a pending invitation from the organization. + */ + updateMembershipForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["orgs"]["updateMembershipForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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 use this endpoint. + */ + updatePatAccess: { + (params?: RestEndpointMethodTypes["orgs"]["updatePatAccess"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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 use this endpoint. + */ + updatePatAccesses: { + (params?: RestEndpointMethodTypes["orgs"]["updatePatAccesses"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)". + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + updateWebhook: { + (params?: RestEndpointMethodTypes["orgs"]["updateWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * You must be an organization owner to use this endpoint. + * + * OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit + * webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + */ + updateWebhookConfigForOrg: { + (params?: RestEndpointMethodTypes["orgs"]["updateWebhookConfigForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + packages: { + /** + * 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. + * + * 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)." + */ + deletePackageForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["packages"]["deletePackageForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * 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)." + */ + deletePackageForOrg: { + (params?: RestEndpointMethodTypes["packages"]["deletePackageForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * 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)." + */ + deletePackageForUser: { + (params?: RestEndpointMethodTypes["packages"]["deletePackageForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * 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)." + */ + deletePackageVersionForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["packages"]["deletePackageVersionForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * 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)." + */ + deletePackageVersionForOrg: { + (params?: RestEndpointMethodTypes["packages"]["deletePackageVersionForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * 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)." + */ + deletePackageVersionForUser: { + (params?: RestEndpointMethodTypes["packages"]["deletePackageVersionForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists package versions for a package owned by an organization. + * + * 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)." + * @deprecated octokit.rest.packages.getAllPackageVersionsForAPackageOwnedByAnOrg() has been renamed to octokit.rest.packages.getAllPackageVersionsForPackageOwnedByOrg() (2021-03-24) + */ + getAllPackageVersionsForAPackageOwnedByAnOrg: { + (params?: RestEndpointMethodTypes["packages"]["getAllPackageVersionsForAPackageOwnedByAnOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists package versions for a package owned by the authenticated user. + * + * 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)." + * @deprecated octokit.rest.packages.getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser() has been renamed to octokit.rest.packages.getAllPackageVersionsForPackageOwnedByAuthenticatedUser() (2021-03-24) + */ + getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: { + (params?: RestEndpointMethodTypes["packages"]["getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists package versions for a package owned by the authenticated user. + * + * 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)." + */ + getAllPackageVersionsForPackageOwnedByAuthenticatedUser: { + (params?: RestEndpointMethodTypes["packages"]["getAllPackageVersionsForPackageOwnedByAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists package versions for a package owned by an organization. + * + * 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)." + */ + getAllPackageVersionsForPackageOwnedByOrg: { + (params?: RestEndpointMethodTypes["packages"]["getAllPackageVersionsForPackageOwnedByOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists package versions for a public package owned by a specified user. + * + * 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)." + */ + getAllPackageVersionsForPackageOwnedByUser: { + (params?: RestEndpointMethodTypes["packages"]["getAllPackageVersionsForPackageOwnedByUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a specific package for a package owned by the authenticated user. + * + * 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)." + */ + getPackageForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["packages"]["getPackageForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a specific package in an organization. + * + * 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)." + */ + getPackageForOrganization: { + (params?: RestEndpointMethodTypes["packages"]["getPackageForOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a specific package metadata for a public package owned by a user. + * + * 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)." + */ + getPackageForUser: { + (params?: RestEndpointMethodTypes["packages"]["getPackageForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * 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)." + */ + getPackageVersionForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["packages"]["getPackageVersionForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a specific package version in an organization. + * + * 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)." + */ + getPackageVersionForOrganization: { + (params?: RestEndpointMethodTypes["packages"]["getPackageVersionForOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a specific package version for a public package owned by a specified user. + * + * 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)." + */ + getPackageVersionForUser: { + (params?: RestEndpointMethodTypes["packages"]["getPackageVersionForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all packages that are owned by the authenticated user within the user's namespace, and that encountered a conflict during a Docker migration. + * + * OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. + */ + listDockerMigrationConflictingPackagesForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["packages"]["listDockerMigrationConflictingPackagesForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all packages that are in a specific organization, are readable by the requesting user, and that encountered a conflict during a Docker migration. + * + * OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. + */ + listDockerMigrationConflictingPackagesForOrganization: { + (params?: RestEndpointMethodTypes["packages"]["listDockerMigrationConflictingPackagesForOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * + * OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. + */ + listDockerMigrationConflictingPackagesForUser: { + (params?: RestEndpointMethodTypes["packages"]["listDockerMigrationConflictingPackagesForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * 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)." + */ + listPackagesForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["packages"]["listPackagesForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists packages in an organization readable by the user. + * + * 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)." + */ + listPackagesForOrganization: { + (params?: RestEndpointMethodTypes["packages"]["listPackagesForOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * 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)." + */ + listPackagesForUser: { + (params?: RestEndpointMethodTypes["packages"]["listPackagesForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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)." + */ + restorePackageForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["packages"]["restorePackageForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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)." + */ + restorePackageForOrg: { + (params?: RestEndpointMethodTypes["packages"]["restorePackageForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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)." + */ + restorePackageForUser: { + (params?: RestEndpointMethodTypes["packages"]["restorePackageForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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)." + */ + restorePackageVersionForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["packages"]["restorePackageVersionForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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)." + */ + restorePackageVersionForOrg: { + (params?: RestEndpointMethodTypes["packages"]["restorePackageVersionForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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)." + */ + restorePackageVersionForUser: { + (params?: RestEndpointMethodTypes["packages"]["restorePackageVersionForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + projects: { + /** + * Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. + */ + addCollaborator: { + (params?: RestEndpointMethodTypes["projects"]["addCollaborator"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + createCard: { + (params?: RestEndpointMethodTypes["projects"]["createCard"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a new project column. + */ + createColumn: { + (params?: RestEndpointMethodTypes["projects"]["createColumn"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + createForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["projects"]["createForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + createForOrg: { + (params?: RestEndpointMethodTypes["projects"]["createForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + createForRepo: { + (params?: RestEndpointMethodTypes["projects"]["createForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a project board. Returns a `404 Not Found` status if projects are disabled. + */ + delete: { + (params?: RestEndpointMethodTypes["projects"]["delete"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a project card + */ + deleteCard: { + (params?: RestEndpointMethodTypes["projects"]["deleteCard"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a project column. + */ + deleteColumn: { + (params?: RestEndpointMethodTypes["projects"]["deleteColumn"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + get: { + (params?: RestEndpointMethodTypes["projects"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets information about a project card. + */ + getCard: { + (params?: RestEndpointMethodTypes["projects"]["getCard"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets information about a project column. + */ + getColumn: { + (params?: RestEndpointMethodTypes["projects"]["getColumn"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. + */ + getPermissionForUser: { + (params?: RestEndpointMethodTypes["projects"]["getPermissionForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the project cards in a project. + */ + listCards: { + (params?: RestEndpointMethodTypes["projects"]["listCards"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. + */ + listCollaborators: { + (params?: RestEndpointMethodTypes["projects"]["listCollaborators"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the project columns in a project. + */ + listColumns: { + (params?: RestEndpointMethodTypes["projects"]["listColumns"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + listForOrg: { + (params?: RestEndpointMethodTypes["projects"]["listForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + listForRepo: { + (params?: RestEndpointMethodTypes["projects"]["listForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists projects for a user. + */ + listForUser: { + (params?: RestEndpointMethodTypes["projects"]["listForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + moveCard: { + (params?: RestEndpointMethodTypes["projects"]["moveCard"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + moveColumn: { + (params?: RestEndpointMethodTypes["projects"]["moveColumn"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. + */ + removeCollaborator: { + (params?: RestEndpointMethodTypes["projects"]["removeCollaborator"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + update: { + (params?: RestEndpointMethodTypes["projects"]["update"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + updateCard: { + (params?: RestEndpointMethodTypes["projects"]["updateCard"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + updateColumn: { + (params?: RestEndpointMethodTypes["projects"]["updateColumn"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + pulls: { + /** + * Checks if a pull request has been merged into the base branch. The HTTP status of the response indicates whether or not the pull request has been merged; the response body is empty. + */ + checkIfMerged: { + (params?: RestEndpointMethodTypes["pulls"]["checkIfMerged"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * 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. 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`. + */ + create: { + (params?: RestEndpointMethodTypes["pulls"]["create"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/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`. + */ + createReplyForReviewComment: { + (params?: RestEndpointMethodTypes["pulls"]["createReplyForReviewComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. 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`. + */ + createReview: { + (params?: RestEndpointMethodTypes["pulls"]["createReview"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * 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. + * + * 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`. + */ + createReviewComment: { + (params?: RestEndpointMethodTypes["pulls"]["createReviewComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + deletePendingReview: { + (params?: RestEndpointMethodTypes["pulls"]["deletePendingReview"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a review comment. + */ + deleteReviewComment: { + (params?: RestEndpointMethodTypes["pulls"]["deleteReviewComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + dismissReview: { + (params?: RestEndpointMethodTypes["pulls"]["dismissReview"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/pulls/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/pulls/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. + * + * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: + * + * * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. + * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. + * + * Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * 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. + */ + get: { + (params?: RestEndpointMethodTypes["pulls"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + getReview: { + (params?: RestEndpointMethodTypes["pulls"]["getReview"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + getReviewComment: { + (params?: RestEndpointMethodTypes["pulls"]["getReviewComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + list: { + (params?: RestEndpointMethodTypes["pulls"]["list"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + listCommentsForReview: { + (params?: RestEndpointMethodTypes["pulls"]["listCommentsForReview"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists a maximum of 250 commits for a pull request. To receive a complete + * commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/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`. + */ + listCommits: { + (params?: RestEndpointMethodTypes["pulls"]["listCommits"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + listFiles: { + (params?: RestEndpointMethodTypes["pulls"]["listFiles"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. + */ + listRequestedReviewers: { + (params?: RestEndpointMethodTypes["pulls"]["listRequestedReviewers"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + listReviewComments: { + (params?: RestEndpointMethodTypes["pulls"]["listReviewComments"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + listReviewCommentsForRepo: { + (params?: RestEndpointMethodTypes["pulls"]["listReviewCommentsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + listReviews: { + (params?: RestEndpointMethodTypes["pulls"]["listReviews"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. 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)." + */ + merge: { + (params?: RestEndpointMethodTypes["pulls"]["merge"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes review requests from a pull request for a given set of users and/or teams. + */ + removeRequestedReviewers: { + (params?: RestEndpointMethodTypes["pulls"]["removeRequestedReviewers"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + requestReviewers: { + (params?: RestEndpointMethodTypes["pulls"]["requestReviewers"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + submitReview: { + (params?: RestEndpointMethodTypes["pulls"]["submitReview"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * 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`. + */ + update: { + (params?: RestEndpointMethodTypes["pulls"]["update"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. + */ + updateBranch: { + (params?: RestEndpointMethodTypes["pulls"]["updateBranch"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + updateReview: { + (params?: RestEndpointMethodTypes["pulls"]["updateReview"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + updateReviewComment: { + (params?: RestEndpointMethodTypes["pulls"]["updateReviewComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + rateLimit: { + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * 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/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)." + * * The `dependency_snapshots` object provides your rate limit status for submitting snapshots to the dependency graph. For more information, see "[Dependency graph](https://docs.github.com/rest/dependency-graph)." + * * The `code_scanning_upload` object provides your rate limit status for uploading SARIF results to code scanning. For more information, see "[Uploading a SARIF file to GitHub](https://docs.github.com/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github)." + * * The `actions_runner_registration` object provides your rate limit status for registering self-hosted runners in GitHub Actions. For more information, see "[Self-hosted runners](https://docs.github.com/rest/actions/self-hosted-runners)." + * * The `source_import` object is no longer in use for any API endpoints, and it will be removed in the next API version. For more information about API versions, see "[API Versions](https://docs.github.com/rest/overview/api-versions)." + * + * **Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. + */ + get: { + (params?: RestEndpointMethodTypes["rateLimit"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + reactions: { + /** + * Create a reaction to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. + */ + createForCommitComment: { + (params?: RestEndpointMethodTypes["reactions"]["createForCommitComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Create a reaction to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). A response with an HTTP `200` status means that you already added the reaction type to this issue. + */ + createForIssue: { + (params?: RestEndpointMethodTypes["reactions"]["createForIssue"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Create a reaction to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. + */ + createForIssueComment: { + (params?: RestEndpointMethodTypes["reactions"]["createForIssueComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Create a reaction to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. + */ + createForPullRequestReviewComment: { + (params?: RestEndpointMethodTypes["reactions"]["createForPullRequestReviewComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Create a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release). A response with a `Status: 200 OK` means that you already added the reaction type to this release. + */ + createForRelease: { + (params?: RestEndpointMethodTypes["reactions"]["createForRelease"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + createForTeamDiscussionCommentInOrg: { + (params?: RestEndpointMethodTypes["reactions"]["createForTeamDiscussionCommentInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + createForTeamDiscussionInOrg: { + (params?: RestEndpointMethodTypes["reactions"]["createForTeamDiscussionInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). + */ + deleteForCommitComment: { + (params?: RestEndpointMethodTypes["reactions"]["deleteForCommitComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). + */ + deleteForIssue: { + (params?: RestEndpointMethodTypes["reactions"]["deleteForIssue"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). + */ + deleteForIssueComment: { + (params?: RestEndpointMethodTypes["reactions"]["deleteForIssueComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). + */ + deleteForPullRequestComment: { + (params?: RestEndpointMethodTypes["reactions"]["deleteForPullRequestComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release). + */ + deleteForRelease: { + (params?: RestEndpointMethodTypes["reactions"]["deleteForRelease"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **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 app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + */ + deleteForTeamDiscussion: { + (params?: RestEndpointMethodTypes["reactions"]["deleteForTeamDiscussion"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **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 app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + */ + deleteForTeamDiscussionComment: { + (params?: RestEndpointMethodTypes["reactions"]["deleteForTeamDiscussionComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the reactions to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). + */ + listForCommitComment: { + (params?: RestEndpointMethodTypes["reactions"]["listForCommitComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the reactions to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). + */ + listForIssue: { + (params?: RestEndpointMethodTypes["reactions"]["listForIssue"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the reactions to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). + */ + listForIssueComment: { + (params?: RestEndpointMethodTypes["reactions"]["listForIssueComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the reactions to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). + */ + listForPullRequestReviewComment: { + (params?: RestEndpointMethodTypes["reactions"]["listForPullRequestReviewComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the reactions to a [release](https://docs.github.com/rest/releases/releases#get-a-release). + */ + listForRelease: { + (params?: RestEndpointMethodTypes["reactions"]["listForRelease"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listForTeamDiscussionCommentInOrg: { + (params?: RestEndpointMethodTypes["reactions"]["listForTeamDiscussionCommentInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listForTeamDiscussionInOrg: { + (params?: RestEndpointMethodTypes["reactions"]["listForTeamDiscussionInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + repos: { + /** + * @deprecated octokit.rest.repos.acceptInvitation() has been renamed to octokit.rest.repos.acceptInvitationForAuthenticatedUser() (2021-10-05) + */ + acceptInvitation: { + (params?: RestEndpointMethodTypes["repos"]["acceptInvitation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + acceptInvitationForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["repos"]["acceptInvitationForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only 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. + */ + addAppAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["addAppAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP 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). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. + */ + addCollaborator: { + (params?: RestEndpointMethodTypes["repos"]["addCollaborator"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + addStatusCheckContexts: { + (params?: RestEndpointMethodTypes["repos"]["addStatusCheckContexts"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. You can also give push access to child teams. + */ + addTeamAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["addTeamAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified people push access for this branch. + * + * | Type | Description | + * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + addUserAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["addUserAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Cancels a GitHub Pages deployment. + * + * The authenticated user must have write permissions for the GitHub Pages site. + */ + cancelPagesDeployment: { + (params?: RestEndpointMethodTypes["repos"]["cancelPagesDeployment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Shows whether automated security fixes are enabled, disabled or paused for a repository. The authenticated user must have admin read access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/articles/configuring-automated-security-fixes)". + */ + checkAutomatedSecurityFixes: { + (params?: RestEndpointMethodTypes["repos"]["checkAutomatedSecurityFixes"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * + * Team members will include the members of child teams. + * + * 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. + */ + checkCollaborator: { + (params?: RestEndpointMethodTypes["repos"]["checkCollaborator"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)". + */ + checkPrivateVulnerabilityReporting: { + (params?: RestEndpointMethodTypes["repos"]["checkPrivateVulnerabilityReporting"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". + */ + checkVulnerabilityAlerts: { + (params?: RestEndpointMethodTypes["repos"]["checkVulnerabilityAlerts"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + codeownersErrors: { + (params?: RestEndpointMethodTypes["repos"]["codeownersErrors"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. Both `:base` and `:head` must be branch names in `:repo`. To compare branches across other repositories in the same network as `:repo`, use the format `:branch`. + * + * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + compareCommits: { + (params?: RestEndpointMethodTypes["repos"]["compareCommits"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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 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. + * + * When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination: + * + * - The list of changed files is only shown on the first page of results, but it includes all changed files for the entire comparison. + * - The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results. + * + * For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)." + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + compareCommitsWithBasehead: { + (params?: RestEndpointMethodTypes["repos"]["compareCommitsWithBasehead"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with admin access to the repository can create an autolink. + */ + createAutolink: { + (params?: RestEndpointMethodTypes["repos"]["createAutolink"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. 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`. + */ + createCommitComment: { + (params?: RestEndpointMethodTypes["repos"]["createCommitComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits. + */ + createCommitSignatureProtection: { + (params?: RestEndpointMethodTypes["repos"]["createCommitSignatureProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with push access in a repository can create commit statuses for a given SHA. + * + * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. + */ + createCommitStatus: { + (params?: RestEndpointMethodTypes["repos"]["createCommitStatus"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * You can create a read-only deploy key. + */ + createDeployKey: { + (params?: RestEndpointMethodTypes["repos"]["createDeployKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deployments offer a few configurable parameters with certain defaults. + * + * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them + * before we merge a pull request. + * + * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have + * multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter + * makes it easier to track which environments have requested deployments. The default environment is `production`. + * + * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If + * the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, + * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will + * return a failure response. + * + * By default, [commit statuses](https://docs.github.com/rest/commits/statuses) for every submitted context must be in a `success` + * state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to + * specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do + * not require any contexts or create any commit statuses, the deployment will always succeed. + * + * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text + * field that will be passed on when a deployment event is dispatched. + * + * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might + * be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an + * application with debugging enabled. + * + * Merged branch response: + * + * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating + * a deployment. This auto-merge happens when: + * * Auto-merge option is enabled in the repository + * * Topic branch does not include the latest changes on the base branch, which is `master` in the response example + * * There are no merge conflicts + * + * If there are no new commits in the base branch, a new request to create a deployment should give a successful + * response. + * + * Merge conflict response: + * + * This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't + * be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts. + * + * Failed commit status checks: + * + * This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success` + * status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` or `repo_deployment` scope to use this endpoint. + */ + createDeployment: { + (params?: RestEndpointMethodTypes["repos"]["createDeployment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a deployment branch or tag policy for an environment. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + createDeploymentBranchPolicy: { + (params?: RestEndpointMethodTypes["repos"]["createDeploymentBranchPolicy"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Enable a custom deployment protection rule for an environment. + * + * 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. + */ + createDeploymentProtectionRule: { + (params?: RestEndpointMethodTypes["repos"]["createDeploymentProtectionRule"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with `push` access can create deployment statuses for a given deployment. + * + * OAuth app tokens and personal access tokens (classic) need the `repo_deployment` scope to use this endpoint. + */ + createDeploymentStatus: { + (params?: RestEndpointMethodTypes["repos"]["createDeploymentStatus"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This 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. + */ + createDispatchEvent: { + (params?: RestEndpointMethodTypes["repos"]["createDispatchEvent"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a new repository for the authenticated user. + * + * 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. + */ + createForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["repos"]["createForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Create a fork for the authenticated user. + * + * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * + * **Note**: Although this endpoint works with GitHub Apps, the GitHub App must be installed on the destination account with access to all repositories and on the source account with access to the source repository. + */ + createFork: { + (params?: RestEndpointMethodTypes["repos"]["createFork"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * 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. + */ + createInOrg: { + (params?: RestEndpointMethodTypes["repos"]["createInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + createOrUpdateCustomPropertiesValues: { + (params?: RestEndpointMethodTypes["repos"]["createOrUpdateCustomPropertiesValues"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **Note:** To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/actions/secrets)." + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + createOrUpdateEnvironment: { + (params?: RestEndpointMethodTypes["repos"]["createOrUpdateEnvironment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + createOrUpdateFileContents: { + (params?: RestEndpointMethodTypes["repos"]["createOrUpdateFileContents"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Create a repository ruleset for an organization. + */ + createOrgRuleset: { + (params?: RestEndpointMethodTypes["repos"]["createOrgRuleset"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Create a GitHub Pages deployment for a repository. + * + * The authenticated user must have write permission to the repository. + */ + createPagesDeployment: { + (params?: RestEndpointMethodTypes["repos"]["createPagesDeployment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." + * + * 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. + */ + createPagesSite: { + (params?: RestEndpointMethodTypes["repos"]["createPagesSite"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. 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)." + */ + createRelease: { + (params?: RestEndpointMethodTypes["repos"]["createRelease"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Create a ruleset for a repository. + */ + createRepoRuleset: { + (params?: RestEndpointMethodTypes["repos"]["createRepoRuleset"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + createTagProtection: { + (params?: RestEndpointMethodTypes["repos"]["createTagProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. 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 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. + */ + createUsingTemplate: { + (params?: RestEndpointMethodTypes["repos"]["createUsingTemplate"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can + * share the same `config` as long as those webhooks do not have any `events` that overlap. + */ + createWebhook: { + (params?: RestEndpointMethodTypes["repos"]["createWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * @deprecated octokit.rest.repos.declineInvitation() has been renamed to octokit.rest.repos.declineInvitationForAuthenticatedUser() (2021-10-05) + */ + declineInvitation: { + (params?: RestEndpointMethodTypes["repos"]["declineInvitation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + declineInvitationForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["repos"]["declineInvitationForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + delete: { + (params?: RestEndpointMethodTypes["repos"]["delete"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + deleteAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["deleteAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + deleteAdminBranchProtection: { + (params?: RestEndpointMethodTypes["repos"]["deleteAdminBranchProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + deleteAnEnvironment: { + (params?: RestEndpointMethodTypes["repos"]["deleteAnEnvironment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + deleteAutolink: { + (params?: RestEndpointMethodTypes["repos"]["deleteAutolink"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + deleteBranchProtection: { + (params?: RestEndpointMethodTypes["repos"]["deleteBranchProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + deleteCommitComment: { + (params?: RestEndpointMethodTypes["repos"]["deleteCommitComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits. + */ + deleteCommitSignatureProtection: { + (params?: RestEndpointMethodTypes["repos"]["deleteCommitSignatureProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. + */ + deleteDeployKey: { + (params?: RestEndpointMethodTypes["repos"]["deleteDeployKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/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. + */ + deleteDeployment: { + (params?: RestEndpointMethodTypes["repos"]["deleteDeployment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a deployment branch or tag policy for an environment. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + deleteDeploymentBranchPolicy: { + (params?: RestEndpointMethodTypes["repos"]["deleteDeploymentBranchPolicy"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a file in a repository. + * + * You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author. + * + * The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used. + * + * You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/rest/repos/contents/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + deleteFile: { + (params?: RestEndpointMethodTypes["repos"]["deleteFile"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + deleteInvitation: { + (params?: RestEndpointMethodTypes["repos"]["deleteInvitation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Delete a ruleset for an organization. + */ + deleteOrgRuleset: { + (params?: RestEndpointMethodTypes["repos"]["deleteOrgRuleset"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * 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. + */ + deletePagesSite: { + (params?: RestEndpointMethodTypes["repos"]["deletePagesSite"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + deletePullRequestReviewProtection: { + (params?: RestEndpointMethodTypes["repos"]["deletePullRequestReviewProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with push access to the repository can delete a release. + */ + deleteRelease: { + (params?: RestEndpointMethodTypes["repos"]["deleteRelease"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + deleteReleaseAsset: { + (params?: RestEndpointMethodTypes["repos"]["deleteReleaseAsset"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Delete a ruleset for a repository. + */ + deleteRepoRuleset: { + (params?: RestEndpointMethodTypes["repos"]["deleteRepoRuleset"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + deleteTagProtection: { + (params?: RestEndpointMethodTypes["repos"]["deleteTagProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + deleteWebhook: { + (params?: RestEndpointMethodTypes["repos"]["deleteWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/articles/configuring-automated-security-fixes)". + */ + disableAutomatedSecurityFixes: { + (params?: RestEndpointMethodTypes["repos"]["disableAutomatedSecurityFixes"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Disables a custom deployment protection rule for an environment. + * + * 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. + */ + disableDeploymentProtectionRule: { + (params?: RestEndpointMethodTypes["repos"]["disableDeploymentProtectionRule"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Disables private vulnerability reporting for a repository. The authenticated user must have admin access to the repository. For more information, see "[Privately reporting a security vulnerability](https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)". + */ + disablePrivateVulnerabilityReporting: { + (params?: RestEndpointMethodTypes["repos"]["disablePrivateVulnerabilityReporting"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Disables dependency alerts and the dependency graph for a repository. + * The authenticated user must have admin access to the repository. For more information, + * see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". + */ + disableVulnerabilityAlerts: { + (params?: RestEndpointMethodTypes["repos"]["disableVulnerabilityAlerts"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use + * the `Location` header to make a second `GET` request. + * + * **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. + * @deprecated octokit.rest.repos.downloadArchive() has been renamed to octokit.rest.repos.downloadZipballArchive() (2020-09-17) + */ + downloadArchive: { + (params?: RestEndpointMethodTypes["repos"]["downloadArchive"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use + * the `Location` header to make a second `GET` request. + * **Note**: For private repositories, these links are temporary and expire after five minutes. + */ + downloadTarballArchive: { + (params?: RestEndpointMethodTypes["repos"]["downloadTarballArchive"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `main`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use + * the `Location` header to make a second `GET` request. + * + * **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. + */ + downloadZipballArchive: { + (params?: RestEndpointMethodTypes["repos"]["downloadZipballArchive"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/articles/configuring-automated-security-fixes)". + */ + enableAutomatedSecurityFixes: { + (params?: RestEndpointMethodTypes["repos"]["enableAutomatedSecurityFixes"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Enables private vulnerability reporting for a repository. The authenticated user must have admin access to the repository. For more information, see "[Privately reporting a security vulnerability](https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)." + */ + enablePrivateVulnerabilityReporting: { + (params?: RestEndpointMethodTypes["repos"]["enablePrivateVulnerabilityReporting"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/articles/about-security-alerts-for-vulnerable-dependencies)". + */ + enableVulnerabilityAlerts: { + (params?: RestEndpointMethodTypes["repos"]["enableVulnerabilityAlerts"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Generate a name and body describing a [release](https://docs.github.com/rest/releases/releases#get-a-release). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. + */ + generateReleaseNotes: { + (params?: RestEndpointMethodTypes["repos"]["generateReleaseNotes"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + get: { + (params?: RestEndpointMethodTypes["repos"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + getAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["getAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + getAdminBranchProtection: { + (params?: RestEndpointMethodTypes["repos"]["getAdminBranchProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getAllDeploymentProtectionRules: { + (params?: RestEndpointMethodTypes["repos"]["getAllDeploymentProtectionRules"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the environments 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. + */ + getAllEnvironments: { + (params?: RestEndpointMethodTypes["repos"]["getAllEnvironments"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + getAllStatusCheckContexts: { + (params?: RestEndpointMethodTypes["repos"]["getAllStatusCheckContexts"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getAllTopics: { + (params?: RestEndpointMethodTypes["repos"]["getAllTopics"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the 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. + */ + getAppsWithAccessToProtectedBranch: { + (params?: RestEndpointMethodTypes["repos"]["getAppsWithAccessToProtectedBranch"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + getAutolink: { + (params?: RestEndpointMethodTypes["repos"]["getAutolink"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getBranch: { + (params?: RestEndpointMethodTypes["repos"]["getBranch"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + getBranchProtection: { + (params?: RestEndpointMethodTypes["repos"]["getBranchProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns all active rules that apply to the specified branch. The branch does not need to exist; rules that would apply + * to a branch with that name will be returned. All active rules that apply will be returned, regardless of the level + * at which they are configured (e.g. repository or organization). Rules in rulesets with "evaluate" or "disabled" + * enforcement statuses are not returned. + */ + getBranchRules: { + (params?: RestEndpointMethodTypes["repos"]["getBranchRules"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. + */ + getClones: { + (params?: RestEndpointMethodTypes["repos"]["getClones"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getCodeFrequencyStats: { + (params?: RestEndpointMethodTypes["repos"]["getCodeFrequencyStats"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Checks the repository permission of a collaborator. The possible repository + * permissions are `admin`, `write`, `read`, and `none`. + * + * *Note*: The `permission` attribute provides the legacy base roles of `admin`, `write`, `read`, and `none`, where the + * `maintain` role is mapped to `write` and the `triage` role is mapped to `read`. To determine the role assigned to the + * collaborator, see the `role_name` attribute, which will provide the full role name, including custom roles. The + * `permissions` hash can also be used to determine which base level of access the collaborator has to the repository. + */ + getCollaboratorPermissionLevel: { + (params?: RestEndpointMethodTypes["repos"]["getCollaboratorPermissionLevel"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. + * + * + * Additionally, a combined `state` is returned. The `state` is one of: + * + * * **failure** if any of the contexts report as `error` or `failure` + * * **pending** if there are no statuses or a context is `pending` + * * **success** if the latest status for all contexts is `success` + */ + getCombinedStatusForRef: { + (params?: RestEndpointMethodTypes["repos"]["getCombinedStatusForRef"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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 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. + * + * 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. + * + * - **`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** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + getCommit: { + (params?: RestEndpointMethodTypes["repos"]["getCommit"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. + */ + getCommitActivityStats: { + (params?: RestEndpointMethodTypes["repos"]["getCommitActivityStats"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + getCommitComment: { + (params?: RestEndpointMethodTypes["repos"]["getCommitComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + getCommitSignatureProtection: { + (params?: RestEndpointMethodTypes["repos"]["getCommitSignatureProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns all community profile metrics for a repository. The repository cannot be a fork. + * + * The returned metrics include an overall health score, the repository description, the presence of documentation, the + * detected code of conduct, the detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * 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. + */ + getCommunityProfileMetrics: { + (params?: RestEndpointMethodTypes["repos"]["getCommunityProfileMetrics"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getContent: { + (params?: RestEndpointMethodTypes["repos"]["getContent"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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](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. + */ + getContributorsStats: { + (params?: RestEndpointMethodTypes["repos"]["getContributorsStats"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getCustomDeploymentProtectionRule: { + (params?: RestEndpointMethodTypes["repos"]["getCustomDeploymentProtectionRule"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets all custom property values that are set for a repository. + * Users with read access to the repository can use this endpoint. + */ + getCustomPropertiesValues: { + (params?: RestEndpointMethodTypes["repos"]["getCustomPropertiesValues"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getDeployKey: { + (params?: RestEndpointMethodTypes["repos"]["getDeployKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getDeployment: { + (params?: RestEndpointMethodTypes["repos"]["getDeployment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a deployment branch or tag policy for an environment. + * + * 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. + */ + getDeploymentBranchPolicy: { + (params?: RestEndpointMethodTypes["repos"]["getDeploymentBranchPolicy"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with pull access can view a deployment status for a deployment: + */ + getDeploymentStatus: { + (params?: RestEndpointMethodTypes["repos"]["getDeploymentStatus"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **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. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + */ + getEnvironment: { + (params?: RestEndpointMethodTypes["repos"]["getEnvironment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets information about the single most recent build of a GitHub Pages site. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + getLatestPagesBuild: { + (params?: RestEndpointMethodTypes["repos"]["getLatestPagesBuild"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * View the latest published full release for the repository. + * + * The latest release is the most recent non-prerelease, non-draft release, sorted by the `created_at` attribute. The `created_at` attribute is the date of the commit used for the release, and not the date when the release was drafted or published. + */ + getLatestRelease: { + (params?: RestEndpointMethodTypes["repos"]["getLatestRelease"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + */ + getOrgRuleSuite: { + (params?: RestEndpointMethodTypes["repos"]["getOrgRuleSuite"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + */ + getOrgRuleSuites: { + (params?: RestEndpointMethodTypes["repos"]["getOrgRuleSuites"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get a repository ruleset for an organization. + */ + getOrgRuleset: { + (params?: RestEndpointMethodTypes["repos"]["getOrgRuleset"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get all the repository rulesets for an organization. + */ + getOrgRulesets: { + (params?: RestEndpointMethodTypes["repos"]["getOrgRulesets"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets information about a GitHub Pages site. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + getPages: { + (params?: RestEndpointMethodTypes["repos"]["getPages"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets information about a GitHub Pages build. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + getPagesBuild: { + (params?: RestEndpointMethodTypes["repos"]["getPagesBuild"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the current status of a GitHub Pages deployment. + * + * The authenticated user must have read permission for the GitHub Pages site. + */ + getPagesDeployment: { + (params?: RestEndpointMethodTypes["repos"]["getPagesDeployment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * 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. + */ + getPagesHealthCheck: { + (params?: RestEndpointMethodTypes["repos"]["getPagesHealthCheck"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`. + * + * The array order is oldest week (index 0) to most recent week. + * + * The most recent week is seven days ago at UTC midnight to today at UTC midnight. + */ + getParticipationStats: { + (params?: RestEndpointMethodTypes["repos"]["getParticipationStats"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + getPullRequestReviewProtection: { + (params?: RestEndpointMethodTypes["repos"]["getPullRequestReviewProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Each array contains the day number, hour number, and number of commits: + * + * * `0-6`: Sunday - Saturday + * * `0-23`: Hour of day + * * Number of commits + * + * For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. + */ + getPunchCardStats: { + (params?: RestEndpointMethodTypes["repos"]["getPunchCardStats"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the preferred README for a repository. + * + * 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). + */ + getReadme: { + (params?: RestEndpointMethodTypes["repos"]["getReadme"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the README from a repository 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. 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). + */ + getReadmeInDirectory: { + (params?: RestEndpointMethodTypes["repos"]["getReadmeInDirectory"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + */ + getRelease: { + (params?: RestEndpointMethodTypes["repos"]["getRelease"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. + */ + getReleaseAsset: { + (params?: RestEndpointMethodTypes["repos"]["getReleaseAsset"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get a published release with the specified tag. + */ + getReleaseByTag: { + (params?: RestEndpointMethodTypes["repos"]["getReleaseByTag"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + */ + getRepoRuleSuite: { + (params?: RestEndpointMethodTypes["repos"]["getRepoRuleSuite"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + */ + getRepoRuleSuites: { + (params?: RestEndpointMethodTypes["repos"]["getRepoRuleSuites"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get a ruleset for a repository. + */ + getRepoRuleset: { + (params?: RestEndpointMethodTypes["repos"]["getRepoRuleset"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get all the rulesets for a repository. + */ + getRepoRulesets: { + (params?: RestEndpointMethodTypes["repos"]["getRepoRulesets"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + getStatusChecksProtection: { + (params?: RestEndpointMethodTypes["repos"]["getStatusChecksProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + getTeamsWithAccessToProtectedBranch: { + (params?: RestEndpointMethodTypes["repos"]["getTeamsWithAccessToProtectedBranch"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get the top 10 popular contents over the last 14 days. + */ + getTopPaths: { + (params?: RestEndpointMethodTypes["repos"]["getTopPaths"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get the top 10 referrers over the last 14 days. + */ + getTopReferrers: { + (params?: RestEndpointMethodTypes["repos"]["getTopReferrers"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + getUsersWithAccessToProtectedBranch: { + (params?: RestEndpointMethodTypes["repos"]["getUsersWithAccessToProtectedBranch"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. + */ + getViews: { + (params?: RestEndpointMethodTypes["repos"]["getViews"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository)." + */ + getWebhook: { + (params?: RestEndpointMethodTypes["repos"]["getWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/webhooks/repos#get-a-repository-webhook)." + * + * OAuth app tokens and personal access tokens (classic) need the `read:repo_hook` or `repo` scope to use this endpoint. + */ + getWebhookConfigForRepo: { + (params?: RestEndpointMethodTypes["repos"]["getWebhookConfigForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a delivery for a webhook configured in a repository. + */ + getWebhookDelivery: { + (params?: RestEndpointMethodTypes["repos"]["getWebhookDelivery"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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 activity and data for your repository](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository)." + */ + listActivities: { + (params?: RestEndpointMethodTypes["repos"]["listActivities"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets all autolinks that are configured for a repository. + * + * Information about autolinks are only available to repository administrators. + */ + listAutolinks: { + (params?: RestEndpointMethodTypes["repos"]["listAutolinks"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listBranches: { + (params?: RestEndpointMethodTypes["repos"]["listBranches"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + listBranchesForHeadCommit: { + (params?: RestEndpointMethodTypes["repos"]["listBranchesForHeadCommit"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * + * Team members will include the members of child teams. + * + * 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. + */ + listCollaborators: { + (params?: RestEndpointMethodTypes["repos"]["listCollaborators"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + listCommentsForCommit: { + (params?: RestEndpointMethodTypes["repos"]["listCommentsForCommit"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the commit comments for a specified repository. 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`. + */ + listCommitCommentsForRepo: { + (params?: RestEndpointMethodTypes["repos"]["listCommitCommentsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one. + * + * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. + */ + listCommitStatusesForRef: { + (params?: RestEndpointMethodTypes["repos"]["listCommitStatusesForRef"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + listCommits: { + (params?: RestEndpointMethodTypes["repos"]["listCommits"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API caches contributor data to improve performance. + * + * GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information. + */ + listContributors: { + (params?: RestEndpointMethodTypes["repos"]["listContributors"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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/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. + */ + listCustomDeploymentRuleIntegrations: { + (params?: RestEndpointMethodTypes["repos"]["listCustomDeploymentRuleIntegrations"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listDeployKeys: { + (params?: RestEndpointMethodTypes["repos"]["listDeployKeys"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the deployment branch policies for an environment. + * + * 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. + */ + listDeploymentBranchPolicies: { + (params?: RestEndpointMethodTypes["repos"]["listDeploymentBranchPolicies"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with pull access can view deployment statuses for a deployment: + */ + listDeploymentStatuses: { + (params?: RestEndpointMethodTypes["repos"]["listDeploymentStatuses"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Simple filtering of deployments is available via query parameters: + */ + listDeployments: { + (params?: RestEndpointMethodTypes["repos"]["listDeployments"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + */ + listForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["repos"]["listForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists repositories for the specified organization. + * + * **Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + */ + listForOrg: { + (params?: RestEndpointMethodTypes["repos"]["listForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists public repositories for the specified user. + */ + listForUser: { + (params?: RestEndpointMethodTypes["repos"]["listForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listForks: { + (params?: RestEndpointMethodTypes["repos"]["listForks"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. + */ + listInvitations: { + (params?: RestEndpointMethodTypes["repos"]["listInvitations"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * When authenticating as a user, this endpoint will list all currently open repository invitations for that user. + */ + listInvitationsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["repos"]["listInvitationsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. + */ + listLanguages: { + (params?: RestEndpointMethodTypes["repos"]["listLanguages"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists builts of a GitHub Pages site. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + listPagesBuilds: { + (params?: RestEndpointMethodTypes["repos"]["listPagesBuilds"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of repositories. + */ + listPublic: { + (params?: RestEndpointMethodTypes["repos"]["listPublic"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, will only return open pull requests associated with the commit. + * + * To list the open or merged pull requests associated with a branch, you can set the `commit_sha` parameter to the branch name. + */ + listPullRequestsAssociatedWithCommit: { + (params?: RestEndpointMethodTypes["repos"]["listPullRequestsAssociatedWithCommit"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listReleaseAssets: { + (params?: RestEndpointMethodTypes["repos"]["listReleaseAssets"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/rest/repos/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + listReleases: { + (params?: RestEndpointMethodTypes["repos"]["listReleases"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + listTagProtection: { + (params?: RestEndpointMethodTypes["repos"]["listTagProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listTags: { + (params?: RestEndpointMethodTypes["repos"]["listTags"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the teams that have access to the specified repository and that are also visible to the authenticated user. + * + * For a public repository, a team is listed only if that team added the public repository explicitly. + * + * 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. + */ + listTeams: { + (params?: RestEndpointMethodTypes["repos"]["listTeams"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a list of webhook deliveries for a webhook configured in a repository. + */ + listWebhookDeliveries: { + (params?: RestEndpointMethodTypes["repos"]["listWebhookDeliveries"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. + */ + listWebhooks: { + (params?: RestEndpointMethodTypes["repos"]["listWebhooks"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + merge: { + (params?: RestEndpointMethodTypes["repos"]["merge"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sync a branch of a forked repository to keep it up-to-date with the upstream repository. + */ + mergeUpstream: { + (params?: RestEndpointMethodTypes["repos"]["mergeUpstream"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. + */ + pingWebhook: { + (params?: RestEndpointMethodTypes["repos"]["pingWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Redeliver a webhook delivery for a webhook configured in a repository. + */ + redeliverWebhookDelivery: { + (params?: RestEndpointMethodTypes["repos"]["redeliverWebhookDelivery"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only 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. + */ + removeAppAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["removeAppAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes a collaborator from a repository. + * + * To use this endpoint, the authenticated user must either be an administrator of the repository or target themselves for removal. + * + * This endpoint also: + * - Cancels any outstanding invitations + * - Unasigns the user from any issues + * - Removes access to organization projects if the user is not an organization member and is not a collaborator on any other organization repositories. + * - Unstars the repository + * - Updates access permissions to packages + * + * Removing a user as a collaborator has the following effects on forks: + * - If the user had access to a fork through their membership to this repository, the user will also be removed from the fork. + * - If the user had their own fork of the repository, the fork will be deleted. + * - If the user still has read access to the repository, open pull requests by this user from a fork will be denied. + * + * **Note**: A user can still have access to the repository through organization permissions like base repository permissions. + * + * Although the API responds immediately, the additional permission updates might take some extra time to complete in the background. + * + * For more information on fork permissions, see "[About permissions and visibility of forks](https://docs.github.com/pull-requests/collaborating-with-pull-requests/working-with-forks/about-permissions-and-visibility-of-forks)". + */ + removeCollaborator: { + (params?: RestEndpointMethodTypes["repos"]["removeCollaborator"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + removeStatusCheckContexts: { + (params?: RestEndpointMethodTypes["repos"]["removeStatusCheckContexts"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + removeStatusCheckProtection: { + (params?: RestEndpointMethodTypes["repos"]["removeStatusCheckProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + */ + removeTeamAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["removeTeamAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + removeUserAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["removeUserAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The 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. + * + * In order to rename the default branch, fine-grained access tokens also need the `administration:write` repository permission. + */ + renameBranch: { + (params?: RestEndpointMethodTypes["repos"]["renameBranch"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + replaceAllTopics: { + (params?: RestEndpointMethodTypes["repos"]["replaceAllTopics"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures. + * + * Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes. + */ + requestPagesBuild: { + (params?: RestEndpointMethodTypes["repos"]["requestPagesBuild"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + setAdminBranchProtection: { + (params?: RestEndpointMethodTypes["repos"]["setAdminBranchProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * 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. + */ + setAppAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["setAppAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + setStatusCheckContexts: { + (params?: RestEndpointMethodTypes["repos"]["setStatusCheckContexts"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams. + */ + setTeamAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["setTeamAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people. + * + * | Type | Description | + * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + setUserAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["setUserAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. + * + * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` + */ + testPushWebhook: { + (params?: RestEndpointMethodTypes["repos"]["testPushWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). + */ + transfer: { + (params?: RestEndpointMethodTypes["repos"]["transfer"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/repos/repos#replace-all-repository-topics) endpoint. + */ + update: { + (params?: RestEndpointMethodTypes["repos"]["update"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Protecting a branch requires admin or owner permissions to the repository. + * + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + * + * **Note**: The list of users, apps, and teams in total is limited to 100 items. + */ + updateBranchProtection: { + (params?: RestEndpointMethodTypes["repos"]["updateBranchProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + updateCommitComment: { + (params?: RestEndpointMethodTypes["repos"]["updateCommitComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates a deployment branch or tag policy for an environment. + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + updateDeploymentBranchPolicy: { + (params?: RestEndpointMethodTypes["repos"]["updateDeploymentBranchPolicy"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + * + * 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. + */ + updateInformationAboutPagesSite: { + (params?: RestEndpointMethodTypes["repos"]["updateInformationAboutPagesSite"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + updateInvitation: { + (params?: RestEndpointMethodTypes["repos"]["updateInvitation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Update a ruleset for an organization. + */ + updateOrgRuleset: { + (params?: RestEndpointMethodTypes["repos"]["updateOrgRuleset"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + * + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + */ + updatePullRequestReviewProtection: { + (params?: RestEndpointMethodTypes["repos"]["updatePullRequestReviewProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with push access to the repository can edit a release. + */ + updateRelease: { + (params?: RestEndpointMethodTypes["repos"]["updateRelease"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with push access to the repository can edit a release asset. + */ + updateReleaseAsset: { + (params?: RestEndpointMethodTypes["repos"]["updateReleaseAsset"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Update a ruleset for a repository. + */ + updateRepoRuleset: { + (params?: RestEndpointMethodTypes["repos"]["updateRepoRuleset"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + * @deprecated octokit.rest.repos.updateStatusCheckPotection() has been renamed to octokit.rest.repos.updateStatusCheckProtection() (2020-09-17) + */ + updateStatusCheckPotection: { + (params?: RestEndpointMethodTypes["repos"]["updateStatusCheckPotection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + updateStatusCheckProtection: { + (params?: RestEndpointMethodTypes["repos"]["updateStatusCheckProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository)." + */ + updateWebhook: { + (params?: RestEndpointMethodTypes["repos"]["updateWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `write:repo_hook` or `repo` scope to use this endpoint. + */ + updateWebhookConfigForRepo: { + (params?: RestEndpointMethodTypes["repos"]["updateWebhookConfigForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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 + * the response of the [Create a release endpoint](https://docs.github.com/rest/releases/releases#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, + * you'll still need to pass your authentication to be able to upload an asset. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List release assets](https://docs.github.com/rest/releases/assets#list-release-assets)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * To find the `release_id` query the [`GET /repos/{owner}/{repo}/releases/latest` endpoint](https://docs.github.com/rest/releases/releases#get-the-latest-release). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + uploadReleaseAsset: { + (params?: RestEndpointMethodTypes["repos"]["uploadReleaseAsset"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + search: { + /** + * 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). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * Considerations for code search: + * + * Due to the complexity of searching code, there are a few restrictions on how searches are performed: + * + * * Only the _default branch_ is considered. In most cases, this will be the `master` branch. + * * Only files smaller than 384 KB are searchable. + * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing + * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. + * + * This endpoint requires you to authenticate and limits you to 10 requests per minute. + */ + code: { + (params?: RestEndpointMethodTypes["search"]["code"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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). + * + * For example, if you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + commits: { + (params?: RestEndpointMethodTypes["search"]["commits"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + issuesAndPullRequests: { + (params?: RestEndpointMethodTypes["search"]["issuesAndPullRequests"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + labels: { + (params?: RestEndpointMethodTypes["search"]["labels"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + repos: { + (params?: RestEndpointMethodTypes["search"]["repos"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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). + * + * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: + * + * `q=ruby+is:featured` + * + * This query searches for topics with the keyword `ruby` and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results. + */ + topics: { + (params?: RestEndpointMethodTypes["search"]["topics"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + * + * This endpoint does not accept authentication and will only include publicly visible users. As an alternative, you can use the GraphQL API. The GraphQL API requires authentication and will return private users, including Enterprise Managed Users (EMUs), that you are authorized to view. For more information, see "[GraphQL Queries](https://docs.github.com/graphql/reference/queries#search)." + */ + users: { + (params?: RestEndpointMethodTypes["search"]["users"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + secretScanning: { + /** + * Gets a single secret scanning alert detected in an eligible repository. + * + * 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. + */ + getAlert: { + (params?: RestEndpointMethodTypes["secretScanning"]["getAlert"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * + * 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. + */ + listAlertsForEnterprise: { + (params?: RestEndpointMethodTypes["secretScanning"]["listAlertsForEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * + * 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. + */ + listAlertsForOrg: { + (params?: RestEndpointMethodTypes["secretScanning"]["listAlertsForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * + * 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. + */ + listAlertsForRepo: { + (params?: RestEndpointMethodTypes["secretScanning"]["listAlertsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * + * 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. + */ + listLocationsForAlert: { + (params?: RestEndpointMethodTypes["secretScanning"]["listLocationsForAlert"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates the status of a secret scanning alert in an eligible repository. + * + * 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. + */ + updateAlert: { + (params?: RestEndpointMethodTypes["secretScanning"]["updateAlert"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + securityAdvisories: { + /** + * 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. + */ + createFork: { + (params?: RestEndpointMethodTypes["securityAdvisories"]["createFork"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Report a security vulnerability to the maintainers of the repository. + * See "[Privately reporting a security vulnerability](https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)" for more information about private vulnerability reporting. + */ + createPrivateVulnerabilityReport: { + (params?: RestEndpointMethodTypes["securityAdvisories"]["createPrivateVulnerabilityReport"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a new repository security advisory. + * + * 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. + */ + createRepositoryAdvisory: { + (params?: RestEndpointMethodTypes["securityAdvisories"]["createRepositoryAdvisory"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * If you want a CVE identification number for the security vulnerability in your project, and don't already have one, you can request a CVE identification number from GitHub. For more information see "[Requesting a CVE identification number](https://docs.github.com/code-security/security-advisories/repository-security-advisories/publishing-a-repository-security-advisory#requesting-a-cve-identification-number-optional)." + * + * You may request a CVE for public repositories, but cannot do so for private repositories. + * + * In order to request a CVE for a 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. + */ + createRepositoryAdvisoryCveRequest: { + (params?: RestEndpointMethodTypes["securityAdvisories"]["createRepositoryAdvisoryCveRequest"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a global security advisory using its GitHub Security Advisory (GHSA) identifier. + */ + getGlobalAdvisory: { + (params?: RestEndpointMethodTypes["securityAdvisories"]["getGlobalAdvisory"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get a repository security advisory using its GitHub Security Advisory (GHSA) identifier. + * + * 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. + */ + getRepositoryAdvisory: { + (params?: RestEndpointMethodTypes["securityAdvisories"]["getRepositoryAdvisory"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all global security advisories that match the specified parameters. If no other parameters are defined, the request will return only GitHub-reviewed advisories that are not malware. + * + * By default, all responses will exclude advisories for malware, because malware are not standard vulnerabilities. To list advisories for malware, you must include the `type` parameter in your request, with the value `malware`. For more information about the different types of security advisories, see "[About the GitHub Advisory database](https://docs.github.com/code-security/security-advisories/global-security-advisories/about-the-github-advisory-database#about-types-of-security-advisories)." + */ + listGlobalAdvisories: { + (params?: RestEndpointMethodTypes["securityAdvisories"]["listGlobalAdvisories"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists repository security advisories for an organization. + * + * 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. + */ + listOrgRepositoryAdvisories: { + (params?: RestEndpointMethodTypes["securityAdvisories"]["listOrgRepositoryAdvisories"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists security advisories in a repository. + * + * 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. + */ + listRepositoryAdvisories: { + (params?: RestEndpointMethodTypes["securityAdvisories"]["listRepositoryAdvisories"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Update a repository security advisory using its GitHub Security Advisory (GHSA) identifier. + * + * 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. + */ + updateRepositoryAdvisory: { + (params?: RestEndpointMethodTypes["securityAdvisories"]["updateRepositoryAdvisory"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + teams: { + /** + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + addOrUpdateMembershipForUserInOrg: { + (params?: RestEndpointMethodTypes["teams"]["addOrUpdateMembershipForUserInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + addOrUpdateProjectPermissionsInOrg: { + (params?: RestEndpointMethodTypes["teams"]["addOrUpdateProjectPermissionsInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + addOrUpdateRepoPermissionsInOrg: { + (params?: RestEndpointMethodTypes["teams"]["addOrUpdateRepoPermissionsInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + checkPermissionsForProjectInOrg: { + (params?: RestEndpointMethodTypes["teams"]["checkPermissionsForProjectInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked. + * + * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * 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}`. + */ + checkPermissionsForRepoInOrg: { + (params?: RestEndpointMethodTypes["teams"]["checkPermissionsForRepoInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://docs.github.com/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + create: { + (params?: RestEndpointMethodTypes["teams"]["create"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * **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. + */ + createDiscussionCommentInOrg: { + (params?: RestEndpointMethodTypes["teams"]["createDiscussionCommentInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * **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. + */ + createDiscussionInOrg: { + (params?: RestEndpointMethodTypes["teams"]["createDiscussionInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + deleteDiscussionCommentInOrg: { + (params?: RestEndpointMethodTypes["teams"]["deleteDiscussionCommentInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + deleteDiscussionInOrg: { + (params?: RestEndpointMethodTypes["teams"]["deleteDiscussionInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + deleteInOrg: { + (params?: RestEndpointMethodTypes["teams"]["deleteInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a team using the team's `slug`. To create the `slug`, GitHub replaces special characters in the `name` string, changes all words to lowercase, and replaces spaces with a `-` separator. For example, `"My TEam Näme"` would become `my-team-name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + getByName: { + (params?: RestEndpointMethodTypes["teams"]["getByName"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getDiscussionCommentInOrg: { + (params?: RestEndpointMethodTypes["teams"]["getDiscussionCommentInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getDiscussionInOrg: { + (params?: RestEndpointMethodTypes["teams"]["getDiscussionInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/teams/teams#create-a-team). + */ + getMembershipForUserInOrg: { + (params?: RestEndpointMethodTypes["teams"]["getMembershipForUserInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all teams in an organization that are visible to the authenticated user. + */ + list: { + (params?: RestEndpointMethodTypes["teams"]["list"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + listChildInOrg: { + (params?: RestEndpointMethodTypes["teams"]["listChildInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listDiscussionCommentsInOrg: { + (params?: RestEndpointMethodTypes["teams"]["listDiscussionCommentsInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listDiscussionsInOrg: { + (params?: RestEndpointMethodTypes["teams"]["listDiscussionsInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["teams"]["listForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + listMembersInOrg: { + (params?: RestEndpointMethodTypes["teams"]["listMembersInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + listPendingInvitationsInOrg: { + (params?: RestEndpointMethodTypes["teams"]["listPendingInvitationsInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + listProjectsInOrg: { + (params?: RestEndpointMethodTypes["teams"]["listProjectsInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + listReposInOrg: { + (params?: RestEndpointMethodTypes["teams"]["listReposInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + removeMembershipForUserInOrg: { + (params?: RestEndpointMethodTypes["teams"]["removeMembershipForUserInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + removeProjectInOrg: { + (params?: RestEndpointMethodTypes["teams"]["removeProjectInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + removeRepoInOrg: { + (params?: RestEndpointMethodTypes["teams"]["removeRepoInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + updateDiscussionCommentInOrg: { + (params?: RestEndpointMethodTypes["teams"]["updateDiscussionCommentInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + updateDiscussionInOrg: { + (params?: RestEndpointMethodTypes["teams"]["updateDiscussionInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + updateInOrg: { + (params?: RestEndpointMethodTypes["teams"]["updateInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + users: { + /** + * OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. + * @deprecated octokit.rest.users.addEmailForAuthenticated() has been renamed to octokit.rest.users.addEmailForAuthenticatedUser() (2021-10-05) + */ + addEmailForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["addEmailForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. + */ + addEmailForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["addEmailForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + addSocialAccountForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["addSocialAccountForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Blocks the given user and returns a 204. If the authenticated user cannot block the given user a 422 is returned. + */ + block: { + (params?: RestEndpointMethodTypes["users"]["block"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a 204 if the given user is blocked by the authenticated user. Returns a 404 if the given user is not blocked by the authenticated user, or if the given user account has been identified as spam by GitHub. + */ + checkBlocked: { + (params?: RestEndpointMethodTypes["users"]["checkBlocked"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + checkFollowingForUser: { + (params?: RestEndpointMethodTypes["users"]["checkFollowingForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + checkPersonIsFollowedByAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["checkPersonIsFollowedByAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * @deprecated octokit.rest.users.createGpgKeyForAuthenticated() has been renamed to octokit.rest.users.createGpgKeyForAuthenticatedUser() (2021-10-05) + */ + createGpgKeyForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["createGpgKeyForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + createGpgKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["createGpgKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * @deprecated octokit.rest.users.createPublicSshKeyForAuthenticated() has been renamed to octokit.rest.users.createPublicSshKeyForAuthenticatedUser() (2021-10-05) + */ + createPublicSshKeyForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["createPublicSshKeyForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + createPublicSshKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["createPublicSshKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + createSshSigningKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["createSshSigningKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. + * @deprecated octokit.rest.users.deleteEmailForAuthenticated() has been renamed to octokit.rest.users.deleteEmailForAuthenticatedUser() (2021-10-05) + */ + deleteEmailForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["deleteEmailForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. + */ + deleteEmailForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["deleteEmailForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * @deprecated octokit.rest.users.deleteGpgKeyForAuthenticated() has been renamed to octokit.rest.users.deleteGpgKeyForAuthenticatedUser() (2021-10-05) + */ + deleteGpgKeyForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["deleteGpgKeyForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + deleteGpgKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["deleteGpgKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * @deprecated octokit.rest.users.deletePublicSshKeyForAuthenticated() has been renamed to octokit.rest.users.deletePublicSshKeyForAuthenticatedUser() (2021-10-05) + */ + deletePublicSshKeyForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["deletePublicSshKeyForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + deletePublicSshKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["deletePublicSshKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + deleteSocialAccountForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["deleteSocialAccountForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + deleteSshSigningKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["deleteSshSigningKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + * + * OAuth app tokens and personal access tokens (classic) need the `user:follow` scope to use this endpoint. + */ + follow: { + (params?: RestEndpointMethodTypes["users"]["follow"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * OAuth app tokens and personal access tokens (classic) need the `user` scope in order for the response to include private profile information. + */ + getAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["getAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Provides publicly available information about someone with a GitHub account. + * + * 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)". + */ + getByUsername: { + (params?: RestEndpointMethodTypes["users"]["getByUsername"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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, you would use a `subject_type` value of `repository` and a `subject_id` value of `1300192` (the ID of the `Spoon-Knife` repository). + * + * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + */ + getContextForUser: { + (params?: RestEndpointMethodTypes["users"]["getContextForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * @deprecated octokit.rest.users.getGpgKeyForAuthenticated() has been renamed to octokit.rest.users.getGpgKeyForAuthenticatedUser() (2021-10-05) + */ + getGpgKeyForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["getGpgKeyForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getGpgKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["getGpgKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * @deprecated octokit.rest.users.getPublicSshKeyForAuthenticated() has been renamed to octokit.rest.users.getPublicSshKeyForAuthenticatedUser() (2021-10-05) + */ + getPublicSshKeyForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["getPublicSshKeyForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getPublicSshKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["getPublicSshKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getSshSigningKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["getSshSigningKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. + * + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of users. + */ + list: { + (params?: RestEndpointMethodTypes["users"]["list"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the users you've blocked on your personal account. + * @deprecated octokit.rest.users.listBlockedByAuthenticated() has been renamed to octokit.rest.users.listBlockedByAuthenticatedUser() (2021-10-05) + */ + listBlockedByAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["listBlockedByAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the users you've blocked on your personal account. + */ + listBlockedByAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listBlockedByAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * @deprecated octokit.rest.users.listEmailsForAuthenticated() has been renamed to octokit.rest.users.listEmailsForAuthenticatedUser() (2021-10-05) + */ + listEmailsForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["listEmailsForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listEmailsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listEmailsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the people who the authenticated user follows. + * @deprecated octokit.rest.users.listFollowedByAuthenticated() has been renamed to octokit.rest.users.listFollowedByAuthenticatedUser() (2021-10-05) + */ + listFollowedByAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["listFollowedByAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the people who the authenticated user follows. + */ + listFollowedByAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listFollowedByAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the people following the authenticated user. + */ + listFollowersForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listFollowersForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the people following the specified user. + */ + listFollowersForUser: { + (params?: RestEndpointMethodTypes["users"]["listFollowersForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the people who the specified user follows. + */ + listFollowingForUser: { + (params?: RestEndpointMethodTypes["users"]["listFollowingForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * @deprecated octokit.rest.users.listGpgKeysForAuthenticated() has been renamed to octokit.rest.users.listGpgKeysForAuthenticatedUser() (2021-10-05) + */ + listGpgKeysForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["listGpgKeysForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listGpgKeysForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listGpgKeysForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the GPG keys for a user. This information is accessible by anyone. + */ + listGpgKeysForUser: { + (params?: RestEndpointMethodTypes["users"]["listGpgKeysForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists your publicly visible email address, which you can set with the + * [Set primary email visibility for the authenticated user](https://docs.github.com/rest/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. + * @deprecated octokit.rest.users.listPublicEmailsForAuthenticated() has been renamed to octokit.rest.users.listPublicEmailsForAuthenticatedUser() (2021-10-05) + */ + listPublicEmailsForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["listPublicEmailsForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists your publicly visible email address, which you can set with the + * [Set primary email visibility for the authenticated user](https://docs.github.com/rest/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. + */ + listPublicEmailsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listPublicEmailsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the _verified_ public SSH keys for a user. This is accessible by anyone. + */ + listPublicKeysForUser: { + (params?: RestEndpointMethodTypes["users"]["listPublicKeysForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + * @deprecated octokit.rest.users.listPublicSshKeysForAuthenticated() has been renamed to octokit.rest.users.listPublicSshKeysForAuthenticatedUser() (2021-10-05) + */ + listPublicSshKeysForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["listPublicSshKeysForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listPublicSshKeysForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listPublicSshKeysForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all of your social accounts. + */ + listSocialAccountsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listSocialAccountsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists social media accounts for a user. This endpoint is accessible by anyone. + */ + listSocialAccountsForUser: { + (params?: RestEndpointMethodTypes["users"]["listSocialAccountsForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listSshSigningKeysForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listSshSigningKeysForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the SSH signing keys for a user. This operation is accessible by anyone. + */ + listSshSigningKeysForUser: { + (params?: RestEndpointMethodTypes["users"]["listSshSigningKeysForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the visibility for your primary email addresses. + * @deprecated octokit.rest.users.setPrimaryEmailVisibilityForAuthenticated() has been renamed to octokit.rest.users.setPrimaryEmailVisibilityForAuthenticatedUser() (2021-10-05) + */ + setPrimaryEmailVisibilityForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["setPrimaryEmailVisibilityForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the visibility for your primary email addresses. + */ + setPrimaryEmailVisibilityForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["setPrimaryEmailVisibilityForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Unblocks the given user and returns a 204. + */ + unblock: { + (params?: RestEndpointMethodTypes["users"]["unblock"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * OAuth app tokens and personal access tokens (classic) need the `user:follow` scope to use this endpoint. + */ + unfollow: { + (params?: RestEndpointMethodTypes["users"]["unfollow"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. + */ + updateAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["updateAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; +}; diff --git a/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts new file mode 100644 index 000000000..c0a8462e8 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts @@ -0,0 +1,3723 @@ +import type { Endpoints, RequestParameters } from "@octokit/types"; +export type RestEndpointMethodTypes = { + actions: { + addCustomLabelsToSelfHostedRunnerForOrg: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/actions/runners/{runner_id}/labels"]["parameters"]; + response: Endpoints["POST /orgs/{org}/actions/runners/{runner_id}/labels"]["response"]; + }; + addCustomLabelsToSelfHostedRunnerForRepo: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"]["response"]; + }; + addSelectedRepoToOrgSecret: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"]["response"]; + }; + addSelectedRepoToOrgVariable: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"]["response"]; + }; + approveWorkflowRun: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"]["response"]; + }; + cancelWorkflowRun: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"]["response"]; + }; + createEnvironmentVariable: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/environments/{environment_name}/variables"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/environments/{environment_name}/variables"]["response"]; + }; + createOrUpdateEnvironmentSecret: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"]["response"]; + }; + createOrUpdateOrgSecret: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/actions/secrets/{secret_name}"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/actions/secrets/{secret_name}"]["response"]; + }; + createOrUpdateRepoSecret: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"]["response"]; + }; + createOrgVariable: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/actions/variables"]["parameters"]; + response: Endpoints["POST /orgs/{org}/actions/variables"]["response"]; + }; + createRegistrationTokenForOrg: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/actions/runners/registration-token"]["parameters"]; + response: Endpoints["POST /orgs/{org}/actions/runners/registration-token"]["response"]; + }; + createRegistrationTokenForRepo: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/actions/runners/registration-token"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runners/registration-token"]["response"]; + }; + createRemoveTokenForOrg: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/actions/runners/remove-token"]["parameters"]; + response: Endpoints["POST /orgs/{org}/actions/runners/remove-token"]["response"]; + }; + createRemoveTokenForRepo: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/actions/runners/remove-token"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runners/remove-token"]["response"]; + }; + createRepoVariable: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/actions/variables"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/actions/variables"]["response"]; + }; + createWorkflowDispatch: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"]["response"]; + }; + deleteActionsCacheById: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}"]["response"]; + }; + deleteActionsCacheByKey: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}"]["response"]; + }; + deleteArtifact: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"]["response"]; + }; + deleteEnvironmentSecret: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"]["response"]; + }; + deleteEnvironmentVariable: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"]["response"]; + }; + deleteOrgSecret: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/actions/secrets/{secret_name}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/actions/secrets/{secret_name}"]["response"]; + }; + deleteOrgVariable: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/actions/variables/{name}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/actions/variables/{name}"]["response"]; + }; + deleteRepoSecret: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"]["response"]; + }; + deleteRepoVariable: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/actions/variables/{name}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/variables/{name}"]["response"]; + }; + deleteSelfHostedRunnerFromOrg: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/actions/runners/{runner_id}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/actions/runners/{runner_id}"]["response"]; + }; + deleteSelfHostedRunnerFromRepo: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"]["response"]; + }; + deleteWorkflowRun: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"]["response"]; + }; + deleteWorkflowRunLogs: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"]["response"]; + }; + disableSelectedRepositoryGithubActionsOrganization: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}"]["response"]; + }; + disableWorkflow: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"]["response"]; + }; + downloadArtifact: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"]["response"]; + }; + downloadJobLogsForWorkflowRun: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"]["response"]; + }; + downloadWorkflowRunAttemptLogs: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs"]["response"]; + }; + downloadWorkflowRunLogs: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"]["response"]; + }; + enableSelectedRepositoryGithubActionsOrganization: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/actions/permissions/repositories/{repository_id}"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/actions/permissions/repositories/{repository_id}"]["response"]; + }; + enableWorkflow: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"]["response"]; + }; + forceCancelWorkflowRun: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel"]["response"]; + }; + generateRunnerJitconfigForOrg: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/actions/runners/generate-jitconfig"]["parameters"]; + response: Endpoints["POST /orgs/{org}/actions/runners/generate-jitconfig"]["response"]; + }; + generateRunnerJitconfigForRepo: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig"]["response"]; + }; + getActionsCacheList: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/caches"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/caches"]["response"]; + }; + getActionsCacheUsage: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/cache/usage"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/cache/usage"]["response"]; + }; + getActionsCacheUsageByRepoForOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/cache/usage-by-repository"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/cache/usage-by-repository"]["response"]; + }; + getActionsCacheUsageForOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/cache/usage"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/cache/usage"]["response"]; + }; + getAllowedActionsOrganization: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/permissions/selected-actions"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/permissions/selected-actions"]["response"]; + }; + getAllowedActionsRepository: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/permissions/selected-actions"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/permissions/selected-actions"]["response"]; + }; + getArtifact: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"]["response"]; + }; + getCustomOidcSubClaimForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/oidc/customization/sub"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/oidc/customization/sub"]["response"]; + }; + getEnvironmentPublicKey: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key"]["response"]; + }; + getEnvironmentSecret: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"]["response"]; + }; + getEnvironmentVariable: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"]["response"]; + }; + getGithubActionsDefaultWorkflowPermissionsOrganization: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/permissions/workflow"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/permissions/workflow"]["response"]; + }; + getGithubActionsDefaultWorkflowPermissionsRepository: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/permissions/workflow"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/permissions/workflow"]["response"]; + }; + getGithubActionsPermissionsOrganization: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/permissions"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/permissions"]["response"]; + }; + getGithubActionsPermissionsRepository: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/permissions"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/permissions"]["response"]; + }; + getJobForWorkflowRun: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"]["response"]; + }; + getOrgPublicKey: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/secrets/public-key"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/secrets/public-key"]["response"]; + }; + getOrgSecret: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/secrets/{secret_name}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/secrets/{secret_name}"]["response"]; + }; + getOrgVariable: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/variables/{name}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/variables/{name}"]["response"]; + }; + getPendingDeploymentsForRun: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"]["response"]; + }; + getRepoPermissions: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/permissions"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/permissions"]["response"]; + }; + getRepoPublicKey: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/secrets/public-key"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/secrets/public-key"]["response"]; + }; + getRepoSecret: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"]["response"]; + }; + getRepoVariable: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/variables/{name}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/variables/{name}"]["response"]; + }; + getReviewsForRun: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals"]["response"]; + }; + getSelfHostedRunnerForOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/runners/{runner_id}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/runners/{runner_id}"]["response"]; + }; + getSelfHostedRunnerForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"]["response"]; + }; + getWorkflow: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"]["response"]; + }; + getWorkflowAccessToRepository: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/permissions/access"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/permissions/access"]["response"]; + }; + getWorkflowRun: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}"]["response"]; + }; + getWorkflowRunAttempt: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}"]["response"]; + }; + getWorkflowRunUsage: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"]["response"]; + }; + getWorkflowUsage: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"]["response"]; + }; + listArtifactsForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/artifacts"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/artifacts"]["response"]; + }; + listEnvironmentSecrets: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/secrets"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/secrets"]["response"]; + }; + listEnvironmentVariables: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/variables"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/variables"]["response"]; + }; + listJobsForWorkflowRun: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"]["response"]; + }; + listJobsForWorkflowRunAttempt: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"]["response"]; + }; + listLabelsForSelfHostedRunnerForOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/runners/{runner_id}/labels"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/runners/{runner_id}/labels"]["response"]; + }; + listLabelsForSelfHostedRunnerForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"]["response"]; + }; + listOrgSecrets: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/secrets"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/secrets"]["response"]; + }; + listOrgVariables: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/variables"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/variables"]["response"]; + }; + listRepoOrganizationSecrets: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/organization-secrets"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/organization-secrets"]["response"]; + }; + listRepoOrganizationVariables: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/organization-variables"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/organization-variables"]["response"]; + }; + listRepoSecrets: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/secrets"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/secrets"]["response"]; + }; + listRepoVariables: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/variables"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/variables"]["response"]; + }; + listRepoWorkflows: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/workflows"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/workflows"]["response"]; + }; + listRunnerApplicationsForOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/runners/downloads"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/runners/downloads"]["response"]; + }; + listRunnerApplicationsForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/runners/downloads"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runners/downloads"]["response"]; + }; + listSelectedReposForOrgSecret: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"]["response"]; + }; + listSelectedReposForOrgVariable: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/variables/{name}/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/variables/{name}/repositories"]["response"]; + }; + listSelectedRepositoriesEnabledGithubActionsOrganization: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/permissions/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/permissions/repositories"]["response"]; + }; + listSelfHostedRunnersForOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/runners"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/runners"]["response"]; + }; + listSelfHostedRunnersForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/runners"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runners"]["response"]; + }; + listWorkflowRunArtifacts: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"]["response"]; + }; + listWorkflowRuns: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"]["response"]; + }; + listWorkflowRunsForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/runs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs"]["response"]; + }; + reRunJobForWorkflowRun: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun"]["response"]; + }; + reRunWorkflow: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"]["response"]; + }; + reRunWorkflowFailedJobs: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs"]["response"]; + }; + removeAllCustomLabelsFromSelfHostedRunnerForOrg: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/actions/runners/{runner_id}/labels"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/actions/runners/{runner_id}/labels"]["response"]; + }; + removeAllCustomLabelsFromSelfHostedRunnerForRepo: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"]["response"]; + }; + removeCustomLabelFromSelfHostedRunnerForOrg: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}"]["response"]; + }; + removeCustomLabelFromSelfHostedRunnerForRepo: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}"]["response"]; + }; + removeSelectedRepoFromOrgSecret: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"]["response"]; + }; + removeSelectedRepoFromOrgVariable: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"]["response"]; + }; + reviewCustomGatesForRun: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule"]["response"]; + }; + reviewPendingDeploymentsForRun: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"]["response"]; + }; + setAllowedActionsOrganization: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/actions/permissions/selected-actions"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/actions/permissions/selected-actions"]["response"]; + }; + setAllowedActionsRepository: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"]["response"]; + }; + setCustomLabelsForSelfHostedRunnerForOrg: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/actions/runners/{runner_id}/labels"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/actions/runners/{runner_id}/labels"]["response"]; + }; + setCustomLabelsForSelfHostedRunnerForRepo: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"]["response"]; + }; + setCustomOidcSubClaimForRepo: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/actions/oidc/customization/sub"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/actions/oidc/customization/sub"]["response"]; + }; + setGithubActionsDefaultWorkflowPermissionsOrganization: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/actions/permissions/workflow"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/actions/permissions/workflow"]["response"]; + }; + setGithubActionsDefaultWorkflowPermissionsRepository: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/actions/permissions/workflow"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/actions/permissions/workflow"]["response"]; + }; + setGithubActionsPermissionsOrganization: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/actions/permissions"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/actions/permissions"]["response"]; + }; + setGithubActionsPermissionsRepository: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/actions/permissions"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/actions/permissions"]["response"]; + }; + setSelectedReposForOrgSecret: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"]["response"]; + }; + setSelectedReposForOrgVariable: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/actions/variables/{name}/repositories"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/actions/variables/{name}/repositories"]["response"]; + }; + setSelectedRepositoriesEnabledGithubActionsOrganization: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/actions/permissions/repositories"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/actions/permissions/repositories"]["response"]; + }; + setWorkflowAccessToRepository: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/actions/permissions/access"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/actions/permissions/access"]["response"]; + }; + updateEnvironmentVariable: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"]["response"]; + }; + updateOrgVariable: { + parameters: RequestParameters & Endpoints["PATCH /orgs/{org}/actions/variables/{name}"]["parameters"]; + response: Endpoints["PATCH /orgs/{org}/actions/variables/{name}"]["response"]; + }; + updateRepoVariable: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/actions/variables/{name}"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/actions/variables/{name}"]["response"]; + }; + }; + activity: { + checkRepoIsStarredByAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/starred/{owner}/{repo}"]["parameters"]; + response: Endpoints["GET /user/starred/{owner}/{repo}"]["response"]; + }; + deleteRepoSubscription: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/subscription"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/subscription"]["response"]; + }; + deleteThreadSubscription: { + parameters: RequestParameters & Endpoints["DELETE /notifications/threads/{thread_id}/subscription"]["parameters"]; + response: Endpoints["DELETE /notifications/threads/{thread_id}/subscription"]["response"]; + }; + getFeeds: { + parameters: RequestParameters & Endpoints["GET /feeds"]["parameters"]; + response: Endpoints["GET /feeds"]["response"]; + }; + getRepoSubscription: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/subscription"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/subscription"]["response"]; + }; + getThread: { + parameters: RequestParameters & Endpoints["GET /notifications/threads/{thread_id}"]["parameters"]; + response: Endpoints["GET /notifications/threads/{thread_id}"]["response"]; + }; + getThreadSubscriptionForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /notifications/threads/{thread_id}/subscription"]["parameters"]; + response: Endpoints["GET /notifications/threads/{thread_id}/subscription"]["response"]; + }; + listEventsForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/events"]["parameters"]; + response: Endpoints["GET /users/{username}/events"]["response"]; + }; + listNotificationsForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /notifications"]["parameters"]; + response: Endpoints["GET /notifications"]["response"]; + }; + listOrgEventsForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/events/orgs/{org}"]["parameters"]; + response: Endpoints["GET /users/{username}/events/orgs/{org}"]["response"]; + }; + listPublicEvents: { + parameters: RequestParameters & Endpoints["GET /events"]["parameters"]; + response: Endpoints["GET /events"]["response"]; + }; + listPublicEventsForRepoNetwork: { + parameters: RequestParameters & Endpoints["GET /networks/{owner}/{repo}/events"]["parameters"]; + response: Endpoints["GET /networks/{owner}/{repo}/events"]["response"]; + }; + listPublicEventsForUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/events/public"]["parameters"]; + response: Endpoints["GET /users/{username}/events/public"]["response"]; + }; + listPublicOrgEvents: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/events"]["parameters"]; + response: Endpoints["GET /orgs/{org}/events"]["response"]; + }; + listReceivedEventsForUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/received_events"]["parameters"]; + response: Endpoints["GET /users/{username}/received_events"]["response"]; + }; + listReceivedPublicEventsForUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/received_events/public"]["parameters"]; + response: Endpoints["GET /users/{username}/received_events/public"]["response"]; + }; + listRepoEvents: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/events"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/events"]["response"]; + }; + listRepoNotificationsForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/notifications"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/notifications"]["response"]; + }; + listReposStarredByAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/starred"]["parameters"]; + response: Endpoints["GET /user/starred"]["response"]; + }; + listReposStarredByUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/starred"]["parameters"]; + response: Endpoints["GET /users/{username}/starred"]["response"]; + }; + listReposWatchedByUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/subscriptions"]["parameters"]; + response: Endpoints["GET /users/{username}/subscriptions"]["response"]; + }; + listStargazersForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/stargazers"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/stargazers"]["response"]; + }; + listWatchedReposForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/subscriptions"]["parameters"]; + response: Endpoints["GET /user/subscriptions"]["response"]; + }; + listWatchersForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/subscribers"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/subscribers"]["response"]; + }; + markNotificationsAsRead: { + parameters: RequestParameters & Endpoints["PUT /notifications"]["parameters"]; + response: Endpoints["PUT /notifications"]["response"]; + }; + markRepoNotificationsAsRead: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/notifications"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/notifications"]["response"]; + }; + markThreadAsDone: { + parameters: RequestParameters & Endpoints["DELETE /notifications/threads/{thread_id}"]["parameters"]; + response: Endpoints["DELETE /notifications/threads/{thread_id}"]["response"]; + }; + markThreadAsRead: { + parameters: RequestParameters & Endpoints["PATCH /notifications/threads/{thread_id}"]["parameters"]; + response: Endpoints["PATCH /notifications/threads/{thread_id}"]["response"]; + }; + setRepoSubscription: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/subscription"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/subscription"]["response"]; + }; + setThreadSubscription: { + parameters: RequestParameters & Endpoints["PUT /notifications/threads/{thread_id}/subscription"]["parameters"]; + response: Endpoints["PUT /notifications/threads/{thread_id}/subscription"]["response"]; + }; + starRepoForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["PUT /user/starred/{owner}/{repo}"]["parameters"]; + response: Endpoints["PUT /user/starred/{owner}/{repo}"]["response"]; + }; + unstarRepoForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["DELETE /user/starred/{owner}/{repo}"]["parameters"]; + response: Endpoints["DELETE /user/starred/{owner}/{repo}"]["response"]; + }; + }; + apps: { + addRepoToInstallation: { + parameters: RequestParameters & Endpoints["PUT /user/installations/{installation_id}/repositories/{repository_id}"]["parameters"]; + response: Endpoints["PUT /user/installations/{installation_id}/repositories/{repository_id}"]["response"]; + }; + addRepoToInstallationForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["PUT /user/installations/{installation_id}/repositories/{repository_id}"]["parameters"]; + response: Endpoints["PUT /user/installations/{installation_id}/repositories/{repository_id}"]["response"]; + }; + checkToken: { + parameters: RequestParameters & Endpoints["POST /applications/{client_id}/token"]["parameters"]; + response: Endpoints["POST /applications/{client_id}/token"]["response"]; + }; + createFromManifest: { + parameters: RequestParameters & Endpoints["POST /app-manifests/{code}/conversions"]["parameters"]; + response: Endpoints["POST /app-manifests/{code}/conversions"]["response"]; + }; + createInstallationAccessToken: { + parameters: RequestParameters & Endpoints["POST /app/installations/{installation_id}/access_tokens"]["parameters"]; + response: Endpoints["POST /app/installations/{installation_id}/access_tokens"]["response"]; + }; + deleteAuthorization: { + parameters: RequestParameters & Endpoints["DELETE /applications/{client_id}/grant"]["parameters"]; + response: Endpoints["DELETE /applications/{client_id}/grant"]["response"]; + }; + deleteInstallation: { + parameters: RequestParameters & Endpoints["DELETE /app/installations/{installation_id}"]["parameters"]; + response: Endpoints["DELETE /app/installations/{installation_id}"]["response"]; + }; + deleteToken: { + parameters: RequestParameters & Endpoints["DELETE /applications/{client_id}/token"]["parameters"]; + response: Endpoints["DELETE /applications/{client_id}/token"]["response"]; + }; + getAuthenticated: { + parameters: RequestParameters & Endpoints["GET /app"]["parameters"]; + response: Endpoints["GET /app"]["response"]; + }; + getBySlug: { + parameters: RequestParameters & Endpoints["GET /apps/{app_slug}"]["parameters"]; + response: Endpoints["GET /apps/{app_slug}"]["response"]; + }; + getInstallation: { + parameters: RequestParameters & Endpoints["GET /app/installations/{installation_id}"]["parameters"]; + response: Endpoints["GET /app/installations/{installation_id}"]["response"]; + }; + getOrgInstallation: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/installation"]["parameters"]; + response: Endpoints["GET /orgs/{org}/installation"]["response"]; + }; + getRepoInstallation: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/installation"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/installation"]["response"]; + }; + getSubscriptionPlanForAccount: { + parameters: RequestParameters & Endpoints["GET /marketplace_listing/accounts/{account_id}"]["parameters"]; + response: Endpoints["GET /marketplace_listing/accounts/{account_id}"]["response"]; + }; + getSubscriptionPlanForAccountStubbed: { + parameters: RequestParameters & Endpoints["GET /marketplace_listing/stubbed/accounts/{account_id}"]["parameters"]; + response: Endpoints["GET /marketplace_listing/stubbed/accounts/{account_id}"]["response"]; + }; + getUserInstallation: { + parameters: RequestParameters & Endpoints["GET /users/{username}/installation"]["parameters"]; + response: Endpoints["GET /users/{username}/installation"]["response"]; + }; + getWebhookConfigForApp: { + parameters: RequestParameters & Endpoints["GET /app/hook/config"]["parameters"]; + response: Endpoints["GET /app/hook/config"]["response"]; + }; + getWebhookDelivery: { + parameters: RequestParameters & Endpoints["GET /app/hook/deliveries/{delivery_id}"]["parameters"]; + response: Endpoints["GET /app/hook/deliveries/{delivery_id}"]["response"]; + }; + listAccountsForPlan: { + parameters: RequestParameters & Endpoints["GET /marketplace_listing/plans/{plan_id}/accounts"]["parameters"]; + response: Endpoints["GET /marketplace_listing/plans/{plan_id}/accounts"]["response"]; + }; + listAccountsForPlanStubbed: { + parameters: RequestParameters & Endpoints["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"]["parameters"]; + response: Endpoints["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"]["response"]; + }; + listInstallationReposForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/installations/{installation_id}/repositories"]["parameters"]; + response: Endpoints["GET /user/installations/{installation_id}/repositories"]["response"]; + }; + listInstallationRequestsForAuthenticatedApp: { + parameters: RequestParameters & Endpoints["GET /app/installation-requests"]["parameters"]; + response: Endpoints["GET /app/installation-requests"]["response"]; + }; + listInstallations: { + parameters: RequestParameters & Endpoints["GET /app/installations"]["parameters"]; + response: Endpoints["GET /app/installations"]["response"]; + }; + listInstallationsForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/installations"]["parameters"]; + response: Endpoints["GET /user/installations"]["response"]; + }; + listPlans: { + parameters: RequestParameters & Endpoints["GET /marketplace_listing/plans"]["parameters"]; + response: Endpoints["GET /marketplace_listing/plans"]["response"]; + }; + listPlansStubbed: { + parameters: RequestParameters & Endpoints["GET /marketplace_listing/stubbed/plans"]["parameters"]; + response: Endpoints["GET /marketplace_listing/stubbed/plans"]["response"]; + }; + listReposAccessibleToInstallation: { + parameters: RequestParameters & Endpoints["GET /installation/repositories"]["parameters"]; + response: Endpoints["GET /installation/repositories"]["response"]; + }; + listSubscriptionsForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/marketplace_purchases"]["parameters"]; + response: Endpoints["GET /user/marketplace_purchases"]["response"]; + }; + listSubscriptionsForAuthenticatedUserStubbed: { + parameters: RequestParameters & Endpoints["GET /user/marketplace_purchases/stubbed"]["parameters"]; + response: Endpoints["GET /user/marketplace_purchases/stubbed"]["response"]; + }; + listWebhookDeliveries: { + parameters: RequestParameters & Endpoints["GET /app/hook/deliveries"]["parameters"]; + response: Endpoints["GET /app/hook/deliveries"]["response"]; + }; + redeliverWebhookDelivery: { + parameters: RequestParameters & Endpoints["POST /app/hook/deliveries/{delivery_id}/attempts"]["parameters"]; + response: Endpoints["POST /app/hook/deliveries/{delivery_id}/attempts"]["response"]; + }; + removeRepoFromInstallation: { + parameters: RequestParameters & Endpoints["DELETE /user/installations/{installation_id}/repositories/{repository_id}"]["parameters"]; + response: Endpoints["DELETE /user/installations/{installation_id}/repositories/{repository_id}"]["response"]; + }; + removeRepoFromInstallationForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["DELETE /user/installations/{installation_id}/repositories/{repository_id}"]["parameters"]; + response: Endpoints["DELETE /user/installations/{installation_id}/repositories/{repository_id}"]["response"]; + }; + resetToken: { + parameters: RequestParameters & Endpoints["PATCH /applications/{client_id}/token"]["parameters"]; + response: Endpoints["PATCH /applications/{client_id}/token"]["response"]; + }; + revokeInstallationAccessToken: { + parameters: RequestParameters & Endpoints["DELETE /installation/token"]["parameters"]; + response: Endpoints["DELETE /installation/token"]["response"]; + }; + scopeToken: { + parameters: RequestParameters & Endpoints["POST /applications/{client_id}/token/scoped"]["parameters"]; + response: Endpoints["POST /applications/{client_id}/token/scoped"]["response"]; + }; + suspendInstallation: { + parameters: RequestParameters & Endpoints["PUT /app/installations/{installation_id}/suspended"]["parameters"]; + response: Endpoints["PUT /app/installations/{installation_id}/suspended"]["response"]; + }; + unsuspendInstallation: { + parameters: RequestParameters & Endpoints["DELETE /app/installations/{installation_id}/suspended"]["parameters"]; + response: Endpoints["DELETE /app/installations/{installation_id}/suspended"]["response"]; + }; + updateWebhookConfigForApp: { + parameters: RequestParameters & Endpoints["PATCH /app/hook/config"]["parameters"]; + response: Endpoints["PATCH /app/hook/config"]["response"]; + }; + }; + billing: { + getGithubActionsBillingOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/settings/billing/actions"]["parameters"]; + response: Endpoints["GET /orgs/{org}/settings/billing/actions"]["response"]; + }; + getGithubActionsBillingUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/settings/billing/actions"]["parameters"]; + response: Endpoints["GET /users/{username}/settings/billing/actions"]["response"]; + }; + getGithubPackagesBillingOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/settings/billing/packages"]["parameters"]; + response: Endpoints["GET /orgs/{org}/settings/billing/packages"]["response"]; + }; + getGithubPackagesBillingUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/settings/billing/packages"]["parameters"]; + response: Endpoints["GET /users/{username}/settings/billing/packages"]["response"]; + }; + getSharedStorageBillingOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/settings/billing/shared-storage"]["parameters"]; + response: Endpoints["GET /orgs/{org}/settings/billing/shared-storage"]["response"]; + }; + getSharedStorageBillingUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/settings/billing/shared-storage"]["parameters"]; + response: Endpoints["GET /users/{username}/settings/billing/shared-storage"]["response"]; + }; + }; + checks: { + create: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/check-runs"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/check-runs"]["response"]; + }; + createSuite: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/check-suites"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/check-suites"]["response"]; + }; + get: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"]["response"]; + }; + getSuite: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"]["response"]; + }; + listAnnotations: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"]["response"]; + }; + listForRef: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"]["response"]; + }; + listForSuite: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"]["response"]; + }; + listSuitesForRef: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"]["response"]; + }; + rerequestRun: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest"]["response"]; + }; + rerequestSuite: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"]["response"]; + }; + setSuitesPreferences: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/check-suites/preferences"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/check-suites/preferences"]["response"]; + }; + update: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"]["response"]; + }; + }; + codeScanning: { + deleteAnalysis: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}"]["response"]; + }; + getAlert: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"]["response"]; + }; + getAnalysis: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"]["response"]; + }; + getCodeqlDatabase: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"]["response"]; + }; + getDefaultSetup: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/code-scanning/default-setup"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/default-setup"]["response"]; + }; + getSarif: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"]["response"]; + }; + listAlertInstances: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"]["response"]; + }; + listAlertsForOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/code-scanning/alerts"]["parameters"]; + response: Endpoints["GET /orgs/{org}/code-scanning/alerts"]["response"]; + }; + listAlertsForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts"]["response"]; + }; + listAlertsInstances: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"]["response"]; + }; + listCodeqlDatabases: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/code-scanning/codeql/databases"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/codeql/databases"]["response"]; + }; + listRecentAnalyses: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/code-scanning/analyses"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/analyses"]["response"]; + }; + updateAlert: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"]["response"]; + }; + updateDefaultSetup: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/code-scanning/default-setup"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/code-scanning/default-setup"]["response"]; + }; + uploadSarif: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/code-scanning/sarifs"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/code-scanning/sarifs"]["response"]; + }; + }; + codesOfConduct: { + getAllCodesOfConduct: { + parameters: RequestParameters & Endpoints["GET /codes_of_conduct"]["parameters"]; + response: Endpoints["GET /codes_of_conduct"]["response"]; + }; + getConductCode: { + parameters: RequestParameters & Endpoints["GET /codes_of_conduct/{key}"]["parameters"]; + response: Endpoints["GET /codes_of_conduct/{key}"]["response"]; + }; + }; + codespaces: { + addRepositoryForSecretForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"]["parameters"]; + response: Endpoints["PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"]["response"]; + }; + addSelectedRepoToOrgSecret: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"]["response"]; + }; + checkPermissionsForDevcontainer: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/codespaces/permissions_check"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/permissions_check"]["response"]; + }; + codespaceMachinesForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/codespaces/{codespace_name}/machines"]["parameters"]; + response: Endpoints["GET /user/codespaces/{codespace_name}/machines"]["response"]; + }; + createForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["POST /user/codespaces"]["parameters"]; + response: Endpoints["POST /user/codespaces"]["response"]; + }; + createOrUpdateOrgSecret: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/codespaces/secrets/{secret_name}"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/codespaces/secrets/{secret_name}"]["response"]; + }; + createOrUpdateRepoSecret: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"]["response"]; + }; + createOrUpdateSecretForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["PUT /user/codespaces/secrets/{secret_name}"]["parameters"]; + response: Endpoints["PUT /user/codespaces/secrets/{secret_name}"]["response"]; + }; + createWithPrForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces"]["response"]; + }; + createWithRepoForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/codespaces"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/codespaces"]["response"]; + }; + deleteForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["DELETE /user/codespaces/{codespace_name}"]["parameters"]; + response: Endpoints["DELETE /user/codespaces/{codespace_name}"]["response"]; + }; + deleteFromOrganization: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}"]["response"]; + }; + deleteOrgSecret: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/codespaces/secrets/{secret_name}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/codespaces/secrets/{secret_name}"]["response"]; + }; + deleteRepoSecret: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"]["response"]; + }; + deleteSecretForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["DELETE /user/codespaces/secrets/{secret_name}"]["parameters"]; + response: Endpoints["DELETE /user/codespaces/secrets/{secret_name}"]["response"]; + }; + exportForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["POST /user/codespaces/{codespace_name}/exports"]["parameters"]; + response: Endpoints["POST /user/codespaces/{codespace_name}/exports"]["response"]; + }; + getCodespacesForUserInOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/members/{username}/codespaces"]["parameters"]; + response: Endpoints["GET /orgs/{org}/members/{username}/codespaces"]["response"]; + }; + getExportDetailsForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/codespaces/{codespace_name}/exports/{export_id}"]["parameters"]; + response: Endpoints["GET /user/codespaces/{codespace_name}/exports/{export_id}"]["response"]; + }; + getForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/codespaces/{codespace_name}"]["parameters"]; + response: Endpoints["GET /user/codespaces/{codespace_name}"]["response"]; + }; + getOrgPublicKey: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/codespaces/secrets/public-key"]["parameters"]; + response: Endpoints["GET /orgs/{org}/codespaces/secrets/public-key"]["response"]; + }; + getOrgSecret: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/codespaces/secrets/{secret_name}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/codespaces/secrets/{secret_name}"]["response"]; + }; + getPublicKeyForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/codespaces/secrets/public-key"]["parameters"]; + response: Endpoints["GET /user/codespaces/secrets/public-key"]["response"]; + }; + getRepoPublicKey: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/codespaces/secrets/public-key"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/secrets/public-key"]["response"]; + }; + getRepoSecret: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"]["response"]; + }; + getSecretForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/codespaces/secrets/{secret_name}"]["parameters"]; + response: Endpoints["GET /user/codespaces/secrets/{secret_name}"]["response"]; + }; + listDevcontainersInRepositoryForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/codespaces/devcontainers"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/devcontainers"]["response"]; + }; + listForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/codespaces"]["parameters"]; + response: Endpoints["GET /user/codespaces"]["response"]; + }; + listInOrganization: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/codespaces"]["parameters"]; + response: Endpoints["GET /orgs/{org}/codespaces"]["response"]; + }; + listInRepositoryForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/codespaces"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces"]["response"]; + }; + listOrgSecrets: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/codespaces/secrets"]["parameters"]; + response: Endpoints["GET /orgs/{org}/codespaces/secrets"]["response"]; + }; + listRepoSecrets: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/codespaces/secrets"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/secrets"]["response"]; + }; + listRepositoriesForSecretForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/codespaces/secrets/{secret_name}/repositories"]["parameters"]; + response: Endpoints["GET /user/codespaces/secrets/{secret_name}/repositories"]["response"]; + }; + listSecretsForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/codespaces/secrets"]["parameters"]; + response: Endpoints["GET /user/codespaces/secrets"]["response"]; + }; + listSelectedReposForOrgSecret: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories"]["response"]; + }; + preFlightWithRepoForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/codespaces/new"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/new"]["response"]; + }; + publishForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["POST /user/codespaces/{codespace_name}/publish"]["parameters"]; + response: Endpoints["POST /user/codespaces/{codespace_name}/publish"]["response"]; + }; + removeRepositoryForSecretForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"]["parameters"]; + response: Endpoints["DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"]["response"]; + }; + removeSelectedRepoFromOrgSecret: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"]["response"]; + }; + repoMachinesForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/codespaces/machines"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/machines"]["response"]; + }; + setRepositoriesForSecretForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["PUT /user/codespaces/secrets/{secret_name}/repositories"]["parameters"]; + response: Endpoints["PUT /user/codespaces/secrets/{secret_name}/repositories"]["response"]; + }; + setSelectedReposForOrgSecret: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories"]["response"]; + }; + startForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["POST /user/codespaces/{codespace_name}/start"]["parameters"]; + response: Endpoints["POST /user/codespaces/{codespace_name}/start"]["response"]; + }; + stopForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["POST /user/codespaces/{codespace_name}/stop"]["parameters"]; + response: Endpoints["POST /user/codespaces/{codespace_name}/stop"]["response"]; + }; + stopInOrganization: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop"]["parameters"]; + response: Endpoints["POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop"]["response"]; + }; + updateForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["PATCH /user/codespaces/{codespace_name}"]["parameters"]; + response: Endpoints["PATCH /user/codespaces/{codespace_name}"]["response"]; + }; + }; + copilot: { + addCopilotSeatsForTeams: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/copilot/billing/selected_teams"]["parameters"]; + response: Endpoints["POST /orgs/{org}/copilot/billing/selected_teams"]["response"]; + }; + addCopilotSeatsForUsers: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/copilot/billing/selected_users"]["parameters"]; + response: Endpoints["POST /orgs/{org}/copilot/billing/selected_users"]["response"]; + }; + cancelCopilotSeatAssignmentForTeams: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/copilot/billing/selected_teams"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/copilot/billing/selected_teams"]["response"]; + }; + cancelCopilotSeatAssignmentForUsers: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/copilot/billing/selected_users"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/copilot/billing/selected_users"]["response"]; + }; + getCopilotOrganizationDetails: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/copilot/billing"]["parameters"]; + response: Endpoints["GET /orgs/{org}/copilot/billing"]["response"]; + }; + getCopilotSeatDetailsForUser: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/members/{username}/copilot"]["parameters"]; + response: Endpoints["GET /orgs/{org}/members/{username}/copilot"]["response"]; + }; + listCopilotSeats: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/copilot/billing/seats"]["parameters"]; + response: Endpoints["GET /orgs/{org}/copilot/billing/seats"]["response"]; + }; + usageMetricsForEnterprise: { + parameters: RequestParameters & Endpoints["GET /enterprises/{enterprise}/copilot/usage"]["parameters"]; + response: Endpoints["GET /enterprises/{enterprise}/copilot/usage"]["response"]; + }; + usageMetricsForOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/copilot/usage"]["parameters"]; + response: Endpoints["GET /orgs/{org}/copilot/usage"]["response"]; + }; + usageMetricsForTeam: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/team/{team_slug}/copilot/usage"]["parameters"]; + response: Endpoints["GET /orgs/{org}/team/{team_slug}/copilot/usage"]["response"]; + }; + }; + dependabot: { + addSelectedRepoToOrgSecret: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"]["response"]; + }; + createOrUpdateOrgSecret: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/dependabot/secrets/{secret_name}"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/dependabot/secrets/{secret_name}"]["response"]; + }; + createOrUpdateRepoSecret: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"]["response"]; + }; + deleteOrgSecret: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"]["response"]; + }; + deleteRepoSecret: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"]["response"]; + }; + getAlert: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"]["response"]; + }; + getOrgPublicKey: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/dependabot/secrets/public-key"]["parameters"]; + response: Endpoints["GET /orgs/{org}/dependabot/secrets/public-key"]["response"]; + }; + getOrgSecret: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/dependabot/secrets/{secret_name}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/dependabot/secrets/{secret_name}"]["response"]; + }; + getRepoPublicKey: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/dependabot/secrets/public-key"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/dependabot/secrets/public-key"]["response"]; + }; + getRepoSecret: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"]["response"]; + }; + listAlertsForEnterprise: { + parameters: RequestParameters & Endpoints["GET /enterprises/{enterprise}/dependabot/alerts"]["parameters"]; + response: Endpoints["GET /enterprises/{enterprise}/dependabot/alerts"]["response"]; + }; + listAlertsForOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/dependabot/alerts"]["parameters"]; + response: Endpoints["GET /orgs/{org}/dependabot/alerts"]["response"]; + }; + listAlertsForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/dependabot/alerts"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/dependabot/alerts"]["response"]; + }; + listOrgSecrets: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/dependabot/secrets"]["parameters"]; + response: Endpoints["GET /orgs/{org}/dependabot/secrets"]["response"]; + }; + listRepoSecrets: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/dependabot/secrets"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/dependabot/secrets"]["response"]; + }; + listSelectedReposForOrgSecret: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"]["response"]; + }; + removeSelectedRepoFromOrgSecret: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"]["response"]; + }; + setSelectedReposForOrgSecret: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"]["response"]; + }; + updateAlert: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"]["response"]; + }; + }; + dependencyGraph: { + createRepositorySnapshot: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/dependency-graph/snapshots"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/dependency-graph/snapshots"]["response"]; + }; + diffRange: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}"]["response"]; + }; + exportSbom: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/dependency-graph/sbom"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/dependency-graph/sbom"]["response"]; + }; + }; + emojis: { + get: { + parameters: RequestParameters & Endpoints["GET /emojis"]["parameters"]; + response: Endpoints["GET /emojis"]["response"]; + }; + }; + gists: { + checkIsStarred: { + parameters: RequestParameters & Endpoints["GET /gists/{gist_id}/star"]["parameters"]; + response: Endpoints["GET /gists/{gist_id}/star"]["response"]; + }; + create: { + parameters: RequestParameters & Endpoints["POST /gists"]["parameters"]; + response: Endpoints["POST /gists"]["response"]; + }; + createComment: { + parameters: RequestParameters & Endpoints["POST /gists/{gist_id}/comments"]["parameters"]; + response: Endpoints["POST /gists/{gist_id}/comments"]["response"]; + }; + delete: { + parameters: RequestParameters & Endpoints["DELETE /gists/{gist_id}"]["parameters"]; + response: Endpoints["DELETE /gists/{gist_id}"]["response"]; + }; + deleteComment: { + parameters: RequestParameters & Endpoints["DELETE /gists/{gist_id}/comments/{comment_id}"]["parameters"]; + response: Endpoints["DELETE /gists/{gist_id}/comments/{comment_id}"]["response"]; + }; + fork: { + parameters: RequestParameters & Endpoints["POST /gists/{gist_id}/forks"]["parameters"]; + response: Endpoints["POST /gists/{gist_id}/forks"]["response"]; + }; + get: { + parameters: RequestParameters & Endpoints["GET /gists/{gist_id}"]["parameters"]; + response: Endpoints["GET /gists/{gist_id}"]["response"]; + }; + getComment: { + parameters: RequestParameters & Endpoints["GET /gists/{gist_id}/comments/{comment_id}"]["parameters"]; + response: Endpoints["GET /gists/{gist_id}/comments/{comment_id}"]["response"]; + }; + getRevision: { + parameters: RequestParameters & Endpoints["GET /gists/{gist_id}/{sha}"]["parameters"]; + response: Endpoints["GET /gists/{gist_id}/{sha}"]["response"]; + }; + list: { + parameters: RequestParameters & Endpoints["GET /gists"]["parameters"]; + response: Endpoints["GET /gists"]["response"]; + }; + listComments: { + parameters: RequestParameters & Endpoints["GET /gists/{gist_id}/comments"]["parameters"]; + response: Endpoints["GET /gists/{gist_id}/comments"]["response"]; + }; + listCommits: { + parameters: RequestParameters & Endpoints["GET /gists/{gist_id}/commits"]["parameters"]; + response: Endpoints["GET /gists/{gist_id}/commits"]["response"]; + }; + listForUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/gists"]["parameters"]; + response: Endpoints["GET /users/{username}/gists"]["response"]; + }; + listForks: { + parameters: RequestParameters & Endpoints["GET /gists/{gist_id}/forks"]["parameters"]; + response: Endpoints["GET /gists/{gist_id}/forks"]["response"]; + }; + listPublic: { + parameters: RequestParameters & Endpoints["GET /gists/public"]["parameters"]; + response: Endpoints["GET /gists/public"]["response"]; + }; + listStarred: { + parameters: RequestParameters & Endpoints["GET /gists/starred"]["parameters"]; + response: Endpoints["GET /gists/starred"]["response"]; + }; + star: { + parameters: RequestParameters & Endpoints["PUT /gists/{gist_id}/star"]["parameters"]; + response: Endpoints["PUT /gists/{gist_id}/star"]["response"]; + }; + unstar: { + parameters: RequestParameters & Endpoints["DELETE /gists/{gist_id}/star"]["parameters"]; + response: Endpoints["DELETE /gists/{gist_id}/star"]["response"]; + }; + update: { + parameters: RequestParameters & Endpoints["PATCH /gists/{gist_id}"]["parameters"]; + response: Endpoints["PATCH /gists/{gist_id}"]["response"]; + }; + updateComment: { + parameters: RequestParameters & Endpoints["PATCH /gists/{gist_id}/comments/{comment_id}"]["parameters"]; + response: Endpoints["PATCH /gists/{gist_id}/comments/{comment_id}"]["response"]; + }; + }; + git: { + createBlob: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/git/blobs"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/git/blobs"]["response"]; + }; + createCommit: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/git/commits"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/git/commits"]["response"]; + }; + createRef: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/git/refs"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/git/refs"]["response"]; + }; + createTag: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/git/tags"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/git/tags"]["response"]; + }; + createTree: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/git/trees"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/git/trees"]["response"]; + }; + deleteRef: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/git/refs/{ref}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/git/refs/{ref}"]["response"]; + }; + getBlob: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"]["response"]; + }; + getCommit: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"]["response"]; + }; + getRef: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/git/ref/{ref}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/git/ref/{ref}"]["response"]; + }; + getTag: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"]["response"]; + }; + getTree: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"]["response"]; + }; + listMatchingRefs: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"]["response"]; + }; + updateRef: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/git/refs/{ref}"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/git/refs/{ref}"]["response"]; + }; + }; + gitignore: { + getAllTemplates: { + parameters: RequestParameters & Endpoints["GET /gitignore/templates"]["parameters"]; + response: Endpoints["GET /gitignore/templates"]["response"]; + }; + getTemplate: { + parameters: RequestParameters & Endpoints["GET /gitignore/templates/{name}"]["parameters"]; + response: Endpoints["GET /gitignore/templates/{name}"]["response"]; + }; + }; + interactions: { + getRestrictionsForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/interaction-limits"]["parameters"]; + response: Endpoints["GET /user/interaction-limits"]["response"]; + }; + getRestrictionsForOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/interaction-limits"]["parameters"]; + response: Endpoints["GET /orgs/{org}/interaction-limits"]["response"]; + }; + getRestrictionsForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/interaction-limits"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/interaction-limits"]["response"]; + }; + getRestrictionsForYourPublicRepos: { + parameters: RequestParameters & Endpoints["GET /user/interaction-limits"]["parameters"]; + response: Endpoints["GET /user/interaction-limits"]["response"]; + }; + removeRestrictionsForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["DELETE /user/interaction-limits"]["parameters"]; + response: Endpoints["DELETE /user/interaction-limits"]["response"]; + }; + removeRestrictionsForOrg: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/interaction-limits"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/interaction-limits"]["response"]; + }; + removeRestrictionsForRepo: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/interaction-limits"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/interaction-limits"]["response"]; + }; + removeRestrictionsForYourPublicRepos: { + parameters: RequestParameters & Endpoints["DELETE /user/interaction-limits"]["parameters"]; + response: Endpoints["DELETE /user/interaction-limits"]["response"]; + }; + setRestrictionsForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["PUT /user/interaction-limits"]["parameters"]; + response: Endpoints["PUT /user/interaction-limits"]["response"]; + }; + setRestrictionsForOrg: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/interaction-limits"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/interaction-limits"]["response"]; + }; + setRestrictionsForRepo: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/interaction-limits"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/interaction-limits"]["response"]; + }; + setRestrictionsForYourPublicRepos: { + parameters: RequestParameters & Endpoints["PUT /user/interaction-limits"]["parameters"]; + response: Endpoints["PUT /user/interaction-limits"]["response"]; + }; + }; + issues: { + addAssignees: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"]["response"]; + }; + addLabels: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"]["response"]; + }; + checkUserCanBeAssigned: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/assignees/{assignee}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/assignees/{assignee}"]["response"]; + }; + checkUserCanBeAssignedToIssue: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}"]["response"]; + }; + create: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/issues"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/issues"]["response"]; + }; + createComment: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/issues/{issue_number}/comments"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/issues/{issue_number}/comments"]["response"]; + }; + createLabel: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/labels"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/labels"]["response"]; + }; + createMilestone: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/milestones"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/milestones"]["response"]; + }; + deleteComment: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"]["response"]; + }; + deleteLabel: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/labels/{name}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/labels/{name}"]["response"]; + }; + deleteMilestone: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"]["response"]; + }; + get: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}"]["response"]; + }; + getComment: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"]["response"]; + }; + getEvent: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/issues/events/{event_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/events/{event_id}"]["response"]; + }; + getLabel: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/labels/{name}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/labels/{name}"]["response"]; + }; + getMilestone: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/milestones/{milestone_number}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/milestones/{milestone_number}"]["response"]; + }; + list: { + parameters: RequestParameters & Endpoints["GET /issues"]["parameters"]; + response: Endpoints["GET /issues"]["response"]; + }; + listAssignees: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/assignees"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/assignees"]["response"]; + }; + listComments: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"]["response"]; + }; + listCommentsForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/issues/comments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/comments"]["response"]; + }; + listEvents: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/events"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/events"]["response"]; + }; + listEventsForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/issues/events"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/events"]["response"]; + }; + listEventsForTimeline: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"]["response"]; + }; + listForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/issues"]["parameters"]; + response: Endpoints["GET /user/issues"]["response"]; + }; + listForOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/issues"]["parameters"]; + response: Endpoints["GET /orgs/{org}/issues"]["response"]; + }; + listForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/issues"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues"]["response"]; + }; + listLabelsForMilestone: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"]["response"]; + }; + listLabelsForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/labels"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/labels"]["response"]; + }; + listLabelsOnIssue: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"]["response"]; + }; + listMilestones: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/milestones"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/milestones"]["response"]; + }; + lock: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"]["response"]; + }; + removeAllLabels: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"]["response"]; + }; + removeAssignees: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"]["response"]; + }; + removeLabel: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"]["response"]; + }; + setLabels: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"]["response"]; + }; + unlock: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"]["response"]; + }; + update: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/issues/{issue_number}"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/issues/{issue_number}"]["response"]; + }; + updateComment: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"]["response"]; + }; + updateLabel: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/labels/{name}"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/labels/{name}"]["response"]; + }; + updateMilestone: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"]["response"]; + }; + }; + licenses: { + get: { + parameters: RequestParameters & Endpoints["GET /licenses/{license}"]["parameters"]; + response: Endpoints["GET /licenses/{license}"]["response"]; + }; + getAllCommonlyUsed: { + parameters: RequestParameters & Endpoints["GET /licenses"]["parameters"]; + response: Endpoints["GET /licenses"]["response"]; + }; + getForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/license"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/license"]["response"]; + }; + }; + markdown: { + render: { + parameters: RequestParameters & Endpoints["POST /markdown"]["parameters"]; + response: Endpoints["POST /markdown"]["response"]; + }; + renderRaw: { + parameters: RequestParameters & Endpoints["POST /markdown/raw"]["parameters"]; + response: Endpoints["POST /markdown/raw"]["response"]; + }; + }; + meta: { + get: { + parameters: RequestParameters & Endpoints["GET /meta"]["parameters"]; + response: Endpoints["GET /meta"]["response"]; + }; + getAllVersions: { + parameters: RequestParameters & Endpoints["GET /versions"]["parameters"]; + response: Endpoints["GET /versions"]["response"]; + }; + getOctocat: { + parameters: RequestParameters & Endpoints["GET /octocat"]["parameters"]; + response: Endpoints["GET /octocat"]["response"]; + }; + getZen: { + parameters: RequestParameters & Endpoints["GET /zen"]["parameters"]; + response: Endpoints["GET /zen"]["response"]; + }; + root: { + parameters: RequestParameters & Endpoints["GET /"]["parameters"]; + response: Endpoints["GET /"]["response"]; + }; + }; + migrations: { + deleteArchiveForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["DELETE /user/migrations/{migration_id}/archive"]["parameters"]; + response: Endpoints["DELETE /user/migrations/{migration_id}/archive"]["response"]; + }; + deleteArchiveForOrg: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/migrations/{migration_id}/archive"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/migrations/{migration_id}/archive"]["response"]; + }; + downloadArchiveForOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/migrations/{migration_id}/archive"]["parameters"]; + response: Endpoints["GET /orgs/{org}/migrations/{migration_id}/archive"]["response"]; + }; + getArchiveForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/migrations/{migration_id}/archive"]["parameters"]; + response: Endpoints["GET /user/migrations/{migration_id}/archive"]["response"]; + }; + getStatusForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/migrations/{migration_id}"]["parameters"]; + response: Endpoints["GET /user/migrations/{migration_id}"]["response"]; + }; + getStatusForOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/migrations/{migration_id}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/migrations/{migration_id}"]["response"]; + }; + listForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/migrations"]["parameters"]; + response: Endpoints["GET /user/migrations"]["response"]; + }; + listForOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/migrations"]["parameters"]; + response: Endpoints["GET /orgs/{org}/migrations"]["response"]; + }; + listReposForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/migrations/{migration_id}/repositories"]["parameters"]; + response: Endpoints["GET /user/migrations/{migration_id}/repositories"]["response"]; + }; + listReposForOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/migrations/{migration_id}/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/migrations/{migration_id}/repositories"]["response"]; + }; + listReposForUser: { + parameters: RequestParameters & Endpoints["GET /user/migrations/{migration_id}/repositories"]["parameters"]; + response: Endpoints["GET /user/migrations/{migration_id}/repositories"]["response"]; + }; + startForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["POST /user/migrations"]["parameters"]; + response: Endpoints["POST /user/migrations"]["response"]; + }; + startForOrg: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/migrations"]["parameters"]; + response: Endpoints["POST /orgs/{org}/migrations"]["response"]; + }; + unlockRepoForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock"]["parameters"]; + response: Endpoints["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock"]["response"]; + }; + unlockRepoForOrg: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock"]["response"]; + }; + }; + oidc: { + getOidcCustomSubTemplateForOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/oidc/customization/sub"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/oidc/customization/sub"]["response"]; + }; + updateOidcCustomSubTemplateForOrg: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/actions/oidc/customization/sub"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/actions/oidc/customization/sub"]["response"]; + }; + }; + orgs: { + addSecurityManagerTeam: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/security-managers/teams/{team_slug}"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/security-managers/teams/{team_slug}"]["response"]; + }; + assignTeamToOrgRole: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"]["response"]; + }; + assignUserToOrgRole: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/organization-roles/users/{username}/{role_id}"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/organization-roles/users/{username}/{role_id}"]["response"]; + }; + blockUser: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/blocks/{username}"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/blocks/{username}"]["response"]; + }; + cancelInvitation: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/invitations/{invitation_id}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/invitations/{invitation_id}"]["response"]; + }; + checkBlockedUser: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/blocks/{username}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/blocks/{username}"]["response"]; + }; + checkMembershipForUser: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/members/{username}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/members/{username}"]["response"]; + }; + checkPublicMembershipForUser: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/public_members/{username}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/public_members/{username}"]["response"]; + }; + convertMemberToOutsideCollaborator: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/outside_collaborators/{username}"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/outside_collaborators/{username}"]["response"]; + }; + createCustomOrganizationRole: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/organization-roles"]["parameters"]; + response: Endpoints["POST /orgs/{org}/organization-roles"]["response"]; + }; + createInvitation: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/invitations"]["parameters"]; + response: Endpoints["POST /orgs/{org}/invitations"]["response"]; + }; + createOrUpdateCustomProperties: { + parameters: RequestParameters & Endpoints["PATCH /orgs/{org}/properties/schema"]["parameters"]; + response: Endpoints["PATCH /orgs/{org}/properties/schema"]["response"]; + }; + createOrUpdateCustomPropertiesValuesForRepos: { + parameters: RequestParameters & Endpoints["PATCH /orgs/{org}/properties/values"]["parameters"]; + response: Endpoints["PATCH /orgs/{org}/properties/values"]["response"]; + }; + createOrUpdateCustomProperty: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/properties/schema/{custom_property_name}"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/properties/schema/{custom_property_name}"]["response"]; + }; + createWebhook: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/hooks"]["parameters"]; + response: Endpoints["POST /orgs/{org}/hooks"]["response"]; + }; + delete: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}"]["response"]; + }; + deleteCustomOrganizationRole: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/organization-roles/{role_id}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/organization-roles/{role_id}"]["response"]; + }; + deleteWebhook: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/hooks/{hook_id}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/hooks/{hook_id}"]["response"]; + }; + enableOrDisableSecurityProductOnAllOrgRepos: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/{security_product}/{enablement}"]["parameters"]; + response: Endpoints["POST /orgs/{org}/{security_product}/{enablement}"]["response"]; + }; + get: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}"]["parameters"]; + response: Endpoints["GET /orgs/{org}"]["response"]; + }; + getAllCustomProperties: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/properties/schema"]["parameters"]; + response: Endpoints["GET /orgs/{org}/properties/schema"]["response"]; + }; + getCustomProperty: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/properties/schema/{custom_property_name}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/properties/schema/{custom_property_name}"]["response"]; + }; + getMembershipForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/memberships/orgs/{org}"]["parameters"]; + response: Endpoints["GET /user/memberships/orgs/{org}"]["response"]; + }; + getMembershipForUser: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/memberships/{username}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/memberships/{username}"]["response"]; + }; + getOrgRole: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/organization-roles/{role_id}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/organization-roles/{role_id}"]["response"]; + }; + getWebhook: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/hooks/{hook_id}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/hooks/{hook_id}"]["response"]; + }; + getWebhookConfigForOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/hooks/{hook_id}/config"]["parameters"]; + response: Endpoints["GET /orgs/{org}/hooks/{hook_id}/config"]["response"]; + }; + getWebhookDelivery: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}"]["response"]; + }; + list: { + parameters: RequestParameters & Endpoints["GET /organizations"]["parameters"]; + response: Endpoints["GET /organizations"]["response"]; + }; + listAppInstallations: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/installations"]["parameters"]; + response: Endpoints["GET /orgs/{org}/installations"]["response"]; + }; + listBlockedUsers: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/blocks"]["parameters"]; + response: Endpoints["GET /orgs/{org}/blocks"]["response"]; + }; + listCustomPropertiesValuesForRepos: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/properties/values"]["parameters"]; + response: Endpoints["GET /orgs/{org}/properties/values"]["response"]; + }; + listFailedInvitations: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/failed_invitations"]["parameters"]; + response: Endpoints["GET /orgs/{org}/failed_invitations"]["response"]; + }; + listForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/orgs"]["parameters"]; + response: Endpoints["GET /user/orgs"]["response"]; + }; + listForUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/orgs"]["parameters"]; + response: Endpoints["GET /users/{username}/orgs"]["response"]; + }; + listInvitationTeams: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/invitations/{invitation_id}/teams"]["parameters"]; + response: Endpoints["GET /orgs/{org}/invitations/{invitation_id}/teams"]["response"]; + }; + listMembers: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/members"]["parameters"]; + response: Endpoints["GET /orgs/{org}/members"]["response"]; + }; + listMembershipsForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/memberships/orgs"]["parameters"]; + response: Endpoints["GET /user/memberships/orgs"]["response"]; + }; + listOrgRoleTeams: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/organization-roles/{role_id}/teams"]["parameters"]; + response: Endpoints["GET /orgs/{org}/organization-roles/{role_id}/teams"]["response"]; + }; + listOrgRoleUsers: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/organization-roles/{role_id}/users"]["parameters"]; + response: Endpoints["GET /orgs/{org}/organization-roles/{role_id}/users"]["response"]; + }; + listOrgRoles: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/organization-roles"]["parameters"]; + response: Endpoints["GET /orgs/{org}/organization-roles"]["response"]; + }; + listOrganizationFineGrainedPermissions: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/organization-fine-grained-permissions"]["parameters"]; + response: Endpoints["GET /orgs/{org}/organization-fine-grained-permissions"]["response"]; + }; + listOutsideCollaborators: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/outside_collaborators"]["parameters"]; + response: Endpoints["GET /orgs/{org}/outside_collaborators"]["response"]; + }; + listPatGrantRepositories: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories"]["response"]; + }; + listPatGrantRequestRepositories: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories"]["response"]; + }; + listPatGrantRequests: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/personal-access-token-requests"]["parameters"]; + response: Endpoints["GET /orgs/{org}/personal-access-token-requests"]["response"]; + }; + listPatGrants: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/personal-access-tokens"]["parameters"]; + response: Endpoints["GET /orgs/{org}/personal-access-tokens"]["response"]; + }; + listPendingInvitations: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/invitations"]["parameters"]; + response: Endpoints["GET /orgs/{org}/invitations"]["response"]; + }; + listPublicMembers: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/public_members"]["parameters"]; + response: Endpoints["GET /orgs/{org}/public_members"]["response"]; + }; + listSecurityManagerTeams: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/security-managers"]["parameters"]; + response: Endpoints["GET /orgs/{org}/security-managers"]["response"]; + }; + listWebhookDeliveries: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/hooks/{hook_id}/deliveries"]["parameters"]; + response: Endpoints["GET /orgs/{org}/hooks/{hook_id}/deliveries"]["response"]; + }; + listWebhooks: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/hooks"]["parameters"]; + response: Endpoints["GET /orgs/{org}/hooks"]["response"]; + }; + patchCustomOrganizationRole: { + parameters: RequestParameters & Endpoints["PATCH /orgs/{org}/organization-roles/{role_id}"]["parameters"]; + response: Endpoints["PATCH /orgs/{org}/organization-roles/{role_id}"]["response"]; + }; + pingWebhook: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/hooks/{hook_id}/pings"]["parameters"]; + response: Endpoints["POST /orgs/{org}/hooks/{hook_id}/pings"]["response"]; + }; + redeliverWebhookDelivery: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"]["parameters"]; + response: Endpoints["POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"]["response"]; + }; + removeCustomProperty: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/properties/schema/{custom_property_name}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/properties/schema/{custom_property_name}"]["response"]; + }; + removeMember: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/members/{username}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/members/{username}"]["response"]; + }; + removeMembershipForUser: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/memberships/{username}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/memberships/{username}"]["response"]; + }; + removeOutsideCollaborator: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/outside_collaborators/{username}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/outside_collaborators/{username}"]["response"]; + }; + removePublicMembershipForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/public_members/{username}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/public_members/{username}"]["response"]; + }; + removeSecurityManagerTeam: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/security-managers/teams/{team_slug}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/security-managers/teams/{team_slug}"]["response"]; + }; + reviewPatGrantRequest: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/personal-access-token-requests/{pat_request_id}"]["parameters"]; + response: Endpoints["POST /orgs/{org}/personal-access-token-requests/{pat_request_id}"]["response"]; + }; + reviewPatGrantRequestsInBulk: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/personal-access-token-requests"]["parameters"]; + response: Endpoints["POST /orgs/{org}/personal-access-token-requests"]["response"]; + }; + revokeAllOrgRolesTeam: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/organization-roles/teams/{team_slug}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/organization-roles/teams/{team_slug}"]["response"]; + }; + revokeAllOrgRolesUser: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/organization-roles/users/{username}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/organization-roles/users/{username}"]["response"]; + }; + revokeOrgRoleTeam: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"]["response"]; + }; + revokeOrgRoleUser: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}"]["response"]; + }; + setMembershipForUser: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/memberships/{username}"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/memberships/{username}"]["response"]; + }; + setPublicMembershipForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/public_members/{username}"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/public_members/{username}"]["response"]; + }; + unblockUser: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/blocks/{username}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/blocks/{username}"]["response"]; + }; + update: { + parameters: RequestParameters & Endpoints["PATCH /orgs/{org}"]["parameters"]; + response: Endpoints["PATCH /orgs/{org}"]["response"]; + }; + updateMembershipForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["PATCH /user/memberships/orgs/{org}"]["parameters"]; + response: Endpoints["PATCH /user/memberships/orgs/{org}"]["response"]; + }; + updatePatAccess: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/personal-access-tokens/{pat_id}"]["parameters"]; + response: Endpoints["POST /orgs/{org}/personal-access-tokens/{pat_id}"]["response"]; + }; + updatePatAccesses: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/personal-access-tokens"]["parameters"]; + response: Endpoints["POST /orgs/{org}/personal-access-tokens"]["response"]; + }; + updateWebhook: { + parameters: RequestParameters & Endpoints["PATCH /orgs/{org}/hooks/{hook_id}"]["parameters"]; + response: Endpoints["PATCH /orgs/{org}/hooks/{hook_id}"]["response"]; + }; + updateWebhookConfigForOrg: { + parameters: RequestParameters & Endpoints["PATCH /orgs/{org}/hooks/{hook_id}/config"]["parameters"]; + response: Endpoints["PATCH /orgs/{org}/hooks/{hook_id}/config"]["response"]; + }; + }; + packages: { + deletePackageForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["DELETE /user/packages/{package_type}/{package_name}"]["parameters"]; + response: Endpoints["DELETE /user/packages/{package_type}/{package_name}"]["response"]; + }; + deletePackageForOrg: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/packages/{package_type}/{package_name}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/packages/{package_type}/{package_name}"]["response"]; + }; + deletePackageForUser: { + parameters: RequestParameters & Endpoints["DELETE /users/{username}/packages/{package_type}/{package_name}"]["parameters"]; + response: Endpoints["DELETE /users/{username}/packages/{package_type}/{package_name}"]["response"]; + }; + deletePackageVersionForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}"]["parameters"]; + response: Endpoints["DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}"]["response"]; + }; + deletePackageVersionForOrg: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"]["response"]; + }; + deletePackageVersionForUser: { + parameters: RequestParameters & Endpoints["DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"]["parameters"]; + response: Endpoints["DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"]["response"]; + }; + getAllPackageVersionsForAPackageOwnedByAnOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"]["parameters"]; + response: Endpoints["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"]["response"]; + }; + getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/packages/{package_type}/{package_name}/versions"]["parameters"]; + response: Endpoints["GET /user/packages/{package_type}/{package_name}/versions"]["response"]; + }; + getAllPackageVersionsForPackageOwnedByAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/packages/{package_type}/{package_name}/versions"]["parameters"]; + response: Endpoints["GET /user/packages/{package_type}/{package_name}/versions"]["response"]; + }; + getAllPackageVersionsForPackageOwnedByOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"]["parameters"]; + response: Endpoints["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"]["response"]; + }; + getAllPackageVersionsForPackageOwnedByUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/packages/{package_type}/{package_name}/versions"]["parameters"]; + response: Endpoints["GET /users/{username}/packages/{package_type}/{package_name}/versions"]["response"]; + }; + getPackageForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/packages/{package_type}/{package_name}"]["parameters"]; + response: Endpoints["GET /user/packages/{package_type}/{package_name}"]["response"]; + }; + getPackageForOrganization: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/packages/{package_type}/{package_name}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/packages/{package_type}/{package_name}"]["response"]; + }; + getPackageForUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/packages/{package_type}/{package_name}"]["parameters"]; + response: Endpoints["GET /users/{username}/packages/{package_type}/{package_name}"]["response"]; + }; + getPackageVersionForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}"]["parameters"]; + response: Endpoints["GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}"]["response"]; + }; + getPackageVersionForOrganization: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"]["response"]; + }; + getPackageVersionForUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"]["parameters"]; + response: Endpoints["GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"]["response"]; + }; + listDockerMigrationConflictingPackagesForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/docker/conflicts"]["parameters"]; + response: Endpoints["GET /user/docker/conflicts"]["response"]; + }; + listDockerMigrationConflictingPackagesForOrganization: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/docker/conflicts"]["parameters"]; + response: Endpoints["GET /orgs/{org}/docker/conflicts"]["response"]; + }; + listDockerMigrationConflictingPackagesForUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/docker/conflicts"]["parameters"]; + response: Endpoints["GET /users/{username}/docker/conflicts"]["response"]; + }; + listPackagesForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/packages"]["parameters"]; + response: Endpoints["GET /user/packages"]["response"]; + }; + listPackagesForOrganization: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/packages"]["parameters"]; + response: Endpoints["GET /orgs/{org}/packages"]["response"]; + }; + listPackagesForUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/packages"]["parameters"]; + response: Endpoints["GET /users/{username}/packages"]["response"]; + }; + restorePackageForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["POST /user/packages/{package_type}/{package_name}/restore{?token}"]["parameters"]; + response: Endpoints["POST /user/packages/{package_type}/{package_name}/restore{?token}"]["response"]; + }; + restorePackageForOrg: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}"]["parameters"]; + response: Endpoints["POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}"]["response"]; + }; + restorePackageForUser: { + parameters: RequestParameters & Endpoints["POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}"]["parameters"]; + response: Endpoints["POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}"]["response"]; + }; + restorePackageVersionForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"]["parameters"]; + response: Endpoints["POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"]["response"]; + }; + restorePackageVersionForOrg: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"]["parameters"]; + response: Endpoints["POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"]["response"]; + }; + restorePackageVersionForUser: { + parameters: RequestParameters & Endpoints["POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"]["parameters"]; + response: Endpoints["POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"]["response"]; + }; + }; + projects: { + addCollaborator: { + parameters: RequestParameters & Endpoints["PUT /projects/{project_id}/collaborators/{username}"]["parameters"]; + response: Endpoints["PUT /projects/{project_id}/collaborators/{username}"]["response"]; + }; + createCard: { + parameters: RequestParameters & Endpoints["POST /projects/columns/{column_id}/cards"]["parameters"]; + response: Endpoints["POST /projects/columns/{column_id}/cards"]["response"]; + }; + createColumn: { + parameters: RequestParameters & Endpoints["POST /projects/{project_id}/columns"]["parameters"]; + response: Endpoints["POST /projects/{project_id}/columns"]["response"]; + }; + createForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["POST /user/projects"]["parameters"]; + response: Endpoints["POST /user/projects"]["response"]; + }; + createForOrg: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/projects"]["parameters"]; + response: Endpoints["POST /orgs/{org}/projects"]["response"]; + }; + createForRepo: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/projects"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/projects"]["response"]; + }; + delete: { + parameters: RequestParameters & Endpoints["DELETE /projects/{project_id}"]["parameters"]; + response: Endpoints["DELETE /projects/{project_id}"]["response"]; + }; + deleteCard: { + parameters: RequestParameters & Endpoints["DELETE /projects/columns/cards/{card_id}"]["parameters"]; + response: Endpoints["DELETE /projects/columns/cards/{card_id}"]["response"]; + }; + deleteColumn: { + parameters: RequestParameters & Endpoints["DELETE /projects/columns/{column_id}"]["parameters"]; + response: Endpoints["DELETE /projects/columns/{column_id}"]["response"]; + }; + get: { + parameters: RequestParameters & Endpoints["GET /projects/{project_id}"]["parameters"]; + response: Endpoints["GET /projects/{project_id}"]["response"]; + }; + getCard: { + parameters: RequestParameters & Endpoints["GET /projects/columns/cards/{card_id}"]["parameters"]; + response: Endpoints["GET /projects/columns/cards/{card_id}"]["response"]; + }; + getColumn: { + parameters: RequestParameters & Endpoints["GET /projects/columns/{column_id}"]["parameters"]; + response: Endpoints["GET /projects/columns/{column_id}"]["response"]; + }; + getPermissionForUser: { + parameters: RequestParameters & Endpoints["GET /projects/{project_id}/collaborators/{username}/permission"]["parameters"]; + response: Endpoints["GET /projects/{project_id}/collaborators/{username}/permission"]["response"]; + }; + listCards: { + parameters: RequestParameters & Endpoints["GET /projects/columns/{column_id}/cards"]["parameters"]; + response: Endpoints["GET /projects/columns/{column_id}/cards"]["response"]; + }; + listCollaborators: { + parameters: RequestParameters & Endpoints["GET /projects/{project_id}/collaborators"]["parameters"]; + response: Endpoints["GET /projects/{project_id}/collaborators"]["response"]; + }; + listColumns: { + parameters: RequestParameters & Endpoints["GET /projects/{project_id}/columns"]["parameters"]; + response: Endpoints["GET /projects/{project_id}/columns"]["response"]; + }; + listForOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/projects"]["parameters"]; + response: Endpoints["GET /orgs/{org}/projects"]["response"]; + }; + listForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/projects"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/projects"]["response"]; + }; + listForUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/projects"]["parameters"]; + response: Endpoints["GET /users/{username}/projects"]["response"]; + }; + moveCard: { + parameters: RequestParameters & Endpoints["POST /projects/columns/cards/{card_id}/moves"]["parameters"]; + response: Endpoints["POST /projects/columns/cards/{card_id}/moves"]["response"]; + }; + moveColumn: { + parameters: RequestParameters & Endpoints["POST /projects/columns/{column_id}/moves"]["parameters"]; + response: Endpoints["POST /projects/columns/{column_id}/moves"]["response"]; + }; + removeCollaborator: { + parameters: RequestParameters & Endpoints["DELETE /projects/{project_id}/collaborators/{username}"]["parameters"]; + response: Endpoints["DELETE /projects/{project_id}/collaborators/{username}"]["response"]; + }; + update: { + parameters: RequestParameters & Endpoints["PATCH /projects/{project_id}"]["parameters"]; + response: Endpoints["PATCH /projects/{project_id}"]["response"]; + }; + updateCard: { + parameters: RequestParameters & Endpoints["PATCH /projects/columns/cards/{card_id}"]["parameters"]; + response: Endpoints["PATCH /projects/columns/cards/{card_id}"]["response"]; + }; + updateColumn: { + parameters: RequestParameters & Endpoints["PATCH /projects/columns/{column_id}"]["parameters"]; + response: Endpoints["PATCH /projects/columns/{column_id}"]["response"]; + }; + }; + pulls: { + checkIfMerged: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"]["response"]; + }; + create: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/pulls"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/pulls"]["response"]; + }; + createReplyForReviewComment: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"]["response"]; + }; + createReview: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"]["response"]; + }; + createReviewComment: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"]["response"]; + }; + deletePendingReview: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"]["response"]; + }; + deleteReviewComment: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"]["response"]; + }; + dismissReview: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"]["response"]; + }; + get: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}"]["response"]; + }; + getReview: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"]["response"]; + }; + getReviewComment: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"]["response"]; + }; + list: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/pulls"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls"]["response"]; + }; + listCommentsForReview: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"]["response"]; + }; + listCommits: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"]["response"]; + }; + listFiles: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"]["response"]; + }; + listRequestedReviewers: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"]["response"]; + }; + listReviewComments: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"]["response"]; + }; + listReviewCommentsForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/pulls/comments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/comments"]["response"]; + }; + listReviews: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"]["response"]; + }; + merge: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"]["response"]; + }; + removeRequestedReviewers: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"]["response"]; + }; + requestReviewers: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"]["response"]; + }; + submitReview: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"]["response"]; + }; + update: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"]["response"]; + }; + updateBranch: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch"]["response"]; + }; + updateReview: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"]["response"]; + }; + updateReviewComment: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"]["response"]; + }; + }; + rateLimit: { + get: { + parameters: RequestParameters & Endpoints["GET /rate_limit"]["parameters"]; + response: Endpoints["GET /rate_limit"]["response"]; + }; + }; + reactions: { + createForCommitComment: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions"]["response"]; + }; + createForIssue: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions"]["response"]; + }; + createForIssueComment: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"]["response"]; + }; + createForPullRequestReviewComment: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"]["response"]; + }; + createForRelease: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/releases/{release_id}/reactions"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/releases/{release_id}/reactions"]["response"]; + }; + createForTeamDiscussionCommentInOrg: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"]["parameters"]; + response: Endpoints["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"]["response"]; + }; + createForTeamDiscussionInOrg: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"]["parameters"]; + response: Endpoints["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"]["response"]; + }; + deleteForCommitComment: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}"]["response"]; + }; + deleteForIssue: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}"]["response"]; + }; + deleteForIssueComment: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}"]["response"]; + }; + deleteForPullRequestComment: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}"]["response"]; + }; + deleteForRelease: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}"]["response"]; + }; + deleteForTeamDiscussion: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}"]["response"]; + }; + deleteForTeamDiscussionComment: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}"]["response"]; + }; + listForCommitComment: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"]["response"]; + }; + listForIssue: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"]["response"]; + }; + listForIssueComment: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"]["response"]; + }; + listForPullRequestReviewComment: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"]["response"]; + }; + listForRelease: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}/reactions"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}/reactions"]["response"]; + }; + listForTeamDiscussionCommentInOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"]["response"]; + }; + listForTeamDiscussionInOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"]["response"]; + }; + }; + repos: { + acceptInvitation: { + parameters: RequestParameters & Endpoints["PATCH /user/repository_invitations/{invitation_id}"]["parameters"]; + response: Endpoints["PATCH /user/repository_invitations/{invitation_id}"]["response"]; + }; + acceptInvitationForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["PATCH /user/repository_invitations/{invitation_id}"]["parameters"]; + response: Endpoints["PATCH /user/repository_invitations/{invitation_id}"]["response"]; + }; + addAppAccessRestrictions: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"]["response"]; + }; + addCollaborator: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/collaborators/{username}"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/collaborators/{username}"]["response"]; + }; + addStatusCheckContexts: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"]["response"]; + }; + addTeamAccessRestrictions: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"]["response"]; + }; + addUserAccessRestrictions: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"]["response"]; + }; + cancelPagesDeployment: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel"]["response"]; + }; + checkAutomatedSecurityFixes: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/automated-security-fixes"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/automated-security-fixes"]["response"]; + }; + checkCollaborator: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/collaborators/{username}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/collaborators/{username}"]["response"]; + }; + checkPrivateVulnerabilityReporting: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/private-vulnerability-reporting"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/private-vulnerability-reporting"]["response"]; + }; + checkVulnerabilityAlerts: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/vulnerability-alerts"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/vulnerability-alerts"]["response"]; + }; + codeownersErrors: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/codeowners/errors"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/codeowners/errors"]["response"]; + }; + compareCommits: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/compare/{base}...{head}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/compare/{base}...{head}"]["response"]; + }; + compareCommitsWithBasehead: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/compare/{basehead}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/compare/{basehead}"]["response"]; + }; + createAutolink: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/autolinks"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/autolinks"]["response"]; + }; + createCommitComment: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"]["response"]; + }; + createCommitSignatureProtection: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"]["response"]; + }; + createCommitStatus: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/statuses/{sha}"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/statuses/{sha}"]["response"]; + }; + createDeployKey: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/keys"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/keys"]["response"]; + }; + createDeployment: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/deployments"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/deployments"]["response"]; + }; + createDeploymentBranchPolicy: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"]["response"]; + }; + createDeploymentProtectionRule: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"]["response"]; + }; + createDeploymentStatus: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"]["response"]; + }; + createDispatchEvent: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/dispatches"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/dispatches"]["response"]; + }; + createForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["POST /user/repos"]["parameters"]; + response: Endpoints["POST /user/repos"]["response"]; + }; + createFork: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/forks"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/forks"]["response"]; + }; + createInOrg: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/repos"]["parameters"]; + response: Endpoints["POST /orgs/{org}/repos"]["response"]; + }; + createOrUpdateCustomPropertiesValues: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/properties/values"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/properties/values"]["response"]; + }; + createOrUpdateEnvironment: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/environments/{environment_name}"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/environments/{environment_name}"]["response"]; + }; + createOrUpdateFileContents: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/contents/{path}"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/contents/{path}"]["response"]; + }; + createOrgRuleset: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/rulesets"]["parameters"]; + response: Endpoints["POST /orgs/{org}/rulesets"]["response"]; + }; + createPagesDeployment: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/pages/deployments"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/pages/deployments"]["response"]; + }; + createPagesSite: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/pages"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/pages"]["response"]; + }; + createRelease: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/releases"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/releases"]["response"]; + }; + createRepoRuleset: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/rulesets"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/rulesets"]["response"]; + }; + createTagProtection: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/tags/protection"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/tags/protection"]["response"]; + }; + createUsingTemplate: { + parameters: RequestParameters & Endpoints["POST /repos/{template_owner}/{template_repo}/generate"]["parameters"]; + response: Endpoints["POST /repos/{template_owner}/{template_repo}/generate"]["response"]; + }; + createWebhook: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/hooks"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/hooks"]["response"]; + }; + declineInvitation: { + parameters: RequestParameters & Endpoints["DELETE /user/repository_invitations/{invitation_id}"]["parameters"]; + response: Endpoints["DELETE /user/repository_invitations/{invitation_id}"]["response"]; + }; + declineInvitationForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["DELETE /user/repository_invitations/{invitation_id}"]["parameters"]; + response: Endpoints["DELETE /user/repository_invitations/{invitation_id}"]["response"]; + }; + delete: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}"]["response"]; + }; + deleteAccessRestrictions: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"]["response"]; + }; + deleteAdminBranchProtection: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"]["response"]; + }; + deleteAnEnvironment: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/environments/{environment_name}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/environments/{environment_name}"]["response"]; + }; + deleteAutolink: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"]["response"]; + }; + deleteBranchProtection: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"]["response"]; + }; + deleteCommitComment: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/comments/{comment_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/comments/{comment_id}"]["response"]; + }; + deleteCommitSignatureProtection: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"]["response"]; + }; + deleteDeployKey: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/keys/{key_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/keys/{key_id}"]["response"]; + }; + deleteDeployment: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"]["response"]; + }; + deleteDeploymentBranchPolicy: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"]["response"]; + }; + deleteFile: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/contents/{path}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/contents/{path}"]["response"]; + }; + deleteInvitation: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"]["response"]; + }; + deleteOrgRuleset: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/rulesets/{ruleset_id}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/rulesets/{ruleset_id}"]["response"]; + }; + deletePagesSite: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/pages"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/pages"]["response"]; + }; + deletePullRequestReviewProtection: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"]["response"]; + }; + deleteRelease: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/releases/{release_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/releases/{release_id}"]["response"]; + }; + deleteReleaseAsset: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"]["response"]; + }; + deleteRepoRuleset: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}"]["response"]; + }; + deleteTagProtection: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}"]["response"]; + }; + deleteWebhook: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"]["response"]; + }; + disableAutomatedSecurityFixes: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/automated-security-fixes"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/automated-security-fixes"]["response"]; + }; + disableDeploymentProtectionRule: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"]["response"]; + }; + disablePrivateVulnerabilityReporting: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/private-vulnerability-reporting"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/private-vulnerability-reporting"]["response"]; + }; + disableVulnerabilityAlerts: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/vulnerability-alerts"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/vulnerability-alerts"]["response"]; + }; + downloadArchive: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/zipball/{ref}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/zipball/{ref}"]["response"]; + }; + downloadTarballArchive: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/tarball/{ref}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/tarball/{ref}"]["response"]; + }; + downloadZipballArchive: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/zipball/{ref}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/zipball/{ref}"]["response"]; + }; + enableAutomatedSecurityFixes: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/automated-security-fixes"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/automated-security-fixes"]["response"]; + }; + enablePrivateVulnerabilityReporting: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/private-vulnerability-reporting"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/private-vulnerability-reporting"]["response"]; + }; + enableVulnerabilityAlerts: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/vulnerability-alerts"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/vulnerability-alerts"]["response"]; + }; + generateReleaseNotes: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/releases/generate-notes"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/releases/generate-notes"]["response"]; + }; + get: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}"]["response"]; + }; + getAccessRestrictions: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"]["response"]; + }; + getAdminBranchProtection: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"]["response"]; + }; + getAllDeploymentProtectionRules: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"]["response"]; + }; + getAllEnvironments: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/environments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/environments"]["response"]; + }; + getAllStatusCheckContexts: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"]["response"]; + }; + getAllTopics: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/topics"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/topics"]["response"]; + }; + getAppsWithAccessToProtectedBranch: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"]["response"]; + }; + getAutolink: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"]["response"]; + }; + getBranch: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/branches/{branch}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}"]["response"]; + }; + getBranchProtection: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection"]["response"]; + }; + getBranchRules: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/rules/branches/{branch}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/rules/branches/{branch}"]["response"]; + }; + getClones: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/traffic/clones"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/traffic/clones"]["response"]; + }; + getCodeFrequencyStats: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/stats/code_frequency"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/stats/code_frequency"]["response"]; + }; + getCollaboratorPermissionLevel: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/collaborators/{username}/permission"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/collaborators/{username}/permission"]["response"]; + }; + getCombinedStatusForRef: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/status"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/status"]["response"]; + }; + getCommit: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/commits/{ref}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}"]["response"]; + }; + getCommitActivityStats: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/stats/commit_activity"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/stats/commit_activity"]["response"]; + }; + getCommitComment: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/comments/{comment_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/comments/{comment_id}"]["response"]; + }; + getCommitSignatureProtection: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"]["response"]; + }; + getCommunityProfileMetrics: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/community/profile"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/community/profile"]["response"]; + }; + getContent: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/contents/{path}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/contents/{path}"]["response"]; + }; + getContributorsStats: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/stats/contributors"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/stats/contributors"]["response"]; + }; + getCustomDeploymentProtectionRule: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"]["response"]; + }; + getCustomPropertiesValues: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/properties/values"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/properties/values"]["response"]; + }; + getDeployKey: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/keys/{key_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/keys/{key_id}"]["response"]; + }; + getDeployment: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/deployments/{deployment_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/deployments/{deployment_id}"]["response"]; + }; + getDeploymentBranchPolicy: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"]["response"]; + }; + getDeploymentStatus: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"]["response"]; + }; + getEnvironment: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}"]["response"]; + }; + getLatestPagesBuild: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/pages/builds/latest"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pages/builds/latest"]["response"]; + }; + getLatestRelease: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/releases/latest"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/releases/latest"]["response"]; + }; + getOrgRuleSuite: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}"]["response"]; + }; + getOrgRuleSuites: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/rulesets/rule-suites"]["parameters"]; + response: Endpoints["GET /orgs/{org}/rulesets/rule-suites"]["response"]; + }; + getOrgRuleset: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/rulesets/{ruleset_id}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/rulesets/{ruleset_id}"]["response"]; + }; + getOrgRulesets: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/rulesets"]["parameters"]; + response: Endpoints["GET /orgs/{org}/rulesets"]["response"]; + }; + getPages: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/pages"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pages"]["response"]; + }; + getPagesBuild: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/pages/builds/{build_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pages/builds/{build_id}"]["response"]; + }; + getPagesDeployment: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}"]["response"]; + }; + getPagesHealthCheck: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/pages/health"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pages/health"]["response"]; + }; + getParticipationStats: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/stats/participation"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/stats/participation"]["response"]; + }; + getPullRequestReviewProtection: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"]["response"]; + }; + getPunchCardStats: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/stats/punch_card"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/stats/punch_card"]["response"]; + }; + getReadme: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/readme"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/readme"]["response"]; + }; + getReadmeInDirectory: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/readme/{dir}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/readme/{dir}"]["response"]; + }; + getRelease: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}"]["response"]; + }; + getReleaseAsset: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"]["response"]; + }; + getReleaseByTag: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/releases/tags/{tag}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/releases/tags/{tag}"]["response"]; + }; + getRepoRuleSuite: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}"]["response"]; + }; + getRepoRuleSuites: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/rulesets/rule-suites"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/rulesets/rule-suites"]["response"]; + }; + getRepoRuleset: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"]["response"]; + }; + getRepoRulesets: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/rulesets"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/rulesets"]["response"]; + }; + getStatusChecksProtection: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"]["response"]; + }; + getTeamsWithAccessToProtectedBranch: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"]["response"]; + }; + getTopPaths: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/traffic/popular/paths"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/traffic/popular/paths"]["response"]; + }; + getTopReferrers: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/traffic/popular/referrers"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/traffic/popular/referrers"]["response"]; + }; + getUsersWithAccessToProtectedBranch: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"]["response"]; + }; + getViews: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/traffic/views"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/traffic/views"]["response"]; + }; + getWebhook: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/hooks/{hook_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/hooks/{hook_id}"]["response"]; + }; + getWebhookConfigForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/hooks/{hook_id}/config"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/hooks/{hook_id}/config"]["response"]; + }; + getWebhookDelivery: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}"]["response"]; + }; + listActivities: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/activity"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/activity"]["response"]; + }; + listAutolinks: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/autolinks"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/autolinks"]["response"]; + }; + listBranches: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/branches"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/branches"]["response"]; + }; + listBranchesForHeadCommit: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head"]["response"]; + }; + listCollaborators: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/collaborators"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/collaborators"]["response"]; + }; + listCommentsForCommit: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"]["response"]; + }; + listCommitCommentsForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/comments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/comments"]["response"]; + }; + listCommitStatusesForRef: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/statuses"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/statuses"]["response"]; + }; + listCommits: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/commits"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits"]["response"]; + }; + listContributors: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/contributors"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/contributors"]["response"]; + }; + listCustomDeploymentRuleIntegrations: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps"]["response"]; + }; + listDeployKeys: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/keys"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/keys"]["response"]; + }; + listDeploymentBranchPolicies: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"]["response"]; + }; + listDeploymentStatuses: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"]["response"]; + }; + listDeployments: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/deployments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/deployments"]["response"]; + }; + listForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/repos"]["parameters"]; + response: Endpoints["GET /user/repos"]["response"]; + }; + listForOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/repos"]["parameters"]; + response: Endpoints["GET /orgs/{org}/repos"]["response"]; + }; + listForUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/repos"]["parameters"]; + response: Endpoints["GET /users/{username}/repos"]["response"]; + }; + listForks: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/forks"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/forks"]["response"]; + }; + listInvitations: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/invitations"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/invitations"]["response"]; + }; + listInvitationsForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/repository_invitations"]["parameters"]; + response: Endpoints["GET /user/repository_invitations"]["response"]; + }; + listLanguages: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/languages"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/languages"]["response"]; + }; + listPagesBuilds: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/pages/builds"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pages/builds"]["response"]; + }; + listPublic: { + parameters: RequestParameters & Endpoints["GET /repositories"]["parameters"]; + response: Endpoints["GET /repositories"]["response"]; + }; + listPullRequestsAssociatedWithCommit: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"]["response"]; + }; + listReleaseAssets: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}/assets"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}/assets"]["response"]; + }; + listReleases: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/releases"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/releases"]["response"]; + }; + listTagProtection: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/tags/protection"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/tags/protection"]["response"]; + }; + listTags: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/tags"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/tags"]["response"]; + }; + listTeams: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/teams"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/teams"]["response"]; + }; + listWebhookDeliveries: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"]["response"]; + }; + listWebhooks: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/hooks"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/hooks"]["response"]; + }; + merge: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/merges"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/merges"]["response"]; + }; + mergeUpstream: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/merge-upstream"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/merge-upstream"]["response"]; + }; + pingWebhook: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"]["response"]; + }; + redeliverWebhookDelivery: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"]["response"]; + }; + removeAppAccessRestrictions: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"]["response"]; + }; + removeCollaborator: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/collaborators/{username}"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/collaborators/{username}"]["response"]; + }; + removeStatusCheckContexts: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"]["response"]; + }; + removeStatusCheckProtection: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"]["response"]; + }; + removeTeamAccessRestrictions: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"]["response"]; + }; + removeUserAccessRestrictions: { + parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"]["parameters"]; + response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"]["response"]; + }; + renameBranch: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/rename"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/rename"]["response"]; + }; + replaceAllTopics: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/topics"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/topics"]["response"]; + }; + requestPagesBuild: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/pages/builds"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/pages/builds"]["response"]; + }; + setAdminBranchProtection: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"]["response"]; + }; + setAppAccessRestrictions: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"]["response"]; + }; + setStatusCheckContexts: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"]["response"]; + }; + setTeamAccessRestrictions: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"]["response"]; + }; + setUserAccessRestrictions: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"]["response"]; + }; + testPushWebhook: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"]["response"]; + }; + transfer: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/transfer"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/transfer"]["response"]; + }; + update: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}"]["response"]; + }; + updateBranchProtection: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/branches/{branch}/protection"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/branches/{branch}/protection"]["response"]; + }; + updateCommitComment: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/comments/{comment_id}"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/comments/{comment_id}"]["response"]; + }; + updateDeploymentBranchPolicy: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"]["response"]; + }; + updateInformationAboutPagesSite: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/pages"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/pages"]["response"]; + }; + updateInvitation: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"]["response"]; + }; + updateOrgRuleset: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/rulesets/{ruleset_id}"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/rulesets/{ruleset_id}"]["response"]; + }; + updatePullRequestReviewProtection: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"]["response"]; + }; + updateRelease: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/releases/{release_id}"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/releases/{release_id}"]["response"]; + }; + updateReleaseAsset: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"]["response"]; + }; + updateRepoRuleset: { + parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}"]["parameters"]; + response: Endpoints["PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}"]["response"]; + }; + updateStatusCheckPotection: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"]["response"]; + }; + updateStatusCheckProtection: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"]["response"]; + }; + updateWebhook: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"]["response"]; + }; + updateWebhookConfigForRepo: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config"]["response"]; + }; + uploadReleaseAsset: { + parameters: RequestParameters & Endpoints["POST {origin}/repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}"]["parameters"]; + response: Endpoints["POST {origin}/repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}"]["response"]; + }; + }; + search: { + code: { + parameters: RequestParameters & Endpoints["GET /search/code"]["parameters"]; + response: Endpoints["GET /search/code"]["response"]; + }; + commits: { + parameters: RequestParameters & Endpoints["GET /search/commits"]["parameters"]; + response: Endpoints["GET /search/commits"]["response"]; + }; + issuesAndPullRequests: { + parameters: RequestParameters & Endpoints["GET /search/issues"]["parameters"]; + response: Endpoints["GET /search/issues"]["response"]; + }; + labels: { + parameters: RequestParameters & Endpoints["GET /search/labels"]["parameters"]; + response: Endpoints["GET /search/labels"]["response"]; + }; + repos: { + parameters: RequestParameters & Endpoints["GET /search/repositories"]["parameters"]; + response: Endpoints["GET /search/repositories"]["response"]; + }; + topics: { + parameters: RequestParameters & Endpoints["GET /search/topics"]["parameters"]; + response: Endpoints["GET /search/topics"]["response"]; + }; + users: { + parameters: RequestParameters & Endpoints["GET /search/users"]["parameters"]; + response: Endpoints["GET /search/users"]["response"]; + }; + }; + secretScanning: { + getAlert: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"]["response"]; + }; + listAlertsForEnterprise: { + parameters: RequestParameters & Endpoints["GET /enterprises/{enterprise}/secret-scanning/alerts"]["parameters"]; + response: Endpoints["GET /enterprises/{enterprise}/secret-scanning/alerts"]["response"]; + }; + listAlertsForOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/secret-scanning/alerts"]["parameters"]; + response: Endpoints["GET /orgs/{org}/secret-scanning/alerts"]["response"]; + }; + listAlertsForRepo: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts"]["response"]; + }; + listLocationsForAlert: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"]["response"]; + }; + updateAlert: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"]["response"]; + }; + }; + securityAdvisories: { + createFork: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks"]["response"]; + }; + createPrivateVulnerabilityReport: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/security-advisories/reports"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/security-advisories/reports"]["response"]; + }; + createRepositoryAdvisory: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/security-advisories"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/security-advisories"]["response"]; + }; + createRepositoryAdvisoryCveRequest: { + parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve"]["parameters"]; + response: Endpoints["POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve"]["response"]; + }; + getGlobalAdvisory: { + parameters: RequestParameters & Endpoints["GET /advisories/{ghsa_id}"]["parameters"]; + response: Endpoints["GET /advisories/{ghsa_id}"]["response"]; + }; + getRepositoryAdvisory: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}"]["response"]; + }; + listGlobalAdvisories: { + parameters: RequestParameters & Endpoints["GET /advisories"]["parameters"]; + response: Endpoints["GET /advisories"]["response"]; + }; + listOrgRepositoryAdvisories: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/security-advisories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/security-advisories"]["response"]; + }; + listRepositoryAdvisories: { + parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/security-advisories"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/security-advisories"]["response"]; + }; + updateRepositoryAdvisory: { + parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}"]["parameters"]; + response: Endpoints["PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}"]["response"]; + }; + }; + teams: { + addOrUpdateMembershipForUserInOrg: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"]["response"]; + }; + addOrUpdateProjectPermissionsInOrg: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}"]["response"]; + }; + addOrUpdateRepoPermissionsInOrg: { + parameters: RequestParameters & Endpoints["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"]["parameters"]; + response: Endpoints["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"]["response"]; + }; + checkPermissionsForProjectInOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}"]["response"]; + }; + checkPermissionsForRepoInOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"]["response"]; + }; + create: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/teams"]["parameters"]; + response: Endpoints["POST /orgs/{org}/teams"]["response"]; + }; + createDiscussionCommentInOrg: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"]["parameters"]; + response: Endpoints["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"]["response"]; + }; + createDiscussionInOrg: { + parameters: RequestParameters & Endpoints["POST /orgs/{org}/teams/{team_slug}/discussions"]["parameters"]; + response: Endpoints["POST /orgs/{org}/teams/{team_slug}/discussions"]["response"]; + }; + deleteDiscussionCommentInOrg: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"]["response"]; + }; + deleteDiscussionInOrg: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"]["response"]; + }; + deleteInOrg: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/teams/{team_slug}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/teams/{team_slug}"]["response"]; + }; + getByName: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/teams/{team_slug}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}"]["response"]; + }; + getDiscussionCommentInOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"]["response"]; + }; + getDiscussionInOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"]["response"]; + }; + getMembershipForUserInOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/teams/{team_slug}/memberships/{username}"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/memberships/{username}"]["response"]; + }; + list: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/teams"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams"]["response"]; + }; + listChildInOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/teams/{team_slug}/teams"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/teams"]["response"]; + }; + listDiscussionCommentsInOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"]["response"]; + }; + listDiscussionsInOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions"]["response"]; + }; + listForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/teams"]["parameters"]; + response: Endpoints["GET /user/teams"]["response"]; + }; + listMembersInOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/teams/{team_slug}/members"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/members"]["response"]; + }; + listPendingInvitationsInOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/teams/{team_slug}/invitations"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/invitations"]["response"]; + }; + listProjectsInOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/teams/{team_slug}/projects"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/projects"]["response"]; + }; + listReposInOrg: { + parameters: RequestParameters & Endpoints["GET /orgs/{org}/teams/{team_slug}/repos"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/repos"]["response"]; + }; + removeMembershipForUserInOrg: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"]["response"]; + }; + removeProjectInOrg: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"]["response"]; + }; + removeRepoInOrg: { + parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"]["parameters"]; + response: Endpoints["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"]["response"]; + }; + updateDiscussionCommentInOrg: { + parameters: RequestParameters & Endpoints["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"]["parameters"]; + response: Endpoints["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"]["response"]; + }; + updateDiscussionInOrg: { + parameters: RequestParameters & Endpoints["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"]["parameters"]; + response: Endpoints["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"]["response"]; + }; + updateInOrg: { + parameters: RequestParameters & Endpoints["PATCH /orgs/{org}/teams/{team_slug}"]["parameters"]; + response: Endpoints["PATCH /orgs/{org}/teams/{team_slug}"]["response"]; + }; + }; + users: { + addEmailForAuthenticated: { + parameters: RequestParameters & Endpoints["POST /user/emails"]["parameters"]; + response: Endpoints["POST /user/emails"]["response"]; + }; + addEmailForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["POST /user/emails"]["parameters"]; + response: Endpoints["POST /user/emails"]["response"]; + }; + addSocialAccountForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["POST /user/social_accounts"]["parameters"]; + response: Endpoints["POST /user/social_accounts"]["response"]; + }; + block: { + parameters: RequestParameters & Endpoints["PUT /user/blocks/{username}"]["parameters"]; + response: Endpoints["PUT /user/blocks/{username}"]["response"]; + }; + checkBlocked: { + parameters: RequestParameters & Endpoints["GET /user/blocks/{username}"]["parameters"]; + response: Endpoints["GET /user/blocks/{username}"]["response"]; + }; + checkFollowingForUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/following/{target_user}"]["parameters"]; + response: Endpoints["GET /users/{username}/following/{target_user}"]["response"]; + }; + checkPersonIsFollowedByAuthenticated: { + parameters: RequestParameters & Endpoints["GET /user/following/{username}"]["parameters"]; + response: Endpoints["GET /user/following/{username}"]["response"]; + }; + createGpgKeyForAuthenticated: { + parameters: RequestParameters & Endpoints["POST /user/gpg_keys"]["parameters"]; + response: Endpoints["POST /user/gpg_keys"]["response"]; + }; + createGpgKeyForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["POST /user/gpg_keys"]["parameters"]; + response: Endpoints["POST /user/gpg_keys"]["response"]; + }; + createPublicSshKeyForAuthenticated: { + parameters: RequestParameters & Endpoints["POST /user/keys"]["parameters"]; + response: Endpoints["POST /user/keys"]["response"]; + }; + createPublicSshKeyForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["POST /user/keys"]["parameters"]; + response: Endpoints["POST /user/keys"]["response"]; + }; + createSshSigningKeyForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["POST /user/ssh_signing_keys"]["parameters"]; + response: Endpoints["POST /user/ssh_signing_keys"]["response"]; + }; + deleteEmailForAuthenticated: { + parameters: RequestParameters & Endpoints["DELETE /user/emails"]["parameters"]; + response: Endpoints["DELETE /user/emails"]["response"]; + }; + deleteEmailForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["DELETE /user/emails"]["parameters"]; + response: Endpoints["DELETE /user/emails"]["response"]; + }; + deleteGpgKeyForAuthenticated: { + parameters: RequestParameters & Endpoints["DELETE /user/gpg_keys/{gpg_key_id}"]["parameters"]; + response: Endpoints["DELETE /user/gpg_keys/{gpg_key_id}"]["response"]; + }; + deleteGpgKeyForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["DELETE /user/gpg_keys/{gpg_key_id}"]["parameters"]; + response: Endpoints["DELETE /user/gpg_keys/{gpg_key_id}"]["response"]; + }; + deletePublicSshKeyForAuthenticated: { + parameters: RequestParameters & Endpoints["DELETE /user/keys/{key_id}"]["parameters"]; + response: Endpoints["DELETE /user/keys/{key_id}"]["response"]; + }; + deletePublicSshKeyForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["DELETE /user/keys/{key_id}"]["parameters"]; + response: Endpoints["DELETE /user/keys/{key_id}"]["response"]; + }; + deleteSocialAccountForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["DELETE /user/social_accounts"]["parameters"]; + response: Endpoints["DELETE /user/social_accounts"]["response"]; + }; + deleteSshSigningKeyForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["DELETE /user/ssh_signing_keys/{ssh_signing_key_id}"]["parameters"]; + response: Endpoints["DELETE /user/ssh_signing_keys/{ssh_signing_key_id}"]["response"]; + }; + follow: { + parameters: RequestParameters & Endpoints["PUT /user/following/{username}"]["parameters"]; + response: Endpoints["PUT /user/following/{username}"]["response"]; + }; + getAuthenticated: { + parameters: RequestParameters & Endpoints["GET /user"]["parameters"]; + response: Endpoints["GET /user"]["response"]; + }; + getByUsername: { + parameters: RequestParameters & Endpoints["GET /users/{username}"]["parameters"]; + response: Endpoints["GET /users/{username}"]["response"]; + }; + getContextForUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/hovercard"]["parameters"]; + response: Endpoints["GET /users/{username}/hovercard"]["response"]; + }; + getGpgKeyForAuthenticated: { + parameters: RequestParameters & Endpoints["GET /user/gpg_keys/{gpg_key_id}"]["parameters"]; + response: Endpoints["GET /user/gpg_keys/{gpg_key_id}"]["response"]; + }; + getGpgKeyForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/gpg_keys/{gpg_key_id}"]["parameters"]; + response: Endpoints["GET /user/gpg_keys/{gpg_key_id}"]["response"]; + }; + getPublicSshKeyForAuthenticated: { + parameters: RequestParameters & Endpoints["GET /user/keys/{key_id}"]["parameters"]; + response: Endpoints["GET /user/keys/{key_id}"]["response"]; + }; + getPublicSshKeyForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/keys/{key_id}"]["parameters"]; + response: Endpoints["GET /user/keys/{key_id}"]["response"]; + }; + getSshSigningKeyForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/ssh_signing_keys/{ssh_signing_key_id}"]["parameters"]; + response: Endpoints["GET /user/ssh_signing_keys/{ssh_signing_key_id}"]["response"]; + }; + list: { + parameters: RequestParameters & Endpoints["GET /users"]["parameters"]; + response: Endpoints["GET /users"]["response"]; + }; + listBlockedByAuthenticated: { + parameters: RequestParameters & Endpoints["GET /user/blocks"]["parameters"]; + response: Endpoints["GET /user/blocks"]["response"]; + }; + listBlockedByAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/blocks"]["parameters"]; + response: Endpoints["GET /user/blocks"]["response"]; + }; + listEmailsForAuthenticated: { + parameters: RequestParameters & Endpoints["GET /user/emails"]["parameters"]; + response: Endpoints["GET /user/emails"]["response"]; + }; + listEmailsForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/emails"]["parameters"]; + response: Endpoints["GET /user/emails"]["response"]; + }; + listFollowedByAuthenticated: { + parameters: RequestParameters & Endpoints["GET /user/following"]["parameters"]; + response: Endpoints["GET /user/following"]["response"]; + }; + listFollowedByAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/following"]["parameters"]; + response: Endpoints["GET /user/following"]["response"]; + }; + listFollowersForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/followers"]["parameters"]; + response: Endpoints["GET /user/followers"]["response"]; + }; + listFollowersForUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/followers"]["parameters"]; + response: Endpoints["GET /users/{username}/followers"]["response"]; + }; + listFollowingForUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/following"]["parameters"]; + response: Endpoints["GET /users/{username}/following"]["response"]; + }; + listGpgKeysForAuthenticated: { + parameters: RequestParameters & Endpoints["GET /user/gpg_keys"]["parameters"]; + response: Endpoints["GET /user/gpg_keys"]["response"]; + }; + listGpgKeysForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/gpg_keys"]["parameters"]; + response: Endpoints["GET /user/gpg_keys"]["response"]; + }; + listGpgKeysForUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/gpg_keys"]["parameters"]; + response: Endpoints["GET /users/{username}/gpg_keys"]["response"]; + }; + listPublicEmailsForAuthenticated: { + parameters: RequestParameters & Endpoints["GET /user/public_emails"]["parameters"]; + response: Endpoints["GET /user/public_emails"]["response"]; + }; + listPublicEmailsForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/public_emails"]["parameters"]; + response: Endpoints["GET /user/public_emails"]["response"]; + }; + listPublicKeysForUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/keys"]["parameters"]; + response: Endpoints["GET /users/{username}/keys"]["response"]; + }; + listPublicSshKeysForAuthenticated: { + parameters: RequestParameters & Endpoints["GET /user/keys"]["parameters"]; + response: Endpoints["GET /user/keys"]["response"]; + }; + listPublicSshKeysForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/keys"]["parameters"]; + response: Endpoints["GET /user/keys"]["response"]; + }; + listSocialAccountsForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/social_accounts"]["parameters"]; + response: Endpoints["GET /user/social_accounts"]["response"]; + }; + listSocialAccountsForUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/social_accounts"]["parameters"]; + response: Endpoints["GET /users/{username}/social_accounts"]["response"]; + }; + listSshSigningKeysForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["GET /user/ssh_signing_keys"]["parameters"]; + response: Endpoints["GET /user/ssh_signing_keys"]["response"]; + }; + listSshSigningKeysForUser: { + parameters: RequestParameters & Endpoints["GET /users/{username}/ssh_signing_keys"]["parameters"]; + response: Endpoints["GET /users/{username}/ssh_signing_keys"]["response"]; + }; + setPrimaryEmailVisibilityForAuthenticated: { + parameters: RequestParameters & Endpoints["PATCH /user/email/visibility"]["parameters"]; + response: Endpoints["PATCH /user/email/visibility"]["response"]; + }; + setPrimaryEmailVisibilityForAuthenticatedUser: { + parameters: RequestParameters & Endpoints["PATCH /user/email/visibility"]["parameters"]; + response: Endpoints["PATCH /user/email/visibility"]["response"]; + }; + unblock: { + parameters: RequestParameters & Endpoints["DELETE /user/blocks/{username}"]["parameters"]; + response: Endpoints["DELETE /user/blocks/{username}"]["response"]; + }; + unfollow: { + parameters: RequestParameters & Endpoints["DELETE /user/following/{username}"]["parameters"]; + response: Endpoints["DELETE /user/following/{username}"]["response"]; + }; + updateAuthenticated: { + parameters: RequestParameters & Endpoints["PATCH /user"]["parameters"]; + response: Endpoints["PATCH /user"]["response"]; + }; + }; +}; diff --git a/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/index.d.ts b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/index.d.ts new file mode 100644 index 000000000..f6d12730e --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/index.d.ts @@ -0,0 +1,12 @@ +import type { Octokit } from "@octokit/core"; +export type { RestEndpointMethodTypes } from "./generated/parameters-and-response-types.js"; +import type { Api } from "./types.js"; +export type { Api }; +export declare function restEndpointMethods(octokit: Octokit): Api; +export declare namespace restEndpointMethods { + var VERSION: string; +} +export declare function legacyRestEndpointMethods(octokit: Octokit): Api["rest"] & Api; +export declare namespace legacyRestEndpointMethods { + var VERSION: string; +} diff --git a/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/types.d.ts b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/types.d.ts new file mode 100644 index 000000000..5fbfe844e --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/types.d.ts @@ -0,0 +1,18 @@ +import type { Route, RequestParameters } from "@octokit/types"; +import type { RestEndpointMethods } from "./generated/method-types.js"; +export type Api = { + rest: RestEndpointMethods; +}; +export type EndpointDecorations = { + mapToData?: string; + deprecated?: string; + renamed?: [string, string]; + renamedParameters?: { + [name: string]: string; + }; +}; +export type EndpointsDefaultsAndDecorations = { + [scope: string]: { + [methodName: string]: [Route, RequestParameters?, EndpointDecorations?]; + }; +}; diff --git a/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/version.d.ts b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/version.d.ts new file mode 100644 index 000000000..23d4f557f --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "13.2.6"; diff --git a/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/package.json b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/package.json new file mode 100644 index 000000000..df39efbd7 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/plugin-rest-endpoint-methods/package.json @@ -0,0 +1,58 @@ +{ + "name": "@octokit/plugin-rest-endpoint-methods", + "version": "13.2.6", + "type": "module", + "description": "Octokit plugin adding one method for all of api.github.com REST API endpoints", + "repository": "github:octokit/plugin-rest-endpoint-methods.js", + "keywords": [ + "github", + "api", + "sdk", + "toolkit" + ], + "author": "Gregor Martynus (https://twitter.com/gr2m)", + "license": "MIT", + "dependencies": { + "@octokit/types": "^13.6.1" + }, + "devDependencies": { + "@octokit/core": "^6.0.0", + "@octokit/tsconfig": "^4.0.0", + "@types/node": "^20.0.0", + "@vitest/coverage-v8": "^2.0.3", + "camelcase": "^8.0.0", + "esbuild": "^0.24.0", + "fetch-mock": "^11.0.0", + "github-openapi-graphql-query": "^4.3.1", + "glob": "^11.0.0", + "prettier": "3.3.3", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "sinon": "^19.0.0", + "sort-keys": "^5.0.0", + "string-to-jsdoc-comment": "^1.0.0", + "typescript": "^5.0.0", + "vitest": "^2.0.3" + }, + "peerDependencies": { + "@octokit/core": ">=6" + }, + "publishConfig": { + "access": "public", + "provenance": true + }, + "engines": { + "node": ">= 18" + }, + "files": [ + "dist-*/**" + ], + "types": "./dist-types/index.d.ts", + "exports": { + ".": { + "import": "./dist-src/index.js", + "types": "./dist-types/index.d.ts", + "default": "./dist-src/index.js" + } + }, + "sideEffects": false +} diff --git a/.github/octokit/node_modules/@octokit/request-error/LICENSE b/.github/octokit/node_modules/@octokit/request-error/LICENSE new file mode 100644 index 000000000..ef2c18ee5 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request-error/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2019 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.github/octokit/node_modules/@octokit/request-error/README.md b/.github/octokit/node_modules/@octokit/request-error/README.md new file mode 100644 index 000000000..df15c6d35 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request-error/README.md @@ -0,0 +1,93 @@ +# request-error.js + +> Error class for Octokit request errors + +[![@latest](https://img.shields.io/npm/v/@octokit/request-error.svg)](https://www.npmjs.com/package/@octokit/request-error) +[![Build Status](https://github.com/octokit/request-error.js/workflows/Test/badge.svg)](https://github.com/octokit/request-error.js/actions?query=workflow%3ATest) + +## Usage + + + + + + +
+Browsers + +Load @octokit/request-error directly from esm.sh + +```html + +``` + +
+Node + + +Install with npm install @octokit/request-error + +```js +import { RequestError } from "@octokit/request-error"; +``` + +
+ +> [!IMPORTANT] +> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json` by setting `"moduleResolution": "node16", "module": "node16"`. +> +> See the TypeScript docs on [package.json "exports"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports).
+> See this [helpful guide on transitioning to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) from [@sindresorhus](https://github.com/sindresorhus) + +```js +const error = new RequestError("Oops", 500, { + request: { + method: "POST", + url: "https://api.github.com/foo", + body: { + bar: "baz", + }, + headers: { + authorization: "token secret123", + }, + }, + response: { + status: 500, + url: "https://api.github.com/foo", + headers: { + "x-github-request-id": "1:2:3:4", + }, + data: { + foo: "bar", + }, + }, +}); + +error.message; // Oops +error.status; // 500 +error.request; // { method, url, headers, body } +error.response; // { url, status, headers, data } +``` + +### Usage with Octokit + +```js +try { + // your code here that sends at least one Octokit request + await octokit.request("GET /"); +} catch (error) { + // Octokit errors always have a `error.status` property which is the http response code + if (error.status) { + // handle Octokit error + } else { + // handle all other errors + throw error; + } +} +``` + +## LICENSE + +[MIT](LICENSE) diff --git a/.github/octokit/node_modules/@octokit/request-error/dist-src/index.js b/.github/octokit/node_modules/@octokit/request-error/dist-src/index.js new file mode 100644 index 000000000..b511825eb --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request-error/dist-src/index.js @@ -0,0 +1,40 @@ +class RequestError extends Error { + name; + /** + * http status code + */ + status; + /** + * Request options that lead to the error. + */ + request; + /** + * Response object if a response was received + */ + response; + constructor(message, statusCode, options) { + super(message); + this.name = "HttpError"; + this.status = Number.parseInt(statusCode); + if (Number.isNaN(this.status)) { + this.status = 0; + } + if ("response" in options) { + this.response = options.response; + } + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace( + / .*$/, + " [REDACTED]" + ) + }); + } + requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + } +} +export { + RequestError +}; diff --git a/.github/octokit/node_modules/@octokit/request-error/dist-types/index.d.ts b/.github/octokit/node_modules/@octokit/request-error/dist-types/index.d.ts new file mode 100644 index 000000000..8f33df74c --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request-error/dist-types/index.d.ts @@ -0,0 +1,21 @@ +import type { RequestOptions, OctokitResponse } from "@octokit/types"; +import type { RequestErrorOptions } from "./types.js"; +/** + * Error with extra properties to help with debugging + */ +export declare class RequestError extends Error { + name: "HttpError"; + /** + * http status code + */ + status: number; + /** + * Request options that lead to the error. + */ + request: RequestOptions; + /** + * Response object if a response was received + */ + response?: OctokitResponse | undefined; + constructor(message: string, statusCode: number, options: RequestErrorOptions); +} diff --git a/.github/octokit/node_modules/@octokit/request-error/dist-types/types.d.ts b/.github/octokit/node_modules/@octokit/request-error/dist-types/types.d.ts new file mode 100644 index 000000000..8b5aa3f21 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request-error/dist-types/types.d.ts @@ -0,0 +1,5 @@ +import type { RequestOptions, OctokitResponse } from "@octokit/types"; +export type RequestErrorOptions = { + response?: OctokitResponse | undefined; + request: RequestOptions; +}; diff --git a/.github/octokit/node_modules/@octokit/request-error/package.json b/.github/octokit/node_modules/@octokit/request-error/package.json new file mode 100644 index 000000000..37323582f --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request-error/package.json @@ -0,0 +1,50 @@ +{ + "name": "@octokit/request-error", + "version": "6.1.5", + "publishConfig": { + "access": "public", + "provenance": true + }, + "type": "module", + "description": "Error class for Octokit request errors", + "repository": "github:octokit/request-error.js", + "keywords": [ + "octokit", + "github", + "api", + "error" + ], + "author": "Gregor Martynus (https://github.com/gr2m)", + "license": "MIT", + "dependencies": { + "@octokit/types": "^13.0.0" + }, + "devDependencies": { + "@octokit/tsconfig": "^3.0.0", + "@types/node": "^20.0.0", + "@vitest/coverage-v8": "^2.0.2", + "esbuild": "^0.24.0", + "glob": "^11.0.0", + "prettier": "3.3.3", + "tinybench": "^2.8.0", + "typescript": "^5.0.0", + "vitest": "^2.0.2" + }, + "engines": { + "node": ">= 18" + }, + "files": [ + "dist-*/**", + "bin/**" + ], + "types": "./dist-types/index.d.ts", + "exports": { + ".": { + "types": "./dist-types/index.d.ts", + "import": "./dist-src/index.js", + "default": "./dist-src/index.js" + } + }, + "sideEffects": false, + "unpkg": "dist-src/index.js" +} diff --git a/.github/octokit/node_modules/@octokit/request/LICENSE b/.github/octokit/node_modules/@octokit/request/LICENSE new file mode 100644 index 000000000..af5366d0d --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2018 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.github/octokit/node_modules/@octokit/request/README.md b/.github/octokit/node_modules/@octokit/request/README.md new file mode 100644 index 000000000..be3e1ccce --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request/README.md @@ -0,0 +1,579 @@ +# request.js + +> Send parameterized requests to GitHub’s APIs with sensible defaults in browsers and Node + +[![@latest](https://img.shields.io/npm/v/@octokit/request.svg)](https://www.npmjs.com/package/@octokit/request) +[![Build Status](https://github.com/octokit/request.js/workflows/Test/badge.svg)](https://github.com/octokit/request.js/actions?query=workflow%3ATest+branch%3Amain) + +`@octokit/request` is a request library for browsers & node that makes it easier +to interact with [GitHub’s REST API](https://developer.github.com/v3/) and +[GitHub’s GraphQL API](https://developer.github.com/v4/guides/forming-calls/#the-graphql-endpoint). + +It uses [`@octokit/endpoint`](https://github.com/octokit/endpoint.js) to parse +the passed options and sends the request using [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). You can pass a custom `fetch` function using the `options.request.fetch` option, see below. + + + + + +- [request.js](#requestjs) + - [Features](#features) + - [Usage](#usage) + - [REST API example](#rest-api-example) + - [GraphQL example](#graphql-example) + - [Alternative: pass `method` \& `url` as part of options](#alternative-pass-method--url-as-part-of-options) + - [Authentication](#authentication) + - [request()](#request) + - [`request.defaults()`](#requestdefaults) + - [`request.endpoint`](#requestendpoint) + - [Special cases](#special-cases) + - [The `data` parameter – set request body directly](#the-data-parameter--set-request-body-directly) + - [Set parameters for both the URL/query and the request body](#set-parameters-for-both-the-urlquery-and-the-request-body) + - [Set a custom Agent to your requests](#set-a-custom-agent-to-your-requests) + - [LICENSE](#license) + + + +## Features + +🤩 1:1 mapping of REST API endpoint documentation, e.g. [Add labels to an issue](https://developer.github.com/v3/issues/labels/#add-labels-to-an-issue) becomes + +```js +request("POST /repos/{owner}/{repo}/issues/{number}/labels", { + mediaType: { + previews: ["symmetra"], + }, + owner: "octokit", + repo: "request.js", + number: 1, + labels: ["🐛 bug"], +}); +``` + +👶 [Small bundle size](https://bundlephobia.com/result?p=@octokit/request@5.0.3) (\<4kb minified + gzipped) + +😎 [Authenticate](#authentication) with any of [GitHubs Authentication Strategies](https://github.com/octokit/auth.js). + +👍 Sensible defaults + +- `baseUrl`: `https://api.github.com` +- `headers.accept`: `application/vnd.github.v3+json` +- `headers['user-agent']`: `octokit-request.js/ `, e.g. `octokit-request.js/1.2.3 Node.js/10.15.0 (macOS Mojave; x64)` + +👌 Simple to test: mock requests by passing a custom fetch method. + +🧐 Simple to debug: Sets `error.request` to request options causing the error (with redacted credentials). + +## Usage + + + + + + +
+Browsers + +Load @octokit/request directly from esm.sh + +```html + +``` + +
+Node + + +Install with npm install @octokit/request + +```js +import { request } from "@octokit/request"; +``` + +
+ +### REST API example + +```js +// Following GitHub docs formatting: +// https://developer.github.com/v3/repos/#list-organization-repositories +const result = await request("GET /orgs/{org}/repos", { + headers: { + authorization: "token 0000000000000000000000000000000000000001", + }, + org: "octokit", + type: "private", +}); + +console.log(`${result.data.length} repos found.`); +``` + +### GraphQL example + +For GraphQL request we recommend using [`@octokit/graphql`](https://github.com/octokit/graphql.js#readme) + +```js +const result = await request("POST /graphql", { + headers: { + authorization: "token 0000000000000000000000000000000000000001", + }, + query: `query ($login: String!) { + organization(login: $login) { + repositories(privacy: PRIVATE) { + totalCount + } + } + }`, + variables: { + login: "octokit", + }, +}); +``` + +### Alternative: pass `method` & `url` as part of options + +Alternatively, pass in a method and a url + +```js +const result = await request({ + method: "GET", + url: "/orgs/{org}/repos", + headers: { + authorization: "token 0000000000000000000000000000000000000001", + }, + org: "octokit", + type: "private", +}); +``` + +## Authentication + +The simplest way to authenticate a request is to set the `Authorization` header directly, e.g. to a [personal access token](https://github.com/settings/tokens/). + +```js +const requestWithAuth = request.defaults({ + headers: { + authorization: "token 0000000000000000000000000000000000000001", + }, +}); +const result = await requestWithAuth("GET /user"); +``` + +For more complex authentication strategies such as GitHub Apps or Basic, we recommend the according authentication library exported by [`@octokit/auth`](https://github.com/octokit/auth.js). + +```js +import { createAppAuth } from "@octokit/auth-app"; +const auth = createAppAuth({ + appId: process.env.APP_ID, + privateKey: process.env.PRIVATE_KEY, + installationId: 123, +}); +const requestWithAuth = request.defaults({ + request: { + hook: auth.hook, + }, + mediaType: { + previews: ["machine-man"], + }, +}); + +const { data: app } = await requestWithAuth("GET /app"); +const { data: app } = await requestWithAuth( + "POST /repos/{owner}/{repo}/issues", + { + owner: "octocat", + repo: "hello-world", + title: "Hello from the engine room", + }, +); +``` + +## request() + +`request(route, options)` or `request(options)`. + +**Options** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ route + + String + + **Required**. If route is set it has to be a string consisting of the request method and URL, e.g. GET /orgs/{org} +
+ options.baseUrl + + String + + The base URL that route or url will be prefixed with, if they use relative paths. Defaults to https://api.github.com. +
+ options.headers + + Object + + Custom headers. Passed headers are merged with defaults:
+ headers['user-agent'] defaults to octokit-rest.js/1.2.3 (where 1.2.3 is the released version).
+ headers['accept'] defaults to application/vnd.github.v3+json.
Use options.mediaType.{format,previews} to request API previews and custom media types. +
+ options.method + + String + + Any supported http verb, case-insensitive. Defaults to Get. +
+ options.mediaType.format + + String + + Media type param, such as `raw`, `html`, or `full`. See Media Types. +
+ options.mediaType.previews + + Array of strings + + Name of previews, such as `mercy`, `symmetra`, or `scarlet-witch`. See GraphQL Schema Previews. + Note that these only apply to GraphQL requests and have no effect on REST routes. +
+ options.url + + String + + **Required**. A path or full URL which may contain :variable or {variable} placeholders, + e.g. /orgs/{org}/repos. The url is parsed using url-template. +
+ options.data + + Any + + Set request body directly instead of setting it to JSON based on additional parameters. See "The `data` parameter" below. +
+ options.request.fetch + + Function + + Custom replacement for fetch. Useful for testing or request hooks. +
+ options.request.hook + + Function + + Function with the signature hook(request, endpointOptions), where endpointOptions are the parsed options as returned by endpoint.merge(), and request is request(). This option works great in conjunction with before-after-hook. +
+ options.request.signal + + new AbortController().signal + + Use an AbortController instance to cancel a request. In node you can only cancel streamed requests. +
+ options.request.log + + object + + Used for internal logging. Defaults to console. +
+ options.request.parseSuccessResponseBody + + boolean + + If set to false the returned `response` will be passed through from `fetch`. This is useful to stream response.body when downloading files from the GitHub API. +
+ +All other options except `options.request.*` will be passed depending on the `method` and `url` options. + +1. If the option key is a placeholder in the `url`, it will be used as replacement. For example, if the passed options are `{url: '/orgs/{org}/repos', org: 'foo'}` the returned `options.url` is `https://api.github.com/orgs/foo/repos` +2. If the `method` is `GET` or `HEAD`, the option is passed as query parameter +3. Otherwise the parameter is passed in the request body as JSON key. + +**Result** + +`request` returns a promise. If the request was successful, the promise resolves with an object containing 4 keys: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ key + + type + + description +
statusIntegerResponse status status
urlStringURL of response. If a request results in redirects, this is the final URL. You can send a HEAD request to retrieve it without loading the full response body.
headersObjectAll response headers
dataAnyThe response body as returned from server. If the response is JSON then it will be parsed into an object
+ +If an error occurs, the promise is rejected with an `error` object containing 3 keys to help with debugging: + +- `error.status` The http response status code +- `error.request` The request options such as `method`, `url` and `data` +- `error.response` The http response object with `url`, `headers`, and `data` + +If the error is due to an `AbortSignal` being used, the resulting `AbortError` is bubbled up to the caller. + +## `request.defaults()` + +Override or set default options. Example: + +```js +import { request } from "@octokit/request"; +const myrequest = request.defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", + headers: { + "user-agent": "myApp/1.2.3", + authorization: `token 0000000000000000000000000000000000000001`, + }, + org: "my-project", + per_page: 100, +}); + +myrequest(`GET /orgs/{org}/repos`); +``` + +You can call `.defaults()` again on the returned method, the defaults will cascade. + +```js +const myProjectRequest = request.defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", + headers: { + "user-agent": "myApp/1.2.3", + }, + org: "my-project", +}); +const myProjectRequestWithAuth = myProjectRequest.defaults({ + headers: { + authorization: `token 0000000000000000000000000000000000000001`, + }, +}); +``` + +`myProjectRequest` now defaults the `baseUrl`, `headers['user-agent']`, +`org` and `headers['authorization']` on top of `headers['accept']` that is set +by the global default. + +## `request.endpoint` + +See https://github.com/octokit/endpoint.js. Example + +```js +const options = request.endpoint("GET /orgs/{org}/repos", { + org: "my-project", + type: "private", +}); + +// { +// method: 'GET', +// url: 'https://api.github.com/orgs/my-project/repos?type=private', +// headers: { +// accept: 'application/vnd.github.v3+json', +// authorization: 'token 0000000000000000000000000000000000000001', +// 'user-agent': 'octokit/endpoint.js v1.2.3' +// } +// } +``` + +All of the [`@octokit/endpoint`](https://github.com/octokit/endpoint.js) API can be used: + +- [`octokitRequest.endpoint()`](#endpoint) +- [`octokitRequest.endpoint.defaults()`](#endpointdefaults) +- [`octokitRequest.endpoint.merge()`](#endpointdefaults) +- [`octokitRequest.endpoint.parse()`](#endpointmerge) + +## Special cases + + + +### The `data` parameter – set request body directly + +Some endpoints such as [Render a Markdown document in raw mode](https://developer.github.com/v3/markdown/#render-a-markdown-document-in-raw-mode) don’t have parameters that are sent as request body keys, instead the request body needs to be set directly. In these cases, set the `data` parameter. + +```js +const response = await request("POST /markdown/raw", { + data: "Hello world github/linguist#1 **cool**, and #1!", + headers: { + accept: "text/html;charset=utf-8", + "content-type": "text/plain", + }, +}); + +// Request is sent as +// +// { +// method: 'post', +// url: 'https://api.github.com/markdown/raw', +// headers: { +// accept: 'text/html;charset=utf-8', +// 'content-type': 'text/plain', +// 'user-agent': userAgent +// }, +// body: 'Hello world github/linguist#1 **cool**, and #1!' +// } +// +// not as +// +// { +// ... +// body: '{"data": "Hello world github/linguist#1 **cool**, and #1!"}' +// } +``` + +### Set parameters for both the URL/query and the request body + +There are API endpoints that accept both query parameters as well as a body. In that case you need to add the query parameters as templates to `options.url`, as defined in the [RFC 6570 URI Template specification](https://tools.ietf.org/html/rfc6570). + +Example + +```js +request( + "POST https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}", + { + name: "example.zip", + label: "short description", + headers: { + "content-type": "text/plain", + "content-length": 14, + authorization: `token 0000000000000000000000000000000000000001`, + }, + data: "Hello, world!", + }, +); +``` + +### Set a custom Agent to your requests + +The way to pass a custom `Agent` to requests is by creating a custom `fetch` function and pass it as `options.request.fetch`. A good example can be [undici's `fetch` implementation](https://undici.nodejs.org/#/?id=undicifetchinput-init-promise). + +Example ([See example in CodeSandbox](https://codesandbox.io/p/sandbox/nifty-stitch-wdlwlf)) + +```js +import { request } from "@octokit/request"; +import { fetch as undiciFetch, Agent } from "undici"; + +/** @type {typeof import("undici").fetch} */ +const myFetch = (url, options) => { + return undiciFetch(url, { + ...options, + dispatcher: new Agent({ + keepAliveTimeout: 10, + keepAliveMaxTimeout: 10, + }), + }); +}; + +const { data } = await request("GET /users/{username}", { + username: "octocat", + headers: { + "X-GitHub-Api-Version": "2022-11-28", + }, + options: { + request: { + fetch: myFetch, + }, + }, +}); +``` + +## LICENSE + +[MIT](LICENSE) diff --git a/.github/octokit/node_modules/@octokit/request/dist-bundle/index.js b/.github/octokit/node_modules/@octokit/request/dist-bundle/index.js new file mode 100644 index 000000000..0ca101213 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request/dist-bundle/index.js @@ -0,0 +1,180 @@ +// pkg/dist-src/index.js +import { endpoint } from "@octokit/endpoint"; + +// pkg/dist-src/defaults.js +import { getUserAgent } from "universal-user-agent"; + +// pkg/dist-src/version.js +var VERSION = "0.0.0-development"; + +// pkg/dist-src/defaults.js +var defaults_default = { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${getUserAgent()}` + } +}; + +// pkg/dist-src/is-plain-object.js +function isPlainObject(value) { + if (typeof value !== "object" || value === null) return false; + if (Object.prototype.toString.call(value) !== "[object Object]") return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); +} + +// pkg/dist-src/fetch-wrapper.js +import { RequestError } from "@octokit/request-error"; +async function fetchWrapper(requestOptions) { + const fetch = requestOptions.request?.fetch || globalThis.fetch; + if (!fetch) { + throw new Error( + "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" + ); + } + const log = requestOptions.request?.log || console; + const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false; + const body = isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body) ? JSON.stringify(requestOptions.body) : requestOptions.body; + const requestHeaders = Object.fromEntries( + Object.entries(requestOptions.headers).map(([name, value]) => [ + name, + String(value) + ]) + ); + let fetchResponse; + try { + fetchResponse = await fetch(requestOptions.url, { + method: requestOptions.method, + body, + redirect: requestOptions.request?.redirect, + headers: requestHeaders, + signal: requestOptions.request?.signal, + // duplex must be set if request.body is ReadableStream or Async Iterables. + // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. + ...requestOptions.body && { duplex: "half" } + }); + } catch (error) { + let message = "Unknown Error"; + if (error instanceof Error) { + if (error.name === "AbortError") { + error.status = 500; + throw error; + } + message = error.message; + if (error.name === "TypeError" && "cause" in error) { + if (error.cause instanceof Error) { + message = error.cause.message; + } else if (typeof error.cause === "string") { + message = error.cause; + } + } + } + const requestError = new RequestError(message, 500, { + request: requestOptions + }); + requestError.cause = error; + throw requestError; + } + const status = fetchResponse.status; + const url = fetchResponse.url; + const responseHeaders = {}; + for (const [key, value] of fetchResponse.headers) { + responseHeaders[key] = value; + } + const octokitResponse = { + url, + status, + headers: responseHeaders, + data: "" + }; + if ("deprecation" in responseHeaders) { + const matches = responseHeaders.link && responseHeaders.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn( + `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${responseHeaders.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` + ); + } + if (status === 204 || status === 205) { + return octokitResponse; + } + if (requestOptions.method === "HEAD") { + if (status < 400) { + return octokitResponse; + } + throw new RequestError(fetchResponse.statusText, status, { + response: octokitResponse, + request: requestOptions + }); + } + if (status === 304) { + octokitResponse.data = await getResponseData(fetchResponse); + throw new RequestError("Not modified", status, { + response: octokitResponse, + request: requestOptions + }); + } + if (status >= 400) { + octokitResponse.data = await getResponseData(fetchResponse); + throw new RequestError(toErrorMessage(octokitResponse.data), status, { + response: octokitResponse, + request: requestOptions + }); + } + octokitResponse.data = parseSuccessResponseBody ? await getResponseData(fetchResponse) : fetchResponse.body; + return octokitResponse; +} +async function getResponseData(response) { + const contentType = response.headers.get("content-type"); + if (/application\/json/.test(contentType)) { + return response.json().catch(() => response.text()).catch(() => ""); + } + if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { + return response.text(); + } + return response.arrayBuffer(); +} +function toErrorMessage(data) { + if (typeof data === "string") { + return data; + } + if (data instanceof ArrayBuffer) { + return "Unknown error"; + } + if ("message" in data) { + const suffix = "documentation_url" in data ? ` - ${data.documentation_url}` : ""; + return Array.isArray(data.errors) ? `${data.message}: ${data.errors.map((v) => JSON.stringify(v)).join(", ")}${suffix}` : `${data.message}${suffix}`; + } + return `Unknown error: ${JSON.stringify(data)}`; +} + +// pkg/dist-src/with-defaults.js +function withDefaults(oldEndpoint, newDefaults) { + const endpoint2 = oldEndpoint.defaults(newDefaults); + const newApi = function(route, parameters) { + const endpointOptions = endpoint2.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint2.parse(endpointOptions)); + } + const request2 = (route2, parameters2) => { + return fetchWrapper( + endpoint2.parse(endpoint2.merge(route2, parameters2)) + ); + }; + Object.assign(request2, { + endpoint: endpoint2, + defaults: withDefaults.bind(null, endpoint2) + }); + return endpointOptions.request.hook(request2, endpointOptions); + }; + return Object.assign(newApi, { + endpoint: endpoint2, + defaults: withDefaults.bind(null, endpoint2) + }); +} + +// pkg/dist-src/index.js +var request = withDefaults(endpoint, defaults_default); +export { + request +}; diff --git a/.github/octokit/node_modules/@octokit/request/dist-bundle/index.js.map b/.github/octokit/node_modules/@octokit/request/dist-bundle/index.js.map new file mode 100644 index 000000000..27018a641 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request/dist-bundle/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../dist-src/index.js", "../dist-src/defaults.js", "../dist-src/version.js", "../dist-src/is-plain-object.js", "../dist-src/fetch-wrapper.js", "../dist-src/with-defaults.js"], + "sourcesContent": ["import { endpoint } from \"@octokit/endpoint\";\nimport defaults from \"./defaults.js\";\nimport withDefaults from \"./with-defaults.js\";\nconst request = withDefaults(endpoint, defaults);\nexport {\n request\n};\n", "import { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version.js\";\nvar defaults_default = {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${getUserAgent()}`\n }\n};\nexport {\n defaults_default as default\n};\n", "const VERSION = \"0.0.0-development\";\nexport {\n VERSION\n};\n", "function isPlainObject(value) {\n if (typeof value !== \"object\" || value === null) return false;\n if (Object.prototype.toString.call(value) !== \"[object Object]\") return false;\n const proto = Object.getPrototypeOf(value);\n if (proto === null) return true;\n const Ctor = Object.prototype.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);\n}\nexport {\n isPlainObject\n};\n", "import { isPlainObject } from \"./is-plain-object.js\";\nimport { RequestError } from \"@octokit/request-error\";\nasync function fetchWrapper(requestOptions) {\n const fetch = requestOptions.request?.fetch || globalThis.fetch;\n if (!fetch) {\n throw new Error(\n \"fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing\"\n );\n }\n const log = requestOptions.request?.log || console;\n const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false;\n const body = isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body) ? JSON.stringify(requestOptions.body) : requestOptions.body;\n const requestHeaders = Object.fromEntries(\n Object.entries(requestOptions.headers).map(([name, value]) => [\n name,\n String(value)\n ])\n );\n let fetchResponse;\n try {\n fetchResponse = await fetch(requestOptions.url, {\n method: requestOptions.method,\n body,\n redirect: requestOptions.request?.redirect,\n headers: requestHeaders,\n signal: requestOptions.request?.signal,\n // duplex must be set if request.body is ReadableStream or Async Iterables.\n // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.\n ...requestOptions.body && { duplex: \"half\" }\n });\n } catch (error) {\n let message = \"Unknown Error\";\n if (error instanceof Error) {\n if (error.name === \"AbortError\") {\n error.status = 500;\n throw error;\n }\n message = error.message;\n if (error.name === \"TypeError\" && \"cause\" in error) {\n if (error.cause instanceof Error) {\n message = error.cause.message;\n } else if (typeof error.cause === \"string\") {\n message = error.cause;\n }\n }\n }\n const requestError = new RequestError(message, 500, {\n request: requestOptions\n });\n requestError.cause = error;\n throw requestError;\n }\n const status = fetchResponse.status;\n const url = fetchResponse.url;\n const responseHeaders = {};\n for (const [key, value] of fetchResponse.headers) {\n responseHeaders[key] = value;\n }\n const octokitResponse = {\n url,\n status,\n headers: responseHeaders,\n data: \"\"\n };\n if (\"deprecation\" in responseHeaders) {\n const matches = responseHeaders.link && responseHeaders.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(\n `[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${responseHeaders.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`\n );\n }\n if (status === 204 || status === 205) {\n return octokitResponse;\n }\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return octokitResponse;\n }\n throw new RequestError(fetchResponse.statusText, status, {\n response: octokitResponse,\n request: requestOptions\n });\n }\n if (status === 304) {\n octokitResponse.data = await getResponseData(fetchResponse);\n throw new RequestError(\"Not modified\", status, {\n response: octokitResponse,\n request: requestOptions\n });\n }\n if (status >= 400) {\n octokitResponse.data = await getResponseData(fetchResponse);\n throw new RequestError(toErrorMessage(octokitResponse.data), status, {\n response: octokitResponse,\n request: requestOptions\n });\n }\n octokitResponse.data = parseSuccessResponseBody ? await getResponseData(fetchResponse) : fetchResponse.body;\n return octokitResponse;\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json().catch(() => response.text()).catch(() => \"\");\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return response.arrayBuffer();\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\") {\n return data;\n }\n if (data instanceof ArrayBuffer) {\n return \"Unknown error\";\n }\n if (\"message\" in data) {\n const suffix = \"documentation_url\" in data ? ` - ${data.documentation_url}` : \"\";\n return Array.isArray(data.errors) ? `${data.message}: ${data.errors.map((v) => JSON.stringify(v)).join(\", \")}${suffix}` : `${data.message}${suffix}`;\n }\n return `Unknown error: ${JSON.stringify(data)}`;\n}\nexport {\n fetchWrapper as default\n};\n", "import fetchWrapper from \"./fetch-wrapper.js\";\nfunction withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n const newApi = function(route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n const request = (route2, parameters2) => {\n return fetchWrapper(\n endpoint.parse(endpoint.merge(route2, parameters2))\n );\n };\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint)\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint)\n });\n}\nexport {\n withDefaults as default\n};\n"], + "mappings": ";AAAA,SAAS,gBAAgB;;;ACAzB,SAAS,oBAAoB;;;ACA7B,IAAM,UAAU;;;ADEhB,IAAI,mBAAmB;AAAA,EACrB,SAAS;AAAA,IACP,cAAc,sBAAsB,OAAO,IAAI,aAAa,CAAC;AAAA,EAC/D;AACF;;;AENA,SAAS,cAAc,OAAO;AAC5B,MAAI,OAAO,UAAU,YAAY,UAAU,KAAM,QAAO;AACxD,MAAI,OAAO,UAAU,SAAS,KAAK,KAAK,MAAM,kBAAmB,QAAO;AACxE,QAAM,QAAQ,OAAO,eAAe,KAAK;AACzC,MAAI,UAAU,KAAM,QAAO;AAC3B,QAAM,OAAO,OAAO,UAAU,eAAe,KAAK,OAAO,aAAa,KAAK,MAAM;AACjF,SAAO,OAAO,SAAS,cAAc,gBAAgB,QAAQ,SAAS,UAAU,KAAK,IAAI,MAAM,SAAS,UAAU,KAAK,KAAK;AAC9H;;;ACNA,SAAS,oBAAoB;AAC7B,eAAe,aAAa,gBAAgB;AAC1C,QAAM,QAAQ,eAAe,SAAS,SAAS,WAAW;AAC1D,MAAI,CAAC,OAAO;AACV,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,QAAM,MAAM,eAAe,SAAS,OAAO;AAC3C,QAAM,2BAA2B,eAAe,SAAS,6BAA6B;AACtF,QAAM,OAAO,cAAc,eAAe,IAAI,KAAK,MAAM,QAAQ,eAAe,IAAI,IAAI,KAAK,UAAU,eAAe,IAAI,IAAI,eAAe;AAC7I,QAAM,iBAAiB,OAAO;AAAA,IAC5B,OAAO,QAAQ,eAAe,OAAO,EAAE,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM;AAAA,MAC5D;AAAA,MACA,OAAO,KAAK;AAAA,IACd,CAAC;AAAA,EACH;AACA,MAAI;AACJ,MAAI;AACF,oBAAgB,MAAM,MAAM,eAAe,KAAK;AAAA,MAC9C,QAAQ,eAAe;AAAA,MACvB;AAAA,MACA,UAAU,eAAe,SAAS;AAAA,MAClC,SAAS;AAAA,MACT,QAAQ,eAAe,SAAS;AAAA;AAAA;AAAA,MAGhC,GAAG,eAAe,QAAQ,EAAE,QAAQ,OAAO;AAAA,IAC7C,CAAC;AAAA,EACH,SAAS,OAAO;AACd,QAAI,UAAU;AACd,QAAI,iBAAiB,OAAO;AAC1B,UAAI,MAAM,SAAS,cAAc;AAC/B,cAAM,SAAS;AACf,cAAM;AAAA,MACR;AACA,gBAAU,MAAM;AAChB,UAAI,MAAM,SAAS,eAAe,WAAW,OAAO;AAClD,YAAI,MAAM,iBAAiB,OAAO;AAChC,oBAAU,MAAM,MAAM;AAAA,QACxB,WAAW,OAAO,MAAM,UAAU,UAAU;AAC1C,oBAAU,MAAM;AAAA,QAClB;AAAA,MACF;AAAA,IACF;AACA,UAAM,eAAe,IAAI,aAAa,SAAS,KAAK;AAAA,MAClD,SAAS;AAAA,IACX,CAAC;AACD,iBAAa,QAAQ;AACrB,UAAM;AAAA,EACR;AACA,QAAM,SAAS,cAAc;AAC7B,QAAM,MAAM,cAAc;AAC1B,QAAM,kBAAkB,CAAC;AACzB,aAAW,CAAC,KAAK,KAAK,KAAK,cAAc,SAAS;AAChD,oBAAgB,GAAG,IAAI;AAAA,EACzB;AACA,QAAM,kBAAkB;AAAA,IACtB;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,MAAM;AAAA,EACR;AACA,MAAI,iBAAiB,iBAAiB;AACpC,UAAM,UAAU,gBAAgB,QAAQ,gBAAgB,KAAK,MAAM,8BAA8B;AACjG,UAAM,kBAAkB,WAAW,QAAQ,IAAI;AAC/C,QAAI;AAAA,MACF,uBAAuB,eAAe,MAAM,IAAI,eAAe,GAAG,qDAAqD,gBAAgB,MAAM,GAAG,kBAAkB,SAAS,eAAe,KAAK,EAAE;AAAA,IACnM;AAAA,EACF;AACA,MAAI,WAAW,OAAO,WAAW,KAAK;AACpC,WAAO;AAAA,EACT;AACA,MAAI,eAAe,WAAW,QAAQ;AACpC,QAAI,SAAS,KAAK;AAChB,aAAO;AAAA,IACT;AACA,UAAM,IAAI,aAAa,cAAc,YAAY,QAAQ;AAAA,MACvD,UAAU;AAAA,MACV,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AACA,MAAI,WAAW,KAAK;AAClB,oBAAgB,OAAO,MAAM,gBAAgB,aAAa;AAC1D,UAAM,IAAI,aAAa,gBAAgB,QAAQ;AAAA,MAC7C,UAAU;AAAA,MACV,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AACA,MAAI,UAAU,KAAK;AACjB,oBAAgB,OAAO,MAAM,gBAAgB,aAAa;AAC1D,UAAM,IAAI,aAAa,eAAe,gBAAgB,IAAI,GAAG,QAAQ;AAAA,MACnE,UAAU;AAAA,MACV,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AACA,kBAAgB,OAAO,2BAA2B,MAAM,gBAAgB,aAAa,IAAI,cAAc;AACvG,SAAO;AACT;AACA,eAAe,gBAAgB,UAAU;AACvC,QAAM,cAAc,SAAS,QAAQ,IAAI,cAAc;AACvD,MAAI,oBAAoB,KAAK,WAAW,GAAG;AACzC,WAAO,SAAS,KAAK,EAAE,MAAM,MAAM,SAAS,KAAK,CAAC,EAAE,MAAM,MAAM,EAAE;AAAA,EACpE;AACA,MAAI,CAAC,eAAe,yBAAyB,KAAK,WAAW,GAAG;AAC9D,WAAO,SAAS,KAAK;AAAA,EACvB;AACA,SAAO,SAAS,YAAY;AAC9B;AACA,SAAS,eAAe,MAAM;AAC5B,MAAI,OAAO,SAAS,UAAU;AAC5B,WAAO;AAAA,EACT;AACA,MAAI,gBAAgB,aAAa;AAC/B,WAAO;AAAA,EACT;AACA,MAAI,aAAa,MAAM;AACrB,UAAM,SAAS,uBAAuB,OAAO,MAAM,KAAK,iBAAiB,KAAK;AAC9E,WAAO,MAAM,QAAQ,KAAK,MAAM,IAAI,GAAG,KAAK,OAAO,KAAK,KAAK,OAAO,IAAI,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,GAAG,MAAM,KAAK,GAAG,KAAK,OAAO,GAAG,MAAM;AAAA,EACpJ;AACA,SAAO,kBAAkB,KAAK,UAAU,IAAI,CAAC;AAC/C;;;ACzHA,SAAS,aAAa,aAAa,aAAa;AAC9C,QAAMA,YAAW,YAAY,SAAS,WAAW;AACjD,QAAM,SAAS,SAAS,OAAO,YAAY;AACzC,UAAM,kBAAkBA,UAAS,MAAM,OAAO,UAAU;AACxD,QAAI,CAAC,gBAAgB,WAAW,CAAC,gBAAgB,QAAQ,MAAM;AAC7D,aAAO,aAAaA,UAAS,MAAM,eAAe,CAAC;AAAA,IACrD;AACA,UAAMC,WAAU,CAAC,QAAQ,gBAAgB;AACvC,aAAO;AAAA,QACLD,UAAS,MAAMA,UAAS,MAAM,QAAQ,WAAW,CAAC;AAAA,MACpD;AAAA,IACF;AACA,WAAO,OAAOC,UAAS;AAAA,MACrB,UAAAD;AAAA,MACA,UAAU,aAAa,KAAK,MAAMA,SAAQ;AAAA,IAC5C,CAAC;AACD,WAAO,gBAAgB,QAAQ,KAAKC,UAAS,eAAe;AAAA,EAC9D;AACA,SAAO,OAAO,OAAO,QAAQ;AAAA,IAC3B,UAAAD;AAAA,IACA,UAAU,aAAa,KAAK,MAAMA,SAAQ;AAAA,EAC5C,CAAC;AACH;;;ALpBA,IAAM,UAAU,aAAa,UAAU,gBAAQ;", + "names": ["endpoint", "request"] +} diff --git a/.github/octokit/node_modules/@octokit/request/dist-src/defaults.js b/.github/octokit/node_modules/@octokit/request/dist-src/defaults.js new file mode 100644 index 000000000..33b14b0ab --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request/dist-src/defaults.js @@ -0,0 +1,10 @@ +import { getUserAgent } from "universal-user-agent"; +import { VERSION } from "./version.js"; +var defaults_default = { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${getUserAgent()}` + } +}; +export { + defaults_default as default +}; diff --git a/.github/octokit/node_modules/@octokit/request/dist-src/fetch-wrapper.js b/.github/octokit/node_modules/@octokit/request/dist-src/fetch-wrapper.js new file mode 100644 index 000000000..a6ca08650 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request/dist-src/fetch-wrapper.js @@ -0,0 +1,126 @@ +import { isPlainObject } from "./is-plain-object.js"; +import { RequestError } from "@octokit/request-error"; +async function fetchWrapper(requestOptions) { + const fetch = requestOptions.request?.fetch || globalThis.fetch; + if (!fetch) { + throw new Error( + "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" + ); + } + const log = requestOptions.request?.log || console; + const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false; + const body = isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body) ? JSON.stringify(requestOptions.body) : requestOptions.body; + const requestHeaders = Object.fromEntries( + Object.entries(requestOptions.headers).map(([name, value]) => [ + name, + String(value) + ]) + ); + let fetchResponse; + try { + fetchResponse = await fetch(requestOptions.url, { + method: requestOptions.method, + body, + redirect: requestOptions.request?.redirect, + headers: requestHeaders, + signal: requestOptions.request?.signal, + // duplex must be set if request.body is ReadableStream or Async Iterables. + // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. + ...requestOptions.body && { duplex: "half" } + }); + } catch (error) { + let message = "Unknown Error"; + if (error instanceof Error) { + if (error.name === "AbortError") { + error.status = 500; + throw error; + } + message = error.message; + if (error.name === "TypeError" && "cause" in error) { + if (error.cause instanceof Error) { + message = error.cause.message; + } else if (typeof error.cause === "string") { + message = error.cause; + } + } + } + const requestError = new RequestError(message, 500, { + request: requestOptions + }); + requestError.cause = error; + throw requestError; + } + const status = fetchResponse.status; + const url = fetchResponse.url; + const responseHeaders = {}; + for (const [key, value] of fetchResponse.headers) { + responseHeaders[key] = value; + } + const octokitResponse = { + url, + status, + headers: responseHeaders, + data: "" + }; + if ("deprecation" in responseHeaders) { + const matches = responseHeaders.link && responseHeaders.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn( + `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${responseHeaders.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` + ); + } + if (status === 204 || status === 205) { + return octokitResponse; + } + if (requestOptions.method === "HEAD") { + if (status < 400) { + return octokitResponse; + } + throw new RequestError(fetchResponse.statusText, status, { + response: octokitResponse, + request: requestOptions + }); + } + if (status === 304) { + octokitResponse.data = await getResponseData(fetchResponse); + throw new RequestError("Not modified", status, { + response: octokitResponse, + request: requestOptions + }); + } + if (status >= 400) { + octokitResponse.data = await getResponseData(fetchResponse); + throw new RequestError(toErrorMessage(octokitResponse.data), status, { + response: octokitResponse, + request: requestOptions + }); + } + octokitResponse.data = parseSuccessResponseBody ? await getResponseData(fetchResponse) : fetchResponse.body; + return octokitResponse; +} +async function getResponseData(response) { + const contentType = response.headers.get("content-type"); + if (/application\/json/.test(contentType)) { + return response.json().catch(() => response.text()).catch(() => ""); + } + if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { + return response.text(); + } + return response.arrayBuffer(); +} +function toErrorMessage(data) { + if (typeof data === "string") { + return data; + } + if (data instanceof ArrayBuffer) { + return "Unknown error"; + } + if ("message" in data) { + const suffix = "documentation_url" in data ? ` - ${data.documentation_url}` : ""; + return Array.isArray(data.errors) ? `${data.message}: ${data.errors.map((v) => JSON.stringify(v)).join(", ")}${suffix}` : `${data.message}${suffix}`; + } + return `Unknown error: ${JSON.stringify(data)}`; +} +export { + fetchWrapper as default +}; diff --git a/.github/octokit/node_modules/@octokit/request/dist-src/index.js b/.github/octokit/node_modules/@octokit/request/dist-src/index.js new file mode 100644 index 000000000..42dfe6cff --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request/dist-src/index.js @@ -0,0 +1,7 @@ +import { endpoint } from "@octokit/endpoint"; +import defaults from "./defaults.js"; +import withDefaults from "./with-defaults.js"; +const request = withDefaults(endpoint, defaults); +export { + request +}; diff --git a/.github/octokit/node_modules/@octokit/request/dist-src/is-plain-object.js b/.github/octokit/node_modules/@octokit/request/dist-src/is-plain-object.js new file mode 100644 index 000000000..6ae73a6c3 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request/dist-src/is-plain-object.js @@ -0,0 +1,11 @@ +function isPlainObject(value) { + if (typeof value !== "object" || value === null) return false; + if (Object.prototype.toString.call(value) !== "[object Object]") return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); +} +export { + isPlainObject +}; diff --git a/.github/octokit/node_modules/@octokit/request/dist-src/version.js b/.github/octokit/node_modules/@octokit/request/dist-src/version.js new file mode 100644 index 000000000..dc248288a --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request/dist-src/version.js @@ -0,0 +1,4 @@ +const VERSION = "9.1.3"; +export { + VERSION +}; diff --git a/.github/octokit/node_modules/@octokit/request/dist-src/with-defaults.js b/.github/octokit/node_modules/@octokit/request/dist-src/with-defaults.js new file mode 100644 index 000000000..b2dd7ad6b --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request/dist-src/with-defaults.js @@ -0,0 +1,27 @@ +import fetchWrapper from "./fetch-wrapper.js"; +function withDefaults(oldEndpoint, newDefaults) { + const endpoint = oldEndpoint.defaults(newDefaults); + const newApi = function(route, parameters) { + const endpointOptions = endpoint.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint.parse(endpointOptions)); + } + const request = (route2, parameters2) => { + return fetchWrapper( + endpoint.parse(endpoint.merge(route2, parameters2)) + ); + }; + Object.assign(request, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); + return endpointOptions.request.hook(request, endpointOptions); + }; + return Object.assign(newApi, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); +} +export { + withDefaults as default +}; diff --git a/.github/octokit/node_modules/@octokit/request/dist-types/defaults.d.ts b/.github/octokit/node_modules/@octokit/request/dist-types/defaults.d.ts new file mode 100644 index 000000000..ddf2ca0de --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request/dist-types/defaults.d.ts @@ -0,0 +1,6 @@ +declare const _default: { + headers: { + "user-agent": string; + }; +}; +export default _default; diff --git a/.github/octokit/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts b/.github/octokit/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts new file mode 100644 index 000000000..880643c29 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts @@ -0,0 +1,2 @@ +import type { EndpointInterface, OctokitResponse } from "@octokit/types"; +export default function fetchWrapper(requestOptions: ReturnType): Promise>; diff --git a/.github/octokit/node_modules/@octokit/request/dist-types/index.d.ts b/.github/octokit/node_modules/@octokit/request/dist-types/index.d.ts new file mode 100644 index 000000000..1030809f9 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request/dist-types/index.d.ts @@ -0,0 +1 @@ +export declare const request: import("@octokit/types").RequestInterface; diff --git a/.github/octokit/node_modules/@octokit/request/dist-types/is-plain-object.d.ts b/.github/octokit/node_modules/@octokit/request/dist-types/is-plain-object.d.ts new file mode 100644 index 000000000..004fa4bf5 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request/dist-types/is-plain-object.d.ts @@ -0,0 +1 @@ +export declare function isPlainObject(value: unknown): value is Object; diff --git a/.github/octokit/node_modules/@octokit/request/dist-types/version.d.ts b/.github/octokit/node_modules/@octokit/request/dist-types/version.d.ts new file mode 100644 index 000000000..0b70291cd --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "9.1.3"; diff --git a/.github/octokit/node_modules/@octokit/request/dist-types/with-defaults.d.ts b/.github/octokit/node_modules/@octokit/request/dist-types/with-defaults.d.ts new file mode 100644 index 000000000..4300682f0 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request/dist-types/with-defaults.d.ts @@ -0,0 +1,2 @@ +import type { EndpointInterface, RequestInterface, RequestParameters } from "@octokit/types"; +export default function withDefaults(oldEndpoint: EndpointInterface, newDefaults: RequestParameters): RequestInterface; diff --git a/.github/octokit/node_modules/@octokit/request/package.json b/.github/octokit/node_modules/@octokit/request/package.json new file mode 100644 index 000000000..c3484ff4f --- /dev/null +++ b/.github/octokit/node_modules/@octokit/request/package.json @@ -0,0 +1,55 @@ +{ + "name": "@octokit/request", + "version": "9.1.3", + "type": "module", + "publishConfig": { + "access": "public", + "provenance": true + }, + "description": "Send parameterized requests to GitHub's APIs with sensible defaults in browsers and Node", + "repository": "github:octokit/request.js", + "keywords": [ + "octokit", + "github", + "api", + "request" + ], + "author": "Gregor Martynus (https://github.com/gr2m)", + "license": "MIT", + "dependencies": { + "@octokit/endpoint": "^10.0.0", + "@octokit/request-error": "^6.0.1", + "@octokit/types": "^13.1.0", + "universal-user-agent": "^7.0.2" + }, + "devDependencies": { + "@octokit/auth-app": "^7.0.0", + "@octokit/tsconfig": "^3.0.0", + "@types/node": "^20.0.0", + "@vitest/coverage-v8": "^2.0.0", + "esbuild": "^0.23.0", + "fetch-mock": "^10.0.0", + "glob": "^10.2.4", + "prettier": "3.3.3", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "typescript": "^5.0.0", + "undici": "^6.19.2", + "vitest": "^2.0.0" + }, + "engines": { + "node": ">= 18" + }, + "files": [ + "dist-*/**", + "bin/**" + ], + "types": "dist-types/index.d.ts", + "exports": { + ".": { + "types": "./dist-types/index.d.ts", + "import": "./dist-bundle/index.js", + "default": "./dist-bundle/index.js" + } + }, + "sideEffects": false +} diff --git a/.github/octokit/node_modules/@octokit/rest/LICENSE b/.github/octokit/node_modules/@octokit/rest/LICENSE new file mode 100644 index 000000000..4c0d268a2 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/rest/LICENSE @@ -0,0 +1,22 @@ +The MIT License + +Copyright (c) 2012 Cloud9 IDE, Inc. (Mike de Boer) +Copyright (c) 2017-2018 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.github/octokit/node_modules/@octokit/rest/README.md b/.github/octokit/node_modules/@octokit/rest/README.md new file mode 100644 index 000000000..9448005b3 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/rest/README.md @@ -0,0 +1,78 @@ +# rest.js + +> GitHub REST API client for JavaScript + +[![@latest](https://img.shields.io/npm/v/@octokit/rest.svg)](https://www.npmjs.com/package/@octokit/rest) +[![Build Status](https://github.com/octokit/rest.js/workflows/Test/badge.svg)](https://github.com/octokit/rest.js/actions?query=workflow%3ATest+branch%3Amain) + +## Usage + + + + + + +
+Browsers + +Load @octokit/rest directly from esm.sh + +```html + +``` + +
+Node + + +Install with npm install @octokit/rest + +```js +import { Octokit } from "@octokit/rest"; +``` + +
+ +> [!IMPORTANT] +> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json` by setting `"moduleResolution": "node16", "module": "node16"`. +> +> See the TypeScript docs on [package.json "exports"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports).
+> See this [helpful guide on transitioning to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) from [@sindresorhus](https://github.com/sindresorhus) + +```js +const octokit = new Octokit(); + +// Compare: https://docs.github.com/en/rest/reference/repos/#list-organization-repositories +octokit.rest.repos + .listForOrg({ + org: "octokit", + type: "public", + }) + .then(({ data }) => { + // handle data + }); +``` + +See https://octokit.github.io/rest.js for full documentation. + +> [!IMPORTANT] +> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json` by setting `"moduleResolution": "node16", "module": "node16"`. +> +> See the TypeScript docs on [package.json "exports"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports).
+> See this [helpful guide on transitioning to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) from [@sindresorhus](https://github.com/sindresorhus) + +## Contributing + +We would love you to contribute to `@octokit/rest`, pull requests are very welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for more information. + +## Credits + +`@octokit/rest` was originally created as [`node-github`](https://www.npmjs.com/package/github) in 2012 by Mike de Boer from Cloud9 IDE, Inc. [The original commit](https://github.blog/2020-04-09-from-48k-lines-of-code-to-10-the-story-of-githubs-javascript-sdk/) is from 2010 which predates the npm registry. + +It was adopted and renamed by GitHub in 2017. Learn more about its origin on GitHub's blog: [From 48k lines of code to 10—the story of GitHub’s JavaScript SDK](https://github.blog/2020-04-09-from-48k-lines-of-code-to-10-the-story-of-githubs-javascript-sdk/) + +## LICENSE + +[MIT](LICENSE) diff --git a/.github/octokit/node_modules/@octokit/rest/dist-src/index.js b/.github/octokit/node_modules/@octokit/rest/dist-src/index.js new file mode 100644 index 000000000..85e37c3f8 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/rest/dist-src/index.js @@ -0,0 +1,15 @@ +import { Octokit as Core } from "@octokit/core"; +import { requestLog } from "@octokit/plugin-request-log"; +import { + paginateRest +} from "@octokit/plugin-paginate-rest"; +import { legacyRestEndpointMethods } from "@octokit/plugin-rest-endpoint-methods"; +import { VERSION } from "./version.js"; +const Octokit = Core.plugin(requestLog, legacyRestEndpointMethods, paginateRest).defaults( + { + userAgent: `octokit-rest.js/${VERSION}` + } +); +export { + Octokit +}; diff --git a/.github/octokit/node_modules/@octokit/rest/dist-src/index.js.map b/.github/octokit/node_modules/@octokit/rest/dist-src/index.js.map new file mode 100644 index 000000000..5d95b000f --- /dev/null +++ b/.github/octokit/node_modules/@octokit/rest/dist-src/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../src/index.ts"], + "sourcesContent": ["import { Octokit as Core } from \"@octokit/core\";\nimport { requestLog } from \"@octokit/plugin-request-log\";\nimport {\n paginateRest,\n type PaginateInterface,\n} from \"@octokit/plugin-paginate-rest\";\nimport { legacyRestEndpointMethods } from \"@octokit/plugin-rest-endpoint-methods\";\nexport type { RestEndpointMethodTypes } from \"@octokit/plugin-rest-endpoint-methods\";\n\nimport { VERSION } from \"./version.js\";\n\ntype Constructor = new (...args: any[]) => T;\n\nexport const Octokit: typeof Core &\n Constructor<\n ReturnType & {\n paginate: PaginateInterface;\n }\n > = Core.plugin(requestLog, legacyRestEndpointMethods, paginateRest).defaults(\n {\n userAgent: `octokit-rest.js/${VERSION}`,\n },\n);\n\nexport type Octokit = InstanceType;\n"], + "mappings": "AAAA,SAAS,WAAW,YAAY;AAChC,SAAS,kBAAkB;AAC3B;AAAA,EACE;AAAA,OAEK;AACP,SAAS,iCAAiC;AAG1C,SAAS,eAAe;AAIjB,MAAM,UAKP,KAAK,OAAO,YAAY,2BAA2B,YAAY,EAAE;AAAA,EACrE;AAAA,IACE,WAAW,mBAAmB,OAAO;AAAA,EACvC;AACF;", + "names": [] +} diff --git a/.github/octokit/node_modules/@octokit/rest/dist-src/version.js b/.github/octokit/node_modules/@octokit/rest/dist-src/version.js new file mode 100644 index 000000000..0e54fcf81 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/rest/dist-src/version.js @@ -0,0 +1,4 @@ +const VERSION = "21.0.2"; +export { + VERSION +}; diff --git a/.github/octokit/node_modules/@octokit/rest/dist-src/version.js.map b/.github/octokit/node_modules/@octokit/rest/dist-src/version.js.map new file mode 100644 index 000000000..9bf2db110 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/rest/dist-src/version.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../src/version.ts"], + "sourcesContent": ["export const VERSION = \"21.0.2\";\n"], + "mappings": "AAAO,MAAM,UAAU;", + "names": [] +} diff --git a/.github/octokit/node_modules/@octokit/rest/dist-types/index.d.ts b/.github/octokit/node_modules/@octokit/rest/dist-types/index.d.ts new file mode 100644 index 000000000..f1f4ceb33 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/rest/dist-types/index.d.ts @@ -0,0 +1,9 @@ +import { Octokit as Core } from "@octokit/core"; +import { type PaginateInterface } from "@octokit/plugin-paginate-rest"; +import { legacyRestEndpointMethods } from "@octokit/plugin-rest-endpoint-methods"; +export type { RestEndpointMethodTypes } from "@octokit/plugin-rest-endpoint-methods"; +type Constructor = new (...args: any[]) => T; +export declare const Octokit: typeof Core & Constructor & { + paginate: PaginateInterface; +}>; +export type Octokit = InstanceType; diff --git a/.github/octokit/node_modules/@octokit/rest/dist-types/version.d.ts b/.github/octokit/node_modules/@octokit/rest/dist-types/version.d.ts new file mode 100644 index 000000000..21f8ab9e4 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/rest/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "21.0.2"; diff --git a/.github/octokit/node_modules/@octokit/rest/package.json b/.github/octokit/node_modules/@octokit/rest/package.json new file mode 100644 index 000000000..b65dbaa41 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/rest/package.json @@ -0,0 +1,76 @@ +{ + "name": "@octokit/rest", + "version": "21.0.2", + "publishConfig": { + "access": "public", + "provenance": true + }, + "type": "module", + "description": "GitHub REST API client for Node.js", + "keywords": [ + "octokit", + "github", + "rest", + "api-client" + ], + "author": "Gregor Martynus (https://github.com/gr2m)", + "contributors": [ + { + "name": "Mike de Boer", + "email": "info@mikedeboer.nl" + }, + { + "name": "Fabian Jakobs", + "email": "fabian@c9.io" + }, + { + "name": "Joe Gallo", + "email": "joe@brassafrax.com" + }, + { + "name": "Gregor Martynus", + "url": "https://github.com/gr2m" + } + ], + "repository": "github:octokit/rest.js", + "dependencies": { + "@octokit/core": "^6.1.2", + "@octokit/plugin-paginate-rest": "^11.0.0", + "@octokit/plugin-request-log": "^5.3.1", + "@octokit/plugin-rest-endpoint-methods": "^13.0.0" + }, + "devDependencies": { + "@octokit/auth-action": "^5.1.0", + "@octokit/auth-app": "^7.0.0", + "@octokit/fixtures-server": "^8.1.0", + "@octokit/request": "^9.1.3", + "@octokit/tsconfig": "^3.0.0", + "@types/node": "^20.11.5", + "@vitest/coverage-v8": "^2.0.3", + "esbuild": "^0.23.0", + "fetch-mock": "^11.0.0", + "glob": "^11.0.0", + "nock": "^14.0.0-beta.8", + "prettier": "^3.2.4", + "semantic-release-plugin-update-version-in-files": "^1.1.0", + "typescript": "^5.3.3", + "undici": "^6.4.0", + "vitest": "^2.0.3" + }, + "license": "MIT", + "engines": { + "node": ">= 18" + }, + "files": [ + "dist-*/**" + ], + "types": "dist-types/index.d.ts", + "exports": { + ".": { + "types": "./dist-types/index.d.ts", + "import": "./dist-src/index.js", + "default": "./dist-src/index.js" + } + }, + "sideEffects": false +} diff --git a/.github/octokit/node_modules/@octokit/types/LICENSE b/.github/octokit/node_modules/@octokit/types/LICENSE new file mode 100644 index 000000000..57bee5f18 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/LICENSE @@ -0,0 +1,7 @@ +MIT License Copyright (c) 2019 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/.github/octokit/node_modules/@octokit/types/README.md b/.github/octokit/node_modules/@octokit/types/README.md new file mode 100644 index 000000000..7ebe154a1 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/README.md @@ -0,0 +1,65 @@ +# types.ts + +> Shared TypeScript definitions for Octokit projects + +[![@latest](https://img.shields.io/npm/v/@octokit/types.svg)](https://www.npmjs.com/package/@octokit/types) +[![Build Status](https://github.com/octokit/types.ts/workflows/Test/badge.svg)](https://github.com/octokit/types.ts/actions?workflow=Test) + + + +- [Usage](#usage) +- [Examples](#examples) + - [Get parameter and response data types for a REST API endpoint](#get-parameter-and-response-data-types-for-a-rest-api-endpoint) + - [Get response types from endpoint methods](#get-response-types-from-endpoint-methods) +- [Contributing](#contributing) +- [License](#license) + + + +## Usage + +See all exported types at https://octokit.github.io/types.ts + +## Examples + +### Get parameter and response data types for a REST API endpoint + +```ts +import { Endpoints } from "@octokit/types"; + +type listUserReposParameters = + Endpoints["GET /repos/{owner}/{repo}"]["parameters"]; +type listUserReposResponse = Endpoints["GET /repos/{owner}/{repo}"]["response"]; + +async function listRepos( + options: listUserReposParameters, +): listUserReposResponse["data"] { + // ... +} +``` + +### Get response types from endpoint methods + +```ts +import { + GetResponseTypeFromEndpointMethod, + GetResponseDataTypeFromEndpointMethod, +} from "@octokit/types"; +import { Octokit } from "@octokit/rest"; + +const octokit = new Octokit(); +type CreateLabelResponseType = GetResponseTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +type CreateLabelResponseDataType = GetResponseDataTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/.github/octokit/node_modules/@octokit/types/dist-types/AuthInterface.d.ts b/.github/octokit/node_modules/@octokit/types/dist-types/AuthInterface.d.ts new file mode 100644 index 000000000..9858dc4f1 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/dist-types/AuthInterface.d.ts @@ -0,0 +1,31 @@ +import type { EndpointOptions } from "./EndpointOptions.js"; +import type { OctokitResponse } from "./OctokitResponse.js"; +import type { RequestInterface } from "./RequestInterface.js"; +import type { RequestParameters } from "./RequestParameters.js"; +import type { Route } from "./Route.js"; +/** + * Interface to implement complex authentication strategies for Octokit. + * An object Implementing the AuthInterface can directly be passed as the + * `auth` option in the Octokit constructor. + * + * For the official implementations of the most common authentication + * strategies, see https://github.com/octokit/auth.js + */ +export interface AuthInterface { + (...args: AuthOptions): Promise; + hook: { + /** + * Sends a request using the passed `request` instance + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (request: RequestInterface, options: EndpointOptions): Promise>; + /** + * Sends a request using the passed `request` instance + * + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (request: RequestInterface, route: Route, parameters?: RequestParameters): Promise>; + }; +} diff --git a/.github/octokit/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts b/.github/octokit/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts new file mode 100644 index 000000000..998b43b81 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts @@ -0,0 +1,21 @@ +import type { RequestHeaders } from "./RequestHeaders.js"; +import type { RequestMethod } from "./RequestMethod.js"; +import type { RequestParameters } from "./RequestParameters.js"; +import type { Url } from "./Url.js"; +/** + * The `.endpoint()` method is guaranteed to set all keys defined by RequestParameters + * as well as the method property. + */ +export type EndpointDefaults = RequestParameters & { + baseUrl: Url; + method: RequestMethod; + url?: Url; + headers: RequestHeaders & { + accept: string; + "user-agent": string; + }; + mediaType: { + format: string; + previews?: string[]; + }; +}; diff --git a/.github/octokit/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts b/.github/octokit/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts new file mode 100644 index 000000000..02bc6e4b9 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts @@ -0,0 +1,65 @@ +import type { EndpointDefaults } from "./EndpointDefaults.js"; +import type { RequestOptions } from "./RequestOptions.js"; +import type { RequestParameters } from "./RequestParameters.js"; +import type { Route } from "./Route.js"; +import type { Endpoints } from "./generated/Endpoints.js"; +export interface EndpointInterface { + /** + * Transforms a GitHub REST API endpoint into generic request options + * + * @param {object} endpoint Must set `url` unless it's set defaults. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): RequestOptions & Pick; + /** + * Transforms a GitHub REST API endpoint into generic request options + * + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (route: keyof Endpoints | R, parameters?: P): (R extends keyof Endpoints ? Endpoints[R]["request"] : RequestOptions) & Pick; + /** + * Object with current default route and parameters + */ + DEFAULTS: D & EndpointDefaults; + /** + * Returns a new `endpoint` interface with new defaults + */ + defaults: (newDefaults: O) => EndpointInterface; + merge: { + /** + * Merges current endpoint defaults with passed route and parameters, + * without transforming them into request options. + * + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + * + */ + (route: keyof Endpoints | R, parameters?: P): D & (R extends keyof Endpoints ? Endpoints[R]["request"] & Endpoints[R]["parameters"] : EndpointDefaults) & P; + /** + * Merges current endpoint defaults with passed route and parameters, + * without transforming them into request options. + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ +

(options: P): EndpointDefaults & D & P; + /** + * Returns current default options. + * + * @deprecated use endpoint.DEFAULTS instead + */ + (): D & EndpointDefaults; + }; + /** + * Stateless method to turn endpoint options into request options. + * Calling `endpoint(options)` is the same as calling `endpoint.parse(endpoint.merge(options))`. + * + * @param {object} options `method`, `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + parse: (options: O) => RequestOptions & Pick; +} diff --git a/.github/octokit/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts b/.github/octokit/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts new file mode 100644 index 000000000..6cb08033e --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts @@ -0,0 +1,7 @@ +import type { RequestMethod } from "./RequestMethod.js"; +import type { Url } from "./Url.js"; +import type { RequestParameters } from "./RequestParameters.js"; +export type EndpointOptions = RequestParameters & { + method: RequestMethod; + url: Url; +}; diff --git a/.github/octokit/node_modules/@octokit/types/dist-types/Fetch.d.ts b/.github/octokit/node_modules/@octokit/types/dist-types/Fetch.d.ts new file mode 100644 index 000000000..983c79be1 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/dist-types/Fetch.d.ts @@ -0,0 +1,4 @@ +/** + * Browser's fetch method (or compatible such as fetch-mock) + */ +export type Fetch = any; diff --git a/.github/octokit/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts b/.github/octokit/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts new file mode 100644 index 000000000..2daaf34db --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts @@ -0,0 +1,5 @@ +type Unwrap = T extends Promise ? U : T; +type AnyFunction = (...args: any[]) => any; +export type GetResponseTypeFromEndpointMethod = Unwrap>; +export type GetResponseDataTypeFromEndpointMethod = Unwrap>["data"]; +export {}; diff --git a/.github/octokit/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts b/.github/octokit/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts new file mode 100644 index 000000000..47a179793 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts @@ -0,0 +1,17 @@ +import type { ResponseHeaders } from "./ResponseHeaders.js"; +import type { Url } from "./Url.js"; +export interface OctokitResponse { + headers: ResponseHeaders; + /** + * http response code + */ + status: S; + /** + * URL of response after all redirects + */ + url: Url; + /** + * Response data as documented in the REST API reference documentation at https://docs.github.com/rest/reference + */ + data: T; +} diff --git a/.github/octokit/node_modules/@octokit/types/dist-types/RequestError.d.ts b/.github/octokit/node_modules/@octokit/types/dist-types/RequestError.d.ts new file mode 100644 index 000000000..46083923d --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/dist-types/RequestError.d.ts @@ -0,0 +1,11 @@ +export type RequestError = { + name: string; + status: number; + documentation_url: string; + errors?: Array<{ + resource: string; + code: string; + field: string; + message?: string; + }>; +}; diff --git a/.github/octokit/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts b/.github/octokit/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts new file mode 100644 index 000000000..423115948 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts @@ -0,0 +1,15 @@ +export type RequestHeaders = { + /** + * Avoid setting `headers.accept`, use `mediaType.{format|previews}` option instead. + */ + accept?: string; + /** + * Use `authorization` to send authenticated request, remember `token ` / `bearer ` prefixes. Example: `token 1234567890abcdef1234567890abcdef12345678` + */ + authorization?: string; + /** + * `user-agent` is set do a default and can be overwritten as needed. + */ + "user-agent"?: string; + [header: string]: string | number | undefined; +}; diff --git a/.github/octokit/node_modules/@octokit/types/dist-types/RequestInterface.d.ts b/.github/octokit/node_modules/@octokit/types/dist-types/RequestInterface.d.ts new file mode 100644 index 000000000..41a884e59 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/dist-types/RequestInterface.d.ts @@ -0,0 +1,34 @@ +import type { EndpointInterface } from "./EndpointInterface.js"; +import type { OctokitResponse } from "./OctokitResponse.js"; +import type { RequestParameters } from "./RequestParameters.js"; +import type { Route } from "./Route.js"; +import type { Endpoints } from "./generated/Endpoints.js"; +export interface RequestInterface { + /** + * Sends a request based on endpoint options + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): Promise>; + /** + * Sends a request based on endpoint options + * + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (route: keyof Endpoints | R, options?: R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters): R extends keyof Endpoints ? Promise : Promise>; + /** + * Returns a new `request` with updated route and parameters + */ + defaults: (newDefaults: O) => RequestInterface; + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: EndpointInterface; +} diff --git a/.github/octokit/node_modules/@octokit/types/dist-types/RequestMethod.d.ts b/.github/octokit/node_modules/@octokit/types/dist-types/RequestMethod.d.ts new file mode 100644 index 000000000..4cdfe61c8 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/dist-types/RequestMethod.d.ts @@ -0,0 +1,4 @@ +/** + * HTTP Verb supported by GitHub's REST API + */ +export type RequestMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; diff --git a/.github/octokit/node_modules/@octokit/types/dist-types/RequestOptions.d.ts b/.github/octokit/node_modules/@octokit/types/dist-types/RequestOptions.d.ts new file mode 100644 index 000000000..b4efafb6b --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/dist-types/RequestOptions.d.ts @@ -0,0 +1,14 @@ +import type { RequestHeaders } from "./RequestHeaders.js"; +import type { RequestMethod } from "./RequestMethod.js"; +import type { RequestRequestOptions } from "./RequestRequestOptions.js"; +import type { Url } from "./Url.js"; +/** + * Generic request options as they are returned by the `endpoint()` method + */ +export type RequestOptions = { + method: RequestMethod; + url: Url; + headers: RequestHeaders; + body?: any; + request?: RequestRequestOptions; +}; diff --git a/.github/octokit/node_modules/@octokit/types/dist-types/RequestParameters.d.ts b/.github/octokit/node_modules/@octokit/types/dist-types/RequestParameters.d.ts new file mode 100644 index 000000000..e3ef2ccc1 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/dist-types/RequestParameters.d.ts @@ -0,0 +1,45 @@ +import type { RequestRequestOptions } from "./RequestRequestOptions.js"; +import type { RequestHeaders } from "./RequestHeaders.js"; +import type { Url } from "./Url.js"; +/** + * Parameters that can be passed into `request(route, parameters)` or `endpoint(route, parameters)` methods + */ +export type RequestParameters = { + /** + * Base URL to be used when a relative URL is passed, such as `/orgs/{org}`. + * If `baseUrl` is `https://enterprise.acme-inc.com/api/v3`, then the request + * will be sent to `https://enterprise.acme-inc.com/api/v3/orgs/{org}`. + */ + baseUrl?: Url; + /** + * HTTP headers. Use lowercase keys. + */ + headers?: RequestHeaders; + /** + * Media type options, see {@link https://developer.github.com/v3/media/|GitHub Developer Guide} + */ + mediaType?: { + /** + * `json` by default. Can be `raw`, `text`, `html`, `full`, `diff`, `patch`, `sha`, `base64`. Depending on endpoint + */ + format?: string; + /** + * Custom media type names of {@link https://docs.github.com/en/graphql/overview/schema-previews|GraphQL API Previews} without the `-preview` suffix. + * Example for single preview: `['squirrel-girl']`. + * Example for multiple previews: `['squirrel-girl', 'mister-fantastic']`. + */ + previews?: string[]; + }; + /** + * Pass custom meta information for the request. The `request` object will be returned as is. + */ + request?: RequestRequestOptions; + /** + * Any additional parameter will be passed as follows + * 1. URL parameter if `':parameter'` or `{parameter}` is part of `url` + * 2. Query parameter if `method` is `'GET'` or `'HEAD'` + * 3. Request body if `parameter` is `'data'` + * 4. JSON in the request body in the form of `body[parameter]` unless `parameter` key is `'data'` + */ + [parameter: string]: unknown; +}; diff --git a/.github/octokit/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts b/.github/octokit/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts new file mode 100644 index 000000000..e55136bbd --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts @@ -0,0 +1,21 @@ +/// +import type { Fetch } from "./Fetch.js"; +/** + * Octokit-specific request options which are ignored for the actual request, but can be used by Octokit or plugins to manipulate how the request is sent or how a response is handled + */ +export type RequestRequestOptions = { + /** + * Custom replacement for built-in fetch method. Useful for testing or request hooks. + */ + fetch?: Fetch; + /** + * Use an `AbortController` instance to cancel a request. In node you can only cancel streamed requests. + */ + signal?: AbortSignal; + /** + * If set to `false`, the response body will not be parsed and will be returned as a stream. + */ + parseSuccessResponseBody?: boolean; + redirect?: "follow" | "error" | "manual"; + [option: string]: any; +}; diff --git a/.github/octokit/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts b/.github/octokit/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts new file mode 100644 index 000000000..7b5bf53b2 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts @@ -0,0 +1,21 @@ +export type ResponseHeaders = { + "cache-control"?: string; + "content-length"?: number; + "content-type"?: string; + date?: string; + etag?: string; + "last-modified"?: string; + link?: string; + location?: string; + server?: string; + status?: string; + vary?: string; + "x-accepted-github-permissions"?: string; + "x-github-mediatype"?: string; + "x-github-request-id"?: string; + "x-oauth-scopes"?: string; + "x-ratelimit-limit"?: string; + "x-ratelimit-remaining"?: string; + "x-ratelimit-reset"?: string; + [header: string]: string | number | undefined; +}; diff --git a/.github/octokit/node_modules/@octokit/types/dist-types/Route.d.ts b/.github/octokit/node_modules/@octokit/types/dist-types/Route.d.ts new file mode 100644 index 000000000..808991ebf --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/dist-types/Route.d.ts @@ -0,0 +1,4 @@ +/** + * String consisting of an optional HTTP method and relative path or absolute URL. Examples: `'/orgs/{org}'`, `'PUT /orgs/{org}'`, `GET https://example.com/foo/bar` + */ +export type Route = string; diff --git a/.github/octokit/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts b/.github/octokit/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts new file mode 100644 index 000000000..158e8663c --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts @@ -0,0 +1,4 @@ +import type { AuthInterface } from "./AuthInterface.js"; +export interface StrategyInterface { + (...args: StrategyOptions): AuthInterface; +} diff --git a/.github/octokit/node_modules/@octokit/types/dist-types/Url.d.ts b/.github/octokit/node_modules/@octokit/types/dist-types/Url.d.ts new file mode 100644 index 000000000..521f5ad9b --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/dist-types/Url.d.ts @@ -0,0 +1,4 @@ +/** + * Relative or absolute URL. Examples: `'/orgs/{org}'`, `https://example.com/foo/bar` + */ +export type Url = string; diff --git a/.github/octokit/node_modules/@octokit/types/dist-types/VERSION.d.ts b/.github/octokit/node_modules/@octokit/types/dist-types/VERSION.d.ts new file mode 100644 index 000000000..858791442 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/dist-types/VERSION.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "13.6.1"; diff --git a/.github/octokit/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts b/.github/octokit/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts new file mode 100644 index 000000000..837e68ae0 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts @@ -0,0 +1,3813 @@ +import type { paths } from "@octokit/openapi-types"; +import type { OctokitResponse } from "../OctokitResponse.js"; +import type { RequestHeaders } from "../RequestHeaders.js"; +import type { RequestRequestOptions } from "../RequestRequestOptions.js"; +/** + * @license (MIT OR CC0-1.0) + * @source https://github.com/sindresorhus/type-fest/blob/570e27f8fdaee37ef5d5e0fbf241e0212ff8fc1a/source/simplify.d.ts + */ +export type Simplify = { + [KeyType in keyof T]: T[KeyType]; +} & {}; +type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; +type ExtractParameters = "parameters" extends keyof T ? UnionToIntersection<{ + [K in keyof T["parameters"]]-?: T["parameters"][K]; +}[keyof T["parameters"]]> : {}; +type ExtractRequestBody = "requestBody" extends keyof T ? "content" extends keyof T["requestBody"] ? "application/json" extends keyof T["requestBody"]["content"] ? T["requestBody"]["content"]["application/json"] : { + data: { + [K in keyof T["requestBody"]["content"]]: T["requestBody"]["content"][K]; + }[keyof T["requestBody"]["content"]]; +} : "application/json" extends keyof T["requestBody"] ? T["requestBody"]["application/json"] : { + data: { + [K in keyof T["requestBody"]]: T["requestBody"][K]; + }[keyof T["requestBody"]]; +} : {}; +type ToOctokitParameters = ExtractParameters & ExtractRequestBody>; +type Operation = { + parameters: Simplify>; + request: Method extends ReadOnlyMethods ? { + method: Method extends string ? Uppercase : never; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; + } : { + method: Method extends string ? Uppercase : never; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; + data: ExtractRequestBody; + }; + response: ExtractOctokitResponse; +}; +type ReadOnlyMethods = "get" | "head"; +type SuccessStatuses = 200 | 201 | 202 | 204 | 205; +type RedirectStatuses = 301 | 302; +type EmptyResponseStatuses = 201 | 204 | 205; +type KnownJsonResponseTypes = "application/json" | "application/octocat-stream" | "application/scim+json" | "text/html" | "text/plain"; +type SuccessResponseDataType = { + [K in SuccessStatuses & keyof Responses]: GetContentKeyIfPresent extends never ? never : OctokitResponse, K>; +}[SuccessStatuses & keyof Responses]; +type RedirectResponseDataType = { + [K in RedirectStatuses & keyof Responses]: OctokitResponse; +}[RedirectStatuses & keyof Responses]; +type EmptyResponseDataType = { + [K in EmptyResponseStatuses & keyof Responses]: OctokitResponse; +}[EmptyResponseStatuses & keyof Responses]; +type GetContentKeyIfPresent = "content" extends keyof T ? DataType : DataType; +type DataType = { + [K in KnownJsonResponseTypes & keyof T]: T[K]; +}[KnownJsonResponseTypes & keyof T]; +type ExtractOctokitResponse = "responses" extends keyof R ? SuccessResponseDataType extends never ? RedirectResponseDataType extends never ? EmptyResponseDataType : RedirectResponseDataType : SuccessResponseDataType : unknown; +export interface Endpoints { + /** + * @see https://docs.github.com/rest/apps/apps#delete-an-installation-for-the-authenticated-app + */ + "DELETE /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "delete">; + /** + * @see https://docs.github.com/rest/apps/apps#unsuspend-an-app-installation + */ + "DELETE /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "delete">; + /** + * @see https://docs.github.com/rest/apps/oauth-applications#delete-an-app-authorization + */ + "DELETE /applications/{client_id}/grant": Operation<"/applications/{client_id}/grant", "delete">; + /** + * @see https://docs.github.com/rest/apps/oauth-applications#delete-an-app-token + */ + "DELETE /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "delete">; + /** + * @see https://docs.github.com/rest/gists/gists#delete-a-gist + */ + "DELETE /gists/{gist_id}": Operation<"/gists/{gist_id}", "delete">; + /** + * @see https://docs.github.com/rest/gists/comments#delete-a-gist-comment + */ + "DELETE /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/gists/gists#unstar-a-gist + */ + "DELETE /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "delete">; + /** + * @see https://docs.github.com/rest/apps/installations#revoke-an-installation-access-token + */ + "DELETE /installation/token": Operation<"/installation/token", "delete">; + /** + * @see https://docs.github.com/rest/activity/notifications#mark-a-thread-as-done + */ + "DELETE /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "delete">; + /** + * @see https://docs.github.com/rest/activity/notifications#delete-a-thread-subscription + */ + "DELETE /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/orgs/orgs#delete-an-organization + */ + "DELETE /orgs/{org}": Operation<"/orgs/{org}", "delete">; + /** + * @see https://docs.github.com/rest/actions/permissions#disable-a-selected-repository-for-github-actions-in-an-organization + */ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#delete-a-self-hosted-runner-from-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/secrets#delete-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/secrets#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#remove-selected-repository-from-an-organization-variable + */ + "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/orgs/blocking#unblock-a-user-from-an-organization + */ + "DELETE /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/codespaces/organizations#remove-users-from-codespaces-access-for-an-organization + */ + "DELETE /orgs/{org}/codespaces/access/selected_users": Operation<"/orgs/{org}/codespaces/access/selected_users", "delete">; + /** + * @see https://docs.github.com/rest/codespaces/organization-secrets#delete-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/codespaces/organization-secrets#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/copilot/copilot-user-management#remove-teams-from-the-copilot-subscription-for-an-organization + */ + "DELETE /orgs/{org}/copilot/billing/selected_teams": Operation<"/orgs/{org}/copilot/billing/selected_teams", "delete">; + /** + * @see https://docs.github.com/rest/copilot/copilot-user-management#remove-users-from-the-copilot-subscription-for-an-organization + */ + "DELETE /orgs/{org}/copilot/billing/selected_users": Operation<"/orgs/{org}/copilot/billing/selected_users", "delete">; + /** + * @see https://docs.github.com/rest/dependabot/secrets#delete-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/dependabot/secrets#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/orgs/webhooks#delete-an-organization-webhook + */ + "DELETE /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/interactions/orgs#remove-interaction-restrictions-for-an-organization + */ + "DELETE /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/orgs/members#cancel-an-organization-invitation + */ + "DELETE /orgs/{org}/invitations/{invitation_id}": Operation<"/orgs/{org}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/orgs/members#remove-an-organization-member + */ + "DELETE /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/codespaces/organizations#delete-a-codespace-from-the-organization + */ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/orgs/members#remove-organization-membership-for-a-user + */ + "DELETE /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/migrations/orgs#delete-an-organization-migration-archive + */ + "DELETE /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/migrations/orgs#unlock-an-organization-repository + */ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/orgs/organization-roles#remove-all-organization-roles-for-a-team + */ + "DELETE /orgs/{org}/organization-roles/teams/{team_slug}": Operation<"/orgs/{org}/organization-roles/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/orgs/organization-roles#remove-an-organization-role-from-a-team + */ + "DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}": Operation<"/orgs/{org}/organization-roles/teams/{team_slug}/{role_id}", "delete">; + /** + * @see https://docs.github.com/rest/orgs/organization-roles#remove-all-organization-roles-for-a-user + */ + "DELETE /orgs/{org}/organization-roles/users/{username}": Operation<"/orgs/{org}/organization-roles/users/{username}", "delete">; + /** + * @see https://docs.github.com/rest/orgs/organization-roles#remove-an-organization-role-from-a-user + */ + "DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}": Operation<"/orgs/{org}/organization-roles/users/{username}/{role_id}", "delete">; + /** + * @see https://docs.github.com/rest/orgs/organization-roles#delete-a-custom-organization-role + */ + "DELETE /orgs/{org}/organization-roles/{role_id}": Operation<"/orgs/{org}/organization-roles/{role_id}", "delete">; + /** + * @see https://docs.github.com/rest/orgs/outside-collaborators#remove-outside-collaborator-from-an-organization + */ + "DELETE /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/packages/packages#delete-a-package-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/packages/packages#delete-package-version-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/orgs/custom-properties#remove-a-custom-property-for-an-organization + */ + "DELETE /orgs/{org}/properties/schema/{custom_property_name}": Operation<"/orgs/{org}/properties/schema/{custom_property_name}", "delete">; + /** + * @see https://docs.github.com/rest/orgs/members#remove-public-organization-membership-for-the-authenticated-user + */ + "DELETE /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/orgs/rules#delete-an-organization-repository-ruleset + */ + "DELETE /orgs/{org}/rulesets/{ruleset_id}": Operation<"/orgs/{org}/rulesets/{ruleset_id}", "delete">; + /** + * @see https://docs.github.com/rest/orgs/security-managers#remove-a-security-manager-team + */ + "DELETE /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/teams/teams#delete-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/teams/discussions#delete-a-discussion + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/teams/discussion-comments#delete-a-discussion-comment + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reactions/reactions#delete-team-discussion-comment-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reactions/reactions#delete-team-discussion-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user + */ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/projects/cards#delete-a-project-card + */ + "DELETE /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "delete">; + /** + * @see https://docs.github.com/rest/projects/columns#delete-a-project-column + */ + "DELETE /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "delete">; + /** + * @see https://docs.github.com/rest/projects/projects#delete-a-project + */ + "DELETE /projects/{project_id}": Operation<"/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/projects/collaborators#remove-user-as-a-collaborator + */ + "DELETE /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/repos/repos#delete-a-repository + */ + "DELETE /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/actions/artifacts#delete-an-artifact + */ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id + */ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}": Operation<"/repos/{owner}/{repo}/actions/caches/{cache_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key + */ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}": Operation<"/repos/{owner}/{repo}/actions/caches", "delete">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#delete-a-self-hosted-runner-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/workflow-runs#delete-a-workflow-run + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/workflow-runs#delete-workflow-run-logs + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "delete">; + /** + * @see https://docs.github.com/rest/actions/secrets#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-a-repository-variable + */ + "DELETE /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/repos/autolinks#delete-an-autolink-reference-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "delete">; + /** + * @see https://docs.github.com/rest/repos/repos#disable-automated-security-fixes + */ + "DELETE /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-admin-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-pull-request-review-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-commit-signature-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-status-check-contexts + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#delete-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-app-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-team-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "delete">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#remove-user-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "delete">; + /** + * @see https://docs.github.com/rest/code-scanning/code-scanning#delete-a-code-scanning-analysis-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "delete">; + /** + * @see https://docs.github.com/rest/codespaces/repository-secrets#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#remove-a-repository-collaborator + */ + "DELETE /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/commits/comments#delete-a-commit-comment + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reactions/reactions#delete-a-commit-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/repos/contents#delete-a-file + */ + "DELETE /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "delete">; + /** + * @see https://docs.github.com/rest/dependabot/secrets#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/deployments#delete-a-deployment + */ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/environments#delete-an-environment + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#delete-a-deployment-branch-policy + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "delete">; + /** + * @see https://docs.github.com/rest/deployments/protection-rules#disable-a-custom-protection-rule-for-an-environment + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/secrets#delete-an-environment-secret + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/actions/variables#delete-an-environment-variable + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/variables/{name}", "delete">; + /** + * @see https://docs.github.com/rest/git/refs#delete-a-reference + */ + "DELETE /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "delete">; + /** + * @see https://docs.github.com/rest/repos/webhooks#delete-a-repository-webhook + */ + "DELETE /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/migrations/source-imports#cancel-an-import + */ + "DELETE /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "delete">; + /** + * @see https://docs.github.com/rest/interactions/repos#remove-interaction-restrictions-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#delete-a-repository-invitation + */ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/issues/comments#delete-an-issue-comment + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reactions/reactions#delete-an-issue-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-assignees-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "delete">; + /** + * @see https://docs.github.com/rest/issues/labels#remove-all-labels-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "delete">; + /** + * @see https://docs.github.com/rest/issues/labels#remove-a-label-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/issues/issues#unlock-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reactions/reactions#delete-an-issue-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/deploy-keys/deploy-keys#delete-a-deploy-key + */ + "DELETE /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/issues/labels#delete-a-label + */ + "DELETE /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/issues/milestones#delete-a-milestone + */ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "delete">; + /** + * @see https://docs.github.com/rest/pages/pages#delete-a-apiname-pages-site + */ + "DELETE /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "delete">; + /** + * @see https://docs.github.com/rest/repos/repos#disable-private-vulnerability-reporting-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/private-vulnerability-reporting": Operation<"/repos/{owner}/{repo}/private-vulnerability-reporting", "delete">; + /** + * @see https://docs.github.com/rest/pulls/comments#delete-a-review-comment-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reactions/reactions#delete-a-pull-request-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/pulls/review-requests#remove-requested-reviewers-from-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "delete">; + /** + * @see https://docs.github.com/rest/pulls/reviews#delete-a-pending-review-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "delete">; + /** + * @see https://docs.github.com/rest/releases/assets#delete-a-release-asset + */ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "delete">; + /** + * @see https://docs.github.com/rest/releases/releases#delete-a-release + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "delete">; + /** + * @see https://docs.github.com/rest/reactions/reactions#delete-a-release-reaction + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset + */ + "DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}": Operation<"/repos/{owner}/{repo}/rulesets/{ruleset_id}", "delete">; + /** + * @see https://docs.github.com/rest/activity/watching#delete-a-repository-subscription + */ + "DELETE /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/repos/tags#delete-a-tag-protection-state-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}": Operation<"/repos/{owner}/{repo}/tags/protection/{tag_protection_id}", "delete">; + /** + * @see https://docs.github.com/rest/repos/repos#disable-vulnerability-alerts + */ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "delete">; + /** + * @see https://docs.github.com/rest/teams/teams#delete-a-team-legacy + */ + "DELETE /teams/{team_id}": Operation<"/teams/{team_id}", "delete">; + /** + * @see https://docs.github.com/rest/teams/discussions#delete-a-discussion-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/teams/discussion-comments#delete-a-discussion-comment-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/teams/members#remove-team-member-legacy + */ + "DELETE /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/teams/members#remove-team-membership-for-a-user-legacy + */ + "DELETE /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team-legacy + */ + "DELETE /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/teams/teams#remove-a-repository-from-a-team-legacy + */ + "DELETE /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/users/blocking#unblock-a-user + */ + "DELETE /user/blocks/{username}": Operation<"/user/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/codespaces/secrets#delete-a-secret-for-the-authenticated-user + */ + "DELETE /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/codespaces/secrets#remove-a-selected-repository-from-a-user-secret + */ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#delete-a-codespace-for-the-authenticated-user + */ + "DELETE /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/users/emails#delete-an-email-address-for-the-authenticated-user + */ + "DELETE /user/emails": Operation<"/user/emails", "delete">; + /** + * @see https://docs.github.com/rest/users/followers#unfollow-a-user + */ + "DELETE /user/following/{username}": Operation<"/user/following/{username}", "delete">; + /** + * @see https://docs.github.com/rest/users/gpg-keys#delete-a-gpg-key-for-the-authenticated-user + */ + "DELETE /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/apps/installations#remove-a-repository-from-an-app-installation + */ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/interactions/user#remove-interaction-restrictions-from-your-public-repositories + */ + "DELETE /user/interaction-limits": Operation<"/user/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/users/keys#delete-a-public-ssh-key-for-the-authenticated-user + */ + "DELETE /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/migrations/users#delete-a-user-migration-archive + */ + "DELETE /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/migrations/users#unlock-a-user-repository + */ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/user/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/packages/packages#delete-a-package-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/packages/packages#delete-a-package-version-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#decline-a-repository-invitation + */ + "DELETE /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/users/social-accounts#delete-social-accounts-for-the-authenticated-user + */ + "DELETE /user/social_accounts": Operation<"/user/social_accounts", "delete">; + /** + * @see https://docs.github.com/rest/users/ssh-signing-keys#delete-an-ssh-signing-key-for-the-authenticated-user + */ + "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/activity/starring#unstar-a-repository-for-the-authenticated-user + */ + "DELETE /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/packages/packages#delete-a-package-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/packages/packages#delete-package-version-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/meta/meta#github-api-root + */ + "GET /": Operation<"/", "get">; + /** + * @see https://docs.github.com/rest/security-advisories/global-advisories#list-global-security-advisories + */ + "GET /advisories": Operation<"/advisories", "get">; + /** + * @see https://docs.github.com/rest/security-advisories/global-advisories#get-a-global-security-advisory + */ + "GET /advisories/{ghsa_id}": Operation<"/advisories/{ghsa_id}", "get">; + /** + * @see https://docs.github.com/rest/apps/apps#get-the-authenticated-app + */ + "GET /app": Operation<"/app", "get">; + /** + * @see https://docs.github.com/rest/apps/webhooks#get-a-webhook-configuration-for-an-app + */ + "GET /app/hook/config": Operation<"/app/hook/config", "get">; + /** + * @see https://docs.github.com/rest/apps/webhooks#list-deliveries-for-an-app-webhook + */ + "GET /app/hook/deliveries": Operation<"/app/hook/deliveries", "get">; + /** + * @see https://docs.github.com/rest/apps/webhooks#get-a-delivery-for-an-app-webhook + */ + "GET /app/hook/deliveries/{delivery_id}": Operation<"/app/hook/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/apps/apps#list-installation-requests-for-the-authenticated-app + */ + "GET /app/installation-requests": Operation<"/app/installation-requests", "get">; + /** + * @see https://docs.github.com/enterprise-server@3.9/rest/apps/apps#list-installations-for-the-authenticated-app + */ + "GET /app/installations": Operation<"/app/installations", "get">; + /** + * @see https://docs.github.com/rest/apps/apps#get-an-installation-for-the-authenticated-app + */ + "GET /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "get">; + /** + * @see https://docs.github.com/rest/apps/apps#get-an-app + */ + "GET /apps/{app_slug}": Operation<"/apps/{app_slug}", "get">; + /** + * @see https://docs.github.com/rest/classroom/classroom#get-an-assignment + */ + "GET /assignments/{assignment_id}": Operation<"/assignments/{assignment_id}", "get">; + /** + * @see https://docs.github.com/rest/classroom/classroom#list-accepted-assignments-for-an-assignment + */ + "GET /assignments/{assignment_id}/accepted_assignments": Operation<"/assignments/{assignment_id}/accepted_assignments", "get">; + /** + * @see https://docs.github.com/rest/classroom/classroom#get-assignment-grades + */ + "GET /assignments/{assignment_id}/grades": Operation<"/assignments/{assignment_id}/grades", "get">; + /** + * @see https://docs.github.com/rest/classroom/classroom#list-classrooms + */ + "GET /classrooms": Operation<"/classrooms", "get">; + /** + * @see https://docs.github.com/rest/classroom/classroom#get-a-classroom + */ + "GET /classrooms/{classroom_id}": Operation<"/classrooms/{classroom_id}", "get">; + /** + * @see https://docs.github.com/rest/classroom/classroom#list-assignments-for-a-classroom + */ + "GET /classrooms/{classroom_id}/assignments": Operation<"/classrooms/{classroom_id}/assignments", "get">; + /** + * @see https://docs.github.com/rest/codes-of-conduct/codes-of-conduct#get-all-codes-of-conduct + */ + "GET /codes_of_conduct": Operation<"/codes_of_conduct", "get">; + /** + * @see https://docs.github.com/rest/codes-of-conduct/codes-of-conduct#get-a-code-of-conduct + */ + "GET /codes_of_conduct/{key}": Operation<"/codes_of_conduct/{key}", "get">; + /** + * @see https://docs.github.com/rest/emojis/emojis#get-emojis + */ + "GET /emojis": Operation<"/emojis", "get">; + /** + * @see https://docs.github.com/rest/copilot/copilot-usage#get-a-summary-of-copilot-usage-for-enterprise-members + */ + "GET /enterprises/{enterprise}/copilot/usage": Operation<"/enterprises/{enterprise}/copilot/usage", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/dependabot/alerts": Operation<"/enterprises/{enterprise}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/secret-scanning/alerts": Operation<"/enterprises/{enterprise}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/activity/events#list-public-events + */ + "GET /events": Operation<"/events", "get">; + /** + * @see https://docs.github.com/rest/activity/feeds#get-feeds + */ + "GET /feeds": Operation<"/feeds", "get">; + /** + * @see https://docs.github.com/rest/gists/gists#list-gists-for-the-authenticated-user + */ + "GET /gists": Operation<"/gists", "get">; + /** + * @see https://docs.github.com/rest/gists/gists#list-public-gists + */ + "GET /gists/public": Operation<"/gists/public", "get">; + /** + * @see https://docs.github.com/rest/gists/gists#list-starred-gists + */ + "GET /gists/starred": Operation<"/gists/starred", "get">; + /** + * @see https://docs.github.com/rest/gists/gists#get-a-gist + */ + "GET /gists/{gist_id}": Operation<"/gists/{gist_id}", "get">; + /** + * @see https://docs.github.com/rest/gists/comments#list-gist-comments + */ + "GET /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/gists/comments#get-a-gist-comment + */ + "GET /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/gists/gists#list-gist-commits + */ + "GET /gists/{gist_id}/commits": Operation<"/gists/{gist_id}/commits", "get">; + /** + * @see https://docs.github.com/rest/gists/gists#list-gist-forks + */ + "GET /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "get">; + /** + * @see https://docs.github.com/rest/gists/gists#check-if-a-gist-is-starred + */ + "GET /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "get">; + /** + * @see https://docs.github.com/rest/gists/gists#get-a-gist-revision + */ + "GET /gists/{gist_id}/{sha}": Operation<"/gists/{gist_id}/{sha}", "get">; + /** + * @see https://docs.github.com/rest/gitignore/gitignore#get-all-gitignore-templates + */ + "GET /gitignore/templates": Operation<"/gitignore/templates", "get">; + /** + * @see https://docs.github.com/rest/gitignore/gitignore#get-a-gitignore-template + */ + "GET /gitignore/templates/{name}": Operation<"/gitignore/templates/{name}", "get">; + /** + * @see https://docs.github.com/rest/apps/installations#list-repositories-accessible-to-the-app-installation + */ + "GET /installation/repositories": Operation<"/installation/repositories", "get">; + /** + * @see https://docs.github.com/rest/issues/issues#list-issues-assigned-to-the-authenticated-user + */ + "GET /issues": Operation<"/issues", "get">; + /** + * @see https://docs.github.com/rest/licenses/licenses#get-all-commonly-used-licenses + */ + "GET /licenses": Operation<"/licenses", "get">; + /** + * @see https://docs.github.com/rest/licenses/licenses#get-a-license + */ + "GET /licenses/{license}": Operation<"/licenses/{license}", "get">; + /** + * @see https://docs.github.com/rest/apps/marketplace#get-a-subscription-plan-for-an-account + */ + "GET /marketplace_listing/accounts/{account_id}": Operation<"/marketplace_listing/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/apps/marketplace#list-plans + */ + "GET /marketplace_listing/plans": Operation<"/marketplace_listing/plans", "get">; + /** + * @see https://docs.github.com/rest/apps/marketplace#list-accounts-for-a-plan + */ + "GET /marketplace_listing/plans/{plan_id}/accounts": Operation<"/marketplace_listing/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/apps/marketplace#get-a-subscription-plan-for-an-account-stubbed + */ + "GET /marketplace_listing/stubbed/accounts/{account_id}": Operation<"/marketplace_listing/stubbed/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/apps/marketplace#list-plans-stubbed + */ + "GET /marketplace_listing/stubbed/plans": Operation<"/marketplace_listing/stubbed/plans", "get">; + /** + * @see https://docs.github.com/rest/apps/marketplace#list-accounts-for-a-plan-stubbed + */ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts": Operation<"/marketplace_listing/stubbed/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/meta/meta#get-apiname-meta-information + */ + "GET /meta": Operation<"/meta", "get">; + /** + * @see https://docs.github.com/rest/activity/events#list-public-events-for-a-network-of-repositories + */ + "GET /networks/{owner}/{repo}/events": Operation<"/networks/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/activity/notifications#list-notifications-for-the-authenticated-user + */ + "GET /notifications": Operation<"/notifications", "get">; + /** + * @see https://docs.github.com/rest/activity/notifications#get-a-thread + */ + "GET /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "get">; + /** + * @see https://docs.github.com/rest/activity/notifications#get-a-thread-subscription-for-the-authenticated-user + */ + "GET /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "get">; + /** + * @see https://docs.github.com/rest/meta/meta#get-octocat + */ + "GET /octocat": Operation<"/octocat", "get">; + /** + * @see https://docs.github.com/rest/orgs/orgs#list-organizations + */ + "GET /organizations": Operation<"/organizations", "get">; + /** + * @see https://docs.github.com/rest/codespaces/organizations#list-codespaces-for-the-organization + * @deprecated "org_id" is now "org" + */ + "GET /orgs/{org_id}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/orgs/orgs#get-an-organization + */ + "GET /orgs/{org}": Operation<"/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/actions/cache#get-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage": Operation<"/orgs/{org}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/actions/cache#list-repositories-with-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage-by-repository": Operation<"/orgs/{org}/actions/cache/usage-by-repository", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "GET /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/actions/permissions#get-github-actions-permissions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/actions/permissions#list-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "GET /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "get">; + /** + * @see https://docs.github.com/rest/actions/permissions#get-allowed-actions-and-reusable-workflows-for-an-organization + */ + "GET /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/actions/permissions#get-default-workflow-permissions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#list-self-hosted-runners-for-an-organization + */ + "GET /orgs/{org}/actions/runners": Operation<"/orgs/{org}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#list-runner-applications-for-an-organization + */ + "GET /orgs/{org}/actions/runners/downloads": Operation<"/orgs/{org}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#get-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#list-labels-for-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/actions/secrets#list-organization-secrets + */ + "GET /orgs/{org}/actions/secrets": Operation<"/orgs/{org}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/actions/secrets#get-an-organization-public-key + */ + "GET /orgs/{org}/actions/secrets/public-key": Operation<"/orgs/{org}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/actions/secrets#get-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/secrets#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-organization-variables + */ + "GET /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-selected-repositories-for-an-organization-variable + */ + "GET /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/orgs/blocking#list-users-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks": Operation<"/orgs/{org}/blocks", "get">; + /** + * @see https://docs.github.com/rest/orgs/blocking#check-if-a-user-is-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/code-scanning/code-scanning#list-code-scanning-alerts-for-an-organization + */ + "GET /orgs/{org}/code-scanning/alerts": Operation<"/orgs/{org}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/codespaces/organizations#list-codespaces-for-the-organization + */ + "GET /orgs/{org}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/codespaces/organization-secrets#list-organization-secrets + */ + "GET /orgs/{org}/codespaces/secrets": Operation<"/orgs/{org}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/codespaces/organization-secrets#get-an-organization-public-key + */ + "GET /orgs/{org}/codespaces/secrets/public-key": Operation<"/orgs/{org}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/codespaces/organization-secrets#get-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/codespaces/organization-secrets#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/copilot/copilot-user-management#get-copilot-seat-information-and-settings-for-an-organization + */ + "GET /orgs/{org}/copilot/billing": Operation<"/orgs/{org}/copilot/billing", "get">; + /** + * @see https://docs.github.com/rest/copilot/copilot-user-management#list-all-copilot-seat-assignments-for-an-organization + */ + "GET /orgs/{org}/copilot/billing/seats": Operation<"/orgs/{org}/copilot/billing/seats", "get">; + /** + * @see https://docs.github.com/rest/copilot/copilot-usage#get-a-summary-of-copilot-usage-for-organization-members + */ + "GET /orgs/{org}/copilot/usage": Operation<"/orgs/{org}/copilot/usage", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-organization + */ + "GET /orgs/{org}/dependabot/alerts": Operation<"/orgs/{org}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/dependabot/secrets#list-organization-secrets + */ + "GET /orgs/{org}/dependabot/secrets": Operation<"/orgs/{org}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/dependabot/secrets#get-an-organization-public-key + */ + "GET /orgs/{org}/dependabot/secrets/public-key": Operation<"/orgs/{org}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/dependabot/secrets#get-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/dependabot/secrets#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/packages/packages#get-list-of-conflicting-packages-during-docker-migration-for-organization + */ + "GET /orgs/{org}/docker/conflicts": Operation<"/orgs/{org}/docker/conflicts", "get">; + /** + * @see https://docs.github.com/rest/activity/events#list-public-organization-events + */ + "GET /orgs/{org}/events": Operation<"/orgs/{org}/events", "get">; + /** + * @see https://docs.github.com/rest/orgs/members#list-failed-organization-invitations + */ + "GET /orgs/{org}/failed_invitations": Operation<"/orgs/{org}/failed_invitations", "get">; + /** + * @see https://docs.github.com/rest/orgs/webhooks#list-organization-webhooks + */ + "GET /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "get">; + /** + * @see https://docs.github.com/rest/orgs/webhooks#get-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/orgs/webhooks#get-a-webhook-configuration-for-an-organization + */ + "GET /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/orgs/webhooks#list-deliveries-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/orgs/webhooks#get-a-webhook-delivery-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/apps/apps#get-an-organization-installation-for-the-authenticated-app + */ + "GET /orgs/{org}/installation": Operation<"/orgs/{org}/installation", "get">; + /** + * @see https://docs.github.com/rest/orgs/orgs#list-app-installations-for-an-organization + */ + "GET /orgs/{org}/installations": Operation<"/orgs/{org}/installations", "get">; + /** + * @see https://docs.github.com/rest/interactions/orgs#get-interaction-restrictions-for-an-organization + */ + "GET /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/orgs/members#list-pending-organization-invitations + */ + "GET /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "get">; + /** + * @see https://docs.github.com/rest/orgs/members#list-organization-invitation-teams + */ + "GET /orgs/{org}/invitations/{invitation_id}/teams": Operation<"/orgs/{org}/invitations/{invitation_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/issues/issues#list-organization-issues-assigned-to-the-authenticated-user + */ + "GET /orgs/{org}/issues": Operation<"/orgs/{org}/issues", "get">; + /** + * @see https://docs.github.com/rest/orgs/members#list-organization-members + */ + "GET /orgs/{org}/members": Operation<"/orgs/{org}/members", "get">; + /** + * @see https://docs.github.com/rest/orgs/members#check-organization-membership-for-a-user + */ + "GET /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/codespaces/organizations#list-codespaces-for-a-user-in-organization + */ + "GET /orgs/{org}/members/{username}/codespaces": Operation<"/orgs/{org}/members/{username}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/copilot/copilot-user-management#get-copilot-seat-assignment-details-for-a-user + */ + "GET /orgs/{org}/members/{username}/copilot": Operation<"/orgs/{org}/members/{username}/copilot", "get">; + /** + * @see https://docs.github.com/rest/orgs/members#get-organization-membership-for-a-user + */ + "GET /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/migrations/orgs#list-organization-migrations + */ + "GET /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "get">; + /** + * @see https://docs.github.com/rest/migrations/orgs#get-an-organization-migration-status + */ + "GET /orgs/{org}/migrations/{migration_id}": Operation<"/orgs/{org}/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/migrations/orgs#download-an-organization-migration-archive + */ + "GET /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/migrations/orgs#list-repositories-in-an-organization-migration + */ + "GET /orgs/{org}/migrations/{migration_id}/repositories": Operation<"/orgs/{org}/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/orgs/organization-roles#list-organization-fine-grained-permissions-for-an-organization + */ + "GET /orgs/{org}/organization-fine-grained-permissions": Operation<"/orgs/{org}/organization-fine-grained-permissions", "get">; + /** + * @see https://docs.github.com/rest/orgs/organization-roles#get-all-organization-roles-for-an-organization + */ + "GET /orgs/{org}/organization-roles": Operation<"/orgs/{org}/organization-roles", "get">; + /** + * @see https://docs.github.com/rest/orgs/organization-roles#get-an-organization-role + */ + "GET /orgs/{org}/organization-roles/{role_id}": Operation<"/orgs/{org}/organization-roles/{role_id}", "get">; + /** + * @see https://docs.github.com/rest/orgs/organization-roles#list-teams-that-are-assigned-to-an-organization-role + */ + "GET /orgs/{org}/organization-roles/{role_id}/teams": Operation<"/orgs/{org}/organization-roles/{role_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/orgs/organization-roles#list-users-that-are-assigned-to-an-organization-role + */ + "GET /orgs/{org}/organization-roles/{role_id}/users": Operation<"/orgs/{org}/organization-roles/{role_id}/users", "get">; + /** + * @see https://docs.github.com/rest/orgs/outside-collaborators#list-outside-collaborators-for-an-organization + */ + "GET /orgs/{org}/outside_collaborators": Operation<"/orgs/{org}/outside_collaborators", "get">; + /** + * @see https://docs.github.com/rest/packages/packages#list-packages-for-an-organization + */ + "GET /orgs/{org}/packages": Operation<"/orgs/{org}/packages", "get">; + /** + * @see https://docs.github.com/rest/packages/packages#get-a-package-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages/packages#list-package-versions-for-a-package-owned-by-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/packages/packages#get-a-package-version-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/orgs/personal-access-tokens#list-requests-to-access-organization-resources-with-fine-grained-personal-access-tokens + */ + "GET /orgs/{org}/personal-access-token-requests": Operation<"/orgs/{org}/personal-access-token-requests", "get">; + /** + * @see https://docs.github.com/rest/orgs/personal-access-tokens#list-repositories-requested-to-be-accessed-by-a-fine-grained-personal-access-token + */ + "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories": Operation<"/orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/orgs/personal-access-tokens#list-fine-grained-personal-access-tokens-with-access-to-organization-resources + */ + "GET /orgs/{org}/personal-access-tokens": Operation<"/orgs/{org}/personal-access-tokens", "get">; + /** + * @see https://docs.github.com/rest/orgs/personal-access-tokens#list-repositories-a-fine-grained-personal-access-token-has-access-to + */ + "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories": Operation<"/orgs/{org}/personal-access-tokens/{pat_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/projects/projects#list-organization-projects + */ + "GET /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "get">; + /** + * @see https://docs.github.com/rest/orgs/custom-properties#get-all-custom-properties-for-an-organization + */ + "GET /orgs/{org}/properties/schema": Operation<"/orgs/{org}/properties/schema", "get">; + /** + * @see https://docs.github.com/rest/orgs/custom-properties#get-a-custom-property-for-an-organization + */ + "GET /orgs/{org}/properties/schema/{custom_property_name}": Operation<"/orgs/{org}/properties/schema/{custom_property_name}", "get">; + /** + * @see https://docs.github.com/rest/orgs/custom-properties#list-custom-property-values-for-organization-repositories + */ + "GET /orgs/{org}/properties/values": Operation<"/orgs/{org}/properties/values", "get">; + /** + * @see https://docs.github.com/rest/orgs/members#list-public-organization-members + */ + "GET /orgs/{org}/public_members": Operation<"/orgs/{org}/public_members", "get">; + /** + * @see https://docs.github.com/rest/orgs/members#check-public-organization-membership-for-a-user + */ + "GET /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "get">; + /** + * @see https://docs.github.com/rest/repos/repos#list-organization-repositories + */ + "GET /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "get">; + /** + * @see https://docs.github.com/rest/orgs/rules#get-all-organization-repository-rulesets + */ + "GET /orgs/{org}/rulesets": Operation<"/orgs/{org}/rulesets", "get">; + /** + * @see https://docs.github.com/rest/orgs/rule-suites#list-organization-rule-suites + */ + "GET /orgs/{org}/rulesets/rule-suites": Operation<"/orgs/{org}/rulesets/rule-suites", "get">; + /** + * @see https://docs.github.com/rest/orgs/rule-suites#get-an-organization-rule-suite + */ + "GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}": Operation<"/orgs/{org}/rulesets/rule-suites/{rule_suite_id}", "get">; + /** + * @see https://docs.github.com/rest/orgs/rules#get-an-organization-repository-ruleset + */ + "GET /orgs/{org}/rulesets/{ruleset_id}": Operation<"/orgs/{org}/rulesets/{ruleset_id}", "get">; + /** + * @see https://docs.github.com/rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-an-organization + */ + "GET /orgs/{org}/secret-scanning/alerts": Operation<"/orgs/{org}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/security-advisories/repository-advisories#list-repository-security-advisories-for-an-organization + */ + "GET /orgs/{org}/security-advisories": Operation<"/orgs/{org}/security-advisories", "get">; + /** + * @see https://docs.github.com/rest/orgs/security-managers#list-security-manager-teams + */ + "GET /orgs/{org}/security-managers": Operation<"/orgs/{org}/security-managers", "get">; + /** + * @see https://docs.github.com/rest/billing/billing#get-github-actions-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/actions": Operation<"/orgs/{org}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/billing/billing#get-github-packages-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/packages": Operation<"/orgs/{org}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/billing/billing#get-shared-storage-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/shared-storage": Operation<"/orgs/{org}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/copilot/copilot-usage#get-a-summary-of-copilot-usage-for-a-team + */ + "GET /orgs/{org}/team/{team_slug}/copilot/usage": Operation<"/orgs/{org}/team/{team_slug}/copilot/usage", "get">; + /** + * @see https://docs.github.com/rest/teams/teams#list-teams + */ + "GET /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "get">; + /** + * @see https://docs.github.com/rest/teams/teams#get-a-team-by-name + */ + "GET /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "get">; + /** + * @see https://docs.github.com/rest/teams/discussions#list-discussions + */ + "GET /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "get">; + /** + * @see https://docs.github.com/rest/teams/discussions#get-a-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/teams/members#list-pending-team-invitations + */ + "GET /orgs/{org}/teams/{team_slug}/invitations": Operation<"/orgs/{org}/teams/{team_slug}/invitations", "get">; + /** + * @see https://docs.github.com/rest/teams/members#list-team-members + */ + "GET /orgs/{org}/teams/{team_slug}/members": Operation<"/orgs/{org}/teams/{team_slug}/members", "get">; + /** + * @see https://docs.github.com/rest/teams/members#get-team-membership-for-a-user + */ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/teams/teams#list-team-projects + */ + "GET /orgs/{org}/teams/{team_slug}/projects": Operation<"/orgs/{org}/teams/{team_slug}/projects", "get">; + /** + * @see https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project + */ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/teams/teams#list-team-repositories + */ + "GET /orgs/{org}/teams/{team_slug}/repos": Operation<"/orgs/{org}/teams/{team_slug}/repos", "get">; + /** + * @see https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository + */ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/teams/teams#list-child-teams + */ + "GET /orgs/{org}/teams/{team_slug}/teams": Operation<"/orgs/{org}/teams/{team_slug}/teams", "get">; + /** + * @see https://docs.github.com/rest/projects/cards#get-a-project-card + */ + "GET /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "get">; + /** + * @see https://docs.github.com/rest/projects/columns#get-a-project-column + */ + "GET /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "get">; + /** + * @see https://docs.github.com/rest/projects/cards#list-project-cards + */ + "GET /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "get">; + /** + * @see https://docs.github.com/rest/projects/projects#get-a-project + */ + "GET /projects/{project_id}": Operation<"/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/projects/collaborators#list-project-collaborators + */ + "GET /projects/{project_id}/collaborators": Operation<"/projects/{project_id}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/projects/collaborators#get-project-permission-for-a-user + */ + "GET /projects/{project_id}/collaborators/{username}/permission": Operation<"/projects/{project_id}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/projects/columns#list-project-columns + */ + "GET /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "get">; + /** + * @see https://docs.github.com/rest/rate-limit/rate-limit#get-rate-limit-status-for-the-authenticated-user + */ + "GET /rate_limit": Operation<"/rate_limit", "get">; + /** + * @see https://docs.github.com/rest/repos/repos#get-a-repository + */ + "GET /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/actions/artifacts#list-artifacts-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/artifacts": Operation<"/repos/{owner}/{repo}/actions/artifacts", "get">; + /** + * @see https://docs.github.com/rest/actions/artifacts#get-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "get">; + /** + * @see https://docs.github.com/rest/actions/artifacts#download-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}", "get">; + /** + * @see https://docs.github.com/rest/actions/cache#get-github-actions-cache-usage-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/cache/usage": Operation<"/repos/{owner}/{repo}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/caches": Operation<"/repos/{owner}/{repo}/actions/caches", "get">; + /** + * @see https://docs.github.com/rest/actions/workflow-jobs#get-a-job-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}", "get">; + /** + * @see https://docs.github.com/rest/actions/workflow-jobs#download-job-logs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/actions/secrets#list-repository-organization-secrets + */ + "GET /repos/{owner}/{repo}/actions/organization-secrets": Operation<"/repos/{owner}/{repo}/actions/organization-secrets", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-repository-organization-variables + */ + "GET /repos/{owner}/{repo}/actions/organization-variables": Operation<"/repos/{owner}/{repo}/actions/organization-variables", "get">; + /** + * @see https://docs.github.com/rest/actions/permissions#get-github-actions-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/actions/permissions#get-the-level-of-access-for-workflows-outside-of-the-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "get">; + /** + * @see https://docs.github.com/rest/actions/permissions#get-allowed-actions-and-reusable-workflows-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/actions/permissions#get-default-workflow-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#list-self-hosted-runners-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners": Operation<"/repos/{owner}/{repo}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#list-runner-applications-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/downloads": Operation<"/repos/{owner}/{repo}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#get-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#list-labels-for-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/actions/workflow-runs#list-workflow-runs-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runs": Operation<"/repos/{owner}/{repo}/actions/runs", "get">; + /** + * @see https://docs.github.com/rest/actions/workflow-runs#get-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "get">; + /** + * @see https://docs.github.com/rest/actions/workflow-runs#get-the-review-history-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approvals", "get">; + /** + * @see https://docs.github.com/rest/actions/artifacts#list-workflow-run-artifacts + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "get">; + /** + * @see https://docs.github.com/rest/actions/workflow-runs#get-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}", "get">; + /** + * @see https://docs.github.com/rest/actions/workflow-jobs#list-jobs-for-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", "get">; + /** + * @see https://docs.github.com/rest/actions/workflow-runs#download-workflow-run-attempt-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs", "get">; + /** + * @see https://docs.github.com/rest/actions/workflow-jobs#list-jobs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "get">; + /** + * @see https://docs.github.com/rest/actions/workflow-runs#download-workflow-run-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/actions/workflow-runs#get-pending-deployments-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "get">; + /** + * @see https://docs.github.com/rest/actions/workflow-runs#get-workflow-run-usage + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/actions/secrets#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/actions/secrets": Operation<"/repos/{owner}/{repo}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/actions/secrets#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/actions/secrets/public-key": Operation<"/repos/{owner}/{repo}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/actions/secrets#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-repository-variables + */ + "GET /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-a-repository-variable + */ + "GET /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/actions/workflows#list-repository-workflows + */ + "GET /repos/{owner}/{repo}/actions/workflows": Operation<"/repos/{owner}/{repo}/actions/workflows", "get">; + /** + * @see https://docs.github.com/rest/actions/workflows#get-a-workflow + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/actions/workflow-runs#list-workflow-runs-for-a-workflow + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "get">; + /** + * @see https://docs.github.com/rest/actions/workflows#get-workflow-usage + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/repos/repos#list-repository-activities + */ + "GET /repos/{owner}/{repo}/activity": Operation<"/repos/{owner}/{repo}/activity", "get">; + /** + * @see https://docs.github.com/rest/issues/assignees#list-assignees + */ + "GET /repos/{owner}/{repo}/assignees": Operation<"/repos/{owner}/{repo}/assignees", "get">; + /** + * @see https://docs.github.com/rest/issues/assignees#check-if-a-user-can-be-assigned + */ + "GET /repos/{owner}/{repo}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/rest/repos/autolinks#get-all-autolinks-of-a-repository + */ + "GET /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "get">; + /** + * @see https://docs.github.com/rest/repos/autolinks#get-an-autolink-reference-of-a-repository + */ + "GET /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "get">; + /** + * @see https://docs.github.com/rest/repos/repos#check-if-automated-security-fixes-are-enabled-for-a-repository + */ + "GET /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#list-branches + */ + "GET /repos/{owner}/{repo}/branches": Operation<"/repos/{owner}/{repo}/branches", "get">; + /** + * @see https://docs.github.com/rest/branches/branches#get-a-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}": Operation<"/repos/{owner}/{repo}/branches/{branch}", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-admin-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-pull-request-review-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-commit-signature-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-status-checks-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-all-status-check-contexts + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-access-restrictions + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-apps-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-teams-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "get">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#get-users-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "get">; + /** + * @see https://docs.github.com/rest/checks/runs#get-a-check-run + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "get">; + /** + * @see https://docs.github.com/rest/checks/runs#list-check-run-annotations + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "get">; + /** + * @see https://docs.github.com/rest/checks/suites#get-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}", "get">; + /** + * @see https://docs.github.com/rest/checks/runs#list-check-runs-in-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts": Operation<"/repos/{owner}/{repo}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/code-scanning/code-scanning#get-a-code-scanning-alert + * @deprecated "alert_id" is now "alert_number" + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_id}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/code-scanning/code-scanning#get-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/code-scanning/code-scanning#list-instances-of-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", "get">; + /** + * @see https://docs.github.com/rest/code-scanning/code-scanning#list-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses": Operation<"/repos/{owner}/{repo}/code-scanning/analyses", "get">; + /** + * @see https://docs.github.com/rest/code-scanning/code-scanning#get-a-code-scanning-analysis-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "get">; + /** + * @see https://docs.github.com/rest/code-scanning/code-scanning#list-codeql-databases-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases", "get">; + /** + * @see https://docs.github.com/rest/code-scanning/code-scanning#get-a-codeql-database-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}", "get">; + /** + * @see https://docs.github.com/rest/code-scanning/code-scanning#get-a-code-scanning-default-setup-configuration + */ + "GET /repos/{owner}/{repo}/code-scanning/default-setup": Operation<"/repos/{owner}/{repo}/code-scanning/default-setup", "get">; + /** + * @see https://docs.github.com/rest/code-scanning/code-scanning#get-information-about-a-sarif-upload + */ + "GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}", "get">; + /** + * @see https://docs.github.com/rest/repos/repos#list-codeowners-errors + */ + "GET /repos/{owner}/{repo}/codeowners/errors": Operation<"/repos/{owner}/{repo}/codeowners/errors", "get">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#list-devcontainer-configurations-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces/devcontainers": Operation<"/repos/{owner}/{repo}/codespaces/devcontainers", "get">; + /** + * @see https://docs.github.com/rest/codespaces/machines#list-available-machine-types-for-a-repository + */ + "GET /repos/{owner}/{repo}/codespaces/machines": Operation<"/repos/{owner}/{repo}/codespaces/machines", "get">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#get-default-attributes-for-a-codespace + */ + "GET /repos/{owner}/{repo}/codespaces/new": Operation<"/repos/{owner}/{repo}/codespaces/new", "get">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#check-if-permissions-defined-by-a-devcontainer-have-been-accepted-by-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces/permissions_check": Operation<"/repos/{owner}/{repo}/codespaces/permissions_check", "get">; + /** + * @see https://docs.github.com/rest/codespaces/repository-secrets#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/codespaces/secrets": Operation<"/repos/{owner}/{repo}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/codespaces/repository-secrets#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key": Operation<"/repos/{owner}/{repo}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/codespaces/repository-secrets#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#list-repository-collaborators + */ + "GET /repos/{owner}/{repo}/collaborators": Operation<"/repos/{owner}/{repo}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#check-if-a-user-is-a-repository-collaborator + */ + "GET /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "get">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#get-repository-permissions-for-a-user + */ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission": Operation<"/repos/{owner}/{repo}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/comments": Operation<"/repos/{owner}/{repo}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#get-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-commits + */ + "GET /repos/{owner}/{repo}/commits": Operation<"/repos/{owner}/{repo}/commits", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-branches-for-head-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", "get">; + /** + * @see https://docs.github.com/rest/commits/comments#list-commit-comments + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#list-pull-requests-associated-with-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/pulls", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#get-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{ref}": Operation<"/repos/{owner}/{repo}/commits/{ref}", "get">; + /** + * @see https://docs.github.com/rest/checks/runs#list-check-runs-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/checks/suites#list-check-suites-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-suites", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#get-the-combined-status-for-a-specific-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/status": Operation<"/repos/{owner}/{repo}/commits/{ref}/status", "get">; + /** + * @see https://docs.github.com/rest/commits/statuses#list-commit-statuses-for-a-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses": Operation<"/repos/{owner}/{repo}/commits/{ref}/statuses", "get">; + /** + * @see https://docs.github.com/rest/metrics/community#get-community-profile-metrics + */ + "GET /repos/{owner}/{repo}/community/profile": Operation<"/repos/{owner}/{repo}/community/profile", "get">; + /** + * @see https://docs.github.com/rest/commits/commits#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{basehead}": Operation<"/repos/{owner}/{repo}/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{base}...{head}": Operation<"/repos/{owner}/{repo}/compare/{base}...{head}", "get">; + /** + * @see https://docs.github.com/rest/repos/contents#get-repository-content + */ + "GET /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "get">; + /** + * @see https://docs.github.com/rest/repos/repos#list-repository-contributors + */ + "GET /repos/{owner}/{repo}/contributors": Operation<"/repos/{owner}/{repo}/contributors", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/dependabot/alerts": Operation<"/repos/{owner}/{repo}/dependabot/alerts", "get">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#get-a-dependabot-alert + */ + "GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/dependabot/secrets#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/dependabot/secrets": Operation<"/repos/{owner}/{repo}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/dependabot/secrets#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key": Operation<"/repos/{owner}/{repo}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/dependabot/secrets#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/dependency-graph/dependency-review#get-a-diff-of-the-dependencies-between-commits + */ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}": Operation<"/repos/{owner}/{repo}/dependency-graph/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/dependency-graph/sboms#export-a-software-bill-of-materials-sbom-for-a-repository + */ + "GET /repos/{owner}/{repo}/dependency-graph/sbom": Operation<"/repos/{owner}/{repo}/dependency-graph/sbom", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#list-deployments + */ + "GET /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "get">; + /** + * @see https://docs.github.com/rest/deployments/deployments#get-a-deployment + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#list-deployment-statuses + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "get">; + /** + * @see https://docs.github.com/rest/deployments/statuses#get-a-deployment-status + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#list-environments + */ + "GET /repos/{owner}/{repo}/environments": Operation<"/repos/{owner}/{repo}/environments", "get">; + /** + * @see https://docs.github.com/rest/deployments/environments#get-an-environment + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#list-deployment-branch-policies + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "get">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#get-a-deployment-branch-policy + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "get">; + /** + * @see https://docs.github.com/rest/deployments/protection-rules#get-all-deployment-protection-rules-for-an-environment + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules", "get">; + /** + * @see https://docs.github.com/rest/deployments/protection-rules#list-custom-deployment-rule-integrations-available-for-an-environment + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps", "get">; + /** + * @see https://docs.github.com/rest/deployments/protection-rules#get-a-custom-deployment-protection-rule + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}", "get">; + /** + * @see https://docs.github.com/rest/actions/secrets#list-environment-secrets + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/secrets": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/secrets", "get">; + /** + * @see https://docs.github.com/rest/actions/secrets#get-an-environment-public-key + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/actions/secrets#get-an-environment-secret + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#list-environment-variables + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/variables": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/variables", "get">; + /** + * @see https://docs.github.com/rest/actions/variables#get-an-environment-variable + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/variables/{name}", "get">; + /** + * @see https://docs.github.com/rest/activity/events#list-repository-events + */ + "GET /repos/{owner}/{repo}/events": Operation<"/repos/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/repos/forks#list-forks + */ + "GET /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "get">; + /** + * @see https://docs.github.com/rest/git/blobs#get-a-blob + */ + "GET /repos/{owner}/{repo}/git/blobs/{file_sha}": Operation<"/repos/{owner}/{repo}/git/blobs/{file_sha}", "get">; + /** + * @see https://docs.github.com/rest/git/commits#get-a-commit-object + */ + "GET /repos/{owner}/{repo}/git/commits/{commit_sha}": Operation<"/repos/{owner}/{repo}/git/commits/{commit_sha}", "get">; + /** + * @see https://docs.github.com/rest/git/refs#list-matching-references + */ + "GET /repos/{owner}/{repo}/git/matching-refs/{ref}": Operation<"/repos/{owner}/{repo}/git/matching-refs/{ref}", "get">; + /** + * @see https://docs.github.com/rest/git/refs#get-a-reference + */ + "GET /repos/{owner}/{repo}/git/ref/{ref}": Operation<"/repos/{owner}/{repo}/git/ref/{ref}", "get">; + /** + * @see https://docs.github.com/rest/git/tags#get-a-tag + */ + "GET /repos/{owner}/{repo}/git/tags/{tag_sha}": Operation<"/repos/{owner}/{repo}/git/tags/{tag_sha}", "get">; + /** + * @see https://docs.github.com/rest/git/trees#get-a-tree + */ + "GET /repos/{owner}/{repo}/git/trees/{tree_sha}": Operation<"/repos/{owner}/{repo}/git/trees/{tree_sha}", "get">; + /** + * @see https://docs.github.com/rest/repos/webhooks#list-repository-webhooks + */ + "GET /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "get">; + /** + * @see https://docs.github.com/rest/repos/webhooks#get-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/repos/webhooks#get-a-webhook-configuration-for-a-repository + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/repos/webhooks#list-deliveries-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/repos/webhooks#get-a-delivery-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/migrations/source-imports#get-an-import-status + */ + "GET /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "get">; + /** + * @see https://docs.github.com/rest/migrations/source-imports#get-commit-authors + */ + "GET /repos/{owner}/{repo}/import/authors": Operation<"/repos/{owner}/{repo}/import/authors", "get">; + /** + * @see https://docs.github.com/rest/migrations/source-imports#get-large-files + */ + "GET /repos/{owner}/{repo}/import/large_files": Operation<"/repos/{owner}/{repo}/import/large_files", "get">; + /** + * @see https://docs.github.com/rest/apps/apps#get-a-repository-installation-for-the-authenticated-app + */ + "GET /repos/{owner}/{repo}/installation": Operation<"/repos/{owner}/{repo}/installation", "get">; + /** + * @see https://docs.github.com/rest/interactions/repos#get-interaction-restrictions-for-a-repository + */ + "GET /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations + */ + "GET /repos/{owner}/{repo}/invitations": Operation<"/repos/{owner}/{repo}/invitations", "get">; + /** + * @see https://docs.github.com/rest/issues/issues#list-repository-issues + */ + "GET /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "get">; + /** + * @see https://docs.github.com/rest/issues/comments#list-issue-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/comments": Operation<"/repos/{owner}/{repo}/issues/comments", "get">; + /** + * @see https://docs.github.com/rest/issues/comments#get-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reactions/reactions#list-reactions-for-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/issues/events#list-issue-events-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/events": Operation<"/repos/{owner}/{repo}/issues/events", "get">; + /** + * @see https://docs.github.com/rest/issues/events#get-an-issue-event + */ + "GET /repos/{owner}/{repo}/issues/events/{event_id}": Operation<"/repos/{owner}/{repo}/issues/events/{event_id}", "get">; + /** + * @see https://docs.github.com/rest/issues/issues#get-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "get">; + /** + * @see https://docs.github.com/rest/issues/assignees#check-if-a-user-can-be-assigned-to-a-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/rest/issues/comments#list-issue-comments + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/issues/events#list-issue-events + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/events": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/events", "get">; + /** + * @see https://docs.github.com/rest/issues/labels#list-labels-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reactions/reactions#list-reactions-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/issues/timeline#list-timeline-events-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/timeline", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys/deploy-keys#list-deploy-keys + */ + "GET /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "get">; + /** + * @see https://docs.github.com/rest/deploy-keys/deploy-keys#get-a-deploy-key + */ + "GET /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/issues/labels#list-labels-for-a-repository + */ + "GET /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "get">; + /** + * @see https://docs.github.com/rest/issues/labels#get-a-label + */ + "GET /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "get">; + /** + * @see https://docs.github.com/rest/repos/repos#list-repository-languages + */ + "GET /repos/{owner}/{repo}/languages": Operation<"/repos/{owner}/{repo}/languages", "get">; + /** + * @see https://docs.github.com/rest/licenses/licenses#get-the-license-for-a-repository + */ + "GET /repos/{owner}/{repo}/license": Operation<"/repos/{owner}/{repo}/license", "get">; + /** + * @see https://docs.github.com/rest/issues/milestones#list-milestones + */ + "GET /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "get">; + /** + * @see https://docs.github.com/rest/issues/milestones#get-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "get">; + /** + * @see https://docs.github.com/rest/issues/labels#list-labels-for-issues-in-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/activity/notifications#list-repository-notifications-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "get">; + /** + * @see https://docs.github.com/rest/pages/pages#get-a-apiname-pages-site + */ + "GET /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "get">; + /** + * @see https://docs.github.com/rest/pages/pages#list-apiname-pages-builds + */ + "GET /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "get">; + /** + * @see https://docs.github.com/rest/pages/pages#get-latest-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/latest": Operation<"/repos/{owner}/{repo}/pages/builds/latest", "get">; + /** + * @see https://docs.github.com/rest/pages/pages#get-apiname-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/{build_id}": Operation<"/repos/{owner}/{repo}/pages/builds/{build_id}", "get">; + /** + * @see https://docs.github.com/rest/pages/pages#get-the-status-of-a-github-pages-deployment + */ + "GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}": Operation<"/repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}", "get">; + /** + * @see https://docs.github.com/rest/pages/pages#get-a-dns-health-check-for-github-pages + */ + "GET /repos/{owner}/{repo}/pages/health": Operation<"/repos/{owner}/{repo}/pages/health", "get">; + /** + * @see https://docs.github.com/rest/repos/repos#check-if-private-vulnerability-reporting-is-enabled-for-a-repository + */ + "GET /repos/{owner}/{repo}/private-vulnerability-reporting": Operation<"/repos/{owner}/{repo}/private-vulnerability-reporting", "get">; + /** + * @see https://docs.github.com/rest/projects/projects#list-repository-projects + */ + "GET /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "get">; + /** + * @see https://docs.github.com/rest/repos/custom-properties#get-all-custom-property-values-for-a-repository + */ + "GET /repos/{owner}/{repo}/properties/values": Operation<"/repos/{owner}/{repo}/properties/values", "get">; + /** + * @see https://docs.github.com/rest/pulls/pulls#list-pull-requests + */ + "GET /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "get">; + /** + * @see https://docs.github.com/rest/pulls/comments#list-review-comments-in-a-repository + */ + "GET /repos/{owner}/{repo}/pulls/comments": Operation<"/repos/{owner}/{repo}/pulls/comments", "get">; + /** + * @see https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-pull-request-review-comment + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/pulls/pulls#get-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "get">; + /** + * @see https://docs.github.com/rest/pulls/comments#list-review-comments-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/pulls/pulls#list-commits-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/commits", "get">; + /** + * @see https://docs.github.com/rest/pulls/pulls#list-pull-requests-files + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/files", "get">; + /** + * @see https://docs.github.com/rest/pulls/pulls#check-if-a-pull-request-has-been-merged + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "get">; + /** + * @see https://docs.github.com/rest/pulls/review-requests#get-all-requested-reviewers-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "get">; + /** + * @see https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "get">; + /** + * @see https://docs.github.com/rest/pulls/reviews#get-a-review-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "get">; + /** + * @see https://docs.github.com/rest/pulls/reviews#list-comments-for-a-pull-request-review + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/repos/contents#get-a-repository-readme + */ + "GET /repos/{owner}/{repo}/readme": Operation<"/repos/{owner}/{repo}/readme", "get">; + /** + * @see https://docs.github.com/rest/repos/contents#get-a-repository-readme-for-a-directory + */ + "GET /repos/{owner}/{repo}/readme/{dir}": Operation<"/repos/{owner}/{repo}/readme/{dir}", "get">; + /** + * @see https://docs.github.com/rest/releases/releases#list-releases + */ + "GET /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "get">; + /** + * @see https://docs.github.com/rest/releases/assets#get-a-release-asset + */ + "GET /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "get">; + /** + * @see https://docs.github.com/rest/releases/releases#get-the-latest-release + */ + "GET /repos/{owner}/{repo}/releases/latest": Operation<"/repos/{owner}/{repo}/releases/latest", "get">; + /** + * @see https://docs.github.com/rest/releases/releases#get-a-release-by-tag-name + */ + "GET /repos/{owner}/{repo}/releases/tags/{tag}": Operation<"/repos/{owner}/{repo}/releases/tags/{tag}", "get">; + /** + * @see https://docs.github.com/rest/releases/releases#get-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "get">; + /** + * @see https://docs.github.com/rest/releases/assets#list-release-assets + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "get">; + /** + * @see https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/repos/rules#get-rules-for-a-branch + */ + "GET /repos/{owner}/{repo}/rules/branches/{branch}": Operation<"/repos/{owner}/{repo}/rules/branches/{branch}", "get">; + /** + * @see https://docs.github.com/rest/repos/rules#get-all-repository-rulesets + */ + "GET /repos/{owner}/{repo}/rulesets": Operation<"/repos/{owner}/{repo}/rulesets", "get">; + /** + * @see https://docs.github.com/rest/repos/rule-suites#list-repository-rule-suites + */ + "GET /repos/{owner}/{repo}/rulesets/rule-suites": Operation<"/repos/{owner}/{repo}/rulesets/rule-suites", "get">; + /** + * @see https://docs.github.com/rest/repos/rule-suites#get-a-repository-rule-suite + */ + "GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}": Operation<"/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}", "get">; + /** + * @see https://docs.github.com/rest/repos/rules#get-a-repository-ruleset + */ + "GET /repos/{owner}/{repo}/rulesets/{ruleset_id}": Operation<"/repos/{owner}/{repo}/rulesets/{ruleset_id}", "get">; + /** + * @see https://docs.github.com/rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/secret-scanning/secret-scanning#get-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/secret-scanning/secret-scanning#list-locations-for-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "get">; + /** + * @see https://docs.github.com/rest/security-advisories/repository-advisories#list-repository-security-advisories + */ + "GET /repos/{owner}/{repo}/security-advisories": Operation<"/repos/{owner}/{repo}/security-advisories", "get">; + /** + * @see https://docs.github.com/rest/security-advisories/repository-advisories#get-a-repository-security-advisory + */ + "GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}": Operation<"/repos/{owner}/{repo}/security-advisories/{ghsa_id}", "get">; + /** + * @see https://docs.github.com/rest/activity/starring#list-stargazers + */ + "GET /repos/{owner}/{repo}/stargazers": Operation<"/repos/{owner}/{repo}/stargazers", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/code_frequency": Operation<"/repos/{owner}/{repo}/stats/code_frequency", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-last-year-of-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/commit_activity": Operation<"/repos/{owner}/{repo}/stats/commit_activity", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-all-contributor-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/contributors": Operation<"/repos/{owner}/{repo}/stats/contributors", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-weekly-commit-count + */ + "GET /repos/{owner}/{repo}/stats/participation": Operation<"/repos/{owner}/{repo}/stats/participation", "get">; + /** + * @see https://docs.github.com/rest/metrics/statistics#get-the-hourly-commit-count-for-each-day + */ + "GET /repos/{owner}/{repo}/stats/punch_card": Operation<"/repos/{owner}/{repo}/stats/punch_card", "get">; + /** + * @see https://docs.github.com/rest/activity/watching#list-watchers + */ + "GET /repos/{owner}/{repo}/subscribers": Operation<"/repos/{owner}/{repo}/subscribers", "get">; + /** + * @see https://docs.github.com/rest/activity/watching#get-a-repository-subscription + */ + "GET /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "get">; + /** + * @see https://docs.github.com/rest/repos/repos#list-repository-tags + */ + "GET /repos/{owner}/{repo}/tags": Operation<"/repos/{owner}/{repo}/tags", "get">; + /** + * @see https://docs.github.com/rest/repos/tags#list-tag-protection-states-for-a-repository + */ + "GET /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "get">; + /** + * @see https://docs.github.com/rest/repos/contents#download-a-repository-archive-tar + */ + "GET /repos/{owner}/{repo}/tarball/{ref}": Operation<"/repos/{owner}/{repo}/tarball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/repos/repos#list-repository-teams + */ + "GET /repos/{owner}/{repo}/teams": Operation<"/repos/{owner}/{repo}/teams", "get">; + /** + * @see https://docs.github.com/rest/repos/repos#get-all-repository-topics + */ + "GET /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-repository-clones + */ + "GET /repos/{owner}/{repo}/traffic/clones": Operation<"/repos/{owner}/{repo}/traffic/clones", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-paths + */ + "GET /repos/{owner}/{repo}/traffic/popular/paths": Operation<"/repos/{owner}/{repo}/traffic/popular/paths", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-top-referral-sources + */ + "GET /repos/{owner}/{repo}/traffic/popular/referrers": Operation<"/repos/{owner}/{repo}/traffic/popular/referrers", "get">; + /** + * @see https://docs.github.com/rest/metrics/traffic#get-page-views + */ + "GET /repos/{owner}/{repo}/traffic/views": Operation<"/repos/{owner}/{repo}/traffic/views", "get">; + /** + * @see https://docs.github.com/rest/repos/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository + */ + "GET /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "get">; + /** + * @see https://docs.github.com/rest/repos/contents#download-a-repository-archive-zip + */ + "GET /repos/{owner}/{repo}/zipball/{ref}": Operation<"/repos/{owner}/{repo}/zipball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/repos/repos#list-public-repositories + */ + "GET /repositories": Operation<"/repositories", "get">; + /** + * @see https://docs.github.com/rest/search/search#search-code + */ + "GET /search/code": Operation<"/search/code", "get">; + /** + * @see https://docs.github.com/rest/search/search#search-commits + */ + "GET /search/commits": Operation<"/search/commits", "get">; + /** + * @see https://docs.github.com/rest/search/search#search-issues-and-pull-requests + */ + "GET /search/issues": Operation<"/search/issues", "get">; + /** + * @see https://docs.github.com/rest/search/search#search-labels + */ + "GET /search/labels": Operation<"/search/labels", "get">; + /** + * @see https://docs.github.com/rest/search/search#search-repositories + */ + "GET /search/repositories": Operation<"/search/repositories", "get">; + /** + * @see https://docs.github.com/rest/search/search#search-topics + */ + "GET /search/topics": Operation<"/search/topics", "get">; + /** + * @see https://docs.github.com/rest/search/search#search-users + */ + "GET /search/users": Operation<"/search/users", "get">; + /** + * @see https://docs.github.com/rest/teams/teams#get-a-team-legacy + */ + "GET /teams/{team_id}": Operation<"/teams/{team_id}", "get">; + /** + * @see https://docs.github.com/rest/teams/discussions#list-discussions-legacy + */ + "GET /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "get">; + /** + * @see https://docs.github.com/rest/teams/discussions#get-a-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/teams/discussion-comments#list-discussion-comments-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reactions/reactions#list-reactions-for-a-team-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/teams/members#list-pending-team-invitations-legacy + */ + "GET /teams/{team_id}/invitations": Operation<"/teams/{team_id}/invitations", "get">; + /** + * @see https://docs.github.com/rest/teams/members#list-team-members-legacy + */ + "GET /teams/{team_id}/members": Operation<"/teams/{team_id}/members", "get">; + /** + * @see https://docs.github.com/rest/teams/members#get-team-member-legacy + */ + "GET /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/teams/members#get-team-membership-for-a-user-legacy + */ + "GET /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/teams/teams#list-team-projects-legacy + */ + "GET /teams/{team_id}/projects": Operation<"/teams/{team_id}/projects", "get">; + /** + * @see https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project-legacy + */ + "GET /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/teams/teams#list-team-repositories-legacy + */ + "GET /teams/{team_id}/repos": Operation<"/teams/{team_id}/repos", "get">; + /** + * @see https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository-legacy + */ + "GET /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/teams/teams#list-child-teams-legacy + */ + "GET /teams/{team_id}/teams": Operation<"/teams/{team_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/users/users#get-the-authenticated-user + */ + "GET /user": Operation<"/user", "get">; + /** + * @see https://docs.github.com/rest/users/blocking#list-users-blocked-by-the-authenticated-user + */ + "GET /user/blocks": Operation<"/user/blocks", "get">; + /** + * @see https://docs.github.com/rest/users/blocking#check-if-a-user-is-blocked-by-the-authenticated-user + */ + "GET /user/blocks/{username}": Operation<"/user/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#list-codespaces-for-the-authenticated-user + */ + "GET /user/codespaces": Operation<"/user/codespaces", "get">; + /** + * @see https://docs.github.com/rest/codespaces/secrets#list-secrets-for-the-authenticated-user + */ + "GET /user/codespaces/secrets": Operation<"/user/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/codespaces/secrets#get-public-key-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/public-key": Operation<"/user/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/codespaces/secrets#get-a-secret-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/codespaces/secrets#list-selected-repositories-for-a-user-secret + */ + "GET /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#get-a-codespace-for-the-authenticated-user + */ + "GET /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "get">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#get-details-about-a-codespace-export + */ + "GET /user/codespaces/{codespace_name}/exports/{export_id}": Operation<"/user/codespaces/{codespace_name}/exports/{export_id}", "get">; + /** + * @see https://docs.github.com/rest/codespaces/machines#list-machine-types-for-a-codespace + */ + "GET /user/codespaces/{codespace_name}/machines": Operation<"/user/codespaces/{codespace_name}/machines", "get">; + /** + * @see https://docs.github.com/rest/packages/packages#get-list-of-conflicting-packages-during-docker-migration-for-authenticated-user + */ + "GET /user/docker/conflicts": Operation<"/user/docker/conflicts", "get">; + /** + * @see https://docs.github.com/rest/users/emails#list-email-addresses-for-the-authenticated-user + */ + "GET /user/emails": Operation<"/user/emails", "get">; + /** + * @see https://docs.github.com/rest/users/followers#list-followers-of-the-authenticated-user + */ + "GET /user/followers": Operation<"/user/followers", "get">; + /** + * @see https://docs.github.com/rest/users/followers#list-the-people-the-authenticated-user-follows + */ + "GET /user/following": Operation<"/user/following", "get">; + /** + * @see https://docs.github.com/rest/users/followers#check-if-a-person-is-followed-by-the-authenticated-user + */ + "GET /user/following/{username}": Operation<"/user/following/{username}", "get">; + /** + * @see https://docs.github.com/rest/users/gpg-keys#list-gpg-keys-for-the-authenticated-user + */ + "GET /user/gpg_keys": Operation<"/user/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/users/gpg-keys#get-a-gpg-key-for-the-authenticated-user + */ + "GET /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "get">; + /** + * @see https://docs.github.com/rest/apps/installations#list-app-installations-accessible-to-the-user-access-token + */ + "GET /user/installations": Operation<"/user/installations", "get">; + /** + * @see https://docs.github.com/rest/apps/installations#list-repositories-accessible-to-the-user-access-token + */ + "GET /user/installations/{installation_id}/repositories": Operation<"/user/installations/{installation_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/interactions/user#get-interaction-restrictions-for-your-public-repositories + */ + "GET /user/interaction-limits": Operation<"/user/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/issues/issues#list-user-account-issues-assigned-to-the-authenticated-user + */ + "GET /user/issues": Operation<"/user/issues", "get">; + /** + * @see https://docs.github.com/rest/users/keys#list-public-ssh-keys-for-the-authenticated-user + */ + "GET /user/keys": Operation<"/user/keys", "get">; + /** + * @see https://docs.github.com/rest/users/keys#get-a-public-ssh-key-for-the-authenticated-user + */ + "GET /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/apps/marketplace#list-subscriptions-for-the-authenticated-user + */ + "GET /user/marketplace_purchases": Operation<"/user/marketplace_purchases", "get">; + /** + * @see https://docs.github.com/rest/apps/marketplace#list-subscriptions-for-the-authenticated-user-stubbed + */ + "GET /user/marketplace_purchases/stubbed": Operation<"/user/marketplace_purchases/stubbed", "get">; + /** + * @see https://docs.github.com/rest/orgs/members#list-organization-memberships-for-the-authenticated-user + */ + "GET /user/memberships/orgs": Operation<"/user/memberships/orgs", "get">; + /** + * @see https://docs.github.com/rest/orgs/members#get-an-organization-membership-for-the-authenticated-user + */ + "GET /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/migrations/users#list-user-migrations + */ + "GET /user/migrations": Operation<"/user/migrations", "get">; + /** + * @see https://docs.github.com/rest/migrations/users#get-a-user-migration-status + */ + "GET /user/migrations/{migration_id}": Operation<"/user/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/migrations/users#download-a-user-migration-archive + */ + "GET /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/migrations/users#list-repositories-for-a-user-migration + */ + "GET /user/migrations/{migration_id}/repositories": Operation<"/user/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/orgs/orgs#list-organizations-for-the-authenticated-user + */ + "GET /user/orgs": Operation<"/user/orgs", "get">; + /** + * @see https://docs.github.com/rest/packages/packages#list-packages-for-the-authenticated-users-namespace + */ + "GET /user/packages": Operation<"/user/packages", "get">; + /** + * @see https://docs.github.com/rest/packages/packages#get-a-package-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages/packages#list-package-versions-for-a-package-owned-by-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions": Operation<"/user/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/packages/packages#get-a-package-version-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/users/emails#list-public-email-addresses-for-the-authenticated-user + */ + "GET /user/public_emails": Operation<"/user/public_emails", "get">; + /** + * @see https://docs.github.com/rest/repos/repos#list-repositories-for-the-authenticated-user + */ + "GET /user/repos": Operation<"/user/repos", "get">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations-for-the-authenticated-user + */ + "GET /user/repository_invitations": Operation<"/user/repository_invitations", "get">; + /** + * @see https://docs.github.com/rest/users/social-accounts#list-social-accounts-for-the-authenticated-user + */ + "GET /user/social_accounts": Operation<"/user/social_accounts", "get">; + /** + * @see https://docs.github.com/rest/users/ssh-signing-keys#list-ssh-signing-keys-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/users/ssh-signing-keys#get-an-ssh-signing-key-for-the-authenticated-user + */ + "GET /user/ssh_signing_keys/{ssh_signing_key_id}": Operation<"/user/ssh_signing_keys/{ssh_signing_key_id}", "get">; + /** + * @see https://docs.github.com/rest/activity/starring#list-repositories-starred-by-the-authenticated-user + */ + "GET /user/starred": Operation<"/user/starred", "get">; + /** + * @see https://docs.github.com/rest/activity/starring#check-if-a-repository-is-starred-by-the-authenticated-user + */ + "GET /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/activity/watching#list-repositories-watched-by-the-authenticated-user + */ + "GET /user/subscriptions": Operation<"/user/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/teams/teams#list-teams-for-the-authenticated-user + */ + "GET /user/teams": Operation<"/user/teams", "get">; + /** + * @see https://docs.github.com/rest/users/users#list-users + */ + "GET /users": Operation<"/users", "get">; + /** + * @see https://docs.github.com/rest/users/users#get-a-user + */ + "GET /users/{username}": Operation<"/users/{username}", "get">; + /** + * @see https://docs.github.com/rest/packages/packages#get-list-of-conflicting-packages-during-docker-migration-for-user + */ + "GET /users/{username}/docker/conflicts": Operation<"/users/{username}/docker/conflicts", "get">; + /** + * @see https://docs.github.com/rest/activity/events#list-events-for-the-authenticated-user + */ + "GET /users/{username}/events": Operation<"/users/{username}/events", "get">; + /** + * @see https://docs.github.com/rest/activity/events#list-organization-events-for-the-authenticated-user + */ + "GET /users/{username}/events/orgs/{org}": Operation<"/users/{username}/events/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/activity/events#list-public-events-for-a-user + */ + "GET /users/{username}/events/public": Operation<"/users/{username}/events/public", "get">; + /** + * @see https://docs.github.com/rest/users/followers#list-followers-of-a-user + */ + "GET /users/{username}/followers": Operation<"/users/{username}/followers", "get">; + /** + * @see https://docs.github.com/rest/users/followers#list-the-people-a-user-follows + */ + "GET /users/{username}/following": Operation<"/users/{username}/following", "get">; + /** + * @see https://docs.github.com/rest/users/followers#check-if-a-user-follows-another-user + */ + "GET /users/{username}/following/{target_user}": Operation<"/users/{username}/following/{target_user}", "get">; + /** + * @see https://docs.github.com/rest/gists/gists#list-gists-for-a-user + */ + "GET /users/{username}/gists": Operation<"/users/{username}/gists", "get">; + /** + * @see https://docs.github.com/rest/users/gpg-keys#list-gpg-keys-for-a-user + */ + "GET /users/{username}/gpg_keys": Operation<"/users/{username}/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/users/users#get-contextual-information-for-a-user + */ + "GET /users/{username}/hovercard": Operation<"/users/{username}/hovercard", "get">; + /** + * @see https://docs.github.com/rest/apps/apps#get-a-user-installation-for-the-authenticated-app + */ + "GET /users/{username}/installation": Operation<"/users/{username}/installation", "get">; + /** + * @see https://docs.github.com/rest/users/keys#list-public-keys-for-a-user + */ + "GET /users/{username}/keys": Operation<"/users/{username}/keys", "get">; + /** + * @see https://docs.github.com/rest/orgs/orgs#list-organizations-for-a-user + */ + "GET /users/{username}/orgs": Operation<"/users/{username}/orgs", "get">; + /** + * @see https://docs.github.com/rest/packages/packages#list-packages-for-a-user + */ + "GET /users/{username}/packages": Operation<"/users/{username}/packages", "get">; + /** + * @see https://docs.github.com/rest/packages/packages#get-a-package-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/packages/packages#list-package-versions-for-a-package-owned-by-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/packages/packages#get-a-package-version-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/projects/projects#list-user-projects + */ + "GET /users/{username}/projects": Operation<"/users/{username}/projects", "get">; + /** + * @see https://docs.github.com/rest/activity/events#list-events-received-by-the-authenticated-user + */ + "GET /users/{username}/received_events": Operation<"/users/{username}/received_events", "get">; + /** + * @see https://docs.github.com/rest/activity/events#list-public-events-received-by-a-user + */ + "GET /users/{username}/received_events/public": Operation<"/users/{username}/received_events/public", "get">; + /** + * @see https://docs.github.com/rest/repos/repos#list-repositories-for-a-user + */ + "GET /users/{username}/repos": Operation<"/users/{username}/repos", "get">; + /** + * @see https://docs.github.com/rest/billing/billing#get-github-actions-billing-for-a-user + */ + "GET /users/{username}/settings/billing/actions": Operation<"/users/{username}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/billing/billing#get-github-packages-billing-for-a-user + */ + "GET /users/{username}/settings/billing/packages": Operation<"/users/{username}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/billing/billing#get-shared-storage-billing-for-a-user + */ + "GET /users/{username}/settings/billing/shared-storage": Operation<"/users/{username}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/users/social-accounts#list-social-accounts-for-a-user + */ + "GET /users/{username}/social_accounts": Operation<"/users/{username}/social_accounts", "get">; + /** + * @see https://docs.github.com/rest/users/ssh-signing-keys#list-ssh-signing-keys-for-a-user + */ + "GET /users/{username}/ssh_signing_keys": Operation<"/users/{username}/ssh_signing_keys", "get">; + /** + * @see https://docs.github.com/rest/activity/starring#list-repositories-starred-by-a-user + */ + "GET /users/{username}/starred": Operation<"/users/{username}/starred", "get">; + /** + * @see https://docs.github.com/rest/activity/watching#list-repositories-watched-by-a-user + */ + "GET /users/{username}/subscriptions": Operation<"/users/{username}/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/meta/meta#get-all-api-versions + */ + "GET /versions": Operation<"/versions", "get">; + /** + * @see https://docs.github.com/rest/meta/meta#get-the-zen-of-github + */ + "GET /zen": Operation<"/zen", "get">; + /** + * @see https://docs.github.com/rest/apps/webhooks#update-a-webhook-configuration-for-an-app + */ + "PATCH /app/hook/config": Operation<"/app/hook/config", "patch">; + /** + * @see https://docs.github.com/rest/apps/oauth-applications#reset-a-token + */ + "PATCH /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists/#update-a-gist + */ + "PATCH /gists/{gist_id}": Operation<"/gists/{gist_id}", "patch">; + /** + * @see https://docs.github.com/rest/gists/comments#update-a-gist-comment + */ + "PATCH /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/activity/notifications#mark-a-thread-as-read + */ + "PATCH /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "patch">; + /** + * @see https://docs.github.com/rest/orgs/orgs#update-an-organization + */ + "PATCH /orgs/{org}": Operation<"/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-organization-variable + */ + "PATCH /orgs/{org}/actions/variables/{name}": Operation<"/orgs/{org}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/orgs/webhooks#update-an-organization-webhook + */ + "PATCH /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/orgs/webhooks#update-a-webhook-configuration-for-an-organization + */ + "PATCH /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/orgs/organization-roles#update-a-custom-organization-role + */ + "PATCH /orgs/{org}/organization-roles/{role_id}": Operation<"/orgs/{org}/organization-roles/{role_id}", "patch">; + /** + * @see https://docs.github.com/rest/orgs/custom-properties#create-or-update-custom-properties-for-an-organization + */ + "PATCH /orgs/{org}/properties/schema": Operation<"/orgs/{org}/properties/schema", "patch">; + /** + * @see https://docs.github.com/rest/orgs/custom-properties#create-or-update-custom-property-values-for-organization-repositories + */ + "PATCH /orgs/{org}/properties/values": Operation<"/orgs/{org}/properties/values", "patch">; + /** + * @see https://docs.github.com/rest/teams/teams#update-a-team + */ + "PATCH /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "patch">; + /** + * @see https://docs.github.com/rest/teams/discussions#update-a-discussion + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/teams/discussion-comments#update-a-discussion-comment + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/projects/cards#update-an-existing-project-card + */ + "PATCH /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "patch">; + /** + * @see https://docs.github.com/rest/projects/columns#update-an-existing-project-column + */ + "PATCH /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "patch">; + /** + * @see https://docs.github.com/rest/projects/projects#update-a-project + */ + "PATCH /projects/{project_id}": Operation<"/projects/{project_id}", "patch">; + /** + * @see https://docs.github.com/rest/repos/repos#update-a-repository + */ + "PATCH /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-a-repository-variable + */ + "PATCH /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-pull-request-review-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "patch">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-status-check-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "patch">; + /** + * @see https://docs.github.com/rest/checks/runs#update-a-check-run + */ + "PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "patch">; + /** + * @see https://docs.github.com/rest/checks/suites#update-repository-preferences-for-check-suites + */ + "PATCH /repos/{owner}/{repo}/check-suites/preferences": Operation<"/repos/{owner}/{repo}/check-suites/preferences", "patch">; + /** + * @see https://docs.github.com/rest/code-scanning/code-scanning#update-a-code-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/code-scanning/code-scanning#update-a-code-scanning-default-setup-configuration + */ + "PATCH /repos/{owner}/{repo}/code-scanning/default-setup": Operation<"/repos/{owner}/{repo}/code-scanning/default-setup", "patch">; + /** + * @see https://docs.github.com/rest/commits/comments#update-a-commit-comment + */ + "PATCH /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/dependabot/alerts#update-a-dependabot-alert + */ + "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/actions/variables#update-an-environment-variable + */ + "PATCH /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/variables/{name}", "patch">; + /** + * @see https://docs.github.com/rest/git/refs#update-a-reference + */ + "PATCH /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "patch">; + /** + * @see https://docs.github.com/rest/repos/webhooks#update-a-repository-webhook + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/repos/webhooks#update-a-webhook-configuration-for-a-repository + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/migrations/source-imports#update-an-import + */ + "PATCH /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "patch">; + /** + * @see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author + */ + "PATCH /repos/{owner}/{repo}/import/authors/{author_id}": Operation<"/repos/{owner}/{repo}/import/authors/{author_id}", "patch">; + /** + * @see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference + */ + "PATCH /repos/{owner}/{repo}/import/lfs": Operation<"/repos/{owner}/{repo}/import/lfs", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#update-a-repository-invitation + */ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/issues/comments#update-an-issue-comment + */ + "PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/issues/issues#update-an-issue + */ + "PATCH /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "patch">; + /** + * @see https://docs.github.com/rest/issues/labels#update-a-label + */ + "PATCH /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "patch">; + /** + * @see https://docs.github.com/rest/issues/milestones#update-a-milestone + */ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "patch">; + /** + * @see https://docs.github.com/rest/repos/custom-properties#create-or-update-custom-property-values-for-a-repository + */ + "PATCH /repos/{owner}/{repo}/properties/values": Operation<"/repos/{owner}/{repo}/properties/values", "patch">; + /** + * @see https://docs.github.com/rest/pulls/comments#update-a-review-comment-for-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/pulls/pulls#update-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "patch">; + /** + * @see https://docs.github.com/rest/releases/assets#update-a-release-asset + */ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "patch">; + /** + * @see https://docs.github.com/rest/releases/releases#update-a-release + */ + "PATCH /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "patch">; + /** + * @see https://docs.github.com/rest/secret-scanning/secret-scanning#update-a-secret-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/security-advisories/repository-advisories#update-a-repository-security-advisory + */ + "PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}": Operation<"/repos/{owner}/{repo}/security-advisories/{ghsa_id}", "patch">; + /** + * @see https://docs.github.com/rest/teams/teams#update-a-team-legacy + */ + "PATCH /teams/{team_id}": Operation<"/teams/{team_id}", "patch">; + /** + * @see https://docs.github.com/rest/teams/discussions#update-a-discussion-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/teams/discussion-comments#update-a-discussion-comment-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/users/users#update-the-authenticated-user + */ + "PATCH /user": Operation<"/user", "patch">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#update-a-codespace-for-the-authenticated-user + */ + "PATCH /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "patch">; + /** + * @see https://docs.github.com/rest/users/emails#set-primary-email-visibility-for-the-authenticated-user + */ + "PATCH /user/email/visibility": Operation<"/user/email/visibility", "patch">; + /** + * @see https://docs.github.com/rest/orgs/members#update-an-organization-membership-for-the-authenticated-user + */ + "PATCH /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/collaborators/invitations#accept-a-repository-invitation + */ + "PATCH /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/apps/apps#create-a-github-app-from-a-manifest + */ + "POST /app-manifests/{code}/conversions": Operation<"/app-manifests/{code}/conversions", "post">; + /** + * @see https://docs.github.com/rest/apps/webhooks#redeliver-a-delivery-for-an-app-webhook + */ + "POST /app/hook/deliveries/{delivery_id}/attempts": Operation<"/app/hook/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/apps/apps#create-an-installation-access-token-for-an-app + */ + "POST /app/installations/{installation_id}/access_tokens": Operation<"/app/installations/{installation_id}/access_tokens", "post">; + /** + * @see https://docs.github.com/rest/apps/oauth-applications#check-a-token + */ + "POST /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "post">; + /** + * @see https://docs.github.com/rest/apps/apps#create-a-scoped-access-token + */ + "POST /applications/{client_id}/token/scoped": Operation<"/applications/{client_id}/token/scoped", "post">; + /** + * @see https://docs.github.com/rest/gists/gists#create-a-gist + */ + "POST /gists": Operation<"/gists", "post">; + /** + * @see https://docs.github.com/rest/gists/comments#create-a-gist-comment + */ + "POST /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "post">; + /** + * @see https://docs.github.com/rest/gists/gists#fork-a-gist + */ + "POST /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "post">; + /** + * @see https://docs.github.com/rest/markdown/markdown#render-a-markdown-document + */ + "POST /markdown": Operation<"/markdown", "post">; + /** + * @see https://docs.github.com/rest/markdown/markdown#render-a-markdown-document-in-raw-mode + */ + "POST /markdown/raw": Operation<"/markdown/raw", "post">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#create-configuration-for-a-just-in-time-runner-for-an-organization + */ + "POST /orgs/{org}/actions/runners/generate-jitconfig": Operation<"/orgs/{org}/actions/runners/generate-jitconfig", "post">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#create-a-registration-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/registration-token": Operation<"/orgs/{org}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#create-a-remove-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/remove-token": Operation<"/orgs/{org}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#add-custom-labels-to-a-self-hosted-runner-for-an-organization + */ + "POST /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-organization-variable + */ + "POST /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/codespaces/organizations#add-users-to-codespaces-access-for-an-organization + */ + "POST /orgs/{org}/codespaces/access/selected_users": Operation<"/orgs/{org}/codespaces/access/selected_users", "post">; + /** + * @see https://docs.github.com/rest/copilot/copilot-user-management#add-teams-to-the-copilot-subscription-for-an-organization + */ + "POST /orgs/{org}/copilot/billing/selected_teams": Operation<"/orgs/{org}/copilot/billing/selected_teams", "post">; + /** + * @see https://docs.github.com/rest/copilot/copilot-user-management#add-users-to-the-copilot-subscription-for-an-organization + */ + "POST /orgs/{org}/copilot/billing/selected_users": Operation<"/orgs/{org}/copilot/billing/selected_users", "post">; + /** + * @see https://docs.github.com/rest/orgs/webhooks#create-an-organization-webhook + */ + "POST /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "post">; + /** + * @see https://docs.github.com/rest/orgs/webhooks#redeliver-a-delivery-for-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/orgs/webhooks#ping-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/pings": Operation<"/orgs/{org}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/orgs/members#create-an-organization-invitation + */ + "POST /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "post">; + /** + * @see https://docs.github.com/rest/codespaces/organizations#stop-a-codespace-for-an-organization-user + */ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/migrations/orgs#start-an-organization-migration + */ + "POST /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "post">; + /** + * @see https://docs.github.com/rest/orgs/organization-roles#create-a-custom-organization-role + */ + "POST /orgs/{org}/organization-roles": Operation<"/orgs/{org}/organization-roles", "post">; + /** + * @see https://docs.github.com/rest/packages/packages#restore-a-package-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/packages/packages#restore-package-version-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/orgs/personal-access-tokens#review-requests-to-access-organization-resources-with-fine-grained-personal-access-tokens + */ + "POST /orgs/{org}/personal-access-token-requests": Operation<"/orgs/{org}/personal-access-token-requests", "post">; + /** + * @see https://docs.github.com/rest/orgs/personal-access-tokens#review-a-request-to-access-organization-resources-with-a-fine-grained-personal-access-token + */ + "POST /orgs/{org}/personal-access-token-requests/{pat_request_id}": Operation<"/orgs/{org}/personal-access-token-requests/{pat_request_id}", "post">; + /** + * @see https://docs.github.com/rest/orgs/personal-access-tokens#update-the-access-to-organization-resources-via-fine-grained-personal-access-tokens + */ + "POST /orgs/{org}/personal-access-tokens": Operation<"/orgs/{org}/personal-access-tokens", "post">; + /** + * @see https://docs.github.com/rest/orgs/personal-access-tokens#update-the-access-a-fine-grained-personal-access-token-has-to-organization-resources + */ + "POST /orgs/{org}/personal-access-tokens/{pat_id}": Operation<"/orgs/{org}/personal-access-tokens/{pat_id}", "post">; + /** + * @see https://docs.github.com/rest/projects/projects#create-an-organization-project + */ + "POST /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "post">; + /** + * @see https://docs.github.com/rest/repos/repos#create-an-organization-repository + */ + "POST /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "post">; + /** + * @see https://docs.github.com/rest/orgs/rules#create-an-organization-repository-ruleset + */ + "POST /orgs/{org}/rulesets": Operation<"/orgs/{org}/rulesets", "post">; + /** + * @see https://docs.github.com/rest/teams/teams#create-a-team + */ + "POST /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "post">; + /** + * @see https://docs.github.com/rest/teams/discussions#create-a-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "post">; + /** + * @see https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/orgs/orgs#enable-or-disable-a-security-feature-for-an-organization + */ + "POST /orgs/{org}/{security_product}/{enablement}": Operation<"/orgs/{org}/{security_product}/{enablement}", "post">; + /** + * @see https://docs.github.com/rest/projects/cards#move-a-project-card + */ + "POST /projects/columns/cards/{card_id}/moves": Operation<"/projects/columns/cards/{card_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/projects/cards#create-a-project-card + */ + "POST /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "post">; + /** + * @see https://docs.github.com/rest/projects/columns#move-a-project-column + */ + "POST /projects/columns/{column_id}/moves": Operation<"/projects/columns/{column_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/projects/columns#create-a-project-column + */ + "POST /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "post">; + /** + * @see https://docs.github.com/rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#create-configuration-for-a-just-in-time-runner-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig": Operation<"/repos/{owner}/{repo}/actions/runners/generate-jitconfig", "post">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#create-a-registration-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/registration-token": Operation<"/repos/{owner}/{repo}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#create-a-remove-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/remove-token": Operation<"/repos/{owner}/{repo}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#add-custom-labels-to-a-self-hosted-runner-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/actions/workflow-runs#approve-a-workflow-run-for-a-fork-pull-request + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approve", "post">; + /** + * @see https://docs.github.com/rest/actions/workflow-runs#cancel-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/cancel", "post">; + /** + * @see https://docs.github.com/rest/actions/workflow-runs#review-custom-deployment-protection-rules-for-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule", "post">; + /** + * @see https://docs.github.com/rest/actions/workflow-runs#force-cancel-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel", "post">; + /** + * @see https://docs.github.com/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "post">; + /** + * @see https://docs.github.com/rest/actions/workflow-runs#re-run-a-workflow + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/actions/workflow-runs#re-run-failed-jobs-from-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-a-repository-variable + */ + "POST /repos/{owner}/{repo}/actions/variables": Operation<"/repos/{owner}/{repo}/actions/variables", "post">; + /** + * @see https://docs.github.com/rest/actions/workflows#create-a-workflow-dispatch-event + */ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", "post">; + /** + * @see https://docs.github.com/rest/repos/autolinks#create-an-autolink-reference-for-a-repository + */ + "POST /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-admin-branch-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#create-commit-signature-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-status-check-contexts + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-app-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-team-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "post">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#add-user-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#rename-a-branch + */ + "POST /repos/{owner}/{repo}/branches/{branch}/rename": Operation<"/repos/{owner}/{repo}/branches/{branch}/rename", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs": Operation<"/repos/{owner}/{repo}/check-runs", "post">; + /** + * @see https://docs.github.com/rest/checks/runs#rerequest-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/checks/suites#create-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites": Operation<"/repos/{owner}/{repo}/check-suites", "post">; + /** + * @see https://docs.github.com/rest/checks/suites#rerequest-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/code-scanning/code-scanning#upload-an-analysis-as-sarif-data + */ + "POST /repos/{owner}/{repo}/code-scanning/sarifs": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs", "post">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#create-a-codespace-in-a-repository + */ + "POST /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-commit-comment + */ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/commits/comments#create-a-commit-comment + */ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "post">; + /** + * @see https://docs.github.com/rest/dependency-graph/dependency-submission#create-a-snapshot-of-dependencies-for-a-repository + */ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots": Operation<"/repos/{owner}/{repo}/dependency-graph/snapshots", "post">; + /** + * @see https://docs.github.com/rest/deployments/deployments#create-a-deployment + */ + "POST /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "post">; + /** + * @see https://docs.github.com/rest/deployments/statuses#create-a-deployment-status + */ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "post">; + /** + * @see https://docs.github.com/rest/repos/repos#create-a-repository-dispatch-event + */ + "POST /repos/{owner}/{repo}/dispatches": Operation<"/repos/{owner}/{repo}/dispatches", "post">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#create-a-deployment-branch-policy + */ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "post">; + /** + * @see https://docs.github.com/rest/deployments/protection-rules#create-a-custom-deployment-protection-rule-on-an-environment + */ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules", "post">; + /** + * @see https://docs.github.com/rest/actions/variables#create-an-environment-variable + */ + "POST /repos/{owner}/{repo}/environments/{environment_name}/variables": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/variables", "post">; + /** + * @see https://docs.github.com/rest/repos/forks#create-a-fork + */ + "POST /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "post">; + /** + * @see https://docs.github.com/rest/git/blobs#create-a-blob + */ + "POST /repos/{owner}/{repo}/git/blobs": Operation<"/repos/{owner}/{repo}/git/blobs", "post">; + /** + * @see https://docs.github.com/rest/git/commits#create-a-commit + */ + "POST /repos/{owner}/{repo}/git/commits": Operation<"/repos/{owner}/{repo}/git/commits", "post">; + /** + * @see https://docs.github.com/rest/git/refs#create-a-reference + */ + "POST /repos/{owner}/{repo}/git/refs": Operation<"/repos/{owner}/{repo}/git/refs", "post">; + /** + * @see https://docs.github.com/rest/git/tags#create-a-tag-object + */ + "POST /repos/{owner}/{repo}/git/tags": Operation<"/repos/{owner}/{repo}/git/tags", "post">; + /** + * @see https://docs.github.com/rest/git/trees#create-a-tree + */ + "POST /repos/{owner}/{repo}/git/trees": Operation<"/repos/{owner}/{repo}/git/trees", "post">; + /** + * @see https://docs.github.com/rest/repos/webhooks#create-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "post">; + /** + * @see https://docs.github.com/rest/repos/webhooks#redeliver-a-delivery-for-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/repos/webhooks#ping-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/pings": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/repos/webhooks#test-the-push-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/tests": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/tests", "post">; + /** + * @see https://docs.github.com/rest/issues/issues#create-an-issue + */ + "POST /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "post">; + /** + * @see https://docs.github.com/rest/reactions/reactions#create-reaction-for-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/issues/assignees#add-assignees-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "post">; + /** + * @see https://docs.github.com/rest/issues/comments#create-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/issues/labels#add-labels-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "post">; + /** + * @see https://docs.github.com/rest/reactions/reactions#create-reaction-for-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/deploy-keys/deploy-keys#create-a-deploy-key + */ + "POST /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "post">; + /** + * @see https://docs.github.com/rest/issues/labels#create-a-label + */ + "POST /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#sync-a-fork-branch-with-the-upstream-repository + */ + "POST /repos/{owner}/{repo}/merge-upstream": Operation<"/repos/{owner}/{repo}/merge-upstream", "post">; + /** + * @see https://docs.github.com/rest/branches/branches#merge-a-branch + */ + "POST /repos/{owner}/{repo}/merges": Operation<"/repos/{owner}/{repo}/merges", "post">; + /** + * @see https://docs.github.com/rest/issues/milestones#create-a-milestone + */ + "POST /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "post">; + /** + * @see https://docs.github.com/rest/pages/pages#create-a-apiname-pages-site + */ + "POST /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "post">; + /** + * @see https://docs.github.com/rest/pages/pages#request-a-apiname-pages-build + */ + "POST /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "post">; + /** + * @see https://docs.github.com/rest/pages/pages#create-a-github-pages-deployment + */ + "POST /repos/{owner}/{repo}/pages/deployments": Operation<"/repos/{owner}/{repo}/pages/deployments", "post">; + /** + * @see https://docs.github.com/rest/pages/pages#cancel-a-github-pages-deployment + */ + "POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel": Operation<"/repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel", "post">; + /** + * @see https://docs.github.com/rest/projects/projects#create-a-repository-project + */ + "POST /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "post">; + /** + * @see https://docs.github.com/rest/pulls/pulls#create-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "post">; + /** + * @see https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-pull-request-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#create-a-codespace-from-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/pulls/comments#create-a-review-comment-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/pulls/comments#create-a-reply-for-a-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "post">; + /** + * @see https://docs.github.com/rest/pulls/reviews#create-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "post">; + /** + * @see https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events", "post">; + /** + * @see https://docs.github.com/rest/releases/releases#create-a-release + */ + "POST /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "post">; + /** + * @see https://docs.github.com/rest/releases/releases#generate-release-notes-content-for-a-release + */ + "POST /repos/{owner}/{repo}/releases/generate-notes": Operation<"/repos/{owner}/{repo}/releases/generate-notes", "post">; + /** + * @see https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-release + */ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/repos/rules#create-a-repository-ruleset + */ + "POST /repos/{owner}/{repo}/rulesets": Operation<"/repos/{owner}/{repo}/rulesets", "post">; + /** + * @see https://docs.github.com/rest/security-advisories/repository-advisories#create-a-repository-security-advisory + */ + "POST /repos/{owner}/{repo}/security-advisories": Operation<"/repos/{owner}/{repo}/security-advisories", "post">; + /** + * @see https://docs.github.com/rest/security-advisories/repository-advisories#privately-report-a-security-vulnerability + */ + "POST /repos/{owner}/{repo}/security-advisories/reports": Operation<"/repos/{owner}/{repo}/security-advisories/reports", "post">; + /** + * @see https://docs.github.com/rest/security-advisories/repository-advisories#request-a-cve-for-a-repository-security-advisory + */ + "POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve": Operation<"/repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve", "post">; + /** + * @see https://docs.github.com/rest/security-advisories/repository-advisories#create-a-temporary-private-fork + */ + "POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks": Operation<"/repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks", "post">; + /** + * @see https://docs.github.com/rest/commits/statuses#create-a-commit-status + */ + "POST /repos/{owner}/{repo}/statuses/{sha}": Operation<"/repos/{owner}/{repo}/statuses/{sha}", "post">; + /** + * @see https://docs.github.com/rest/repos/tags#create-a-tag-protection-state-for-a-repository + */ + "POST /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "post">; + /** + * @see https://docs.github.com/rest/repos/repos#transfer-a-repository + */ + "POST /repos/{owner}/{repo}/transfer": Operation<"/repos/{owner}/{repo}/transfer", "post">; + /** + * @see https://docs.github.com/rest/repos/repos#create-a-repository-using-a-template + */ + "POST /repos/{template_owner}/{template_repo}/generate": Operation<"/repos/{template_owner}/{template_repo}/generate", "post">; + /** + * @see https://docs.github.com/rest/teams/discussions#create-a-discussion-legacy + */ + "POST /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "post">; + /** + * @see https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reactions/reactions#create-reaction-for-a-team-discussion-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#create-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces": Operation<"/user/codespaces", "post">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#export-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/exports": Operation<"/user/codespaces/{codespace_name}/exports", "post">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#create-a-repository-from-an-unpublished-codespace + */ + "POST /user/codespaces/{codespace_name}/publish": Operation<"/user/codespaces/{codespace_name}/publish", "post">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#start-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/start": Operation<"/user/codespaces/{codespace_name}/start", "post">; + /** + * @see https://docs.github.com/rest/codespaces/codespaces#stop-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/stop": Operation<"/user/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/users/emails#add-an-email-address-for-the-authenticated-user + */ + "POST /user/emails": Operation<"/user/emails", "post">; + /** + * @see https://docs.github.com/rest/users/gpg-keys#create-a-gpg-key-for-the-authenticated-user + */ + "POST /user/gpg_keys": Operation<"/user/gpg_keys", "post">; + /** + * @see https://docs.github.com/rest/users/keys#create-a-public-ssh-key-for-the-authenticated-user + */ + "POST /user/keys": Operation<"/user/keys", "post">; + /** + * @see https://docs.github.com/rest/migrations/users#start-a-user-migration + */ + "POST /user/migrations": Operation<"/user/migrations", "post">; + /** + * @see https://docs.github.com/rest/packages/packages#restore-a-package-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/restore{?token}": Operation<"/user/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/packages/packages#restore-a-package-version-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/projects/projects#create-a-user-project + */ + "POST /user/projects": Operation<"/user/projects", "post">; + /** + * @see https://docs.github.com/rest/repos/repos#create-a-repository-for-the-authenticated-user + */ + "POST /user/repos": Operation<"/user/repos", "post">; + /** + * @see https://docs.github.com/rest/users/social-accounts#add-social-accounts-for-the-authenticated-user + */ + "POST /user/social_accounts": Operation<"/user/social_accounts", "post">; + /** + * @see https://docs.github.com/rest/users/ssh-signing-keys#create-a-ssh-signing-key-for-the-authenticated-user + */ + "POST /user/ssh_signing_keys": Operation<"/user/ssh_signing_keys", "post">; + /** + * @see https://docs.github.com/rest/packages/packages#restore-a-package-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/users/{username}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/packages/packages#restore-package-version-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/releases/assets#upload-a-release-asset + */ + "POST {origin}/repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "post">; + /** + * @see https://docs.github.com/rest/apps/apps#suspend-an-app-installation + */ + "PUT /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "put">; + /** + * @see https://docs.github.com/rest/gists/gists#star-a-gist + */ + "PUT /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "put">; + /** + * @see https://docs.github.com/rest/activity/notifications#mark-notifications-as-read + */ + "PUT /notifications": Operation<"/notifications", "put">; + /** + * @see https://docs.github.com/rest/activity/notifications#set-a-thread-subscription + */ + "PUT /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "PUT /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/actions/permissions#set-github-actions-permissions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/actions/permissions#set-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "put">; + /** + * @see https://docs.github.com/rest/actions/permissions#enable-a-selected-repository-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/actions/permissions#set-allowed-actions-and-reusable-workflows-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/actions/permissions#set-default-workflow-permissions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#set-custom-labels-for-a-self-hosted-runner-for-an-organization + */ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/actions/secrets#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/actions/secrets#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#set-selected-repositories-for-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories": Operation<"/orgs/{org}/actions/variables/{name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/actions/variables#add-selected-repository-to-an-organization-variable + */ + "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/orgs/blocking#block-a-user-from-an-organization + */ + "PUT /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/codespaces/organizations#manage-access-control-for-organization-codespaces + */ + "PUT /orgs/{org}/codespaces/access": Operation<"/orgs/{org}/codespaces/access", "put">; + /** + * @see https://docs.github.com/rest/codespaces/organization-secrets#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/codespaces/organization-secrets#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/codespaces/organization-secrets#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/dependabot/secrets#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/dependabot/secrets#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/interactions/orgs#set-interaction-restrictions-for-an-organization + */ + "PUT /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/orgs/members#set-organization-membership-for-a-user + */ + "PUT /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/orgs/organization-roles#assign-an-organization-role-to-a-team + */ + "PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}": Operation<"/orgs/{org}/organization-roles/teams/{team_slug}/{role_id}", "put">; + /** + * @see https://docs.github.com/rest/orgs/organization-roles#assign-an-organization-role-to-a-user + */ + "PUT /orgs/{org}/organization-roles/users/{username}/{role_id}": Operation<"/orgs/{org}/organization-roles/users/{username}/{role_id}", "put">; + /** + * @see https://docs.github.com/rest/orgs/outside-collaborators#convert-an-organization-member-to-outside-collaborator + */ + "PUT /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/orgs/custom-properties#create-or-update-a-custom-property-for-an-organization + */ + "PUT /orgs/{org}/properties/schema/{custom_property_name}": Operation<"/orgs/{org}/properties/schema/{custom_property_name}", "put">; + /** + * @see https://docs.github.com/rest/orgs/members#set-public-organization-membership-for-the-authenticated-user + */ + "PUT /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "put">; + /** + * @see https://docs.github.com/rest/orgs/rules#update-an-organization-repository-ruleset + */ + "PUT /orgs/{org}/rulesets/{ruleset_id}": Operation<"/orgs/{org}/rulesets/{ruleset_id}", "put">; + /** + * @see https://docs.github.com/rest/orgs/security-managers#add-a-security-manager-team + */ + "PUT /orgs/{org}/security-managers/teams/{team_slug}": Operation<"/orgs/{org}/security-managers/teams/{team_slug}", "put">; + /** + * @see https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user + */ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/projects/collaborators#add-project-collaborator + */ + "PUT /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/actions/permissions#set-github-actions-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/actions/permissions#set-the-level-of-access-for-workflows-outside-of-the-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "put">; + /** + * @see https://docs.github.com/rest/actions/permissions#set-allowed-actions-and-reusable-workflows-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/actions/permissions#set-default-workflow-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/actions/self-hosted-runners#set-custom-labels-for-a-self-hosted-runner-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/actions/secrets#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/actions/workflows#disable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable", "put">; + /** + * @see https://docs.github.com/rest/actions/workflows#enable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable", "put">; + /** + * @see https://docs.github.com/rest/repos/repos#enable-automated-security-fixes + */ + "PUT /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#update-branch-protection + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-status-check-contexts + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-app-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-team-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "put">; + /** + * @see https://docs.github.com/rest/branches/branch-protection#set-user-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "put">; + /** + * @see https://docs.github.com/rest/codespaces/repository-secrets#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/collaborators/collaborators#add-a-repository-collaborator + */ + "PUT /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/repos/contents#create-or-update-file-contents + */ + "PUT /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "put">; + /** + * @see https://docs.github.com/rest/dependabot/secrets#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/environments#create-or-update-an-environment + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "put">; + /** + * @see https://docs.github.com/rest/deployments/branch-policies#update-a-deployment-branch-policy + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "put">; + /** + * @see https://docs.github.com/rest/actions/secrets#create-or-update-an-environment-secret + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/migrations/source-imports#start-an-import + */ + "PUT /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "put">; + /** + * @see https://docs.github.com/rest/interactions/repos#set-interaction-restrictions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/issues/labels#set-labels-for-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "put">; + /** + * @see https://docs.github.com/rest/issues/issues#lock-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "put">; + /** + * @see https://docs.github.com/rest/activity/notifications#mark-repository-notifications-as-read + */ + "PUT /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "put">; + /** + * @see https://docs.github.com/rest/pages/pages#update-information-about-a-apiname-pages-site + */ + "PUT /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "put">; + /** + * @see https://docs.github.com/rest/repos/repos#enable-private-vulnerability-reporting-for-a-repository + */ + "PUT /repos/{owner}/{repo}/private-vulnerability-reporting": Operation<"/repos/{owner}/{repo}/private-vulnerability-reporting", "put">; + /** + * @see https://docs.github.com/rest/pulls/pulls#merge-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "put">; + /** + * @see https://docs.github.com/rest/pulls/reviews#update-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "put">; + /** + * @see https://docs.github.com/rest/pulls/reviews#dismiss-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals", "put">; + /** + * @see https://docs.github.com/rest/pulls/pulls#update-a-pull-request-branch + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/update-branch", "put">; + /** + * @see https://docs.github.com/rest/repos/rules#update-a-repository-ruleset + */ + "PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}": Operation<"/repos/{owner}/{repo}/rulesets/{ruleset_id}", "put">; + /** + * @see https://docs.github.com/rest/activity/watching#set-a-repository-subscription + */ + "PUT /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "put">; + /** + * @see https://docs.github.com/rest/repos/repos#replace-all-repository-topics + */ + "PUT /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "put">; + /** + * @see https://docs.github.com/rest/repos/repos#enable-vulnerability-alerts + */ + "PUT /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "put">; + /** + * @see https://docs.github.com/rest/teams/members#add-team-member-legacy + */ + "PUT /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "put">; + /** + * @see https://docs.github.com/rest/teams/members#add-or-update-team-membership-for-a-user-legacy + */ + "PUT /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions-legacy + */ + "PUT /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/teams/teams#add-or-update-team-repository-permissions-legacy + */ + "PUT /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/users/blocking#block-a-user + */ + "PUT /user/blocks/{username}": Operation<"/user/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/codespaces/secrets#create-or-update-a-secret-for-the-authenticated-user + */ + "PUT /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/codespaces/secrets#set-selected-repositories-for-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/codespaces/secrets#add-a-selected-repository-to-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/users/followers#follow-a-user + */ + "PUT /user/following/{username}": Operation<"/user/following/{username}", "put">; + /** + * @see https://docs.github.com/rest/apps/installations#add-a-repository-to-an-app-installation + */ + "PUT /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/interactions/user#set-interaction-restrictions-for-your-public-repositories + */ + "PUT /user/interaction-limits": Operation<"/user/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/activity/starring#star-a-repository-for-the-authenticated-user + */ + "PUT /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "put">; +} +export {}; diff --git a/.github/octokit/node_modules/@octokit/types/dist-types/index.d.ts b/.github/octokit/node_modules/@octokit/types/dist-types/index.d.ts new file mode 100644 index 000000000..a640e7c97 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/dist-types/index.d.ts @@ -0,0 +1,20 @@ +export * from "./AuthInterface.js"; +export * from "./EndpointDefaults.js"; +export * from "./EndpointInterface.js"; +export * from "./EndpointOptions.js"; +export * from "./Fetch.js"; +export * from "./OctokitResponse.js"; +export * from "./RequestError.js"; +export * from "./RequestHeaders.js"; +export * from "./RequestInterface.js"; +export * from "./RequestMethod.js"; +export * from "./RequestOptions.js"; +export * from "./RequestParameters.js"; +export * from "./RequestRequestOptions.js"; +export * from "./ResponseHeaders.js"; +export * from "./Route.js"; +export * from "./StrategyInterface.js"; +export * from "./Url.js"; +export * from "./VERSION.js"; +export * from "./GetResponseTypeFromEndpointMethod.js"; +export * from "./generated/Endpoints.js"; diff --git a/.github/octokit/node_modules/@octokit/types/package.json b/.github/octokit/node_modules/@octokit/types/package.json new file mode 100644 index 000000000..d5dbb1e55 --- /dev/null +++ b/.github/octokit/node_modules/@octokit/types/package.json @@ -0,0 +1,47 @@ +{ + "name": "@octokit/types", + "version": "13.6.1", + "publishConfig": { + "access": "public", + "provenance": true + }, + "description": "Shared TypeScript definitions for Octokit projects", + "dependencies": { + "@octokit/openapi-types": "^22.2.0" + }, + "repository": "github:octokit/types.ts", + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "typescript" + ], + "author": "Gregor Martynus (https://twitter.com/gr2m)", + "license": "MIT", + "devDependencies": { + "@octokit/tsconfig": "^4.0.0", + "@types/node": ">= 8", + "github-openapi-graphql-query": "^4.0.0", + "handlebars": "^4.7.6", + "json-schema-to-typescript": "^15.0.0", + "lodash.set": "^4.3.2", + "npm-run-all2": "^6.0.0", + "pascal-case": "^4.0.0", + "prettier": "^3.0.0", + "semantic-release": "^24.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "sort-keys": "^5.0.0", + "string-to-jsdoc-comment": "^1.0.0", + "typedoc": "^0.26.0", + "typescript": "^5.0.0" + }, + "octokit": { + "openapi-version": "16.5.0" + }, + "files": [ + "dist-types/**" + ], + "types": "dist-types/index.d.ts", + "sideEffects": false +} diff --git a/.github/octokit/node_modules/before-after-hook/LICENSE b/.github/octokit/node_modules/before-after-hook/LICENSE new file mode 100644 index 000000000..225063c34 --- /dev/null +++ b/.github/octokit/node_modules/before-after-hook/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018 Gregor Martynus and other contributors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/.github/octokit/node_modules/before-after-hook/README.md b/.github/octokit/node_modules/before-after-hook/README.md new file mode 100644 index 000000000..6e67ffa56 --- /dev/null +++ b/.github/octokit/node_modules/before-after-hook/README.md @@ -0,0 +1,679 @@ +# before-after-hook + +> asynchronous hooks for internal functionality + +[![npm downloads](https://img.shields.io/npm/dw/before-after-hook.svg)](https://www.npmjs.com/package/before-after-hook) +[![Test](https://github.com/gr2m/before-after-hook/actions/workflows/test.yml/badge.svg)](https://github.com/gr2m/before-after-hook/actions/workflows/test.yml) + +## Usage + + + + + + +
+Browsers + +Load before-after-hook directly from cdn.skypack.dev + +```html + +``` + +
+Node + + +Install with npm install before-after-hook + +```js +import Hook from "before-after-hook"; +``` + +
+ +### Singular hook + +```js +// instantiate singular hook API +const hook = new Hook.Singular(); + +// Create a hook +async function getData(options) { + try { + const result = await hook(fetchFromDatabase, options); + return handleData(result); + } catch (error) { + return handleGetError(error); + } +} + +// register before/error/after hooks. +// The methods can be async or return a promise +hook.before(beforeHook); +hook.error(errorHook); +hook.after(afterHook); + +getData({ id: 123 }); +``` + +### Hook collection + +```js +// instantiate hook collection API +const hookCollection = new Hook.Collection(); + +// Create a hook +async function getData(options) { + try { + const result = await hookCollection("get", fetchFromDatabase, options); + return handleData(result); + } catch (error) { + return handleGetError(error); + } +} + +// register before/error/after hooks. +// The methods can be async or return a promise +hookCollection.before("get", beforeHook); +hookCollection.error("get", errorHook); +hookCollection.after("get", afterHook); + +getData({ id: 123 }); +``` + +### Hook.Singular vs Hook.Collection + +There's no fundamental difference between the `Hook.Singular` and `Hook.Collection` hooks except for the fact that a hook from a collection requires you to pass along the name. Therefore the following explanation applies to both code snippets as described above. + +The methods are executed in the following order + +1. `beforeHook` +2. `fetchFromDatabase` +3. `afterHook` +4. `handleData` + +`beforeHook` can mutate `options` before it’s passed to `fetchFromDatabase`. + +If an error is thrown in `beforeHook` or `fetchFromDatabase` then `errorHook` is +called next. + +If `afterHook` throws an error then `handleGetError` is called instead +of `handleData`. + +If `errorHook` throws an error then `handleGetError` is called next, otherwise +`afterHook` and `handleData`. + +You can also use `hook.wrap` to achieve the same thing as shown above (collection example): + +```js +hookCollection.wrap("get", async (getData, options) => { + await beforeHook(options); + + try { + const result = getData(options); + } catch (error) { + await errorHook(error, options); + } + + await afterHook(result, options); +}); +``` + +## API + +- [Singular Hook Constructor](#singular-hook-api) +- [Hook Collection Constructor](#hook-collection-api) + +## Singular hook API + +- [Singular constructor](#singular-constructor) +- [hook.api](#singular-api) +- [hook()](#singular-api) +- [hook.before()](#singular-api) +- [hook.error()](#singular-api) +- [hook.after()](#singular-api) +- [hook.wrap()](#singular-api) +- [hook.remove()](#singular-api) + +### Singular constructor + +The `Hook.Singular` constructor has no options and returns a `hook` instance with the +methods below: + +```js +const hook = new Hook.Singular(); +``` + +Using the singular hook is recommended for [TypeScript](#typescript) + +### Singular API + +The singular hook is a reference to a single hook. This means that there's no need to pass along any identifier (such as a `name` as can be seen in the [Hook.Collection API](#hookcollectionapi)). + +The API of a singular hook is exactly the same as a collection hook and we therefore suggest you read the [Hook.Collection API](#hookcollectionapi) and leave out any use of the `name` argument. Just skip it like described in this example: + +```js +const hook = new Hook.Singular(); + +// good +hook.before(beforeHook); +hook.after(afterHook); +hook(fetchFromDatabase, options); + +// bad +hook.before("get", beforeHook); +hook.after("get", afterHook); +hook("get", fetchFromDatabase, options); +``` + +## Hook collection API + +- [Collection constructor](#collection-constructor) +- [hookCollection.api](#hookcollectionapi) +- [hookCollection()](#hookcollection) +- [hookCollection.before()](#hookcollectionbefore) +- [hookCollection.error()](#hookcollectionerror) +- [hookCollection.after()](#hookcollectionafter) +- [hookCollection.wrap()](#hookcollectionwrap) +- [hookCollection.remove()](#hookcollectionremove) + +### Collection constructor + +The `Hook.Collection` constructor has no options and returns a `hookCollection` instance with the +methods below + +```js +const hookCollection = new Hook.Collection(); +``` + +### hookCollection.api + +Use the `api` property to return the public API: + +- [hookCollection.before()](#hookcollectionbefore) +- [hookCollection.after()](#hookcollectionafter) +- [hookCollection.error()](#hookcollectionerror) +- [hookCollection.wrap()](#hookcollectionwrap) +- [hookCollection.remove()](#hookcollectionremove) + +That way you don’t need to expose the [hookCollection()](#hookcollection) method to consumers of your library + +### hookCollection() + +Invoke before and after hooks. Returns a promise. + +```js +hookCollection(nameOrNames, method /*, options */); +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameString or Array of StringsHook name, for example 'save'. Or an array of names, see example below.Yes
methodFunctionCallback to be executed after all before hooks finished execution successfully. options is passed as first argumentYes
optionsObjectWill be passed to all before hooks as reference, so they can mutate itNo, defaults to empty object ({})
+ +Resolves with whatever `method` returns or resolves with. +Rejects with error that is thrown or rejected with by + +1. Any of the before hooks, whichever rejects / throws first +2. `method` +3. Any of the after hooks, whichever rejects / throws first + +Simple Example + +```js +hookCollection( + "save", + (record) => { + return store.save(record); + }, + record +); +// shorter: hookCollection('save', store.save, record) + +hookCollection.before("save", function addTimestamps(record) { + const now = new Date().toISOString(); + if (record.createdAt) { + record.updatedAt = now; + } else { + record.createdAt = now; + } +}); +``` + +Example defining multiple hooks at once. + +```js +hookCollection( + ["add", "save"], + (record) => { + return store.save(record); + }, + record +); + +hookCollection.before("add", function addTimestamps(record) { + if (!record.type) { + throw new Error("type property is required"); + } +}); + +hookCollection.before("save", function addTimestamps(record) { + if (!record.type) { + throw new Error("type property is required"); + } +}); +``` + +Defining multiple hooks is helpful if you have similar methods for which you want to define separate hooks, but also an additional hook that gets called for all at once. The example above is equal to this: + +```js +hookCollection( + "add", + (record) => { + return hookCollection( + "save", + (record) => { + return store.save(record); + }, + record + ); + }, + record +); +``` + +### hookCollection.before() + +Add before hook for given name. + +```js +hookCollection.before(name, method); +``` + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
methodFunction + Executed before the wrapped method. Called with the hook’s + options argument. Before hooks can mutate the passed options + before they are passed to the wrapped method. + Yes
+ +Example + +```js +hookCollection.before("save", function validate(record) { + if (!record.name) { + throw new Error("name property is required"); + } +}); +``` + +### hookCollection.error() + +Add error hook for given name. + +```js +hookCollection.error(name, method); +``` + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
methodFunction + Executed when an error occurred in either the wrapped method or a + before hook. Called with the thrown error + and the hook’s options argument. The first method + which does not throw an error will set the result that the after hook + methods will receive. + Yes
+ +Example + +```js +hookCollection.error("save", (error, options) => { + if (error.ignore) return; + throw error; +}); +``` + +### hookCollection.after() + +Add after hook for given name. + +```js +hookCollection.after(name, method); +``` + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
methodFunction + Executed after wrapped method. Called with what the wrapped method + resolves with the hook’s options argument. + Yes
+ +Example + +```js +hookCollection.after("save", (result, options) => { + if (result.updatedAt) { + app.emit("update", result); + } else { + app.emit("create", result); + } +}); +``` + +### hookCollection.wrap() + +Add wrap hook for given name. + +```js +hookCollection.wrap(name, method); +``` + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
methodFunction + Receives both the wrapped method and the passed options as arguments so it can add logic before and after the wrapped method, it can handle errors and even replace the wrapped method altogether + Yes
+ +Example + +```js +hookCollection.wrap("save", async (saveInDatabase, options) => { + if (!record.name) { + throw new Error("name property is required"); + } + + try { + const result = await saveInDatabase(options); + + if (result.updatedAt) { + app.emit("update", result); + } else { + app.emit("create", result); + } + + return result; + } catch (error) { + if (error.ignore) return; + throw error; + } +}); +``` + +See also: [Test mock example](examples/test-mock-example.md) + +### hookCollection.remove() + +Removes hook for given name. + +```js +hookCollection.remove(name, hookMethod); +``` + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
beforeHookMethodFunction + Same function that was previously passed to hookCollection.before(), hookCollection.error(), hookCollection.after() or hookCollection.wrap() + Yes
+ +Example + +```js +hookCollection.remove("save", validateRecord); +``` + +## TypeScript + +This library contains type definitions for TypeScript. + +### Type support for `Singular`: + +```ts +import Hook from "before-after-hook"; + +type TOptions = { foo: string }; // type for options +type TResult = { bar: number }; // type for result +type TError = Error; // type for error + +const hook = new Hook.Singular(); + +hook.before((options) => { + // `options.foo` has `string` type + + // not allowed + options.foo = 42; + + // allowed + options.foo = "Forty-Two"; +}); + +const hookedMethod = hook( + (options) => { + // `options.foo` has `string` type + + // not allowed, because it does not satisfy the `R` type + return { foo: 42 }; + + // allowed + return { bar: 42 }; + }, + { foo: "Forty-Two" } +); +``` + +You can choose not to pass the types for options, result or error. So, these are completely valid: + +```ts +const hook = new Hook.Singular(); +const hook = new Hook.Singular(); +const hook = new Hook.Singular(); +``` + +In these cases, the omitted types will implicitly be `any`. + +### Type support for `Collection`: + +`Collection` also has strict type support. You can use it like this: + +```ts +import { Hook } from "before-after-hook"; + +type HooksType = { + add: { + Options: { type: string }; + Result: { id: number }; + Error: Error; + }; + save: { + Options: { type: string }; + Result: { id: number }; + }; + read: { + Options: { id: number; foo: number }; + }; + destroy: { + Options: { id: number; foo: string }; + }; +}; + +const hooks = new Hook.Collection(); + +hooks.before("destroy", (options) => { + // `options.id` has `number` type +}); + +hooks.error("add", (err, options) => { + // `options.type` has `string` type + // `err` is `instanceof Error` +}); + +hooks.error("save", (err, options) => { + // `options.type` has `string` type + // `err` has type `any` +}); + +hooks.after("save", (result, options) => { + // `options.type` has `string` type + // `result.id` has `number` type +}); +``` + +You can choose not to pass the types altogether. In that case, everything will implicitly be `any`: + +```ts +const hook = new Hook.Collection(); +``` + +Alternative imports: + +```ts +import { Singular, Collection } from "before-after-hook"; + +const hook = new Singular(); +const hooks = new Collection(); +``` + +## Upgrading to 1.4 + +Since version 1.4 the `Hook` constructor has been deprecated in favor of returning `Hook.Singular` in an upcoming breaking release. + +Version 1.4 is still 100% backwards-compatible, but if you want to continue using hook collections, we recommend using the `Hook.Collection` constructor instead before the next release. + +For even more details, check out [the PR](https://github.com/gr2m/before-after-hook/pull/52). + +## See also + +If `before-after-hook` is not for you, have a look at one of these alternatives: + +- https://github.com/keystonejs/grappling-hook +- https://github.com/sebelga/promised-hooks +- https://github.com/bnoguchi/hooks-js +- https://github.com/cb1kenobi/hook-emitter + +## License + +[Apache 2.0](LICENSE) diff --git a/.github/octokit/node_modules/before-after-hook/index.d.ts b/.github/octokit/node_modules/before-after-hook/index.d.ts new file mode 100644 index 000000000..1f69f0ae6 --- /dev/null +++ b/.github/octokit/node_modules/before-after-hook/index.d.ts @@ -0,0 +1,174 @@ +type HookMethod = ( + options: Options +) => Result | Promise; + +type BeforeHook = (options: Options) => void | Promise; +type ErrorHook = ( + error: Error, + options: Options +) => unknown | Promise; +type AfterHook = ( + result: Result, + options: Options +) => void | Promise; +type WrapHook = ( + hookMethod: HookMethod, + options: Options +) => Result | Promise; + +type AnyHook = + | BeforeHook + | ErrorHook + | AfterHook + | WrapHook; + +type TypeStoreKey = "Options" | "Result" | "Error"; +type TypeStore = { [key in TypeStoreKey]?: any }; +type GetType< + TStore extends TypeStore, + TKey extends TypeStoreKey +> = TKey extends keyof TStore ? TStore[TKey] : any; + +export interface HookCollection< + HooksType extends Record = Record< + string, + { Options: any; Result: any; Error: any } + >, + HookName extends keyof HooksType = keyof HooksType +> { + /** + * Invoke before and after hooks + */ + ( + name: Name | Name[], + hookMethod: HookMethod< + GetType, + GetType + >, + options?: GetType + ): Promise>; + /** + * Add `before` hook for given `name` + */ + before( + name: Name, + beforeHook: BeforeHook> + ): void; + /** + * Add `error` hook for given `name` + */ + error( + name: Name, + errorHook: ErrorHook< + GetType, + GetType + > + ): void; + /** + * Add `after` hook for given `name` + */ + after( + name: Name, + afterHook: AfterHook< + GetType, + GetType + > + ): void; + /** + * Add `wrap` hook for given `name` + */ + wrap( + name: Name, + wrapHook: WrapHook< + GetType, + GetType + > + ): void; + /** + * Remove added hook for given `name` + */ + remove( + name: Name, + hook: AnyHook< + GetType, + GetType, + GetType + > + ): void; + /** + * Public API + */ + api: Pick< + HookCollection, + "before" | "error" | "after" | "wrap" | "remove" + >; +} + +export interface HookSingular { + /** + * Invoke before and after hooks + */ + (hookMethod: HookMethod, options?: Options): Promise; + /** + * Add `before` hook + */ + before(beforeHook: BeforeHook): void; + /** + * Add `error` hook + */ + error(errorHook: ErrorHook): void; + /** + * Add `after` hook + */ + after(afterHook: AfterHook): void; + /** + * Add `wrap` hook + */ + wrap(wrapHook: WrapHook): void; + /** + * Remove added hook + */ + remove(hook: AnyHook): void; + /** + * Public API + */ + api: Pick< + HookSingular, + "before" | "error" | "after" | "wrap" | "remove" + >; +} + +type Collection = new < + HooksType extends Record = Record +>() => HookCollection; +type Singular = new < + Options = unknown, + Result = unknown, + Error = unknown +>() => HookSingular; + +interface Hook { + /** + * Creates a collection of hooks + */ + Collection: Collection; + + /** + * Creates a nameless hook that supports strict typings + */ + Singular: Singular; +} + +declare const Hook: { + /** + * Creates a collection of hooks + */ + Collection: Collection; + + /** + * Creates a nameless hook that supports strict typings + */ + Singular: Singular; +}; + +export default Hook; diff --git a/.github/octokit/node_modules/before-after-hook/index.js b/.github/octokit/node_modules/before-after-hook/index.js new file mode 100644 index 000000000..444f99d03 --- /dev/null +++ b/.github/octokit/node_modules/before-after-hook/index.js @@ -0,0 +1,45 @@ +// @ts-check + +import { register } from "./lib/register.js"; +import { addHook } from "./lib/add.js"; +import { removeHook } from "./lib/remove.js"; + +// bind with array of arguments: https://stackoverflow.com/a/21792913 +const bind = Function.bind; +const bindable = bind.bind(bind); + +function bindApi(hook, state, name) { + const removeHookRef = bindable(removeHook, null).apply( + null, + name ? [state, name] : [state] + ); + hook.api = { remove: removeHookRef }; + hook.remove = removeHookRef; + ["before", "error", "after", "wrap"].forEach((kind) => { + const args = name ? [state, kind, name] : [state, kind]; + hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args); + }); +} + +function Singular() { + const singularHookName = Symbol("Singular"); + const singularHookState = { + registry: {}, + }; + const singularHook = register.bind(null, singularHookState, singularHookName); + bindApi(singularHook, singularHookState, singularHookName); + return singularHook; +} + +function Collection() { + const state = { + registry: {}, + }; + + const hook = register.bind(null, state); + bindApi(hook, state); + + return hook; +} + +export default { Singular, Collection }; diff --git a/.github/octokit/node_modules/before-after-hook/lib/add.js b/.github/octokit/node_modules/before-after-hook/lib/add.js new file mode 100644 index 000000000..f19ee7133 --- /dev/null +++ b/.github/octokit/node_modules/before-after-hook/lib/add.js @@ -0,0 +1,46 @@ +// @ts-check + +export function addHook(state, kind, name, hook) { + const orig = hook; + if (!state.registry[name]) { + state.registry[name] = []; + } + + if (kind === "before") { + hook = (method, options) => { + return Promise.resolve() + .then(orig.bind(null, options)) + .then(method.bind(null, options)); + }; + } + + if (kind === "after") { + hook = (method, options) => { + let result; + return Promise.resolve() + .then(method.bind(null, options)) + .then((result_) => { + result = result_; + return orig(result, options); + }) + .then(() => { + return result; + }); + }; + } + + if (kind === "error") { + hook = (method, options) => { + return Promise.resolve() + .then(method.bind(null, options)) + .catch((error) => { + return orig(error, options); + }); + }; + } + + state.registry[name].push({ + hook: hook, + orig: orig, + }); +} diff --git a/.github/octokit/node_modules/before-after-hook/lib/register.js b/.github/octokit/node_modules/before-after-hook/lib/register.js new file mode 100644 index 000000000..cc4e3018d --- /dev/null +++ b/.github/octokit/node_modules/before-after-hook/lib/register.js @@ -0,0 +1,27 @@ +// @ts-check + +export function register(state, name, method, options) { + if (typeof method !== "function") { + throw new Error("method for before hook must be a function"); + } + + if (!options) { + options = {}; + } + + if (Array.isArray(name)) { + return name.reverse().reduce((callback, name) => { + return register.bind(null, state, name, callback, options); + }, method)(); + } + + return Promise.resolve().then(() => { + if (!state.registry[name]) { + return method(options); + } + + return state.registry[name].reduce((method, registered) => { + return registered.hook.bind(null, method, options); + }, method)(); + }); +} diff --git a/.github/octokit/node_modules/before-after-hook/lib/remove.js b/.github/octokit/node_modules/before-after-hook/lib/remove.js new file mode 100644 index 000000000..e844890bc --- /dev/null +++ b/.github/octokit/node_modules/before-after-hook/lib/remove.js @@ -0,0 +1,19 @@ +// @ts-check + +export function removeHook(state, name, method) { + if (!state.registry[name]) { + return; + } + + const index = state.registry[name] + .map((registered) => { + return registered.orig; + }) + .indexOf(method); + + if (index === -1) { + return; + } + + state.registry[name].splice(index, 1); +} diff --git a/.github/octokit/node_modules/before-after-hook/package.json b/.github/octokit/node_modules/before-after-hook/package.json new file mode 100644 index 000000000..f23f655db --- /dev/null +++ b/.github/octokit/node_modules/before-after-hook/package.json @@ -0,0 +1,55 @@ +{ + "name": "before-after-hook", + "type": "module", + "version": "3.0.2", + "description": "asynchronous before/error/after hooks for internal functionality", + "exports": "./index.js", + "types": "./index.d.ts", + "files": [ + "index.js", + "index.d.ts", + "lib" + ], + "scripts": { + "test": "npm run test:code && npm run test:tsc && npm run test:tsd && npm run lint", + "test:code": "c8 --100 ava test/*.test.js", + "test:tsc": "tsc --allowJs --noEmit --esModuleInterop --skipLibCheck --lib es2020 index.js", + "test:tsd": "tsd", + "lint": "prettier --check \"*.{js,json,ts,md}\" \".github/**/*.yml\"", + "lint:fix": "prettier --write \"*.{js,json,ts,md}\" \".github/**/*.yml\"", + "coverage": "c8 report --reporter html", + "postcoverage": "open-cli coverage/index.html" + }, + "repository": "github:gr2m/before-after-hook", + "keywords": [ + "hook", + "hooks", + "api" + ], + "author": "Gregor Martynus", + "license": "Apache-2.0", + "devDependencies": { + "ava": "^4.3.3", + "c8": "^7.12.0", + "prettier": "^2.0.0", + "sinon": "^14.0.1", + "tsd": "^0.24.1", + "typescript": "^4.8.4" + }, + "release": { + "branches": [ + "+([0-9]).x", + "main", + "next", + { + "name": "beta", + "prerelease": true + } + ] + }, + "renovate": { + "extends": [ + "github>gr2m/.github" + ] + } +} diff --git a/.github/octokit/node_modules/lru-cache/LICENSE b/.github/octokit/node_modules/lru-cache/LICENSE new file mode 100644 index 000000000..f785757cd --- /dev/null +++ b/.github/octokit/node_modules/lru-cache/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2010-2023 Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/.github/octokit/node_modules/lru-cache/README.md b/.github/octokit/node_modules/lru-cache/README.md new file mode 100644 index 000000000..931822f3a --- /dev/null +++ b/.github/octokit/node_modules/lru-cache/README.md @@ -0,0 +1,331 @@ +# lru-cache + +A cache object that deletes the least-recently-used items. + +Specify a max number of the most recently used items that you +want to keep, and this cache will keep that many of the most +recently accessed items. + +This is not primarily a TTL cache, and does not make strong TTL +guarantees. There is no preemptive pruning of expired items by +default, but you _may_ set a TTL on the cache or on a single +`set`. If you do so, it will treat expired items as missing, and +delete them when fetched. If you are more interested in TTL +caching than LRU caching, check out +[@isaacs/ttlcache](http://npm.im/@isaacs/ttlcache). + +As of version 7, this is one of the most performant LRU +implementations available in JavaScript, and supports a wide +diversity of use cases. However, note that using some of the +features will necessarily impact performance, by causing the +cache to have to do more work. See the "Performance" section +below. + +## Installation + +```bash +npm install lru-cache --save +``` + +## Usage + +```js +// hybrid module, either works +import { LRUCache } from 'lru-cache' +// or: +const { LRUCache } = require('lru-cache') +// or in minified form for web browsers: +import { LRUCache } from 'http://unpkg.com/lru-cache@9/dist/mjs/index.min.mjs' + +// At least one of 'max', 'ttl', or 'maxSize' is required, to prevent +// unsafe unbounded storage. +// +// In most cases, it's best to specify a max for performance, so all +// the required memory allocation is done up-front. +// +// All the other options are optional, see the sections below for +// documentation on what each one does. Most of them can be +// overridden for specific items in get()/set() +const options = { + max: 500, + + // for use with tracking overall storage size + maxSize: 5000, + sizeCalculation: (value, key) => { + return 1 + }, + + // for use when you need to clean up something when objects + // are evicted from the cache + dispose: (value, key) => { + freeFromMemoryOrWhatever(value) + }, + + // how long to live in ms + ttl: 1000 * 60 * 5, + + // return stale items before removing from cache? + allowStale: false, + + updateAgeOnGet: false, + updateAgeOnHas: false, + + // async method to use for cache.fetch(), for + // stale-while-revalidate type of behavior + fetchMethod: async ( + key, + staleValue, + { options, signal, context } + ) => {}, +} + +const cache = new LRUCache(options) + +cache.set('key', 'value') +cache.get('key') // "value" + +// non-string keys ARE fully supported +// but note that it must be THE SAME object, not +// just a JSON-equivalent object. +var someObject = { a: 1 } +cache.set(someObject, 'a value') +// Object keys are not toString()-ed +cache.set('[object Object]', 'a different value') +assert.equal(cache.get(someObject), 'a value') +// A similar object with same keys/values won't work, +// because it's a different object identity +assert.equal(cache.get({ a: 1 }), undefined) + +cache.clear() // empty the cache +``` + +If you put more stuff in the cache, then less recently used items +will fall out. That's what an LRU cache is. + +For full description of the API and all options, please see [the +LRUCache typedocs](https://isaacs.github.io/node-lru-cache/) + +## Storage Bounds Safety + +This implementation aims to be as flexible as possible, within +the limits of safe memory consumption and optimal performance. + +At initial object creation, storage is allocated for `max` items. +If `max` is set to zero, then some performance is lost, and item +count is unbounded. Either `maxSize` or `ttl` _must_ be set if +`max` is not specified. + +If `maxSize` is set, then this creates a safe limit on the +maximum storage consumed, but without the performance benefits of +pre-allocation. When `maxSize` is set, every item _must_ provide +a size, either via the `sizeCalculation` method provided to the +constructor, or via a `size` or `sizeCalculation` option provided +to `cache.set()`. The size of every item _must_ be a positive +integer. + +If neither `max` nor `maxSize` are set, then `ttl` tracking must +be enabled. Note that, even when tracking item `ttl`, items are +_not_ preemptively deleted when they become stale, unless +`ttlAutopurge` is enabled. Instead, they are only purged the +next time the key is requested. Thus, if `ttlAutopurge`, `max`, +and `maxSize` are all not set, then the cache will potentially +grow unbounded. + +In this case, a warning is printed to standard error. Future +versions may require the use of `ttlAutopurge` if `max` and +`maxSize` are not specified. + +If you truly wish to use a cache that is bound _only_ by TTL +expiration, consider using a `Map` object, and calling +`setTimeout` to delete entries when they expire. It will perform +much better than an LRU cache. + +Here is an implementation you may use, under the same +[license](./LICENSE) as this package: + +```js +// a storage-unbounded ttl cache that is not an lru-cache +const cache = { + data: new Map(), + timers: new Map(), + set: (k, v, ttl) => { + if (cache.timers.has(k)) { + clearTimeout(cache.timers.get(k)) + } + cache.timers.set( + k, + setTimeout(() => cache.delete(k), ttl) + ) + cache.data.set(k, v) + }, + get: k => cache.data.get(k), + has: k => cache.data.has(k), + delete: k => { + if (cache.timers.has(k)) { + clearTimeout(cache.timers.get(k)) + } + cache.timers.delete(k) + return cache.data.delete(k) + }, + clear: () => { + cache.data.clear() + for (const v of cache.timers.values()) { + clearTimeout(v) + } + cache.timers.clear() + }, +} +``` + +If that isn't to your liking, check out +[@isaacs/ttlcache](http://npm.im/@isaacs/ttlcache). + +## Storing Undefined Values + +This cache never stores undefined values, as `undefined` is used +internally in a few places to indicate that a key is not in the +cache. + +You may call `cache.set(key, undefined)`, but this is just +an alias for `cache.delete(key)`. Note that this has the effect +that `cache.has(key)` will return _false_ after setting it to +undefined. + +```js +cache.set(myKey, undefined) +cache.has(myKey) // false! +``` + +If you need to track `undefined` values, and still note that the +key is in the cache, an easy workaround is to use a sigil object +of your own. + +```js +import { LRUCache } from 'lru-cache' +const undefinedValue = Symbol('undefined') +const cache = new LRUCache(...) +const mySet = (key, value) => + cache.set(key, value === undefined ? undefinedValue : value) +const myGet = (key, value) => { + const v = cache.get(key) + return v === undefinedValue ? undefined : v +} +``` + +## Performance + +As of January 2022, version 7 of this library is one of the most +performant LRU cache implementations in JavaScript. + +Benchmarks can be extremely difficult to get right. In +particular, the performance of set/get/delete operations on +objects will vary _wildly_ depending on the type of key used. V8 +is highly optimized for objects with keys that are short strings, +especially integer numeric strings. Thus any benchmark which +tests _solely_ using numbers as keys will tend to find that an +object-based approach performs the best. + +Note that coercing _anything_ to strings to use as object keys is +unsafe, unless you can be 100% certain that no other type of +value will be used. For example: + +```js +const myCache = {} +const set = (k, v) => (myCache[k] = v) +const get = k => myCache[k] + +set({}, 'please hang onto this for me') +set('[object Object]', 'oopsie') +``` + +Also beware of "Just So" stories regarding performance. Garbage +collection of large (especially: deep) object graphs can be +incredibly costly, with several "tipping points" where it +increases exponentially. As a result, putting that off until +later can make it much worse, and less predictable. If a library +performs well, but only in a scenario where the object graph is +kept shallow, then that won't help you if you are using large +objects as keys. + +In general, when attempting to use a library to improve +performance (such as a cache like this one), it's best to choose +an option that will perform well in the sorts of scenarios where +you'll actually use it. + +This library is optimized for repeated gets and minimizing +eviction time, since that is the expected need of a LRU. Set +operations are somewhat slower on average than a few other +options, in part because of that optimization. It is assumed +that you'll be caching some costly operation, ideally as rarely +as possible, so optimizing set over get would be unwise. + +If performance matters to you: + +1. If it's at all possible to use small integer values as keys, + and you can guarantee that no other types of values will be + used as keys, then do that, and use a cache such as + [lru-fast](https://npmjs.com/package/lru-fast), or + [mnemonist's + LRUCache](https://yomguithereal.github.io/mnemonist/lru-cache) + which uses an Object as its data store. + +2. Failing that, if at all possible, use short non-numeric + strings (ie, less than 256 characters) as your keys, and use + [mnemonist's + LRUCache](https://yomguithereal.github.io/mnemonist/lru-cache). + +3. If the types of your keys will be anything else, especially + long strings, strings that look like floats, objects, or some + mix of types, or if you aren't sure, then this library will + work well for you. + + If you do not need the features that this library provides + (like asynchronous fetching, a variety of TTL staleness + options, and so on), then [mnemonist's + LRUMap](https://yomguithereal.github.io/mnemonist/lru-map) is + a very good option, and just slightly faster than this module + (since it does considerably less). + +4. Do not use a `dispose` function, size tracking, or especially + ttl behavior, unless absolutely needed. These features are + convenient, and necessary in some use cases, and every attempt + has been made to make the performance impact minimal, but it + isn't nothing. + +## Breaking Changes in Version 7 + +This library changed to a different algorithm and internal data +structure in version 7, yielding significantly better +performance, albeit with some subtle changes as a result. + +If you were relying on the internals of LRUCache in version 6 or +before, it probably will not work in version 7 and above. + +## Breaking Changes in Version 8 + +- The `fetchContext` option was renamed to `context`, and may no + longer be set on the cache instance itself. +- Rewritten in TypeScript, so pretty much all the types moved + around a lot. +- The AbortController/AbortSignal polyfill was removed. For this + reason, **Node version 16.14.0 or higher is now required**. +- Internal properties were moved to actual private class + properties. +- Keys and values must not be `null` or `undefined`. +- Minified export available at `'lru-cache/min'`, for both CJS + and MJS builds. + +## Breaking Changes in Version 9 + +- Named export only, no default export. +- AbortController polyfill returned, albeit with a warning when + used. + +## Breaking Changes in Version 10 + +- `cache.fetch()` return type is now `Promise` + instead of `Promise`. This is an irrelevant change + practically speaking, but can require changes for TypeScript + users. + +For more info, see the [change log](CHANGELOG.md). diff --git a/.github/octokit/node_modules/lru-cache/dist/commonjs/index.d.ts b/.github/octokit/node_modules/lru-cache/dist/commonjs/index.d.ts new file mode 100644 index 000000000..f59de7602 --- /dev/null +++ b/.github/octokit/node_modules/lru-cache/dist/commonjs/index.d.ts @@ -0,0 +1,1277 @@ +/** + * @module LRUCache + */ +declare const TYPE: unique symbol; +export type PosInt = number & { + [TYPE]: 'Positive Integer'; +}; +export type Index = number & { + [TYPE]: 'LRUCache Index'; +}; +export type UintArray = Uint8Array | Uint16Array | Uint32Array; +export type NumberArray = UintArray | number[]; +declare class ZeroArray extends Array { + constructor(size: number); +} +export type { ZeroArray }; +export type { Stack }; +export type StackLike = Stack | Index[]; +declare class Stack { + #private; + heap: NumberArray; + length: number; + static create(max: number): StackLike; + constructor(max: number, HeapCls: { + new (n: number): NumberArray; + }); + push(n: Index): void; + pop(): Index; +} +/** + * Promise representing an in-progress {@link LRUCache#fetch} call + */ +export type BackgroundFetch = Promise & { + __returned: BackgroundFetch | undefined; + __abortController: AbortController; + __staleWhileFetching: V | undefined; +}; +export type DisposeTask = [ + value: V, + key: K, + reason: LRUCache.DisposeReason +]; +export declare namespace LRUCache { + /** + * An integer greater than 0, reflecting the calculated size of items + */ + type Size = number; + /** + * Integer greater than 0, representing some number of milliseconds, or the + * time at which a TTL started counting from. + */ + type Milliseconds = number; + /** + * An integer greater than 0, reflecting a number of items + */ + type Count = number; + /** + * The reason why an item was removed from the cache, passed + * to the {@link Disposer} methods. + * + * - `evict`: The item was evicted because it is the least recently used, + * and the cache is full. + * - `set`: A new value was set, overwriting the old value being disposed. + * - `delete`: The item was explicitly deleted, either by calling + * {@link LRUCache#delete}, {@link LRUCache#clear}, or + * {@link LRUCache#set} with an undefined value. + * - `expire`: The item was removed due to exceeding its TTL. + * - `fetch`: A {@link OptionsBase#fetchMethod} operation returned + * `undefined` or was aborted, causing the item to be deleted. + */ + type DisposeReason = 'evict' | 'set' | 'delete' | 'expire' | 'fetch'; + /** + * A method called upon item removal, passed as the + * {@link OptionsBase.dispose} and/or + * {@link OptionsBase.disposeAfter} options. + */ + type Disposer = (value: V, key: K, reason: DisposeReason) => void; + /** + * A function that returns the effective calculated size + * of an entry in the cache. + */ + type SizeCalculator = (value: V, key: K) => Size; + /** + * Options provided to the + * {@link OptionsBase.fetchMethod} function. + */ + interface FetcherOptions { + signal: AbortSignal; + options: FetcherFetchOptions; + /** + * Object provided in the {@link FetchOptions.context} option to + * {@link LRUCache#fetch} + */ + context: FC; + } + /** + * Occasionally, it may be useful to track the internal behavior of the + * cache, particularly for logging, debugging, or for behavior within the + * `fetchMethod`. To do this, you can pass a `status` object to the + * {@link LRUCache#fetch}, {@link LRUCache#get}, {@link LRUCache#set}, + * {@link LRUCache#memo}, and {@link LRUCache#has} methods. + * + * The `status` option should be a plain JavaScript object. The following + * fields will be set on it appropriately, depending on the situation. + */ + interface Status { + /** + * The status of a set() operation. + * + * - add: the item was not found in the cache, and was added + * - update: the item was in the cache, with the same value provided + * - replace: the item was in the cache, and replaced + * - miss: the item was not added to the cache for some reason + */ + set?: 'add' | 'update' | 'replace' | 'miss'; + /** + * the ttl stored for the item, or undefined if ttls are not used. + */ + ttl?: Milliseconds; + /** + * the start time for the item, or undefined if ttls are not used. + */ + start?: Milliseconds; + /** + * The timestamp used for TTL calculation + */ + now?: Milliseconds; + /** + * the remaining ttl for the item, or undefined if ttls are not used. + */ + remainingTTL?: Milliseconds; + /** + * The calculated size for the item, if sizes are used. + */ + entrySize?: Size; + /** + * The total calculated size of the cache, if sizes are used. + */ + totalCalculatedSize?: Size; + /** + * A flag indicating that the item was not stored, due to exceeding the + * {@link OptionsBase.maxEntrySize} + */ + maxEntrySizeExceeded?: true; + /** + * The old value, specified in the case of `set:'update'` or + * `set:'replace'` + */ + oldValue?: V; + /** + * The results of a {@link LRUCache#has} operation + * + * - hit: the item was found in the cache + * - stale: the item was found in the cache, but is stale + * - miss: the item was not found in the cache + */ + has?: 'hit' | 'stale' | 'miss'; + /** + * The status of a {@link LRUCache#fetch} operation. + * Note that this can change as the underlying fetch() moves through + * various states. + * + * - inflight: there is another fetch() for this key which is in process + * - get: there is no {@link OptionsBase.fetchMethod}, so + * {@link LRUCache#get} was called. + * - miss: the item is not in cache, and will be fetched. + * - hit: the item is in the cache, and was resolved immediately. + * - stale: the item is in the cache, but stale. + * - refresh: the item is in the cache, and not stale, but + * {@link FetchOptions.forceRefresh} was specified. + */ + fetch?: 'get' | 'inflight' | 'miss' | 'hit' | 'stale' | 'refresh'; + /** + * The {@link OptionsBase.fetchMethod} was called + */ + fetchDispatched?: true; + /** + * The cached value was updated after a successful call to + * {@link OptionsBase.fetchMethod} + */ + fetchUpdated?: true; + /** + * The reason for a fetch() rejection. Either the error raised by the + * {@link OptionsBase.fetchMethod}, or the reason for an + * AbortSignal. + */ + fetchError?: Error; + /** + * The fetch received an abort signal + */ + fetchAborted?: true; + /** + * The abort signal received was ignored, and the fetch was allowed to + * continue. + */ + fetchAbortIgnored?: true; + /** + * The fetchMethod promise resolved successfully + */ + fetchResolved?: true; + /** + * The fetchMethod promise was rejected + */ + fetchRejected?: true; + /** + * The status of a {@link LRUCache#get} operation. + * + * - fetching: The item is currently being fetched. If a previous value + * is present and allowed, that will be returned. + * - stale: The item is in the cache, and is stale. + * - hit: the item is in the cache + * - miss: the item is not in the cache + */ + get?: 'stale' | 'hit' | 'miss'; + /** + * A fetch or get operation returned a stale value. + */ + returnedStale?: true; + } + /** + * options which override the options set in the LRUCache constructor + * when calling {@link LRUCache#fetch}. + * + * This is the union of {@link GetOptions} and {@link SetOptions}, plus + * {@link OptionsBase.noDeleteOnFetchRejection}, + * {@link OptionsBase.allowStaleOnFetchRejection}, + * {@link FetchOptions.forceRefresh}, and + * {@link FetcherOptions.context} + * + * Any of these may be modified in the {@link OptionsBase.fetchMethod} + * function, but the {@link GetOptions} fields will of course have no + * effect, as the {@link LRUCache#get} call already happened by the time + * the fetchMethod is called. + */ + interface FetcherFetchOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet' | 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL' | 'noDeleteOnFetchRejection' | 'allowStaleOnFetchRejection' | 'ignoreFetchAbort' | 'allowStaleOnFetchAbort'> { + status?: Status; + size?: Size; + } + /** + * Options that may be passed to the {@link LRUCache#fetch} method. + */ + interface FetchOptions extends FetcherFetchOptions { + /** + * Set to true to force a re-load of the existing data, even if it + * is not yet stale. + */ + forceRefresh?: boolean; + /** + * Context provided to the {@link OptionsBase.fetchMethod} as + * the {@link FetcherOptions.context} param. + * + * If the FC type is specified as unknown (the default), + * undefined or void, then this is optional. Otherwise, it will + * be required. + */ + context?: FC; + signal?: AbortSignal; + status?: Status; + } + /** + * Options provided to {@link LRUCache#fetch} when the FC type is something + * other than `unknown`, `undefined`, or `void` + */ + interface FetchOptionsWithContext extends FetchOptions { + context: FC; + } + /** + * Options provided to {@link LRUCache#fetch} when the FC type is + * `undefined` or `void` + */ + interface FetchOptionsNoContext extends FetchOptions { + context?: undefined; + } + interface MemoOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet' | 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL' | 'noDeleteOnFetchRejection' | 'allowStaleOnFetchRejection' | 'ignoreFetchAbort' | 'allowStaleOnFetchAbort'> { + /** + * Set to true to force a re-load of the existing data, even if it + * is not yet stale. + */ + forceRefresh?: boolean; + /** + * Context provided to the {@link OptionsBase.memoMethod} as + * the {@link MemoizerOptions.context} param. + * + * If the FC type is specified as unknown (the default), + * undefined or void, then this is optional. Otherwise, it will + * be required. + */ + context?: FC; + status?: Status; + } + /** + * Options provided to {@link LRUCache#memo} when the FC type is something + * other than `unknown`, `undefined`, or `void` + */ + interface MemoOptionsWithContext extends MemoOptions { + context: FC; + } + /** + * Options provided to {@link LRUCache#memo} when the FC type is + * `undefined` or `void` + */ + interface MemoOptionsNoContext extends MemoOptions { + context?: undefined; + } + /** + * Options provided to the + * {@link OptionsBase.memoMethod} function. + */ + interface MemoizerOptions { + options: MemoizerMemoOptions; + /** + * Object provided in the {@link MemoOptions.context} option to + * {@link LRUCache#memo} + */ + context: FC; + } + /** + * options which override the options set in the LRUCache constructor + * when calling {@link LRUCache#memo}. + * + * This is the union of {@link GetOptions} and {@link SetOptions}, plus + * {@link MemoOptions.forceRefresh}, and + * {@link MemoerOptions.context} + * + * Any of these may be modified in the {@link OptionsBase.memoMethod} + * function, but the {@link GetOptions} fields will of course have no + * effect, as the {@link LRUCache#get} call already happened by the time + * the memoMethod is called. + */ + interface MemoizerMemoOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet' | 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'> { + status?: Status; + size?: Size; + start?: Milliseconds; + } + /** + * Options that may be passed to the {@link LRUCache#has} method. + */ + interface HasOptions extends Pick, 'updateAgeOnHas'> { + status?: Status; + } + /** + * Options that may be passed to the {@link LRUCache#get} method. + */ + interface GetOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet'> { + status?: Status; + } + /** + * Options that may be passed to the {@link LRUCache#peek} method. + */ + interface PeekOptions extends Pick, 'allowStale'> { + } + /** + * Options that may be passed to the {@link LRUCache#set} method. + */ + interface SetOptions extends Pick, 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'> { + /** + * If size tracking is enabled, then setting an explicit size + * in the {@link LRUCache#set} call will prevent calling the + * {@link OptionsBase.sizeCalculation} function. + */ + size?: Size; + /** + * If TTL tracking is enabled, then setting an explicit start + * time in the {@link LRUCache#set} call will override the + * default time from `performance.now()` or `Date.now()`. + * + * Note that it must be a valid value for whichever time-tracking + * method is in use. + */ + start?: Milliseconds; + status?: Status; + } + /** + * The type signature for the {@link OptionsBase.fetchMethod} option. + */ + type Fetcher = (key: K, staleValue: V | undefined, options: FetcherOptions) => Promise | V | undefined | void; + /** + * the type signature for the {@link OptionsBase.memoMethod} option. + */ + type Memoizer = (key: K, staleValue: V | undefined, options: MemoizerOptions) => V; + /** + * Options which may be passed to the {@link LRUCache} constructor. + * + * Most of these may be overridden in the various options that use + * them. + * + * Despite all being technically optional, the constructor requires that + * a cache is at minimum limited by one or more of {@link OptionsBase.max}, + * {@link OptionsBase.ttl}, or {@link OptionsBase.maxSize}. + * + * If {@link OptionsBase.ttl} is used alone, then it is strongly advised + * (and in fact required by the type definitions here) that the cache + * also set {@link OptionsBase.ttlAutopurge}, to prevent potentially + * unbounded storage. + * + * All options are also available on the {@link LRUCache} instance, making + * it safe to pass an LRUCache instance as the options argumemnt to + * make another empty cache of the same type. + * + * Some options are marked as read-only, because changing them after + * instantiation is not safe. Changing any of the other options will of + * course only have an effect on subsequent method calls. + */ + interface OptionsBase { + /** + * The maximum number of items to store in the cache before evicting + * old entries. This is read-only on the {@link LRUCache} instance, + * and may not be overridden. + * + * If set, then storage space will be pre-allocated at construction + * time, and the cache will perform significantly faster. + * + * Note that significantly fewer items may be stored, if + * {@link OptionsBase.maxSize} and/or {@link OptionsBase.ttl} are also + * set. + * + * **It is strongly recommended to set a `max` to prevent unbounded growth + * of the cache.** + */ + max?: Count; + /** + * Max time in milliseconds for items to live in cache before they are + * considered stale. Note that stale items are NOT preemptively removed by + * default, and MAY live in the cache, contributing to its LRU max, long + * after they have expired, unless {@link OptionsBase.ttlAutopurge} is + * set. + * + * If set to `0` (the default value), then that means "do not track + * TTL", not "expire immediately". + * + * Also, as this cache is optimized for LRU/MRU operations, some of + * the staleness/TTL checks will reduce performance, as they will incur + * overhead by deleting items. + * + * This is not primarily a TTL cache, and does not make strong TTL + * guarantees. There is no pre-emptive pruning of expired items, but you + * _may_ set a TTL on the cache, and it will treat expired items as missing + * when they are fetched, and delete them. + * + * Optional, but must be a non-negative integer in ms if specified. + * + * This may be overridden by passing an options object to `cache.set()`. + * + * At least one of `max`, `maxSize`, or `TTL` is required. This must be a + * positive integer if set. + * + * Even if ttl tracking is enabled, **it is strongly recommended to set a + * `max` to prevent unbounded growth of the cache.** + * + * If ttl tracking is enabled, and `max` and `maxSize` are not set, + * and `ttlAutopurge` is not set, then a warning will be emitted + * cautioning about the potential for unbounded memory consumption. + * (The TypeScript definitions will also discourage this.) + */ + ttl?: Milliseconds; + /** + * Minimum amount of time in ms in which to check for staleness. + * Defaults to 1, which means that the current time is checked + * at most once per millisecond. + * + * Set to 0 to check the current time every time staleness is tested. + * (This reduces performance, and is theoretically unnecessary.) + * + * Setting this to a higher value will improve performance somewhat + * while using ttl tracking, albeit at the expense of keeping stale + * items around a bit longer than their TTLs would indicate. + * + * @default 1 + */ + ttlResolution?: Milliseconds; + /** + * Preemptively remove stale items from the cache. + * + * Note that this may *significantly* degrade performance, especially if + * the cache is storing a large number of items. It is almost always best + * to just leave the stale items in the cache, and let them fall out as new + * items are added. + * + * Note that this means that {@link OptionsBase.allowStale} is a bit + * pointless, as stale items will be deleted almost as soon as they + * expire. + * + * Use with caution! + */ + ttlAutopurge?: boolean; + /** + * When using time-expiring entries with `ttl`, setting this to `true` will + * make each item's age reset to 0 whenever it is retrieved from cache with + * {@link LRUCache#get}, causing it to not expire. (It can still fall out + * of cache based on recency of use, of course.) + * + * Has no effect if {@link OptionsBase.ttl} is not set. + * + * This may be overridden by passing an options object to `cache.get()`. + */ + updateAgeOnGet?: boolean; + /** + * When using time-expiring entries with `ttl`, setting this to `true` will + * make each item's age reset to 0 whenever its presence in the cache is + * checked with {@link LRUCache#has}, causing it to not expire. (It can + * still fall out of cache based on recency of use, of course.) + * + * Has no effect if {@link OptionsBase.ttl} is not set. + */ + updateAgeOnHas?: boolean; + /** + * Allow {@link LRUCache#get} and {@link LRUCache#fetch} calls to return + * stale data, if available. + * + * By default, if you set `ttl`, stale items will only be deleted from the + * cache when you `get(key)`. That is, it's not preemptively pruning items, + * unless {@link OptionsBase.ttlAutopurge} is set. + * + * If you set `allowStale:true`, it'll return the stale value *as well as* + * deleting it. If you don't set this, then it'll return `undefined` when + * you try to get a stale entry. + * + * Note that when a stale entry is fetched, _even if it is returned due to + * `allowStale` being set_, it is removed from the cache immediately. You + * can suppress this behavior by setting + * {@link OptionsBase.noDeleteOnStaleGet}, either in the constructor, or in + * the options provided to {@link LRUCache#get}. + * + * This may be overridden by passing an options object to `cache.get()`. + * The `cache.has()` method will always return `false` for stale items. + * + * Only relevant if a ttl is set. + */ + allowStale?: boolean; + /** + * Function that is called on items when they are dropped from the + * cache, as `dispose(value, key, reason)`. + * + * This can be handy if you want to close file descriptors or do + * other cleanup tasks when items are no longer stored in the cache. + * + * **NOTE**: It is called _before_ the item has been fully removed + * from the cache, so if you want to put it right back in, you need + * to wait until the next tick. If you try to add it back in during + * the `dispose()` function call, it will break things in subtle and + * weird ways. + * + * Unlike several other options, this may _not_ be overridden by + * passing an option to `set()`, for performance reasons. + * + * The `reason` will be one of the following strings, corresponding + * to the reason for the item's deletion: + * + * - `evict` Item was evicted to make space for a new addition + * - `set` Item was overwritten by a new value + * - `expire` Item expired its TTL + * - `fetch` Item was deleted due to a failed or aborted fetch, or a + * fetchMethod returning `undefined. + * - `delete` Item was removed by explicit `cache.delete(key)`, + * `cache.clear()`, or `cache.set(key, undefined)`. + */ + dispose?: Disposer; + /** + * The same as {@link OptionsBase.dispose}, but called *after* the entry + * is completely removed and the cache is once again in a clean state. + * + * It is safe to add an item right back into the cache at this point. + * However, note that it is *very* easy to inadvertently create infinite + * recursion this way. + */ + disposeAfter?: Disposer; + /** + * Set to true to suppress calling the + * {@link OptionsBase.dispose} function if the entry key is + * still accessible within the cache. + * + * This may be overridden by passing an options object to + * {@link LRUCache#set}. + * + * Only relevant if `dispose` or `disposeAfter` are set. + */ + noDisposeOnSet?: boolean; + /** + * Boolean flag to tell the cache to not update the TTL when setting a new + * value for an existing key (ie, when updating a value rather than + * inserting a new value). Note that the TTL value is _always_ set (if + * provided) when adding a new entry into the cache. + * + * Has no effect if a {@link OptionsBase.ttl} is not set. + * + * May be passed as an option to {@link LRUCache#set}. + */ + noUpdateTTL?: boolean; + /** + * Set to a positive integer to track the sizes of items added to the + * cache, and automatically evict items in order to stay below this size. + * Note that this may result in fewer than `max` items being stored. + * + * Attempting to add an item to the cache whose calculated size is greater + * that this amount will be a no-op. The item will not be cached, and no + * other items will be evicted. + * + * Optional, must be a positive integer if provided. + * + * Sets `maxEntrySize` to the same value, unless a different value is + * provided for `maxEntrySize`. + * + * At least one of `max`, `maxSize`, or `TTL` is required. This must be a + * positive integer if set. + * + * Even if size tracking is enabled, **it is strongly recommended to set a + * `max` to prevent unbounded growth of the cache.** + * + * Note also that size tracking can negatively impact performance, + * though for most cases, only minimally. + */ + maxSize?: Size; + /** + * The maximum allowed size for any single item in the cache. + * + * If a larger item is passed to {@link LRUCache#set} or returned by a + * {@link OptionsBase.fetchMethod} or {@link OptionsBase.memoMethod}, then + * it will not be stored in the cache. + * + * Attempting to add an item whose calculated size is greater than + * this amount will not cache the item or evict any old items, but + * WILL delete an existing value if one is already present. + * + * Optional, must be a positive integer if provided. Defaults to + * the value of `maxSize` if provided. + */ + maxEntrySize?: Size; + /** + * A function that returns a number indicating the item's size. + * + * Requires {@link OptionsBase.maxSize} to be set. + * + * If not provided, and {@link OptionsBase.maxSize} or + * {@link OptionsBase.maxEntrySize} are set, then all + * {@link LRUCache#set} calls **must** provide an explicit + * {@link SetOptions.size} or sizeCalculation param. + */ + sizeCalculation?: SizeCalculator; + /** + * Method that provides the implementation for {@link LRUCache#fetch} + * + * ```ts + * fetchMethod(key, staleValue, { signal, options, context }) + * ``` + * + * If `fetchMethod` is not provided, then `cache.fetch(key)` is equivalent + * to `Promise.resolve(cache.get(key))`. + * + * If at any time, `signal.aborted` is set to `true`, or if the + * `signal.onabort` method is called, or if it emits an `'abort'` event + * which you can listen to with `addEventListener`, then that means that + * the fetch should be abandoned. This may be passed along to async + * functions aware of AbortController/AbortSignal behavior. + * + * The `fetchMethod` should **only** return `undefined` or a Promise + * resolving to `undefined` if the AbortController signaled an `abort` + * event. In all other cases, it should return or resolve to a value + * suitable for adding to the cache. + * + * The `options` object is a union of the options that may be provided to + * `set()` and `get()`. If they are modified, then that will result in + * modifying the settings to `cache.set()` when the value is resolved, and + * in the case of + * {@link OptionsBase.noDeleteOnFetchRejection} and + * {@link OptionsBase.allowStaleOnFetchRejection}, the handling of + * `fetchMethod` failures. + * + * For example, a DNS cache may update the TTL based on the value returned + * from a remote DNS server by changing `options.ttl` in the `fetchMethod`. + */ + fetchMethod?: Fetcher; + /** + * Method that provides the implementation for {@link LRUCache#memo} + */ + memoMethod?: Memoizer; + /** + * Set to true to suppress the deletion of stale data when a + * {@link OptionsBase.fetchMethod} returns a rejected promise. + */ + noDeleteOnFetchRejection?: boolean; + /** + * Do not delete stale items when they are retrieved with + * {@link LRUCache#get}. + * + * Note that the `get` return value will still be `undefined` + * unless {@link OptionsBase.allowStale} is true. + * + * When using time-expiring entries with `ttl`, by default stale + * items will be removed from the cache when the key is accessed + * with `cache.get()`. + * + * Setting this option will cause stale items to remain in the cache, until + * they are explicitly deleted with `cache.delete(key)`, or retrieved with + * `noDeleteOnStaleGet` set to `false`. + * + * This may be overridden by passing an options object to `cache.get()`. + * + * Only relevant if a ttl is used. + */ + noDeleteOnStaleGet?: boolean; + /** + * Set to true to allow returning stale data when a + * {@link OptionsBase.fetchMethod} throws an error or returns a rejected + * promise. + * + * This differs from using {@link OptionsBase.allowStale} in that stale + * data will ONLY be returned in the case that the {@link LRUCache#fetch} + * fails, not any other times. + * + * If a `fetchMethod` fails, and there is no stale value available, the + * `fetch()` will resolve to `undefined`. Ie, all `fetchMethod` errors are + * suppressed. + * + * Implies `noDeleteOnFetchRejection`. + * + * This may be set in calls to `fetch()`, or defaulted on the constructor, + * or overridden by modifying the options object in the `fetchMethod`. + */ + allowStaleOnFetchRejection?: boolean; + /** + * Set to true to return a stale value from the cache when the + * `AbortSignal` passed to the {@link OptionsBase.fetchMethod} dispatches + * an `'abort'` event, whether user-triggered, or due to internal cache + * behavior. + * + * Unless {@link OptionsBase.ignoreFetchAbort} is also set, the underlying + * {@link OptionsBase.fetchMethod} will still be considered canceled, and + * any value it returns will be ignored and not cached. + * + * Caveat: since fetches are aborted when a new value is explicitly + * set in the cache, this can lead to fetch returning a stale value, + * since that was the fallback value _at the moment the `fetch()` was + * initiated_, even though the new updated value is now present in + * the cache. + * + * For example: + * + * ```ts + * const cache = new LRUCache({ + * ttl: 100, + * fetchMethod: async (url, oldValue, { signal }) => { + * const res = await fetch(url, { signal }) + * return await res.json() + * } + * }) + * cache.set('https://example.com/', { some: 'data' }) + * // 100ms go by... + * const result = cache.fetch('https://example.com/') + * cache.set('https://example.com/', { other: 'thing' }) + * console.log(await result) // { some: 'data' } + * console.log(cache.get('https://example.com/')) // { other: 'thing' } + * ``` + */ + allowStaleOnFetchAbort?: boolean; + /** + * Set to true to ignore the `abort` event emitted by the `AbortSignal` + * object passed to {@link OptionsBase.fetchMethod}, and still cache the + * resulting resolution value, as long as it is not `undefined`. + * + * When used on its own, this means aborted {@link LRUCache#fetch} calls + * are not immediately resolved or rejected when they are aborted, and + * instead take the full time to await. + * + * When used with {@link OptionsBase.allowStaleOnFetchAbort}, aborted + * {@link LRUCache#fetch} calls will resolve immediately to their stale + * cached value or `undefined`, and will continue to process and eventually + * update the cache when they resolve, as long as the resulting value is + * not `undefined`, thus supporting a "return stale on timeout while + * refreshing" mechanism by passing `AbortSignal.timeout(n)` as the signal. + * + * For example: + * + * ```ts + * const c = new LRUCache({ + * ttl: 100, + * ignoreFetchAbort: true, + * allowStaleOnFetchAbort: true, + * fetchMethod: async (key, oldValue, { signal }) => { + * // note: do NOT pass the signal to fetch()! + * // let's say this fetch can take a long time. + * const res = await fetch(`https://slow-backend-server/${key}`) + * return await res.json() + * }, + * }) + * + * // this will return the stale value after 100ms, while still + * // updating in the background for next time. + * const val = await c.fetch('key', { signal: AbortSignal.timeout(100) }) + * ``` + * + * **Note**: regardless of this setting, an `abort` event _is still + * emitted on the `AbortSignal` object_, so may result in invalid results + * when passed to other underlying APIs that use AbortSignals. + * + * This may be overridden in the {@link OptionsBase.fetchMethod} or the + * call to {@link LRUCache#fetch}. + */ + ignoreFetchAbort?: boolean; + } + interface OptionsMaxLimit extends OptionsBase { + max: Count; + } + interface OptionsTTLLimit extends OptionsBase { + ttl: Milliseconds; + ttlAutopurge: boolean; + } + interface OptionsSizeLimit extends OptionsBase { + maxSize: Size; + } + /** + * The valid safe options for the {@link LRUCache} constructor + */ + type Options = OptionsMaxLimit | OptionsSizeLimit | OptionsTTLLimit; + /** + * Entry objects used by {@link LRUCache#load} and {@link LRUCache#dump}, + * and returned by {@link LRUCache#info}. + */ + interface Entry { + value: V; + ttl?: Milliseconds; + size?: Size; + start?: Milliseconds; + } +} +/** + * Default export, the thing you're using this module to get. + * + * The `K` and `V` types define the key and value types, respectively. The + * optional `FC` type defines the type of the `context` object passed to + * `cache.fetch()` and `cache.memo()`. + * + * Keys and values **must not** be `null` or `undefined`. + * + * All properties from the options object (with the exception of `max`, + * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are + * added as normal public members. (The listed options are read-only getters.) + * + * Changing any of these will alter the defaults for subsequent method calls. + */ +export declare class LRUCache implements Map { + #private; + /** + * {@link LRUCache.OptionsBase.ttl} + */ + ttl: LRUCache.Milliseconds; + /** + * {@link LRUCache.OptionsBase.ttlResolution} + */ + ttlResolution: LRUCache.Milliseconds; + /** + * {@link LRUCache.OptionsBase.ttlAutopurge} + */ + ttlAutopurge: boolean; + /** + * {@link LRUCache.OptionsBase.updateAgeOnGet} + */ + updateAgeOnGet: boolean; + /** + * {@link LRUCache.OptionsBase.updateAgeOnHas} + */ + updateAgeOnHas: boolean; + /** + * {@link LRUCache.OptionsBase.allowStale} + */ + allowStale: boolean; + /** + * {@link LRUCache.OptionsBase.noDisposeOnSet} + */ + noDisposeOnSet: boolean; + /** + * {@link LRUCache.OptionsBase.noUpdateTTL} + */ + noUpdateTTL: boolean; + /** + * {@link LRUCache.OptionsBase.maxEntrySize} + */ + maxEntrySize: LRUCache.Size; + /** + * {@link LRUCache.OptionsBase.sizeCalculation} + */ + sizeCalculation?: LRUCache.SizeCalculator; + /** + * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection} + */ + noDeleteOnFetchRejection: boolean; + /** + * {@link LRUCache.OptionsBase.noDeleteOnStaleGet} + */ + noDeleteOnStaleGet: boolean; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort} + */ + allowStaleOnFetchAbort: boolean; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} + */ + allowStaleOnFetchRejection: boolean; + /** + * {@link LRUCache.OptionsBase.ignoreFetchAbort} + */ + ignoreFetchAbort: boolean; + /** + * Do not call this method unless you need to inspect the + * inner workings of the cache. If anything returned by this + * object is modified in any way, strange breakage may occur. + * + * These fields are private for a reason! + * + * @internal + */ + static unsafeExposeInternals(c: LRUCache): { + starts: ZeroArray | undefined; + ttls: ZeroArray | undefined; + sizes: ZeroArray | undefined; + keyMap: Map; + keyList: (K | undefined)[]; + valList: (V | BackgroundFetch | undefined)[]; + next: NumberArray; + prev: NumberArray; + readonly head: Index; + readonly tail: Index; + free: StackLike; + isBackgroundFetch: (p: any) => boolean; + backgroundFetch: (k: K, index: number | undefined, options: LRUCache.FetchOptions, context: any) => BackgroundFetch; + moveToTail: (index: number) => void; + indexes: (options?: { + allowStale: boolean; + }) => Generator; + rindexes: (options?: { + allowStale: boolean; + }) => Generator; + isStale: (index: number | undefined) => boolean; + }; + /** + * {@link LRUCache.OptionsBase.max} (read-only) + */ + get max(): LRUCache.Count; + /** + * {@link LRUCache.OptionsBase.maxSize} (read-only) + */ + get maxSize(): LRUCache.Count; + /** + * The total computed size of items in the cache (read-only) + */ + get calculatedSize(): LRUCache.Size; + /** + * The number of items stored in the cache (read-only) + */ + get size(): LRUCache.Count; + /** + * {@link LRUCache.OptionsBase.fetchMethod} (read-only) + */ + get fetchMethod(): LRUCache.Fetcher | undefined; + get memoMethod(): LRUCache.Memoizer | undefined; + /** + * {@link LRUCache.OptionsBase.dispose} (read-only) + */ + get dispose(): LRUCache.Disposer | undefined; + /** + * {@link LRUCache.OptionsBase.disposeAfter} (read-only) + */ + get disposeAfter(): LRUCache.Disposer | undefined; + constructor(options: LRUCache.Options | LRUCache); + /** + * Return the number of ms left in the item's TTL. If item is not in cache, + * returns `0`. Returns `Infinity` if item is in cache without a defined TTL. + */ + getRemainingTTL(key: K): number; + /** + * Return a generator yielding `[key, value]` pairs, + * in order from most recently used to least recently used. + */ + entries(): Generator<[K, V], void, unknown>; + /** + * Inverse order version of {@link LRUCache.entries} + * + * Return a generator yielding `[key, value]` pairs, + * in order from least recently used to most recently used. + */ + rentries(): Generator<(K | V | BackgroundFetch | undefined)[], void, unknown>; + /** + * Return a generator yielding the keys in the cache, + * in order from most recently used to least recently used. + */ + keys(): Generator; + /** + * Inverse order version of {@link LRUCache.keys} + * + * Return a generator yielding the keys in the cache, + * in order from least recently used to most recently used. + */ + rkeys(): Generator; + /** + * Return a generator yielding the values in the cache, + * in order from most recently used to least recently used. + */ + values(): Generator; + /** + * Inverse order version of {@link LRUCache.values} + * + * Return a generator yielding the values in the cache, + * in order from least recently used to most recently used. + */ + rvalues(): Generator | undefined, void, unknown>; + /** + * Iterating over the cache itself yields the same results as + * {@link LRUCache.entries} + */ + [Symbol.iterator](): Generator<[K, V], void, unknown>; + /** + * A String value that is used in the creation of the default string + * description of an object. Called by the built-in method + * `Object.prototype.toString`. + */ + [Symbol.toStringTag]: string; + /** + * Find a value for which the supplied fn method returns a truthy value, + * similar to `Array.find()`. fn is called as `fn(value, key, cache)`. + */ + find(fn: (v: V, k: K, self: LRUCache) => boolean, getOptions?: LRUCache.GetOptions): V | undefined; + /** + * Call the supplied function on each item in the cache, in order from most + * recently used to least recently used. + * + * `fn` is called as `fn(value, key, cache)`. + * + * If `thisp` is provided, function will be called in the `this`-context of + * the provided object, or the cache if no `thisp` object is provided. + * + * Does not update age or recenty of use, or iterate over stale values. + */ + forEach(fn: (v: V, k: K, self: LRUCache) => any, thisp?: any): void; + /** + * The same as {@link LRUCache.forEach} but items are iterated over in + * reverse order. (ie, less recently used items are iterated over first.) + */ + rforEach(fn: (v: V, k: K, self: LRUCache) => any, thisp?: any): void; + /** + * Delete any stale entries. Returns true if anything was removed, + * false otherwise. + */ + purgeStale(): boolean; + /** + * Get the extended info about a given entry, to get its value, size, and + * TTL info simultaneously. Returns `undefined` if the key is not present. + * + * Unlike {@link LRUCache#dump}, which is designed to be portable and survive + * serialization, the `start` value is always the current timestamp, and the + * `ttl` is a calculated remaining time to live (negative if expired). + * + * Always returns stale values, if their info is found in the cache, so be + * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl}) + * if relevant. + */ + info(key: K): LRUCache.Entry | undefined; + /** + * Return an array of [key, {@link LRUCache.Entry}] tuples which can be + * passed to {@link LRLUCache#load}. + * + * The `start` fields are calculated relative to a portable `Date.now()` + * timestamp, even if `performance.now()` is available. + * + * Stale entries are always included in the `dump`, even if + * {@link LRUCache.OptionsBase.allowStale} is false. + * + * Note: this returns an actual array, not a generator, so it can be more + * easily passed around. + */ + dump(): [K, LRUCache.Entry][]; + /** + * Reset the cache and load in the items in entries in the order listed. + * + * The shape of the resulting cache may be different if the same options are + * not used in both caches. + * + * The `start` fields are assumed to be calculated relative to a portable + * `Date.now()` timestamp, even if `performance.now()` is available. + */ + load(arr: [K, LRUCache.Entry][]): void; + /** + * Add a value to the cache. + * + * Note: if `undefined` is specified as a value, this is an alias for + * {@link LRUCache#delete} + * + * Fields on the {@link LRUCache.SetOptions} options param will override + * their corresponding values in the constructor options for the scope + * of this single `set()` operation. + * + * If `start` is provided, then that will set the effective start + * time for the TTL calculation. Note that this must be a previous + * value of `performance.now()` if supported, or a previous value of + * `Date.now()` if not. + * + * Options object may also include `size`, which will prevent + * calling the `sizeCalculation` function and just use the specified + * number if it is a positive integer, and `noDisposeOnSet` which + * will prevent calling a `dispose` function in the case of + * overwrites. + * + * If the `size` (or return value of `sizeCalculation`) for a given + * entry is greater than `maxEntrySize`, then the item will not be + * added to the cache. + * + * Will update the recency of the entry. + * + * If the value is `undefined`, then this is an alias for + * `cache.delete(key)`. `undefined` is never stored in the cache. + */ + set(k: K, v: V | BackgroundFetch | undefined, setOptions?: LRUCache.SetOptions): this; + /** + * Evict the least recently used item, returning its value or + * `undefined` if cache is empty. + */ + pop(): V | undefined; + /** + * Check if a key is in the cache, without updating the recency of use. + * Will return false if the item is stale, even though it is technically + * in the cache. + * + * Check if a key is in the cache, without updating the recency of + * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set + * to `true` in either the options or the constructor. + * + * Will return `false` if the item is stale, even though it is technically in + * the cache. The difference can be determined (if it matters) by using a + * `status` argument, and inspecting the `has` field. + * + * Will not update item age unless + * {@link LRUCache.OptionsBase.updateAgeOnHas} is set. + */ + has(k: K, hasOptions?: LRUCache.HasOptions): boolean; + /** + * Like {@link LRUCache#get} but doesn't update recency or delete stale + * items. + * + * Returns `undefined` if the item is stale, unless + * {@link LRUCache.OptionsBase.allowStale} is set. + */ + peek(k: K, peekOptions?: LRUCache.PeekOptions): V | undefined; + /** + * Make an asynchronous cached fetch using the + * {@link LRUCache.OptionsBase.fetchMethod} function. + * + * If the value is in the cache and not stale, then the returned + * Promise resolves to the value. + * + * If not in the cache, or beyond its TTL staleness, then + * `fetchMethod(key, staleValue, { options, signal, context })` is + * called, and the value returned will be added to the cache once + * resolved. + * + * If called with `allowStale`, and an asynchronous fetch is + * currently in progress to reload a stale value, then the former + * stale value will be returned. + * + * If called with `forceRefresh`, then the cached item will be + * re-fetched, even if it is not stale. However, if `allowStale` is also + * set, then the old value will still be returned. This is useful + * in cases where you want to force a reload of a cached value. If + * a background fetch is already in progress, then `forceRefresh` + * has no effect. + * + * If multiple fetches for the same key are issued, then they will all be + * coalesced into a single call to fetchMethod. + * + * Note that this means that handling options such as + * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}, + * {@link LRUCache.FetchOptions.signal}, + * and {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} will be + * determined by the FIRST fetch() call for a given key. + * + * This is a known (fixable) shortcoming which will be addresed on when + * someone complains about it, as the fix would involve added complexity and + * may not be worth the costs for this edge case. + * + * If {@link LRUCache.OptionsBase.fetchMethod} is not specified, then this is + * effectively an alias for `Promise.resolve(cache.get(key))`. + * + * When the fetch method resolves to a value, if the fetch has not + * been aborted due to deletion, eviction, or being overwritten, + * then it is added to the cache using the options provided. + * + * If the key is evicted or deleted before the `fetchMethod` + * resolves, then the AbortSignal passed to the `fetchMethod` will + * receive an `abort` event, and the promise returned by `fetch()` + * will reject with the reason for the abort. + * + * If a `signal` is passed to the `fetch()` call, then aborting the + * signal will abort the fetch and cause the `fetch()` promise to + * reject with the reason provided. + * + * **Setting `context`** + * + * If an `FC` type is set to a type other than `unknown`, `void`, or + * `undefined` in the {@link LRUCache} constructor, then all + * calls to `cache.fetch()` _must_ provide a `context` option. If + * set to `undefined` or `void`, then calls to fetch _must not_ + * provide a `context` option. + * + * The `context` param allows you to provide arbitrary data that + * might be relevant in the course of fetching the data. It is only + * relevant for the course of a single `fetch()` operation, and + * discarded afterwards. + * + * **Note: `fetch()` calls are inflight-unique** + * + * If you call `fetch()` multiple times with the same key value, + * then every call after the first will resolve on the same + * promise1, + * _even if they have different settings that would otherwise change + * the behavior of the fetch_, such as `noDeleteOnFetchRejection` + * or `ignoreFetchAbort`. + * + * In most cases, this is not a problem (in fact, only fetching + * something once is what you probably want, if you're caching in + * the first place). If you are changing the fetch() options + * dramatically between runs, there's a good chance that you might + * be trying to fit divergent semantics into a single object, and + * would be better off with multiple cache instances. + * + * **1**: Ie, they're not the "same Promise", but they resolve at + * the same time, because they're both waiting on the same + * underlying fetchMethod response. + */ + fetch(k: K, fetchOptions: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : LRUCache.FetchOptionsWithContext): Promise; + fetch(k: unknown extends FC ? K : FC extends undefined | void ? K : never, fetchOptions?: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : never): Promise; + /** + * In some cases, `cache.fetch()` may resolve to `undefined`, either because + * a {@link LRUCache.OptionsBase#fetchMethod} was not provided (turning + * `cache.fetch(k)` into just an async wrapper around `cache.get(k)`) or + * because `ignoreFetchAbort` was specified (either to the constructor or + * in the {@link LRUCache.FetchOptions}). Also, the + * {@link OptionsBase.fetchMethod} may return `undefined` or `void`, making + * the test even more complicated. + * + * Because inferring the cases where `undefined` might be returned are so + * cumbersome, but testing for `undefined` can also be annoying, this method + * can be used, which will reject if `this.fetch()` resolves to undefined. + */ + forceFetch(k: K, fetchOptions: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : LRUCache.FetchOptionsWithContext): Promise; + forceFetch(k: unknown extends FC ? K : FC extends undefined | void ? K : never, fetchOptions?: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : never): Promise; + /** + * If the key is found in the cache, then this is equivalent to + * {@link LRUCache#get}. If not, in the cache, then calculate the value using + * the {@link LRUCache.OptionsBase.memoMethod}, and add it to the cache. + * + * If an `FC` type is set to a type other than `unknown`, `void`, or + * `undefined` in the LRUCache constructor, then all calls to `cache.memo()` + * _must_ provide a `context` option. If set to `undefined` or `void`, then + * calls to memo _must not_ provide a `context` option. + * + * The `context` param allows you to provide arbitrary data that might be + * relevant in the course of fetching the data. It is only relevant for the + * course of a single `memo()` operation, and discarded afterwards. + */ + memo(k: K, memoOptions: unknown extends FC ? LRUCache.MemoOptions : FC extends undefined | void ? LRUCache.MemoOptionsNoContext : LRUCache.MemoOptionsWithContext): V; + memo(k: unknown extends FC ? K : FC extends undefined | void ? K : never, memoOptions?: unknown extends FC ? LRUCache.MemoOptions : FC extends undefined | void ? LRUCache.MemoOptionsNoContext : never): V; + /** + * Return a value from the cache. Will update the recency of the cache + * entry found. + * + * If the key is not found, get() will return `undefined`. + */ + get(k: K, getOptions?: LRUCache.GetOptions): V | undefined; + /** + * Deletes a key out of the cache. + * + * Returns true if the key was deleted, false otherwise. + */ + delete(k: K): boolean; + /** + * Clear the cache entirely, throwing away all values. + */ + clear(): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/.github/octokit/node_modules/lru-cache/dist/commonjs/index.d.ts.map b/.github/octokit/node_modules/lru-cache/dist/commonjs/index.d.ts.map new file mode 100644 index 000000000..34d60c505 --- /dev/null +++ b/.github/octokit/node_modules/lru-cache/dist/commonjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AA0FH,QAAA,MAAM,IAAI,eAAiB,CAAA;AAC3B,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG;IAAE,CAAC,IAAI,CAAC,EAAE,kBAAkB,CAAA;CAAE,CAAA;AAC5D,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG;IAAE,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAA;CAAE,CAAA;AAKzD,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAA;AAC9D,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,MAAM,EAAE,CAAA;AAyB9C,cAAM,SAAU,SAAQ,KAAK,CAAC,MAAM,CAAC;gBACvB,IAAI,EAAE,MAAM;CAIzB;AACD,YAAY,EAAE,SAAS,EAAE,CAAA;AACzB,YAAY,EAAE,KAAK,EAAE,CAAA;AAErB,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,EAAE,CAAA;AACvC,cAAM,KAAK;;IACT,IAAI,EAAE,WAAW,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IAGd,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS;gBASnC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,GAAG,WAAW,CAAA;KAAE;IAU3C,IAAI,CAAC,CAAC,EAAE,KAAK;IAGb,GAAG,IAAI,KAAK;CAGb;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG;IACxD,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA;IAC1C,iBAAiB,EAAE,eAAe,CAAA;IAClC,oBAAoB,EAAE,CAAC,GAAG,SAAS,CAAA;CACpC,CAAA;AAED,MAAM,MAAM,WAAW,CAAC,CAAC,EAAE,CAAC,IAAI;IAC9B,KAAK,EAAE,CAAC;IACR,GAAG,EAAE,CAAC;IACN,MAAM,EAAE,QAAQ,CAAC,aAAa;CAC/B,CAAA;AAED,yBAAiB,QAAQ,CAAC;IACxB;;OAEG;IACH,KAAY,IAAI,GAAG,MAAM,CAAA;IAEzB;;;OAGG;IACH,KAAY,YAAY,GAAG,MAAM,CAAA;IAEjC;;OAEG;IACH,KAAY,KAAK,GAAG,MAAM,CAAA;IAE1B;;;;;;;;;;;;;OAaG;IACH,KAAY,aAAa,GACrB,OAAO,GACP,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,OAAO,CAAA;IACX;;;;OAIG;IACH,KAAY,QAAQ,CAAC,CAAC,EAAE,CAAC,IAAI,CAC3B,KAAK,EAAE,CAAC,EACR,GAAG,EAAE,CAAC,EACN,MAAM,EAAE,aAAa,KAClB,IAAI,CAAA;IAET;;;OAGG;IACH,KAAY,cAAc,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,IAAI,CAAA;IAE7D;;;OAGG;IACH,UAAiB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,OAAO;QAChD,MAAM,EAAE,WAAW,CAAA;QACnB,OAAO,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;QACtC;;;WAGG;QACH,OAAO,EAAE,EAAE,CAAA;KACZ;IAED;;;;;;;;;OASG;IACH,UAAiB,MAAM,CAAC,CAAC;QACvB;;;;;;;WAOG;QACH,GAAG,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAA;QAE3C;;WAEG;QACH,GAAG,CAAC,EAAE,YAAY,CAAA;QAElB;;WAEG;QACH,KAAK,CAAC,EAAE,YAAY,CAAA;QAEpB;;WAEG;QACH,GAAG,CAAC,EAAE,YAAY,CAAA;QAElB;;WAEG;QACH,YAAY,CAAC,EAAE,YAAY,CAAA;QAE3B;;WAEG;QACH,SAAS,CAAC,EAAE,IAAI,CAAA;QAEhB;;WAEG;QACH,mBAAmB,CAAC,EAAE,IAAI,CAAA;QAE1B;;;WAGG;QACH,oBAAoB,CAAC,EAAE,IAAI,CAAA;QAE3B;;;WAGG;QACH,QAAQ,CAAC,EAAE,CAAC,CAAA;QAEZ;;;;;;WAMG;QACH,GAAG,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,MAAM,CAAA;QAE9B;;;;;;;;;;;;;WAaG;QACH,KAAK,CAAC,EAAE,KAAK,GAAG,UAAU,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,CAAA;QAEjE;;WAEG;QACH,eAAe,CAAC,EAAE,IAAI,CAAA;QAEtB;;;WAGG;QACH,YAAY,CAAC,EAAE,IAAI,CAAA;QAEnB;;;;WAIG;QACH,UAAU,CAAC,EAAE,KAAK,CAAA;QAElB;;WAEG;QACH,YAAY,CAAC,EAAE,IAAI,CAAA;QAEnB;;;WAGG;QACH,iBAAiB,CAAC,EAAE,IAAI,CAAA;QAExB;;WAEG;QACH,aAAa,CAAC,EAAE,IAAI,CAAA;QAEpB;;WAEG;QACH,aAAa,CAAC,EAAE,IAAI,CAAA;QAEpB;;;;;;;;WAQG;QACH,GAAG,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,CAAA;QAE9B;;WAEG;QACH,aAAa,CAAC,EAAE,IAAI,CAAA;KACrB;IAED;;;;;;;;;;;;;;OAcG;IACH,UAAiB,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,OAAO,CACrD,SAAQ,IAAI,CACV,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EACnB,YAAY,GACZ,gBAAgB,GAChB,oBAAoB,GACpB,iBAAiB,GACjB,KAAK,GACL,gBAAgB,GAChB,aAAa,GACb,0BAA0B,GAC1B,4BAA4B,GAC5B,kBAAkB,GAClB,wBAAwB,CAC3B;QACD,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;QAClB,IAAI,CAAC,EAAE,IAAI,CAAA;KACZ;IAED;;OAEG;IACH,UAAiB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACpC,SAAQ,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC;;;WAGG;QACH,YAAY,CAAC,EAAE,OAAO,CAAA;QACtB;;;;;;;WAOG;QACH,OAAO,CAAC,EAAE,EAAE,CAAA;QACZ,MAAM,CAAC,EAAE,WAAW,CAAA;QACpB,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;KACnB;IACD;;;OAGG;IACH,UAAiB,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAC/C,SAAQ,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC9B,OAAO,EAAE,EAAE,CAAA;KACZ;IACD;;;OAGG;IACH,UAAiB,qBAAqB,CAAC,CAAC,EAAE,CAAC,CACzC,SAAQ,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC;QACrC,OAAO,CAAC,EAAE,SAAS,CAAA;KACpB;IAED,UAAiB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,OAAO,CAC7C,SAAQ,IAAI,CACV,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EACnB,YAAY,GACZ,gBAAgB,GAChB,oBAAoB,GACpB,iBAAiB,GACjB,KAAK,GACL,gBAAgB,GAChB,aAAa,GACb,0BAA0B,GAC1B,4BAA4B,GAC5B,kBAAkB,GAClB,wBAAwB,CAC3B;QACD;;;WAGG;QACH,YAAY,CAAC,EAAE,OAAO,CAAA;QACtB;;;;;;;WAOG;QACH,OAAO,CAAC,EAAE,EAAE,CAAA;QACZ,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;KACnB;IACD;;;OAGG;IACH,UAAiB,sBAAsB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAC9C,SAAQ,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC7B,OAAO,EAAE,EAAE,CAAA;KACZ;IACD;;;OAGG;IACH,UAAiB,oBAAoB,CAAC,CAAC,EAAE,CAAC,CACxC,SAAQ,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC;QACpC,OAAO,CAAC,EAAE,SAAS,CAAA;KACpB;IAED;;;OAGG;IACH,UAAiB,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,OAAO;QACjD,OAAO,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;QACtC;;;WAGG;QACH,OAAO,EAAE,EAAE,CAAA;KACZ;IAED;;;;;;;;;;;;OAYG;IACH,UAAiB,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,OAAO,CACrD,SAAQ,IAAI,CACV,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EACnB,YAAY,GACZ,gBAAgB,GAChB,oBAAoB,GACpB,iBAAiB,GACjB,KAAK,GACL,gBAAgB,GAChB,aAAa,CAChB;QACD,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;QAClB,IAAI,CAAC,EAAE,IAAI,CAAA;QACX,KAAK,CAAC,EAAE,YAAY,CAAA;KACrB;IAED;;OAEG;IACH,UAAiB,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAClC,SAAQ,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,gBAAgB,CAAC;QACrD,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;KACnB;IAED;;OAEG;IACH,UAAiB,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAClC,SAAQ,IAAI,CACV,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EACrB,YAAY,GAAG,gBAAgB,GAAG,oBAAoB,CACvD;QACD,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;KACnB;IAED;;OAEG;IACH,UAAiB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACnC,SAAQ,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,YAAY,CAAC;KAAG;IAEtD;;OAEG;IACH,UAAiB,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAClC,SAAQ,IAAI,CACV,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EACrB,iBAAiB,GAAG,KAAK,GAAG,gBAAgB,GAAG,aAAa,CAC7D;QACD;;;;WAIG;QACH,IAAI,CAAC,EAAE,IAAI,CAAA;QACX;;;;;;;WAOG;QACH,KAAK,CAAC,EAAE,YAAY,CAAA;QACpB,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;KACnB;IAED;;OAEG;IACH,KAAY,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,OAAO,IAAI,CACxC,GAAG,EAAE,CAAC,EACN,UAAU,EAAE,CAAC,GAAG,SAAS,EACzB,OAAO,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAC9B,OAAO,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,SAAS,GAAG,IAAI,CAAA;IAEzD;;OAEG;IACH,KAAY,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,OAAO,IAAI,CACzC,GAAG,EAAE,CAAC,EACN,UAAU,EAAE,CAAC,GAAG,SAAS,EACzB,OAAO,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAC/B,CAAC,CAAA;IAEN;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,UAAiB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACnC;;;;;;;;;;;;;;WAcG;QACH,GAAG,CAAC,EAAE,KAAK,CAAA;QAEX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAiCG;QACH,GAAG,CAAC,EAAE,YAAY,CAAA;QAElB;;;;;;;;;;;;;WAaG;QACH,aAAa,CAAC,EAAE,YAAY,CAAA;QAE5B;;;;;;;;;;;;;WAaG;QACH,YAAY,CAAC,EAAE,OAAO,CAAA;QAEtB;;;;;;;;;WASG;QACH,cAAc,CAAC,EAAE,OAAO,CAAA;QAExB;;;;;;;WAOG;QACH,cAAc,CAAC,EAAE,OAAO,CAAA;QAExB;;;;;;;;;;;;;;;;;;;;;;WAsBG;QACH,UAAU,CAAC,EAAE,OAAO,CAAA;QAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;WA0BG;QACH,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QAExB;;;;;;;WAOG;QACH,YAAY,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QAE7B;;;;;;;;;WASG;QACH,cAAc,CAAC,EAAE,OAAO,CAAA;QAExB;;;;;;;;;WASG;QACH,WAAW,CAAC,EAAE,OAAO,CAAA;QAErB;;;;;;;;;;;;;;;;;;;;;;WAsBG;QACH,OAAO,CAAC,EAAE,IAAI,CAAA;QAEd;;;;;;;;;;;;;WAaG;QACH,YAAY,CAAC,EAAE,IAAI,CAAA;QAEnB;;;;;;;;;WASG;QACH,eAAe,CAAC,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA+BG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;QAE/B;;WAEG;QACH,UAAU,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;QAE/B;;;WAGG;QACH,wBAAwB,CAAC,EAAE,OAAO,CAAA;QAElC;;;;;;;;;;;;;;;;;;WAkBG;QACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;QAE5B;;;;;;;;;;;;;;;;;WAiBG;QACH,0BAA0B,CAAC,EAAE,OAAO,CAAA;QAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAiCG;QACH,sBAAsB,CAAC,EAAE,OAAO,CAAA;QAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA0CG;QACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAC3B;IAED,UAAiB,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACvC,SAAQ,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC7B,GAAG,EAAE,KAAK,CAAA;KACX;IACD,UAAiB,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACvC,SAAQ,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC7B,GAAG,EAAE,YAAY,CAAA;QACjB,YAAY,EAAE,OAAO,CAAA;KACtB;IACD,UAAiB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACxC,SAAQ,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC7B,OAAO,EAAE,IAAI,CAAA;KACd;IAED;;OAEG;IACH,KAAY,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,IACxB,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GACzB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC1B,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;IAE7B;;;OAGG;IACH,UAAiB,KAAK,CAAC,CAAC;QACtB,KAAK,EAAE,CAAC,CAAA;QACR,GAAG,CAAC,EAAE,YAAY,CAAA;QAClB,IAAI,CAAC,EAAE,IAAI,CAAA;QACX,KAAK,CAAC,EAAE,YAAY,CAAA;KACrB;CACF;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,QAAQ,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,EAAE,EAAE,GAAG,OAAO,CAC5D,YAAW,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;;IAUpB;;OAEG;IACH,GAAG,EAAE,QAAQ,CAAC,YAAY,CAAA;IAE1B;;OAEG;IACH,aAAa,EAAE,QAAQ,CAAC,YAAY,CAAA;IACpC;;OAEG;IACH,YAAY,EAAE,OAAO,CAAA;IACrB;;OAEG;IACH,cAAc,EAAE,OAAO,CAAA;IACvB;;OAEG;IACH,cAAc,EAAE,OAAO,CAAA;IACvB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAA;IAEnB;;OAEG;IACH,cAAc,EAAE,OAAO,CAAA;IACvB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAA;IACpB;;OAEG;IACH,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAA;IAC3B;;OAEG;IACH,eAAe,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAC/C;;OAEG;IACH,wBAAwB,EAAE,OAAO,CAAA;IACjC;;OAEG;IACH,kBAAkB,EAAE,OAAO,CAAA;IAC3B;;OAEG;IACH,sBAAsB,EAAE,OAAO,CAAA;IAC/B;;OAEG;IACH,0BAA0B,EAAE,OAAO,CAAA;IACnC;;OAEG;IACH,gBAAgB,EAAE,OAAO,CAAA;IAsBzB;;;;;;;;OAQG;IACH,MAAM,CAAC,qBAAqB,CAC1B,CAAC,SAAS,EAAE,EACZ,CAAC,SAAS,EAAE,EACZ,EAAE,SAAS,OAAO,GAAG,OAAO,EAC5B,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;;;;;;;;;;;;+BAmBI,GAAG;6BAErB,CAAC,SACG,MAAM,GAAG,SAAS,WAChB,SAAS,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,WAC/B,GAAG,KACX,gBAAgB,CAAC,CAAC;4BAOD,MAAM,KAAG,IAAI;4BAEb;YAAE,UAAU,EAAE,OAAO,CAAA;SAAE;6BAEtB;YAAE,UAAU,EAAE,OAAO,CAAA;SAAE;yBAE3B,MAAM,GAAG,SAAS;;IAOvC;;OAEG;IACH,IAAI,GAAG,IAAI,QAAQ,CAAC,KAAK,CAExB;IACD;;OAEG;IACH,IAAI,OAAO,IAAI,QAAQ,CAAC,KAAK,CAE5B;IACD;;OAEG;IACH,IAAI,cAAc,IAAI,QAAQ,CAAC,IAAI,CAElC;IACD;;OAEG;IACH,IAAI,IAAI,IAAI,QAAQ,CAAC,KAAK,CAEzB;IACD;;OAEG;IACH,IAAI,WAAW,IAAI,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,SAAS,CAExD;IACD,IAAI,UAAU,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,SAAS,CAExD;IACD;;OAEG;IACH,IAAI,OAAO,wCAEV;IACD;;OAEG;IACH,IAAI,YAAY,wCAEf;gBAGC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IA0J1D;;;OAGG;IACH,eAAe,CAAC,GAAG,EAAE,CAAC;IAkOtB;;;OAGG;IACF,OAAO;IAYR;;;;;OAKG;IACF,QAAQ;IAYT;;;OAGG;IACF,IAAI;IAYL;;;;;OAKG;IACF,KAAK;IAYN;;;OAGG;IACF,MAAM;IAYP;;;;;OAKG;IACF,OAAO;IAYR;;;OAGG;IACH,CAAC,MAAM,CAAC,QAAQ,CAAC;IAIjB;;;;OAIG;IACH,CAAC,MAAM,CAAC,WAAW,CAAC,SAAa;IAEjC;;;OAGG;IACH,IAAI,CACF,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,OAAO,EACrD,UAAU,GAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAM;IAchD;;;;;;;;;;OAUG;IACH,OAAO,CACL,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,GAAG,EACjD,KAAK,GAAE,GAAU;IAYnB;;;OAGG;IACH,QAAQ,CACN,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,GAAG,EACjD,KAAK,GAAE,GAAU;IAYnB;;;OAGG;IACH,UAAU;IAWV;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS;IAwB3C;;;;;;;;;;;;OAYG;IACH,IAAI;IAyBJ;;;;;;;;OAQG;IACH,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;IAiBlC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,GAAG,CACD,CAAC,EAAE,CAAC,EACJ,CAAC,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,GAAG,SAAS,EACrC,UAAU,GAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAM;IAgHhD;;;OAGG;IACH,GAAG,IAAI,CAAC,GAAG,SAAS;IAwDpB;;;;;;;;;;;;;;;OAeG;IACH,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,UAAU,GAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAM;IA+BxD;;;;;;OAMG;IACH,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,GAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAM;IAuK3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoFG;IAEH,KAAK,CACH,CAAC,EAAE,CAAC,EACJ,YAAY,EAAE,OAAO,SAAS,EAAE,GAC5B,QAAQ,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC/B,EAAE,SAAS,SAAS,GAAG,IAAI,GAC3B,QAAQ,CAAC,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC,QAAQ,CAAC,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC7C,OAAO,CAAC,SAAS,GAAG,CAAC,CAAC;IAGzB,KAAK,CACH,CAAC,EAAE,OAAO,SAAS,EAAE,GACjB,CAAC,GACD,EAAE,SAAS,SAAS,GAAG,IAAI,GAC3B,CAAC,GACD,KAAK,EACT,YAAY,CAAC,EAAE,OAAO,SAAS,EAAE,GAC7B,QAAQ,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC/B,EAAE,SAAS,SAAS,GAAG,IAAI,GAC3B,QAAQ,CAAC,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC,KAAK,GACR,OAAO,CAAC,SAAS,GAAG,CAAC,CAAC;IAmGzB;;;;;;;;;;;;OAYG;IACH,UAAU,CACR,CAAC,EAAE,CAAC,EACJ,YAAY,EAAE,OAAO,SAAS,EAAE,GAC5B,QAAQ,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC/B,EAAE,SAAS,SAAS,GAAG,IAAI,GAC3B,QAAQ,CAAC,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC,QAAQ,CAAC,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC7C,OAAO,CAAC,CAAC,CAAC;IAEb,UAAU,CACR,CAAC,EAAE,OAAO,SAAS,EAAE,GACjB,CAAC,GACD,EAAE,SAAS,SAAS,GAAG,IAAI,GAC3B,CAAC,GACD,KAAK,EACT,YAAY,CAAC,EAAE,OAAO,SAAS,EAAE,GAC7B,QAAQ,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC/B,EAAE,SAAS,SAAS,GAAG,IAAI,GAC3B,QAAQ,CAAC,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC,KAAK,GACR,OAAO,CAAC,CAAC,CAAC;IAiBb;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,CAAC,EAAE,CAAC,EACJ,WAAW,EAAE,OAAO,SAAS,EAAE,GAC3B,QAAQ,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC9B,EAAE,SAAS,SAAS,GAAG,IAAI,GAC3B,QAAQ,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,GACnC,QAAQ,CAAC,sBAAsB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC5C,CAAC;IAEJ,IAAI,CACF,CAAC,EAAE,OAAO,SAAS,EAAE,GACjB,CAAC,GACD,EAAE,SAAS,SAAS,GAAG,IAAI,GAC3B,CAAC,GACD,KAAK,EACT,WAAW,CAAC,EAAE,OAAO,SAAS,EAAE,GAC5B,QAAQ,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC9B,EAAE,SAAS,SAAS,GAAG,IAAI,GAC3B,QAAQ,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,GACnC,KAAK,GACR,CAAC;IAiBJ;;;;;OAKG;IACH,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,UAAU,GAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAM;IAgFxD;;;;OAIG;IACH,MAAM,CAAC,CAAC,EAAE,CAAC;IAqDX;;OAEG;IACH,KAAK;CA0CN"} \ No newline at end of file diff --git a/.github/octokit/node_modules/lru-cache/dist/commonjs/index.js b/.github/octokit/node_modules/lru-cache/dist/commonjs/index.js new file mode 100644 index 000000000..058923188 --- /dev/null +++ b/.github/octokit/node_modules/lru-cache/dist/commonjs/index.js @@ -0,0 +1,1546 @@ +"use strict"; +/** + * @module LRUCache + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LRUCache = void 0; +const perf = typeof performance === 'object' && + performance && + typeof performance.now === 'function' + ? performance + : Date; +const warned = new Set(); +/* c8 ignore start */ +const PROCESS = (typeof process === 'object' && !!process ? process : {}); +/* c8 ignore start */ +const emitWarning = (msg, type, code, fn) => { + typeof PROCESS.emitWarning === 'function' + ? PROCESS.emitWarning(msg, type, code, fn) + : console.error(`[${code}] ${type}: ${msg}`); +}; +let AC = globalThis.AbortController; +let AS = globalThis.AbortSignal; +/* c8 ignore start */ +if (typeof AC === 'undefined') { + //@ts-ignore + AS = class AbortSignal { + onabort; + _onabort = []; + reason; + aborted = false; + addEventListener(_, fn) { + this._onabort.push(fn); + } + }; + //@ts-ignore + AC = class AbortController { + constructor() { + warnACPolyfill(); + } + signal = new AS(); + abort(reason) { + if (this.signal.aborted) + return; + //@ts-ignore + this.signal.reason = reason; + //@ts-ignore + this.signal.aborted = true; + //@ts-ignore + for (const fn of this.signal._onabort) { + fn(reason); + } + this.signal.onabort?.(reason); + } + }; + let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'; + const warnACPolyfill = () => { + if (!printACPolyfillWarning) + return; + printACPolyfillWarning = false; + emitWarning('AbortController is not defined. If using lru-cache in ' + + 'node 14, load an AbortController polyfill from the ' + + '`node-abort-controller` package. A minimal polyfill is ' + + 'provided for use by LRUCache.fetch(), but it should not be ' + + 'relied upon in other contexts (eg, passing it to other APIs that ' + + 'use AbortController/AbortSignal might have undesirable effects). ' + + 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.', 'NO_ABORT_CONTROLLER', 'ENOTSUP', warnACPolyfill); + }; +} +/* c8 ignore stop */ +const shouldWarn = (code) => !warned.has(code); +const TYPE = Symbol('type'); +const isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n); +/* c8 ignore start */ +// This is a little bit ridiculous, tbh. +// The maximum array length is 2^32-1 or thereabouts on most JS impls. +// And well before that point, you're caching the entire world, I mean, +// that's ~32GB of just integers for the next/prev links, plus whatever +// else to hold that many keys and values. Just filling the memory with +// zeroes at init time is brutal when you get that big. +// But why not be complete? +// Maybe in the future, these limits will have expanded. +const getUintArray = (max) => !isPosInt(max) + ? null + : max <= Math.pow(2, 8) + ? Uint8Array + : max <= Math.pow(2, 16) + ? Uint16Array + : max <= Math.pow(2, 32) + ? Uint32Array + : max <= Number.MAX_SAFE_INTEGER + ? ZeroArray + : null; +/* c8 ignore stop */ +class ZeroArray extends Array { + constructor(size) { + super(size); + this.fill(0); + } +} +class Stack { + heap; + length; + // private constructor + static #constructing = false; + static create(max) { + const HeapCls = getUintArray(max); + if (!HeapCls) + return []; + Stack.#constructing = true; + const s = new Stack(max, HeapCls); + Stack.#constructing = false; + return s; + } + constructor(max, HeapCls) { + /* c8 ignore start */ + if (!Stack.#constructing) { + throw new TypeError('instantiate Stack using Stack.create(n)'); + } + /* c8 ignore stop */ + this.heap = new HeapCls(max); + this.length = 0; + } + push(n) { + this.heap[this.length++] = n; + } + pop() { + return this.heap[--this.length]; + } +} +/** + * Default export, the thing you're using this module to get. + * + * The `K` and `V` types define the key and value types, respectively. The + * optional `FC` type defines the type of the `context` object passed to + * `cache.fetch()` and `cache.memo()`. + * + * Keys and values **must not** be `null` or `undefined`. + * + * All properties from the options object (with the exception of `max`, + * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are + * added as normal public members. (The listed options are read-only getters.) + * + * Changing any of these will alter the defaults for subsequent method calls. + */ +class LRUCache { + // options that cannot be changed without disaster + #max; + #maxSize; + #dispose; + #disposeAfter; + #fetchMethod; + #memoMethod; + /** + * {@link LRUCache.OptionsBase.ttl} + */ + ttl; + /** + * {@link LRUCache.OptionsBase.ttlResolution} + */ + ttlResolution; + /** + * {@link LRUCache.OptionsBase.ttlAutopurge} + */ + ttlAutopurge; + /** + * {@link LRUCache.OptionsBase.updateAgeOnGet} + */ + updateAgeOnGet; + /** + * {@link LRUCache.OptionsBase.updateAgeOnHas} + */ + updateAgeOnHas; + /** + * {@link LRUCache.OptionsBase.allowStale} + */ + allowStale; + /** + * {@link LRUCache.OptionsBase.noDisposeOnSet} + */ + noDisposeOnSet; + /** + * {@link LRUCache.OptionsBase.noUpdateTTL} + */ + noUpdateTTL; + /** + * {@link LRUCache.OptionsBase.maxEntrySize} + */ + maxEntrySize; + /** + * {@link LRUCache.OptionsBase.sizeCalculation} + */ + sizeCalculation; + /** + * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection} + */ + noDeleteOnFetchRejection; + /** + * {@link LRUCache.OptionsBase.noDeleteOnStaleGet} + */ + noDeleteOnStaleGet; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort} + */ + allowStaleOnFetchAbort; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} + */ + allowStaleOnFetchRejection; + /** + * {@link LRUCache.OptionsBase.ignoreFetchAbort} + */ + ignoreFetchAbort; + // computed properties + #size; + #calculatedSize; + #keyMap; + #keyList; + #valList; + #next; + #prev; + #head; + #tail; + #free; + #disposed; + #sizes; + #starts; + #ttls; + #hasDispose; + #hasFetchMethod; + #hasDisposeAfter; + /** + * Do not call this method unless you need to inspect the + * inner workings of the cache. If anything returned by this + * object is modified in any way, strange breakage may occur. + * + * These fields are private for a reason! + * + * @internal + */ + static unsafeExposeInternals(c) { + return { + // properties + starts: c.#starts, + ttls: c.#ttls, + sizes: c.#sizes, + keyMap: c.#keyMap, + keyList: c.#keyList, + valList: c.#valList, + next: c.#next, + prev: c.#prev, + get head() { + return c.#head; + }, + get tail() { + return c.#tail; + }, + free: c.#free, + // methods + isBackgroundFetch: (p) => c.#isBackgroundFetch(p), + backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context), + moveToTail: (index) => c.#moveToTail(index), + indexes: (options) => c.#indexes(options), + rindexes: (options) => c.#rindexes(options), + isStale: (index) => c.#isStale(index), + }; + } + // Protected read-only members + /** + * {@link LRUCache.OptionsBase.max} (read-only) + */ + get max() { + return this.#max; + } + /** + * {@link LRUCache.OptionsBase.maxSize} (read-only) + */ + get maxSize() { + return this.#maxSize; + } + /** + * The total computed size of items in the cache (read-only) + */ + get calculatedSize() { + return this.#calculatedSize; + } + /** + * The number of items stored in the cache (read-only) + */ + get size() { + return this.#size; + } + /** + * {@link LRUCache.OptionsBase.fetchMethod} (read-only) + */ + get fetchMethod() { + return this.#fetchMethod; + } + get memoMethod() { + return this.#memoMethod; + } + /** + * {@link LRUCache.OptionsBase.dispose} (read-only) + */ + get dispose() { + return this.#dispose; + } + /** + * {@link LRUCache.OptionsBase.disposeAfter} (read-only) + */ + get disposeAfter() { + return this.#disposeAfter; + } + constructor(options) { + const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, memoMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort, } = options; + if (max !== 0 && !isPosInt(max)) { + throw new TypeError('max option must be a nonnegative integer'); + } + const UintArray = max ? getUintArray(max) : Array; + if (!UintArray) { + throw new Error('invalid max value: ' + max); + } + this.#max = max; + this.#maxSize = maxSize; + this.maxEntrySize = maxEntrySize || this.#maxSize; + this.sizeCalculation = sizeCalculation; + if (this.sizeCalculation) { + if (!this.#maxSize && !this.maxEntrySize) { + throw new TypeError('cannot set sizeCalculation without setting maxSize or maxEntrySize'); + } + if (typeof this.sizeCalculation !== 'function') { + throw new TypeError('sizeCalculation set to non-function'); + } + } + if (memoMethod !== undefined && + typeof memoMethod !== 'function') { + throw new TypeError('memoMethod must be a function if defined'); + } + this.#memoMethod = memoMethod; + if (fetchMethod !== undefined && + typeof fetchMethod !== 'function') { + throw new TypeError('fetchMethod must be a function if specified'); + } + this.#fetchMethod = fetchMethod; + this.#hasFetchMethod = !!fetchMethod; + this.#keyMap = new Map(); + this.#keyList = new Array(max).fill(undefined); + this.#valList = new Array(max).fill(undefined); + this.#next = new UintArray(max); + this.#prev = new UintArray(max); + this.#head = 0; + this.#tail = 0; + this.#free = Stack.create(max); + this.#size = 0; + this.#calculatedSize = 0; + if (typeof dispose === 'function') { + this.#dispose = dispose; + } + if (typeof disposeAfter === 'function') { + this.#disposeAfter = disposeAfter; + this.#disposed = []; + } + else { + this.#disposeAfter = undefined; + this.#disposed = undefined; + } + this.#hasDispose = !!this.#dispose; + this.#hasDisposeAfter = !!this.#disposeAfter; + this.noDisposeOnSet = !!noDisposeOnSet; + this.noUpdateTTL = !!noUpdateTTL; + this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection; + this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection; + this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort; + this.ignoreFetchAbort = !!ignoreFetchAbort; + // NB: maxEntrySize is set to maxSize if it's set + if (this.maxEntrySize !== 0) { + if (this.#maxSize !== 0) { + if (!isPosInt(this.#maxSize)) { + throw new TypeError('maxSize must be a positive integer if specified'); + } + } + if (!isPosInt(this.maxEntrySize)) { + throw new TypeError('maxEntrySize must be a positive integer if specified'); + } + this.#initializeSizeTracking(); + } + this.allowStale = !!allowStale; + this.noDeleteOnStaleGet = !!noDeleteOnStaleGet; + this.updateAgeOnGet = !!updateAgeOnGet; + this.updateAgeOnHas = !!updateAgeOnHas; + this.ttlResolution = + isPosInt(ttlResolution) || ttlResolution === 0 + ? ttlResolution + : 1; + this.ttlAutopurge = !!ttlAutopurge; + this.ttl = ttl || 0; + if (this.ttl) { + if (!isPosInt(this.ttl)) { + throw new TypeError('ttl must be a positive integer if specified'); + } + this.#initializeTTLTracking(); + } + // do not allow completely unbounded caches + if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) { + throw new TypeError('At least one of max, maxSize, or ttl is required'); + } + if (!this.ttlAutopurge && !this.#max && !this.#maxSize) { + const code = 'LRU_CACHE_UNBOUNDED'; + if (shouldWarn(code)) { + warned.add(code); + const msg = 'TTL caching without ttlAutopurge, max, or maxSize can ' + + 'result in unbounded memory consumption.'; + emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache); + } + } + } + /** + * Return the number of ms left in the item's TTL. If item is not in cache, + * returns `0`. Returns `Infinity` if item is in cache without a defined TTL. + */ + getRemainingTTL(key) { + return this.#keyMap.has(key) ? Infinity : 0; + } + #initializeTTLTracking() { + const ttls = new ZeroArray(this.#max); + const starts = new ZeroArray(this.#max); + this.#ttls = ttls; + this.#starts = starts; + this.#setItemTTL = (index, ttl, start = perf.now()) => { + starts[index] = ttl !== 0 ? start : 0; + ttls[index] = ttl; + if (ttl !== 0 && this.ttlAutopurge) { + const t = setTimeout(() => { + if (this.#isStale(index)) { + this.#delete(this.#keyList[index], 'expire'); + } + }, ttl + 1); + // unref() not supported on all platforms + /* c8 ignore start */ + if (t.unref) { + t.unref(); + } + /* c8 ignore stop */ + } + }; + this.#updateItemAge = index => { + starts[index] = ttls[index] !== 0 ? perf.now() : 0; + }; + this.#statusTTL = (status, index) => { + if (ttls[index]) { + const ttl = ttls[index]; + const start = starts[index]; + /* c8 ignore next */ + if (!ttl || !start) + return; + status.ttl = ttl; + status.start = start; + status.now = cachedNow || getNow(); + const age = status.now - start; + status.remainingTTL = ttl - age; + } + }; + // debounce calls to perf.now() to 1s so we're not hitting + // that costly call repeatedly. + let cachedNow = 0; + const getNow = () => { + const n = perf.now(); + if (this.ttlResolution > 0) { + cachedNow = n; + const t = setTimeout(() => (cachedNow = 0), this.ttlResolution); + // not available on all platforms + /* c8 ignore start */ + if (t.unref) { + t.unref(); + } + /* c8 ignore stop */ + } + return n; + }; + this.getRemainingTTL = key => { + const index = this.#keyMap.get(key); + if (index === undefined) { + return 0; + } + const ttl = ttls[index]; + const start = starts[index]; + if (!ttl || !start) { + return Infinity; + } + const age = (cachedNow || getNow()) - start; + return ttl - age; + }; + this.#isStale = index => { + const s = starts[index]; + const t = ttls[index]; + return !!t && !!s && (cachedNow || getNow()) - s > t; + }; + } + // conditionally set private methods related to TTL + #updateItemAge = () => { }; + #statusTTL = () => { }; + #setItemTTL = () => { }; + /* c8 ignore stop */ + #isStale = () => false; + #initializeSizeTracking() { + const sizes = new ZeroArray(this.#max); + this.#calculatedSize = 0; + this.#sizes = sizes; + this.#removeItemSize = index => { + this.#calculatedSize -= sizes[index]; + sizes[index] = 0; + }; + this.#requireSize = (k, v, size, sizeCalculation) => { + // provisionally accept background fetches. + // actual value size will be checked when they return. + if (this.#isBackgroundFetch(v)) { + return 0; + } + if (!isPosInt(size)) { + if (sizeCalculation) { + if (typeof sizeCalculation !== 'function') { + throw new TypeError('sizeCalculation must be a function'); + } + size = sizeCalculation(v, k); + if (!isPosInt(size)) { + throw new TypeError('sizeCalculation return invalid (expect positive integer)'); + } + } + else { + throw new TypeError('invalid size value (must be positive integer). ' + + 'When maxSize or maxEntrySize is used, sizeCalculation ' + + 'or size must be set.'); + } + } + return size; + }; + this.#addItemSize = (index, size, status) => { + sizes[index] = size; + if (this.#maxSize) { + const maxSize = this.#maxSize - sizes[index]; + while (this.#calculatedSize > maxSize) { + this.#evict(true); + } + } + this.#calculatedSize += sizes[index]; + if (status) { + status.entrySize = size; + status.totalCalculatedSize = this.#calculatedSize; + } + }; + } + #removeItemSize = _i => { }; + #addItemSize = (_i, _s, _st) => { }; + #requireSize = (_k, _v, size, sizeCalculation) => { + if (size || sizeCalculation) { + throw new TypeError('cannot set size without setting maxSize or maxEntrySize on cache'); + } + return 0; + }; + *#indexes({ allowStale = this.allowStale } = {}) { + if (this.#size) { + for (let i = this.#tail; true;) { + if (!this.#isValidIndex(i)) { + break; + } + if (allowStale || !this.#isStale(i)) { + yield i; + } + if (i === this.#head) { + break; + } + else { + i = this.#prev[i]; + } + } + } + } + *#rindexes({ allowStale = this.allowStale } = {}) { + if (this.#size) { + for (let i = this.#head; true;) { + if (!this.#isValidIndex(i)) { + break; + } + if (allowStale || !this.#isStale(i)) { + yield i; + } + if (i === this.#tail) { + break; + } + else { + i = this.#next[i]; + } + } + } + } + #isValidIndex(index) { + return (index !== undefined && + this.#keyMap.get(this.#keyList[index]) === index); + } + /** + * Return a generator yielding `[key, value]` pairs, + * in order from most recently used to least recently used. + */ + *entries() { + for (const i of this.#indexes()) { + if (this.#valList[i] !== undefined && + this.#keyList[i] !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield [this.#keyList[i], this.#valList[i]]; + } + } + } + /** + * Inverse order version of {@link LRUCache.entries} + * + * Return a generator yielding `[key, value]` pairs, + * in order from least recently used to most recently used. + */ + *rentries() { + for (const i of this.#rindexes()) { + if (this.#valList[i] !== undefined && + this.#keyList[i] !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield [this.#keyList[i], this.#valList[i]]; + } + } + } + /** + * Return a generator yielding the keys in the cache, + * in order from most recently used to least recently used. + */ + *keys() { + for (const i of this.#indexes()) { + const k = this.#keyList[i]; + if (k !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield k; + } + } + } + /** + * Inverse order version of {@link LRUCache.keys} + * + * Return a generator yielding the keys in the cache, + * in order from least recently used to most recently used. + */ + *rkeys() { + for (const i of this.#rindexes()) { + const k = this.#keyList[i]; + if (k !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield k; + } + } + } + /** + * Return a generator yielding the values in the cache, + * in order from most recently used to least recently used. + */ + *values() { + for (const i of this.#indexes()) { + const v = this.#valList[i]; + if (v !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield this.#valList[i]; + } + } + } + /** + * Inverse order version of {@link LRUCache.values} + * + * Return a generator yielding the values in the cache, + * in order from least recently used to most recently used. + */ + *rvalues() { + for (const i of this.#rindexes()) { + const v = this.#valList[i]; + if (v !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield this.#valList[i]; + } + } + } + /** + * Iterating over the cache itself yields the same results as + * {@link LRUCache.entries} + */ + [Symbol.iterator]() { + return this.entries(); + } + /** + * A String value that is used in the creation of the default string + * description of an object. Called by the built-in method + * `Object.prototype.toString`. + */ + [Symbol.toStringTag] = 'LRUCache'; + /** + * Find a value for which the supplied fn method returns a truthy value, + * similar to `Array.find()`. fn is called as `fn(value, key, cache)`. + */ + find(fn, getOptions = {}) { + for (const i of this.#indexes()) { + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + continue; + if (fn(value, this.#keyList[i], this)) { + return this.get(this.#keyList[i], getOptions); + } + } + } + /** + * Call the supplied function on each item in the cache, in order from most + * recently used to least recently used. + * + * `fn` is called as `fn(value, key, cache)`. + * + * If `thisp` is provided, function will be called in the `this`-context of + * the provided object, or the cache if no `thisp` object is provided. + * + * Does not update age or recenty of use, or iterate over stale values. + */ + forEach(fn, thisp = this) { + for (const i of this.#indexes()) { + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + continue; + fn.call(thisp, value, this.#keyList[i], this); + } + } + /** + * The same as {@link LRUCache.forEach} but items are iterated over in + * reverse order. (ie, less recently used items are iterated over first.) + */ + rforEach(fn, thisp = this) { + for (const i of this.#rindexes()) { + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + continue; + fn.call(thisp, value, this.#keyList[i], this); + } + } + /** + * Delete any stale entries. Returns true if anything was removed, + * false otherwise. + */ + purgeStale() { + let deleted = false; + for (const i of this.#rindexes({ allowStale: true })) { + if (this.#isStale(i)) { + this.#delete(this.#keyList[i], 'expire'); + deleted = true; + } + } + return deleted; + } + /** + * Get the extended info about a given entry, to get its value, size, and + * TTL info simultaneously. Returns `undefined` if the key is not present. + * + * Unlike {@link LRUCache#dump}, which is designed to be portable and survive + * serialization, the `start` value is always the current timestamp, and the + * `ttl` is a calculated remaining time to live (negative if expired). + * + * Always returns stale values, if their info is found in the cache, so be + * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl}) + * if relevant. + */ + info(key) { + const i = this.#keyMap.get(key); + if (i === undefined) + return undefined; + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + return undefined; + const entry = { value }; + if (this.#ttls && this.#starts) { + const ttl = this.#ttls[i]; + const start = this.#starts[i]; + if (ttl && start) { + const remain = ttl - (perf.now() - start); + entry.ttl = remain; + entry.start = Date.now(); + } + } + if (this.#sizes) { + entry.size = this.#sizes[i]; + } + return entry; + } + /** + * Return an array of [key, {@link LRUCache.Entry}] tuples which can be + * passed to {@link LRLUCache#load}. + * + * The `start` fields are calculated relative to a portable `Date.now()` + * timestamp, even if `performance.now()` is available. + * + * Stale entries are always included in the `dump`, even if + * {@link LRUCache.OptionsBase.allowStale} is false. + * + * Note: this returns an actual array, not a generator, so it can be more + * easily passed around. + */ + dump() { + const arr = []; + for (const i of this.#indexes({ allowStale: true })) { + const key = this.#keyList[i]; + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined || key === undefined) + continue; + const entry = { value }; + if (this.#ttls && this.#starts) { + entry.ttl = this.#ttls[i]; + // always dump the start relative to a portable timestamp + // it's ok for this to be a bit slow, it's a rare operation. + const age = perf.now() - this.#starts[i]; + entry.start = Math.floor(Date.now() - age); + } + if (this.#sizes) { + entry.size = this.#sizes[i]; + } + arr.unshift([key, entry]); + } + return arr; + } + /** + * Reset the cache and load in the items in entries in the order listed. + * + * The shape of the resulting cache may be different if the same options are + * not used in both caches. + * + * The `start` fields are assumed to be calculated relative to a portable + * `Date.now()` timestamp, even if `performance.now()` is available. + */ + load(arr) { + this.clear(); + for (const [key, entry] of arr) { + if (entry.start) { + // entry.start is a portable timestamp, but we may be using + // node's performance.now(), so calculate the offset, so that + // we get the intended remaining TTL, no matter how long it's + // been on ice. + // + // it's ok for this to be a bit slow, it's a rare operation. + const age = Date.now() - entry.start; + entry.start = perf.now() - age; + } + this.set(key, entry.value, entry); + } + } + /** + * Add a value to the cache. + * + * Note: if `undefined` is specified as a value, this is an alias for + * {@link LRUCache#delete} + * + * Fields on the {@link LRUCache.SetOptions} options param will override + * their corresponding values in the constructor options for the scope + * of this single `set()` operation. + * + * If `start` is provided, then that will set the effective start + * time for the TTL calculation. Note that this must be a previous + * value of `performance.now()` if supported, or a previous value of + * `Date.now()` if not. + * + * Options object may also include `size`, which will prevent + * calling the `sizeCalculation` function and just use the specified + * number if it is a positive integer, and `noDisposeOnSet` which + * will prevent calling a `dispose` function in the case of + * overwrites. + * + * If the `size` (or return value of `sizeCalculation`) for a given + * entry is greater than `maxEntrySize`, then the item will not be + * added to the cache. + * + * Will update the recency of the entry. + * + * If the value is `undefined`, then this is an alias for + * `cache.delete(key)`. `undefined` is never stored in the cache. + */ + set(k, v, setOptions = {}) { + if (v === undefined) { + this.delete(k); + return this; + } + const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status, } = setOptions; + let { noUpdateTTL = this.noUpdateTTL } = setOptions; + const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation); + // if the item doesn't fit, don't do anything + // NB: maxEntrySize set to maxSize by default + if (this.maxEntrySize && size > this.maxEntrySize) { + if (status) { + status.set = 'miss'; + status.maxEntrySizeExceeded = true; + } + // have to delete, in case something is there already. + this.#delete(k, 'set'); + return this; + } + let index = this.#size === 0 ? undefined : this.#keyMap.get(k); + if (index === undefined) { + // addition + index = (this.#size === 0 + ? this.#tail + : this.#free.length !== 0 + ? this.#free.pop() + : this.#size === this.#max + ? this.#evict(false) + : this.#size); + this.#keyList[index] = k; + this.#valList[index] = v; + this.#keyMap.set(k, index); + this.#next[this.#tail] = index; + this.#prev[index] = this.#tail; + this.#tail = index; + this.#size++; + this.#addItemSize(index, size, status); + if (status) + status.set = 'add'; + noUpdateTTL = false; + } + else { + // update + this.#moveToTail(index); + const oldVal = this.#valList[index]; + if (v !== oldVal) { + if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) { + oldVal.__abortController.abort(new Error('replaced')); + const { __staleWhileFetching: s } = oldVal; + if (s !== undefined && !noDisposeOnSet) { + if (this.#hasDispose) { + this.#dispose?.(s, k, 'set'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([s, k, 'set']); + } + } + } + else if (!noDisposeOnSet) { + if (this.#hasDispose) { + this.#dispose?.(oldVal, k, 'set'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([oldVal, k, 'set']); + } + } + this.#removeItemSize(index); + this.#addItemSize(index, size, status); + this.#valList[index] = v; + if (status) { + status.set = 'replace'; + const oldValue = oldVal && this.#isBackgroundFetch(oldVal) + ? oldVal.__staleWhileFetching + : oldVal; + if (oldValue !== undefined) + status.oldValue = oldValue; + } + } + else if (status) { + status.set = 'update'; + } + } + if (ttl !== 0 && !this.#ttls) { + this.#initializeTTLTracking(); + } + if (this.#ttls) { + if (!noUpdateTTL) { + this.#setItemTTL(index, ttl, start); + } + if (status) + this.#statusTTL(status, index); + } + if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + return this; + } + /** + * Evict the least recently used item, returning its value or + * `undefined` if cache is empty. + */ + pop() { + try { + while (this.#size) { + const val = this.#valList[this.#head]; + this.#evict(true); + if (this.#isBackgroundFetch(val)) { + if (val.__staleWhileFetching) { + return val.__staleWhileFetching; + } + } + else if (val !== undefined) { + return val; + } + } + } + finally { + if (this.#hasDisposeAfter && this.#disposed) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + } + } + #evict(free) { + const head = this.#head; + const k = this.#keyList[head]; + const v = this.#valList[head]; + if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) { + v.__abortController.abort(new Error('evicted')); + } + else if (this.#hasDispose || this.#hasDisposeAfter) { + if (this.#hasDispose) { + this.#dispose?.(v, k, 'evict'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([v, k, 'evict']); + } + } + this.#removeItemSize(head); + // if we aren't about to use the index, then null these out + if (free) { + this.#keyList[head] = undefined; + this.#valList[head] = undefined; + this.#free.push(head); + } + if (this.#size === 1) { + this.#head = this.#tail = 0; + this.#free.length = 0; + } + else { + this.#head = this.#next[head]; + } + this.#keyMap.delete(k); + this.#size--; + return head; + } + /** + * Check if a key is in the cache, without updating the recency of use. + * Will return false if the item is stale, even though it is technically + * in the cache. + * + * Check if a key is in the cache, without updating the recency of + * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set + * to `true` in either the options or the constructor. + * + * Will return `false` if the item is stale, even though it is technically in + * the cache. The difference can be determined (if it matters) by using a + * `status` argument, and inspecting the `has` field. + * + * Will not update item age unless + * {@link LRUCache.OptionsBase.updateAgeOnHas} is set. + */ + has(k, hasOptions = {}) { + const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions; + const index = this.#keyMap.get(k); + if (index !== undefined) { + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v) && + v.__staleWhileFetching === undefined) { + return false; + } + if (!this.#isStale(index)) { + if (updateAgeOnHas) { + this.#updateItemAge(index); + } + if (status) { + status.has = 'hit'; + this.#statusTTL(status, index); + } + return true; + } + else if (status) { + status.has = 'stale'; + this.#statusTTL(status, index); + } + } + else if (status) { + status.has = 'miss'; + } + return false; + } + /** + * Like {@link LRUCache#get} but doesn't update recency or delete stale + * items. + * + * Returns `undefined` if the item is stale, unless + * {@link LRUCache.OptionsBase.allowStale} is set. + */ + peek(k, peekOptions = {}) { + const { allowStale = this.allowStale } = peekOptions; + const index = this.#keyMap.get(k); + if (index === undefined || + (!allowStale && this.#isStale(index))) { + return; + } + const v = this.#valList[index]; + // either stale and allowed, or forcing a refresh of non-stale value + return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; + } + #backgroundFetch(k, index, options, context) { + const v = index === undefined ? undefined : this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + return v; + } + const ac = new AC(); + const { signal } = options; + // when/if our AC signals, then stop listening to theirs. + signal?.addEventListener('abort', () => ac.abort(signal.reason), { + signal: ac.signal, + }); + const fetchOpts = { + signal: ac.signal, + options, + context, + }; + const cb = (v, updateCache = false) => { + const { aborted } = ac.signal; + const ignoreAbort = options.ignoreFetchAbort && v !== undefined; + if (options.status) { + if (aborted && !updateCache) { + options.status.fetchAborted = true; + options.status.fetchError = ac.signal.reason; + if (ignoreAbort) + options.status.fetchAbortIgnored = true; + } + else { + options.status.fetchResolved = true; + } + } + if (aborted && !ignoreAbort && !updateCache) { + return fetchFail(ac.signal.reason); + } + // either we didn't abort, and are still here, or we did, and ignored + const bf = p; + if (this.#valList[index] === p) { + if (v === undefined) { + if (bf.__staleWhileFetching) { + this.#valList[index] = bf.__staleWhileFetching; + } + else { + this.#delete(k, 'fetch'); + } + } + else { + if (options.status) + options.status.fetchUpdated = true; + this.set(k, v, fetchOpts.options); + } + } + return v; + }; + const eb = (er) => { + if (options.status) { + options.status.fetchRejected = true; + options.status.fetchError = er; + } + return fetchFail(er); + }; + const fetchFail = (er) => { + const { aborted } = ac.signal; + const allowStaleAborted = aborted && options.allowStaleOnFetchAbort; + const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection; + const noDelete = allowStale || options.noDeleteOnFetchRejection; + const bf = p; + if (this.#valList[index] === p) { + // if we allow stale on fetch rejections, then we need to ensure that + // the stale value is not removed from the cache when the fetch fails. + const del = !noDelete || bf.__staleWhileFetching === undefined; + if (del) { + this.#delete(k, 'fetch'); + } + else if (!allowStaleAborted) { + // still replace the *promise* with the stale value, + // since we are done with the promise at this point. + // leave it untouched if we're still waiting for an + // aborted background fetch that hasn't yet returned. + this.#valList[index] = bf.__staleWhileFetching; + } + } + if (allowStale) { + if (options.status && bf.__staleWhileFetching !== undefined) { + options.status.returnedStale = true; + } + return bf.__staleWhileFetching; + } + else if (bf.__returned === bf) { + throw er; + } + }; + const pcall = (res, rej) => { + const fmp = this.#fetchMethod?.(k, v, fetchOpts); + if (fmp && fmp instanceof Promise) { + fmp.then(v => res(v === undefined ? undefined : v), rej); + } + // ignored, we go until we finish, regardless. + // defer check until we are actually aborting, + // so fetchMethod can override. + ac.signal.addEventListener('abort', () => { + if (!options.ignoreFetchAbort || + options.allowStaleOnFetchAbort) { + res(undefined); + // when it eventually resolves, update the cache. + if (options.allowStaleOnFetchAbort) { + res = v => cb(v, true); + } + } + }); + }; + if (options.status) + options.status.fetchDispatched = true; + const p = new Promise(pcall).then(cb, eb); + const bf = Object.assign(p, { + __abortController: ac, + __staleWhileFetching: v, + __returned: undefined, + }); + if (index === undefined) { + // internal, don't expose status. + this.set(k, bf, { ...fetchOpts.options, status: undefined }); + index = this.#keyMap.get(k); + } + else { + this.#valList[index] = bf; + } + return bf; + } + #isBackgroundFetch(p) { + if (!this.#hasFetchMethod) + return false; + const b = p; + return (!!b && + b instanceof Promise && + b.hasOwnProperty('__staleWhileFetching') && + b.__abortController instanceof AC); + } + async fetch(k, fetchOptions = {}) { + const { + // get options + allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, + // set options + ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL, + // fetch exclusive options + noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal, } = fetchOptions; + if (!this.#hasFetchMethod) { + if (status) + status.fetch = 'get'; + return this.get(k, { + allowStale, + updateAgeOnGet, + noDeleteOnStaleGet, + status, + }); + } + const options = { + allowStale, + updateAgeOnGet, + noDeleteOnStaleGet, + ttl, + noDisposeOnSet, + size, + sizeCalculation, + noUpdateTTL, + noDeleteOnFetchRejection, + allowStaleOnFetchRejection, + allowStaleOnFetchAbort, + ignoreFetchAbort, + status, + signal, + }; + let index = this.#keyMap.get(k); + if (index === undefined) { + if (status) + status.fetch = 'miss'; + const p = this.#backgroundFetch(k, index, options, context); + return (p.__returned = p); + } + else { + // in cache, maybe already fetching + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + const stale = allowStale && v.__staleWhileFetching !== undefined; + if (status) { + status.fetch = 'inflight'; + if (stale) + status.returnedStale = true; + } + return stale ? v.__staleWhileFetching : (v.__returned = v); + } + // if we force a refresh, that means do NOT serve the cached value, + // unless we are already in the process of refreshing the cache. + const isStale = this.#isStale(index); + if (!forceRefresh && !isStale) { + if (status) + status.fetch = 'hit'; + this.#moveToTail(index); + if (updateAgeOnGet) { + this.#updateItemAge(index); + } + if (status) + this.#statusTTL(status, index); + return v; + } + // ok, it is stale or a forced refresh, and not already fetching. + // refresh the cache. + const p = this.#backgroundFetch(k, index, options, context); + const hasStale = p.__staleWhileFetching !== undefined; + const staleVal = hasStale && allowStale; + if (status) { + status.fetch = isStale ? 'stale' : 'refresh'; + if (staleVal && isStale) + status.returnedStale = true; + } + return staleVal ? p.__staleWhileFetching : (p.__returned = p); + } + } + async forceFetch(k, fetchOptions = {}) { + const v = await this.fetch(k, fetchOptions); + if (v === undefined) + throw new Error('fetch() returned undefined'); + return v; + } + memo(k, memoOptions = {}) { + const memoMethod = this.#memoMethod; + if (!memoMethod) { + throw new Error('no memoMethod provided to constructor'); + } + const { context, forceRefresh, ...options } = memoOptions; + const v = this.get(k, options); + if (!forceRefresh && v !== undefined) + return v; + const vv = memoMethod(k, v, { + options, + context, + }); + this.set(k, vv, options); + return vv; + } + /** + * Return a value from the cache. Will update the recency of the cache + * entry found. + * + * If the key is not found, get() will return `undefined`. + */ + get(k, getOptions = {}) { + const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status, } = getOptions; + const index = this.#keyMap.get(k); + if (index !== undefined) { + const value = this.#valList[index]; + const fetching = this.#isBackgroundFetch(value); + if (status) + this.#statusTTL(status, index); + if (this.#isStale(index)) { + if (status) + status.get = 'stale'; + // delete only if not an in-flight background fetch + if (!fetching) { + if (!noDeleteOnStaleGet) { + this.#delete(k, 'expire'); + } + if (status && allowStale) + status.returnedStale = true; + return allowStale ? value : undefined; + } + else { + if (status && + allowStale && + value.__staleWhileFetching !== undefined) { + status.returnedStale = true; + } + return allowStale ? value.__staleWhileFetching : undefined; + } + } + else { + if (status) + status.get = 'hit'; + // if we're currently fetching it, we don't actually have it yet + // it's not stale, which means this isn't a staleWhileRefetching. + // If it's not stale, and fetching, AND has a __staleWhileFetching + // value, then that means the user fetched with {forceRefresh:true}, + // so it's safe to return that value. + if (fetching) { + return value.__staleWhileFetching; + } + this.#moveToTail(index); + if (updateAgeOnGet) { + this.#updateItemAge(index); + } + return value; + } + } + else if (status) { + status.get = 'miss'; + } + } + #connect(p, n) { + this.#prev[n] = p; + this.#next[p] = n; + } + #moveToTail(index) { + // if tail already, nothing to do + // if head, move head to next[index] + // else + // move next[prev[index]] to next[index] (head has no prev) + // move prev[next[index]] to prev[index] + // prev[index] = tail + // next[tail] = index + // tail = index + if (index !== this.#tail) { + if (index === this.#head) { + this.#head = this.#next[index]; + } + else { + this.#connect(this.#prev[index], this.#next[index]); + } + this.#connect(this.#tail, index); + this.#tail = index; + } + } + /** + * Deletes a key out of the cache. + * + * Returns true if the key was deleted, false otherwise. + */ + delete(k) { + return this.#delete(k, 'delete'); + } + #delete(k, reason) { + let deleted = false; + if (this.#size !== 0) { + const index = this.#keyMap.get(k); + if (index !== undefined) { + deleted = true; + if (this.#size === 1) { + this.#clear(reason); + } + else { + this.#removeItemSize(index); + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + v.__abortController.abort(new Error('deleted')); + } + else if (this.#hasDispose || this.#hasDisposeAfter) { + if (this.#hasDispose) { + this.#dispose?.(v, k, reason); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([v, k, reason]); + } + } + this.#keyMap.delete(k); + this.#keyList[index] = undefined; + this.#valList[index] = undefined; + if (index === this.#tail) { + this.#tail = this.#prev[index]; + } + else if (index === this.#head) { + this.#head = this.#next[index]; + } + else { + const pi = this.#prev[index]; + this.#next[pi] = this.#next[index]; + const ni = this.#next[index]; + this.#prev[ni] = this.#prev[index]; + } + this.#size--; + this.#free.push(index); + } + } + } + if (this.#hasDisposeAfter && this.#disposed?.length) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + return deleted; + } + /** + * Clear the cache entirely, throwing away all values. + */ + clear() { + return this.#clear('delete'); + } + #clear(reason) { + for (const index of this.#rindexes({ allowStale: true })) { + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + v.__abortController.abort(new Error('deleted')); + } + else { + const k = this.#keyList[index]; + if (this.#hasDispose) { + this.#dispose?.(v, k, reason); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([v, k, reason]); + } + } + } + this.#keyMap.clear(); + this.#valList.fill(undefined); + this.#keyList.fill(undefined); + if (this.#ttls && this.#starts) { + this.#ttls.fill(0); + this.#starts.fill(0); + } + if (this.#sizes) { + this.#sizes.fill(0); + } + this.#head = 0; + this.#tail = 0; + this.#free.length = 0; + this.#calculatedSize = 0; + this.#size = 0; + if (this.#hasDisposeAfter && this.#disposed) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + } +} +exports.LRUCache = LRUCache; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/.github/octokit/node_modules/lru-cache/dist/commonjs/index.js.map b/.github/octokit/node_modules/lru-cache/dist/commonjs/index.js.map new file mode 100644 index 000000000..557c61613 --- /dev/null +++ b/.github/octokit/node_modules/lru-cache/dist/commonjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAIH,MAAM,IAAI,GACR,OAAO,WAAW,KAAK,QAAQ;IAC/B,WAAW;IACX,OAAO,WAAW,CAAC,GAAG,KAAK,UAAU;IACnC,CAAC,CAAC,WAAW;IACb,CAAC,CAAC,IAAI,CAAA;AAEV,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAA;AAKhC,qBAAqB;AACrB,MAAM,OAAO,GAAG,CACd,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAChC,CAAA;AACzB,qBAAqB;AAErB,MAAM,WAAW,GAAG,CAClB,GAAW,EACX,IAAY,EACZ,IAAY,EACZ,EAAQ,EACR,EAAE;IACF,OAAO,OAAO,CAAC,WAAW,KAAK,UAAU;QACvC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC;QAC1C,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,IAAI,KAAK,GAAG,EAAE,CAAC,CAAA;AAChD,CAAC,CAAA;AAED,IAAI,EAAE,GAAG,UAAU,CAAC,eAAe,CAAA;AACnC,IAAI,EAAE,GAAG,UAAU,CAAC,WAAW,CAAA;AAE/B,qBAAqB;AACrB,IAAI,OAAO,EAAE,KAAK,WAAW,EAAE;IAC7B,YAAY;IACZ,EAAE,GAAG,MAAM,WAAW;QACpB,OAAO,CAAuB;QAC9B,QAAQ,GAA6B,EAAE,CAAA;QACvC,MAAM,CAAM;QACZ,OAAO,GAAY,KAAK,CAAA;QACxB,gBAAgB,CAAC,CAAS,EAAE,EAAwB;YAClD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QACxB,CAAC;KACF,CAAA;IACD,YAAY;IACZ,EAAE,GAAG,MAAM,eAAe;QACxB;YACE,cAAc,EAAE,CAAA;QAClB,CAAC;QACD,MAAM,GAAG,IAAI,EAAE,EAAE,CAAA;QACjB,KAAK,CAAC,MAAW;YACf,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO;gBAAE,OAAM;YAC/B,YAAY;YACZ,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAA;YAC3B,YAAY;YACZ,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG,IAAI,CAAA;YAC1B,YAAY;YACZ,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;gBACrC,EAAE,CAAC,MAAM,CAAC,CAAA;aACX;YACD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAA;QAC/B,CAAC;KACF,CAAA;IACD,IAAI,sBAAsB,GACxB,OAAO,CAAC,GAAG,EAAE,2BAA2B,KAAK,GAAG,CAAA;IAClD,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,IAAI,CAAC,sBAAsB;YAAE,OAAM;QACnC,sBAAsB,GAAG,KAAK,CAAA;QAC9B,WAAW,CACT,wDAAwD;YACtD,qDAAqD;YACrD,yDAAyD;YACzD,6DAA6D;YAC7D,mEAAmE;YACnE,mEAAmE;YACnE,qEAAqE,EACvE,qBAAqB,EACrB,SAAS,EACT,cAAc,CACf,CAAA;IACH,CAAC,CAAA;CACF;AACD,oBAAoB;AAEpB,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AAEtD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;AAI3B,MAAM,QAAQ,GAAG,CAAC,CAAM,EAAe,EAAE,CACvC,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAA;AAKlD,qBAAqB;AACrB,wCAAwC;AACxC,sEAAsE;AACtE,uEAAuE;AACvE,uEAAuE;AACvE,wEAAwE;AACxE,uDAAuD;AACvD,2BAA2B;AAC3B,wDAAwD;AACxD,MAAM,YAAY,GAAG,CAAC,GAAW,EAAE,EAAE,CACnC,CAAC,QAAQ,CAAC,GAAG,CAAC;IACZ,CAAC,CAAC,IAAI;IACN,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;QACvB,CAAC,CAAC,UAAU;QACZ,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC;YACxB,CAAC,CAAC,WAAW;YACb,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC;gBACxB,CAAC,CAAC,WAAW;gBACb,CAAC,CAAC,GAAG,IAAI,MAAM,CAAC,gBAAgB;oBAChC,CAAC,CAAC,SAAS;oBACX,CAAC,CAAC,IAAI,CAAA;AACV,oBAAoB;AAEpB,MAAM,SAAU,SAAQ,KAAa;IACnC,YAAY,IAAY;QACtB,KAAK,CAAC,IAAI,CAAC,CAAA;QACX,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACd,CAAC;CACF;AAKD,MAAM,KAAK;IACT,IAAI,CAAa;IACjB,MAAM,CAAQ;IACd,sBAAsB;IACtB,MAAM,CAAC,aAAa,GAAY,KAAK,CAAA;IACrC,MAAM,CAAC,MAAM,CAAC,GAAW;QACvB,MAAM,OAAO,GAAG,YAAY,CAAC,GAAG,CAAC,CAAA;QACjC,IAAI,CAAC,OAAO;YAAE,OAAO,EAAE,CAAA;QACvB,KAAK,CAAC,aAAa,GAAG,IAAI,CAAA;QAC1B,MAAM,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;QACjC,KAAK,CAAC,aAAa,GAAG,KAAK,CAAA;QAC3B,OAAO,CAAC,CAAA;IACV,CAAC;IACD,YACE,GAAW,EACX,OAAyC;QAEzC,qBAAqB;QACrB,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE;YACxB,MAAM,IAAI,SAAS,CAAC,yCAAyC,CAAC,CAAA;SAC/D;QACD,oBAAoB;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,CAAA;QAC5B,IAAI,CAAC,MAAM,GAAG,CAAC,CAAA;IACjB,CAAC;IACD,IAAI,CAAC,CAAQ;QACX,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAA;IAC9B,CAAC;IACD,GAAG;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,MAAM,CAAU,CAAA;IAC1C,CAAC;;AAw6BH;;;;;;;;;;;;;;GAcG;AACH,MAAa,QAAQ;IAGnB,kDAAkD;IACzC,IAAI,CAAgB;IACpB,QAAQ,CAAe;IACvB,QAAQ,CAA0B;IAClC,aAAa,CAA0B;IACvC,YAAY,CAA6B;IACzC,WAAW,CAA8B;IAElD;;OAEG;IACH,GAAG,CAAuB;IAE1B;;OAEG;IACH,aAAa,CAAuB;IACpC;;OAEG;IACH,YAAY,CAAS;IACrB;;OAEG;IACH,cAAc,CAAS;IACvB;;OAEG;IACH,cAAc,CAAS;IACvB;;OAEG;IACH,UAAU,CAAS;IAEnB;;OAEG;IACH,cAAc,CAAS;IACvB;;OAEG;IACH,WAAW,CAAS;IACpB;;OAEG;IACH,YAAY,CAAe;IAC3B;;OAEG;IACH,eAAe,CAAgC;IAC/C;;OAEG;IACH,wBAAwB,CAAS;IACjC;;OAEG;IACH,kBAAkB,CAAS;IAC3B;;OAEG;IACH,sBAAsB,CAAS;IAC/B;;OAEG;IACH,0BAA0B,CAAS;IACnC;;OAEG;IACH,gBAAgB,CAAS;IAEzB,sBAAsB;IACtB,KAAK,CAAgB;IACrB,eAAe,CAAe;IAC9B,OAAO,CAAe;IACtB,QAAQ,CAAmB;IAC3B,QAAQ,CAAwC;IAChD,KAAK,CAAa;IAClB,KAAK,CAAa;IAClB,KAAK,CAAO;IACZ,KAAK,CAAO;IACZ,KAAK,CAAW;IAChB,SAAS,CAAsB;IAC/B,MAAM,CAAY;IAClB,OAAO,CAAY;IACnB,KAAK,CAAY;IAEjB,WAAW,CAAS;IACpB,eAAe,CAAS;IACxB,gBAAgB,CAAS;IAEzB;;;;;;;;OAQG;IACH,MAAM,CAAC,qBAAqB,CAI1B,CAAqB;QACrB,OAAO;YACL,aAAa;YACb,MAAM,EAAE,CAAC,CAAC,OAAO;YACjB,IAAI,EAAE,CAAC,CAAC,KAAK;YACb,KAAK,EAAE,CAAC,CAAC,MAAM;YACf,MAAM,EAAE,CAAC,CAAC,OAAyB;YACnC,OAAO,EAAE,CAAC,CAAC,QAAQ;YACnB,OAAO,EAAE,CAAC,CAAC,QAAQ;YACnB,IAAI,EAAE,CAAC,CAAC,KAAK;YACb,IAAI,EAAE,CAAC,CAAC,KAAK;YACb,IAAI,IAAI;gBACN,OAAO,CAAC,CAAC,KAAK,CAAA;YAChB,CAAC;YACD,IAAI,IAAI;gBACN,OAAO,CAAC,CAAC,KAAK,CAAA;YAChB,CAAC;YACD,IAAI,EAAE,CAAC,CAAC,KAAK;YACb,UAAU;YACV,iBAAiB,EAAE,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC;YACtD,eAAe,EAAE,CACf,CAAI,EACJ,KAAyB,EACzB,OAAwC,EACxC,OAAY,EACQ,EAAE,CACtB,CAAC,CAAC,gBAAgB,CAChB,CAAC,EACD,KAA0B,EAC1B,OAAO,EACP,OAAO,CACR;YACH,UAAU,EAAE,CAAC,KAAa,EAAQ,EAAE,CAClC,CAAC,CAAC,WAAW,CAAC,KAAc,CAAC;YAC/B,OAAO,EAAE,CAAC,OAAiC,EAAE,EAAE,CAC7C,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;YACrB,QAAQ,EAAE,CAAC,OAAiC,EAAE,EAAE,CAC9C,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC;YACtB,OAAO,EAAE,CAAC,KAAyB,EAAE,EAAE,CACrC,CAAC,CAAC,QAAQ,CAAC,KAAc,CAAC;SAC7B,CAAA;IACH,CAAC;IAED,8BAA8B;IAE9B;;OAEG;IACH,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,IAAI,CAAA;IAClB,CAAC;IACD;;OAEG;IACH,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAA;IACtB,CAAC;IACD;;OAEG;IACH,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,eAAe,CAAA;IAC7B,CAAC;IACD;;OAEG;IACH,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;IACD;;OAEG;IACH,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAA;IAC1B,CAAC;IACD,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,WAAW,CAAA;IACzB,CAAC;IACD;;OAEG;IACH,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAA;IACtB,CAAC;IACD;;OAEG;IACH,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,aAAa,CAAA;IAC3B,CAAC;IAED,YACE,OAAwD;QAExD,MAAM,EACJ,GAAG,GAAG,CAAC,EACP,GAAG,EACH,aAAa,GAAG,CAAC,EACjB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,UAAU,EACV,OAAO,EACP,YAAY,EACZ,cAAc,EACd,WAAW,EACX,OAAO,GAAG,CAAC,EACX,YAAY,GAAG,CAAC,EAChB,eAAe,EACf,WAAW,EACX,UAAU,EACV,wBAAwB,EACxB,kBAAkB,EAClB,0BAA0B,EAC1B,sBAAsB,EACtB,gBAAgB,GACjB,GAAG,OAAO,CAAA;QAEX,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC/B,MAAM,IAAI,SAAS,CAAC,0CAA0C,CAAC,CAAA;SAChE;QAED,MAAM,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;QACjD,IAAI,CAAC,SAAS,EAAE;YACd,MAAM,IAAI,KAAK,CAAC,qBAAqB,GAAG,GAAG,CAAC,CAAA;SAC7C;QAED,IAAI,CAAC,IAAI,GAAG,GAAG,CAAA;QACf,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;QACvB,IAAI,CAAC,YAAY,GAAG,YAAY,IAAI,IAAI,CAAC,QAAQ,CAAA;QACjD,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;QACtC,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;gBACxC,MAAM,IAAI,SAAS,CACjB,oEAAoE,CACrE,CAAA;aACF;YACD,IAAI,OAAO,IAAI,CAAC,eAAe,KAAK,UAAU,EAAE;gBAC9C,MAAM,IAAI,SAAS,CAAC,qCAAqC,CAAC,CAAA;aAC3D;SACF;QAED,IACE,UAAU,KAAK,SAAS;YACxB,OAAO,UAAU,KAAK,UAAU,EAChC;YACA,MAAM,IAAI,SAAS,CAAC,0CAA0C,CAAC,CAAA;SAChE;QACD,IAAI,CAAC,WAAW,GAAG,UAAU,CAAA;QAE7B,IACE,WAAW,KAAK,SAAS;YACzB,OAAO,WAAW,KAAK,UAAU,EACjC;YACA,MAAM,IAAI,SAAS,CACjB,6CAA6C,CAC9C,CAAA;SACF;QACD,IAAI,CAAC,YAAY,GAAG,WAAW,CAAA;QAC/B,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,WAAW,CAAA;QAEpC,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,EAAE,CAAA;QACxB,IAAI,CAAC,QAAQ,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAC9C,IAAI,CAAC,QAAQ,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAC9C,IAAI,CAAC,KAAK,GAAG,IAAI,SAAS,CAAC,GAAG,CAAC,CAAA;QAC/B,IAAI,CAAC,KAAK,GAAG,IAAI,SAAS,CAAC,GAAG,CAAC,CAAA;QAC/B,IAAI,CAAC,KAAK,GAAG,CAAU,CAAA;QACvB,IAAI,CAAC,KAAK,GAAG,CAAU,CAAA;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QAC9B,IAAI,CAAC,KAAK,GAAG,CAAC,CAAA;QACd,IAAI,CAAC,eAAe,GAAG,CAAC,CAAA;QAExB,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;YACjC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;SACxB;QACD,IAAI,OAAO,YAAY,KAAK,UAAU,EAAE;YACtC,IAAI,CAAC,aAAa,GAAG,YAAY,CAAA;YACjC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAA;SACpB;aAAM;YACL,IAAI,CAAC,aAAa,GAAG,SAAS,CAAA;YAC9B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;SAC3B;QACD,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAA;QAClC,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,aAAa,CAAA;QAE5C,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,cAAc,CAAA;QACtC,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,WAAW,CAAA;QAChC,IAAI,CAAC,wBAAwB,GAAG,CAAC,CAAC,wBAAwB,CAAA;QAC1D,IAAI,CAAC,0BAA0B,GAAG,CAAC,CAAC,0BAA0B,CAAA;QAC9D,IAAI,CAAC,sBAAsB,GAAG,CAAC,CAAC,sBAAsB,CAAA;QACtD,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC,gBAAgB,CAAA;QAE1C,iDAAiD;QACjD,IAAI,IAAI,CAAC,YAAY,KAAK,CAAC,EAAE;YAC3B,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC,EAAE;gBACvB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;oBAC5B,MAAM,IAAI,SAAS,CACjB,iDAAiD,CAClD,CAAA;iBACF;aACF;YACD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE;gBAChC,MAAM,IAAI,SAAS,CACjB,sDAAsD,CACvD,CAAA;aACF;YACD,IAAI,CAAC,uBAAuB,EAAE,CAAA;SAC/B;QAED,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,CAAA;QAC9B,IAAI,CAAC,kBAAkB,GAAG,CAAC,CAAC,kBAAkB,CAAA;QAC9C,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,cAAc,CAAA;QACtC,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,cAAc,CAAA;QACtC,IAAI,CAAC,aAAa;YAChB,QAAQ,CAAC,aAAa,CAAC,IAAI,aAAa,KAAK,CAAC;gBAC5C,CAAC,CAAC,aAAa;gBACf,CAAC,CAAC,CAAC,CAAA;QACP,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,YAAY,CAAA;QAClC,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,CAAA;QACnB,IAAI,IAAI,CAAC,GAAG,EAAE;YACZ,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;gBACvB,MAAM,IAAI,SAAS,CACjB,6CAA6C,CAC9C,CAAA;aACF;YACD,IAAI,CAAC,sBAAsB,EAAE,CAAA;SAC9B;QAED,2CAA2C;QAC3C,IAAI,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC,EAAE;YAC5D,MAAM,IAAI,SAAS,CACjB,kDAAkD,CACnD,CAAA;SACF;QACD,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YACtD,MAAM,IAAI,GAAG,qBAAqB,CAAA;YAClC,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE;gBACpB,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;gBAChB,MAAM,GAAG,GACP,wDAAwD;oBACxD,yCAAyC,CAAA;gBAC3C,WAAW,CAAC,GAAG,EAAE,uBAAuB,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;aAC1D;SACF;IACH,CAAC;IAED;;;OAGG;IACH,eAAe,CAAC,GAAM;QACpB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;IAC7C,CAAC;IAED,sBAAsB;QACpB,MAAM,IAAI,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACrC,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACvC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QACjB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;QAErB,IAAI,CAAC,WAAW,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE;YACpD,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;YACrC,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,CAAA;YACjB,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,CAAC,YAAY,EAAE;gBAClC,MAAM,CAAC,GAAG,UAAU,CAAC,GAAG,EAAE;oBACxB,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;wBACxB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAM,EAAE,QAAQ,CAAC,CAAA;qBAClD;gBACH,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,CAAA;gBACX,yCAAyC;gBACzC,qBAAqB;gBACrB,IAAI,CAAC,CAAC,KAAK,EAAE;oBACX,CAAC,CAAC,KAAK,EAAE,CAAA;iBACV;gBACD,oBAAoB;aACrB;QACH,CAAC,CAAA;QAED,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,EAAE;YAC5B,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;QACpD,CAAC,CAAA;QAED,IAAI,CAAC,UAAU,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAClC,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE;gBACf,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAA;gBACvB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;gBAC3B,oBAAoB;gBACpB,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK;oBAAE,OAAM;gBAC1B,MAAM,CAAC,GAAG,GAAG,GAAG,CAAA;gBAChB,MAAM,CAAC,KAAK,GAAG,KAAK,CAAA;gBACpB,MAAM,CAAC,GAAG,GAAG,SAAS,IAAI,MAAM,EAAE,CAAA;gBAClC,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,GAAG,KAAK,CAAA;gBAC9B,MAAM,CAAC,YAAY,GAAG,GAAG,GAAG,GAAG,CAAA;aAChC;QACH,CAAC,CAAA;QAED,0DAA0D;QAC1D,+BAA+B;QAC/B,IAAI,SAAS,GAAG,CAAC,CAAA;QACjB,MAAM,MAAM,GAAG,GAAG,EAAE;YAClB,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;YACpB,IAAI,IAAI,CAAC,aAAa,GAAG,CAAC,EAAE;gBAC1B,SAAS,GAAG,CAAC,CAAA;gBACb,MAAM,CAAC,GAAG,UAAU,CAClB,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EACrB,IAAI,CAAC,aAAa,CACnB,CAAA;gBACD,iCAAiC;gBACjC,qBAAqB;gBACrB,IAAI,CAAC,CAAC,KAAK,EAAE;oBACX,CAAC,CAAC,KAAK,EAAE,CAAA;iBACV;gBACD,oBAAoB;aACrB;YACD,OAAO,CAAC,CAAA;QACV,CAAC,CAAA;QAED,IAAI,CAAC,eAAe,GAAG,GAAG,CAAC,EAAE;YAC3B,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;YACnC,IAAI,KAAK,KAAK,SAAS,EAAE;gBACvB,OAAO,CAAC,CAAA;aACT;YACD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAA;YACvB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;YAC3B,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE;gBAClB,OAAO,QAAQ,CAAA;aAChB;YACD,MAAM,GAAG,GAAG,CAAC,SAAS,IAAI,MAAM,EAAE,CAAC,GAAG,KAAK,CAAA;YAC3C,OAAO,GAAG,GAAG,GAAG,CAAA;QAClB,CAAC,CAAA;QAED,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,EAAE;YACtB,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;YACvB,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAA;YACrB,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QACtD,CAAC,CAAA;IACH,CAAC;IAED,mDAAmD;IACnD,cAAc,GAA2B,GAAG,EAAE,GAAE,CAAC,CAAA;IACjD,UAAU,GACR,GAAG,EAAE,GAAE,CAAC,CAAA;IACV,WAAW,GAMC,GAAG,EAAE,GAAE,CAAC,CAAA;IACpB,oBAAoB;IAEpB,QAAQ,GAA8B,GAAG,EAAE,CAAC,KAAK,CAAA;IAEjD,uBAAuB;QACrB,MAAM,KAAK,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACtC,IAAI,CAAC,eAAe,GAAG,CAAC,CAAA;QACxB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;QACnB,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,EAAE;YAC7B,IAAI,CAAC,eAAe,IAAI,KAAK,CAAC,KAAK,CAAW,CAAA;YAC9C,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAClB,CAAC,CAAA;QACD,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE;YAClD,2CAA2C;YAC3C,sDAAsD;YACtD,IAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE;gBAC9B,OAAO,CAAC,CAAA;aACT;YACD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;gBACnB,IAAI,eAAe,EAAE;oBACnB,IAAI,OAAO,eAAe,KAAK,UAAU,EAAE;wBACzC,MAAM,IAAI,SAAS,CAAC,oCAAoC,CAAC,CAAA;qBAC1D;oBACD,IAAI,GAAG,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;oBAC5B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;wBACnB,MAAM,IAAI,SAAS,CACjB,0DAA0D,CAC3D,CAAA;qBACF;iBACF;qBAAM;oBACL,MAAM,IAAI,SAAS,CACjB,iDAAiD;wBAC/C,wDAAwD;wBACxD,sBAAsB,CACzB,CAAA;iBACF;aACF;YACD,OAAO,IAAI,CAAA;QACb,CAAC,CAAA;QACD,IAAI,CAAC,YAAY,GAAG,CAClB,KAAY,EACZ,IAAmB,EACnB,MAA2B,EAC3B,EAAE;YACF,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,CAAA;YACnB,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACjB,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,GAAI,KAAK,CAAC,KAAK,CAAY,CAAA;gBACxD,OAAO,IAAI,CAAC,eAAe,GAAG,OAAO,EAAE;oBACrC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;iBAClB;aACF;YACD,IAAI,CAAC,eAAe,IAAI,KAAK,CAAC,KAAK,CAAW,CAAA;YAC9C,IAAI,MAAM,EAAE;gBACV,MAAM,CAAC,SAAS,GAAG,IAAI,CAAA;gBACvB,MAAM,CAAC,mBAAmB,GAAG,IAAI,CAAC,eAAe,CAAA;aAClD;QACH,CAAC,CAAA;IACH,CAAC;IAED,eAAe,GAA2B,EAAE,CAAC,EAAE,GAAE,CAAC,CAAA;IAClD,YAAY,GAIA,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,GAAE,CAAC,CAAA;IAC/B,YAAY,GAKS,CACnB,EAAK,EACL,EAA0B,EAC1B,IAAoB,EACpB,eAA+C,EAC/C,EAAE;QACF,IAAI,IAAI,IAAI,eAAe,EAAE;YAC3B,MAAM,IAAI,SAAS,CACjB,kEAAkE,CACnE,CAAA;SACF;QACD,OAAO,CAAC,CAAA;IACV,CAAC,CAAC;IAEF,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,EAAE;QAC7C,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,IAAI,GAAI;gBAC/B,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE;oBAC1B,MAAK;iBACN;gBACD,IAAI,UAAU,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;oBACnC,MAAM,CAAC,CAAA;iBACR;gBACD,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,EAAE;oBACpB,MAAK;iBACN;qBAAM;oBACL,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAU,CAAA;iBAC3B;aACF;SACF;IACH,CAAC;IAED,CAAC,SAAS,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,EAAE;QAC9C,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,IAAI,GAAI;gBAC/B,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE;oBAC1B,MAAK;iBACN;gBACD,IAAI,UAAU,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;oBACnC,MAAM,CAAC,CAAA;iBACR;gBACD,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,EAAE;oBACpB,MAAK;iBACN;qBAAM;oBACL,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAU,CAAA;iBAC3B;aACF;SACF;IACH,CAAC;IAED,aAAa,CAAC,KAAY;QACxB,OAAO,CACL,KAAK,KAAK,SAAS;YACnB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAM,CAAC,KAAK,KAAK,CACtD,CAAA;IACH,CAAC;IAED;;;OAGG;IACH,CAAC,OAAO;QACN,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YAC/B,IACE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,SAAS;gBAC9B,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,SAAS;gBAC9B,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAC1C;gBACA,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAW,CAAA;aACrD;SACF;IACH,CAAC;IAED;;;;;OAKG;IACH,CAAC,QAAQ;QACP,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE,EAAE;YAChC,IACE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,SAAS;gBAC9B,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,SAAS;gBAC9B,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAC1C;gBACA,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;aAC3C;SACF;IACH,CAAC;IAED;;;OAGG;IACH,CAAC,IAAI;QACH,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YAC/B,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YAC1B,IACE,CAAC,KAAK,SAAS;gBACf,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAC1C;gBACA,MAAM,CAAC,CAAA;aACR;SACF;IACH,CAAC;IAED;;;;;OAKG;IACH,CAAC,KAAK;QACJ,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE,EAAE;YAChC,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YAC1B,IACE,CAAC,KAAK,SAAS;gBACf,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAC1C;gBACA,MAAM,CAAC,CAAA;aACR;SACF;IACH,CAAC;IAED;;;OAGG;IACH,CAAC,MAAM;QACL,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YAC/B,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YAC1B,IACE,CAAC,KAAK,SAAS;gBACf,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAC1C;gBACA,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAM,CAAA;aAC5B;SACF;IACH,CAAC;IAED;;;;;OAKG;IACH,CAAC,OAAO;QACN,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE,EAAE;YAChC,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YAC1B,IACE,CAAC,KAAK,SAAS;gBACf,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAC1C;gBACA,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;aACvB;SACF;IACH,CAAC;IAED;;;OAGG;IACH,CAAC,MAAM,CAAC,QAAQ,CAAC;QACf,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;IACvB,CAAC;IAED;;;;OAIG;IACH,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,UAAU,CAAA;IAEjC;;;OAGG;IACH,IAAI,CACF,EAAqD,EACrD,aAA4C,EAAE;QAE9C,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YAC/B,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YAC1B,MAAM,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;gBACtC,CAAC,CAAC,CAAC,CAAC,oBAAoB;gBACxB,CAAC,CAAC,CAAC,CAAA;YACL,IAAI,KAAK,KAAK,SAAS;gBAAE,SAAQ;YACjC,IAAI,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAM,EAAE,IAAI,CAAC,EAAE;gBAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAM,EAAE,UAAU,CAAC,CAAA;aACnD;SACF;IACH,CAAC;IAED;;;;;;;;;;OAUG;IACH,OAAO,CACL,EAAiD,EACjD,QAAa,IAAI;QAEjB,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YAC/B,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YAC1B,MAAM,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;gBACtC,CAAC,CAAC,CAAC,CAAC,oBAAoB;gBACxB,CAAC,CAAC,CAAC,CAAA;YACL,IAAI,KAAK,KAAK,SAAS;gBAAE,SAAQ;YACjC,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAM,EAAE,IAAI,CAAC,CAAA;SACnD;IACH,CAAC;IAED;;;OAGG;IACH,QAAQ,CACN,EAAiD,EACjD,QAAa,IAAI;QAEjB,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE,EAAE;YAChC,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YAC1B,MAAM,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;gBACtC,CAAC,CAAC,CAAC,CAAC,oBAAoB;gBACxB,CAAC,CAAC,CAAC,CAAA;YACL,IAAI,KAAK,KAAK,SAAS;gBAAE,SAAQ;YACjC,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAM,EAAE,IAAI,CAAC,CAAA;SACnD;IACH,CAAC;IAED;;;OAGG;IACH,UAAU;QACR,IAAI,OAAO,GAAG,KAAK,CAAA;QACnB,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,EAAE;YACpD,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;gBACpB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAM,EAAE,QAAQ,CAAC,CAAA;gBAC7C,OAAO,GAAG,IAAI,CAAA;aACf;SACF;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,GAAM;QACT,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QAC/B,IAAI,CAAC,KAAK,SAAS;YAAE,OAAO,SAAS,CAAA;QACrC,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;QAC1B,MAAM,KAAK,GAAkB,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;YACrD,CAAC,CAAC,CAAC,CAAC,oBAAoB;YACxB,CAAC,CAAC,CAAC,CAAA;QACL,IAAI,KAAK,KAAK,SAAS;YAAE,OAAO,SAAS,CAAA;QACzC,MAAM,KAAK,GAAsB,EAAE,KAAK,EAAE,CAAA;QAC1C,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,OAAO,EAAE;YAC9B,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;YACzB,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;YAC7B,IAAI,GAAG,IAAI,KAAK,EAAE;gBAChB,MAAM,MAAM,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAA;gBACzC,KAAK,CAAC,GAAG,GAAG,MAAM,CAAA;gBAClB,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;aACzB;SACF;QACD,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;SAC5B;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,IAAI;QACF,MAAM,GAAG,GAA6B,EAAE,CAAA;QACxC,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,EAAE;YACnD,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YAC5B,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YAC1B,MAAM,KAAK,GAAkB,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;gBACrD,CAAC,CAAC,CAAC,CAAC,oBAAoB;gBACxB,CAAC,CAAC,CAAC,CAAA;YACL,IAAI,KAAK,KAAK,SAAS,IAAI,GAAG,KAAK,SAAS;gBAAE,SAAQ;YACtD,MAAM,KAAK,GAAsB,EAAE,KAAK,EAAE,CAAA;YAC1C,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,OAAO,EAAE;gBAC9B,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;gBACzB,yDAAyD;gBACzD,4DAA4D;gBAC5D,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,GAAI,IAAI,CAAC,OAAO,CAAC,CAAC,CAAY,CAAA;gBACpD,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,CAAA;aAC3C;YACD,IAAI,IAAI,CAAC,MAAM,EAAE;gBACf,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;aAC5B;YACD,GAAG,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAA;SAC1B;QACD,OAAO,GAAG,CAAA;IACZ,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CAAC,GAA6B;QAChC,IAAI,CAAC,KAAK,EAAE,CAAA;QACZ,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,GAAG,EAAE;YAC9B,IAAI,KAAK,CAAC,KAAK,EAAE;gBACf,2DAA2D;gBAC3D,6DAA6D;gBAC7D,6DAA6D;gBAC7D,eAAe;gBACf,EAAE;gBACF,4DAA4D;gBAC5D,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,KAAK,CAAA;gBACpC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,CAAA;aAC/B;YACD,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;SAClC;IACH,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,GAAG,CACD,CAAI,EACJ,CAAqC,EACrC,aAA4C,EAAE;QAE9C,IAAI,CAAC,KAAK,SAAS,EAAE;YACnB,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;YACd,OAAO,IAAI,CAAA;SACZ;QACD,MAAM,EACJ,GAAG,GAAG,IAAI,CAAC,GAAG,EACd,KAAK,EACL,cAAc,GAAG,IAAI,CAAC,cAAc,EACpC,eAAe,GAAG,IAAI,CAAC,eAAe,EACtC,MAAM,GACP,GAAG,UAAU,CAAA;QACd,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC,WAAW,EAAE,GAAG,UAAU,CAAA;QAEnD,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,CAC5B,CAAC,EACD,CAAC,EACD,UAAU,CAAC,IAAI,IAAI,CAAC,EACpB,eAAe,CAChB,CAAA;QACD,6CAA6C;QAC7C,6CAA6C;QAC7C,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,GAAG,IAAI,CAAC,YAAY,EAAE;YACjD,IAAI,MAAM,EAAE;gBACV,MAAM,CAAC,GAAG,GAAG,MAAM,CAAA;gBACnB,MAAM,CAAC,oBAAoB,GAAG,IAAI,CAAA;aACnC;YACD,sDAAsD;YACtD,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;YACtB,OAAO,IAAI,CAAA;SACZ;QACD,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;QAC9D,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,WAAW;YACX,KAAK,GAAG,CACN,IAAI,CAAC,KAAK,KAAK,CAAC;gBACd,CAAC,CAAC,IAAI,CAAC,KAAK;gBACZ,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;oBACzB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE;oBAClB,CAAC,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI;wBAC1B,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;wBACpB,CAAC,CAAC,IAAI,CAAC,KAAK,CACN,CAAA;YACV,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YACxB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YACxB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;YAC1B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAA;YAC9B,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAA;YAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;YAClB,IAAI,CAAC,KAAK,EAAE,CAAA;YACZ,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;YACtC,IAAI,MAAM;gBAAE,MAAM,CAAC,GAAG,GAAG,KAAK,CAAA;YAC9B,WAAW,GAAG,KAAK,CAAA;SACpB;aAAM;YACL,SAAS;YACT,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;YACvB,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAA2B,CAAA;YAC7D,IAAI,CAAC,KAAK,MAAM,EAAE;gBAChB,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE;oBAC3D,MAAM,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,CAAA;oBACrD,MAAM,EAAE,oBAAoB,EAAE,CAAC,EAAE,GAAG,MAAM,CAAA;oBAC1C,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,cAAc,EAAE;wBACtC,IAAI,IAAI,CAAC,WAAW,EAAE;4BACpB,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAM,EAAE,CAAC,EAAE,KAAK,CAAC,CAAA;yBAClC;wBACD,IAAI,IAAI,CAAC,gBAAgB,EAAE;4BACzB,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAM,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CAAA;yBACzC;qBACF;iBACF;qBAAM,IAAI,CAAC,cAAc,EAAE;oBAC1B,IAAI,IAAI,CAAC,WAAW,EAAE;wBACpB,IAAI,CAAC,QAAQ,EAAE,CAAC,MAAW,EAAE,CAAC,EAAE,KAAK,CAAC,CAAA;qBACvC;oBACD,IAAI,IAAI,CAAC,gBAAgB,EAAE;wBACzB,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,MAAW,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CAAA;qBAC9C;iBACF;gBACD,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAA;gBAC3B,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;gBACtC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBACxB,IAAI,MAAM,EAAE;oBACV,MAAM,CAAC,GAAG,GAAG,SAAS,CAAA;oBACtB,MAAM,QAAQ,GACZ,MAAM,IAAI,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC;wBACvC,CAAC,CAAC,MAAM,CAAC,oBAAoB;wBAC7B,CAAC,CAAC,MAAM,CAAA;oBACZ,IAAI,QAAQ,KAAK,SAAS;wBAAE,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAA;iBACvD;aACF;iBAAM,IAAI,MAAM,EAAE;gBACjB,MAAM,CAAC,GAAG,GAAG,QAAQ,CAAA;aACtB;SACF;QACD,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YAC5B,IAAI,CAAC,sBAAsB,EAAE,CAAA;SAC9B;QACD,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,IAAI,CAAC,WAAW,EAAE;gBAChB,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,CAAA;aACpC;YACD,IAAI,MAAM;gBAAE,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;SAC3C;QACD,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,SAAS,EAAE;YAC9D,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAA;YACzB,IAAI,IAAmC,CAAA;YACvC,OAAO,CAAC,IAAI,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;gBAC3B,IAAI,CAAC,aAAa,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;aAC9B;SACF;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;OAGG;IACH,GAAG;QACD,IAAI;YACF,OAAO,IAAI,CAAC,KAAK,EAAE;gBACjB,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;gBACrC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;gBACjB,IAAI,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE;oBAChC,IAAI,GAAG,CAAC,oBAAoB,EAAE;wBAC5B,OAAO,GAAG,CAAC,oBAAoB,CAAA;qBAChC;iBACF;qBAAM,IAAI,GAAG,KAAK,SAAS,EAAE;oBAC5B,OAAO,GAAG,CAAA;iBACX;aACF;SACF;gBAAS;YACR,IAAI,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,SAAS,EAAE;gBAC3C,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAA;gBACzB,IAAI,IAAmC,CAAA;gBACvC,OAAO,CAAC,IAAI,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;oBAC3B,IAAI,CAAC,aAAa,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;iBAC9B;aACF;SACF;IACH,CAAC;IAED,MAAM,CAAC,IAAa;QAClB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAA;QACvB,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAM,CAAA;QAClC,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAM,CAAA;QAClC,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE;YACtD,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAA;SAChD;aAAM,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACpD,IAAI,IAAI,CAAC,WAAW,EAAE;gBACpB,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAA;aAC/B;YACD,IAAI,IAAI,CAAC,gBAAgB,EAAE;gBACzB,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,CAAA;aACtC;SACF;QACD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAA;QAC1B,2DAA2D;QAC3D,IAAI,IAAI,EAAE;YACR,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,SAAS,CAAA;YAC/B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,SAAS,CAAA;YAC/B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;SACtB;QACD,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC,EAAE;YACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,CAAU,CAAA;YACpC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAA;SACtB;aAAM;YACL,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAU,CAAA;SACvC;QACD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QACtB,IAAI,CAAC,KAAK,EAAE,CAAA;QACZ,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,GAAG,CAAC,CAAI,EAAE,aAA4C,EAAE;QACtD,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,GACpD,UAAU,CAAA;QACZ,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;QACjC,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;YAC9B,IACE,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;gBAC1B,CAAC,CAAC,oBAAoB,KAAK,SAAS,EACpC;gBACA,OAAO,KAAK,CAAA;aACb;YACD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;gBACzB,IAAI,cAAc,EAAE;oBAClB,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAA;iBAC3B;gBACD,IAAI,MAAM,EAAE;oBACV,MAAM,CAAC,GAAG,GAAG,KAAK,CAAA;oBAClB,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;iBAC/B;gBACD,OAAO,IAAI,CAAA;aACZ;iBAAM,IAAI,MAAM,EAAE;gBACjB,MAAM,CAAC,GAAG,GAAG,OAAO,CAAA;gBACpB,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;aAC/B;SACF;aAAM,IAAI,MAAM,EAAE;YACjB,MAAM,CAAC,GAAG,GAAG,MAAM,CAAA;SACpB;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAED;;;;;;OAMG;IACH,IAAI,CAAC,CAAI,EAAE,cAA8C,EAAE;QACzD,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,WAAW,CAAA;QACpD,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;QACjC,IACE,KAAK,KAAK,SAAS;YACnB,CAAC,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EACrC;YACA,OAAM;SACP;QACD,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;QAC9B,oEAAoE;QACpE,OAAO,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAA;IAChE,CAAC;IAED,gBAAgB,CACd,CAAI,EACJ,KAAwB,EACxB,OAAwC,EACxC,OAAY;QAEZ,MAAM,CAAC,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;QAChE,IAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE;YAC9B,OAAO,CAAC,CAAA;SACT;QAED,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE,CAAA;QACnB,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;QAC1B,yDAAyD;QACzD,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;YAC/D,MAAM,EAAE,EAAE,CAAC,MAAM;SAClB,CAAC,CAAA;QAEF,MAAM,SAAS,GAAG;YAChB,MAAM,EAAE,EAAE,CAAC,MAAM;YACjB,OAAO;YACP,OAAO;SACR,CAAA;QAED,MAAM,EAAE,GAAG,CACT,CAAgB,EAChB,WAAW,GAAG,KAAK,EACJ,EAAE;YACjB,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAA;YAC7B,MAAM,WAAW,GAAG,OAAO,CAAC,gBAAgB,IAAI,CAAC,KAAK,SAAS,CAAA;YAC/D,IAAI,OAAO,CAAC,MAAM,EAAE;gBAClB,IAAI,OAAO,IAAI,CAAC,WAAW,EAAE;oBAC3B,OAAO,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAA;oBAClC,OAAO,CAAC,MAAM,CAAC,UAAU,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAA;oBAC5C,IAAI,WAAW;wBAAE,OAAO,CAAC,MAAM,CAAC,iBAAiB,GAAG,IAAI,CAAA;iBACzD;qBAAM;oBACL,OAAO,CAAC,MAAM,CAAC,aAAa,GAAG,IAAI,CAAA;iBACpC;aACF;YACD,IAAI,OAAO,IAAI,CAAC,WAAW,IAAI,CAAC,WAAW,EAAE;gBAC3C,OAAO,SAAS,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;aACnC;YACD,qEAAqE;YACrE,MAAM,EAAE,GAAG,CAAuB,CAAA;YAClC,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAc,CAAC,KAAK,CAAC,EAAE;gBACvC,IAAI,CAAC,KAAK,SAAS,EAAE;oBACnB,IAAI,EAAE,CAAC,oBAAoB,EAAE;wBAC3B,IAAI,CAAC,QAAQ,CAAC,KAAc,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAA;qBACxD;yBAAM;wBACL,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;qBACzB;iBACF;qBAAM;oBACL,IAAI,OAAO,CAAC,MAAM;wBAAE,OAAO,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAA;oBACtD,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;iBAClC;aACF;YACD,OAAO,CAAC,CAAA;QACV,CAAC,CAAA;QAED,MAAM,EAAE,GAAG,CAAC,EAAO,EAAE,EAAE;YACrB,IAAI,OAAO,CAAC,MAAM,EAAE;gBAClB,OAAO,CAAC,MAAM,CAAC,aAAa,GAAG,IAAI,CAAA;gBACnC,OAAO,CAAC,MAAM,CAAC,UAAU,GAAG,EAAE,CAAA;aAC/B;YACD,OAAO,SAAS,CAAC,EAAE,CAAC,CAAA;QACtB,CAAC,CAAA;QAED,MAAM,SAAS,GAAG,CAAC,EAAO,EAAiB,EAAE;YAC3C,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAA;YAC7B,MAAM,iBAAiB,GACrB,OAAO,IAAI,OAAO,CAAC,sBAAsB,CAAA;YAC3C,MAAM,UAAU,GACd,iBAAiB,IAAI,OAAO,CAAC,0BAA0B,CAAA;YACzD,MAAM,QAAQ,GAAG,UAAU,IAAI,OAAO,CAAC,wBAAwB,CAAA;YAC/D,MAAM,EAAE,GAAG,CAAuB,CAAA;YAClC,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAc,CAAC,KAAK,CAAC,EAAE;gBACvC,qEAAqE;gBACrE,sEAAsE;gBACtE,MAAM,GAAG,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC,oBAAoB,KAAK,SAAS,CAAA;gBAC9D,IAAI,GAAG,EAAE;oBACP,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;iBACzB;qBAAM,IAAI,CAAC,iBAAiB,EAAE;oBAC7B,oDAAoD;oBACpD,oDAAoD;oBACpD,mDAAmD;oBACnD,qDAAqD;oBACrD,IAAI,CAAC,QAAQ,CAAC,KAAc,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAA;iBACxD;aACF;YACD,IAAI,UAAU,EAAE;gBACd,IAAI,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,oBAAoB,KAAK,SAAS,EAAE;oBAC3D,OAAO,CAAC,MAAM,CAAC,aAAa,GAAG,IAAI,CAAA;iBACpC;gBACD,OAAO,EAAE,CAAC,oBAAoB,CAAA;aAC/B;iBAAM,IAAI,EAAE,CAAC,UAAU,KAAK,EAAE,EAAE;gBAC/B,MAAM,EAAE,CAAA;aACT;QACH,CAAC,CAAA;QAED,MAAM,KAAK,GAAG,CACZ,GAA+B,EAC/B,GAAqB,EACrB,EAAE;YACF,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAA;YAChD,IAAI,GAAG,IAAI,GAAG,YAAY,OAAO,EAAE;gBACjC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;aACzD;YACD,8CAA8C;YAC9C,8CAA8C;YAC9C,+BAA+B;YAC/B,EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;gBACvC,IACE,CAAC,OAAO,CAAC,gBAAgB;oBACzB,OAAO,CAAC,sBAAsB,EAC9B;oBACA,GAAG,CAAC,SAAS,CAAC,CAAA;oBACd,iDAAiD;oBACjD,IAAI,OAAO,CAAC,sBAAsB,EAAE;wBAClC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;qBACvB;iBACF;YACH,CAAC,CAAC,CAAA;QACJ,CAAC,CAAA;QAED,IAAI,OAAO,CAAC,MAAM;YAAE,OAAO,CAAC,MAAM,CAAC,eAAe,GAAG,IAAI,CAAA;QACzD,MAAM,CAAC,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;QACzC,MAAM,EAAE,GAAuB,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE;YAC9C,iBAAiB,EAAE,EAAE;YACrB,oBAAoB,EAAE,CAAC;YACvB,UAAU,EAAE,SAAS;SACtB,CAAC,CAAA;QAEF,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,iCAAiC;YACjC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAA;YAC5D,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;SAC5B;aAAM;YACL,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,CAAA;SAC1B;QACD,OAAO,EAAE,CAAA;IACX,CAAC;IAED,kBAAkB,CAAC,CAAM;QACvB,IAAI,CAAC,IAAI,CAAC,eAAe;YAAE,OAAO,KAAK,CAAA;QACvC,MAAM,CAAC,GAAG,CAAuB,CAAA;QACjC,OAAO,CACL,CAAC,CAAC,CAAC;YACH,CAAC,YAAY,OAAO;YACpB,CAAC,CAAC,cAAc,CAAC,sBAAsB,CAAC;YACxC,CAAC,CAAC,iBAAiB,YAAY,EAAE,CAClC,CAAA;IACH,CAAC;IA+GD,KAAK,CAAC,KAAK,CACT,CAAI,EACJ,eAAgD,EAAE;QAElD,MAAM;QACJ,cAAc;QACd,UAAU,GAAG,IAAI,CAAC,UAAU,EAC5B,cAAc,GAAG,IAAI,CAAC,cAAc,EACpC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB;QAC5C,cAAc;QACd,GAAG,GAAG,IAAI,CAAC,GAAG,EACd,cAAc,GAAG,IAAI,CAAC,cAAc,EACpC,IAAI,GAAG,CAAC,EACR,eAAe,GAAG,IAAI,CAAC,eAAe,EACtC,WAAW,GAAG,IAAI,CAAC,WAAW;QAC9B,0BAA0B;QAC1B,wBAAwB,GAAG,IAAI,CAAC,wBAAwB,EACxD,0BAA0B,GAAG,IAAI,CAAC,0BAA0B,EAC5D,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,EACxC,sBAAsB,GAAG,IAAI,CAAC,sBAAsB,EACpD,OAAO,EACP,YAAY,GAAG,KAAK,EACpB,MAAM,EACN,MAAM,GACP,GAAG,YAAY,CAAA;QAEhB,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;YACzB,IAAI,MAAM;gBAAE,MAAM,CAAC,KAAK,GAAG,KAAK,CAAA;YAChC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE;gBACjB,UAAU;gBACV,cAAc;gBACd,kBAAkB;gBAClB,MAAM;aACP,CAAC,CAAA;SACH;QAED,MAAM,OAAO,GAAG;YACd,UAAU;YACV,cAAc;YACd,kBAAkB;YAClB,GAAG;YACH,cAAc;YACd,IAAI;YACJ,eAAe;YACf,WAAW;YACX,wBAAwB;YACxB,0BAA0B;YAC1B,sBAAsB;YACtB,gBAAgB;YAChB,MAAM;YACN,MAAM;SACP,CAAA;QAED,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;QAC/B,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,IAAI,MAAM;gBAAE,MAAM,CAAC,KAAK,GAAG,MAAM,CAAA;YACjC,MAAM,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;YAC3D,OAAO,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,CAAA;SAC1B;aAAM;YACL,mCAAmC;YACnC,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;YAC9B,IAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE;gBAC9B,MAAM,KAAK,GACT,UAAU,IAAI,CAAC,CAAC,oBAAoB,KAAK,SAAS,CAAA;gBACpD,IAAI,MAAM,EAAE;oBACV,MAAM,CAAC,KAAK,GAAG,UAAU,CAAA;oBACzB,IAAI,KAAK;wBAAE,MAAM,CAAC,aAAa,GAAG,IAAI,CAAA;iBACvC;gBACD,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,CAAA;aAC3D;YAED,mEAAmE;YACnE,gEAAgE;YAChE,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;YACpC,IAAI,CAAC,YAAY,IAAI,CAAC,OAAO,EAAE;gBAC7B,IAAI,MAAM;oBAAE,MAAM,CAAC,KAAK,GAAG,KAAK,CAAA;gBAChC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;gBACvB,IAAI,cAAc,EAAE;oBAClB,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAA;iBAC3B;gBACD,IAAI,MAAM;oBAAE,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;gBAC1C,OAAO,CAAC,CAAA;aACT;YAED,iEAAiE;YACjE,qBAAqB;YACrB,MAAM,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;YAC3D,MAAM,QAAQ,GAAG,CAAC,CAAC,oBAAoB,KAAK,SAAS,CAAA;YACrD,MAAM,QAAQ,GAAG,QAAQ,IAAI,UAAU,CAAA;YACvC,IAAI,MAAM,EAAE;gBACV,MAAM,CAAC,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAA;gBAC5C,IAAI,QAAQ,IAAI,OAAO;oBAAE,MAAM,CAAC,aAAa,GAAG,IAAI,CAAA;aACrD;YACD,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,CAAA;SAC9D;IACH,CAAC;IAoCD,KAAK,CAAC,UAAU,CACd,CAAI,EACJ,eAAgD,EAAE;QAElD,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CACxB,CAAC,EACD,YAI8C,CAC/C,CAAA;QACD,IAAI,CAAC,KAAK,SAAS;YAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;QAClE,OAAO,CAAC,CAAA;IACV,CAAC;IAqCD,IAAI,CAAC,CAAI,EAAE,cAA8C,EAAE;QACzD,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAA;QACnC,IAAI,CAAC,UAAU,EAAE;YACf,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;SACzD;QACD,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,OAAO,EAAE,GAAG,WAAW,CAAA;QACzD,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;QAC9B,IAAI,CAAC,YAAY,IAAI,CAAC,KAAK,SAAS;YAAE,OAAO,CAAC,CAAA;QAC9C,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE;YAC1B,OAAO;YACP,OAAO;SAC8B,CAAC,CAAA;QACxC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;QACxB,OAAO,EAAE,CAAA;IACX,CAAC;IAED;;;;;OAKG;IACH,GAAG,CAAC,CAAI,EAAE,aAA4C,EAAE;QACtD,MAAM,EACJ,UAAU,GAAG,IAAI,CAAC,UAAU,EAC5B,cAAc,GAAG,IAAI,CAAC,cAAc,EACpC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,EAC5C,MAAM,GACP,GAAG,UAAU,CAAA;QACd,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;QACjC,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;YAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAA;YAC/C,IAAI,MAAM;gBAAE,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;YAC1C,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;gBACxB,IAAI,MAAM;oBAAE,MAAM,CAAC,GAAG,GAAG,OAAO,CAAA;gBAChC,mDAAmD;gBACnD,IAAI,CAAC,QAAQ,EAAE;oBACb,IAAI,CAAC,kBAAkB,EAAE;wBACvB,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAA;qBAC1B;oBACD,IAAI,MAAM,IAAI,UAAU;wBAAE,MAAM,CAAC,aAAa,GAAG,IAAI,CAAA;oBACrD,OAAO,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAA;iBACtC;qBAAM;oBACL,IACE,MAAM;wBACN,UAAU;wBACV,KAAK,CAAC,oBAAoB,KAAK,SAAS,EACxC;wBACA,MAAM,CAAC,aAAa,GAAG,IAAI,CAAA;qBAC5B;oBACD,OAAO,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAC,SAAS,CAAA;iBAC3D;aACF;iBAAM;gBACL,IAAI,MAAM;oBAAE,MAAM,CAAC,GAAG,GAAG,KAAK,CAAA;gBAC9B,gEAAgE;gBAChE,iEAAiE;gBACjE,kEAAkE;gBAClE,oEAAoE;gBACpE,qCAAqC;gBACrC,IAAI,QAAQ,EAAE;oBACZ,OAAO,KAAK,CAAC,oBAAoB,CAAA;iBAClC;gBACD,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;gBACvB,IAAI,cAAc,EAAE;oBAClB,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAA;iBAC3B;gBACD,OAAO,KAAK,CAAA;aACb;SACF;aAAM,IAAI,MAAM,EAAE;YACjB,MAAM,CAAC,GAAG,GAAG,MAAM,CAAA;SACpB;IACH,CAAC;IAED,QAAQ,CAAC,CAAQ,EAAE,CAAQ;QACzB,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;QACjB,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;IACnB,CAAC;IAED,WAAW,CAAC,KAAY;QACtB,iCAAiC;QACjC,oCAAoC;QACpC,OAAO;QACP,6DAA6D;QAC7D,0CAA0C;QAC1C,qBAAqB;QACrB,qBAAqB;QACrB,eAAe;QACf,IAAI,KAAK,KAAK,IAAI,CAAC,KAAK,EAAE;YACxB,IAAI,KAAK,KAAK,IAAI,CAAC,KAAK,EAAE;gBACxB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAU,CAAA;aACxC;iBAAM;gBACL,IAAI,CAAC,QAAQ,CACX,IAAI,CAAC,KAAK,CAAC,KAAK,CAAU,EAC1B,IAAI,CAAC,KAAK,CAAC,KAAK,CAAU,CAC3B,CAAA;aACF;YACD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;YAChC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;SACnB;IACH,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,CAAI;QACT,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAA;IAClC,CAAC;IAED,OAAO,CAAC,CAAI,EAAE,MAA8B;QAC1C,IAAI,OAAO,GAAG,KAAK,CAAA;QACnB,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC,EAAE;YACpB,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;YACjC,IAAI,KAAK,KAAK,SAAS,EAAE;gBACvB,OAAO,GAAG,IAAI,CAAA;gBACd,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC,EAAE;oBACpB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;iBACpB;qBAAM;oBACL,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAA;oBAC3B,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;oBAC9B,IAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE;wBAC9B,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAA;qBAChD;yBAAM,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,gBAAgB,EAAE;wBACpD,IAAI,IAAI,CAAC,WAAW,EAAE;4BACpB,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAA;yBACnC;wBACD,IAAI,IAAI,CAAC,gBAAgB,EAAE;4BACzB,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAA;yBAC1C;qBACF;oBACD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;oBACtB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,SAAS,CAAA;oBAChC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,SAAS,CAAA;oBAChC,IAAI,KAAK,KAAK,IAAI,CAAC,KAAK,EAAE;wBACxB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAU,CAAA;qBACxC;yBAAM,IAAI,KAAK,KAAK,IAAI,CAAC,KAAK,EAAE;wBAC/B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAU,CAAA;qBACxC;yBAAM;wBACL,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAW,CAAA;wBACtC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAW,CAAA;wBAC5C,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAW,CAAA;wBACtC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAW,CAAA;qBAC7C;oBACD,IAAI,CAAC,KAAK,EAAE,CAAA;oBACZ,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;iBACvB;aACF;SACF;QACD,IAAI,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE;YACnD,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAA;YACzB,IAAI,IAAmC,CAAA;YACvC,OAAO,CAAC,IAAI,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;gBAC3B,IAAI,CAAC,aAAa,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;aAC9B;SACF;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;IAED;;OAEG;IACH,KAAK;QACH,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IAC9B,CAAC;IACD,MAAM,CAAC,MAA8B;QACnC,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,EAAE;YACxD,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;YAC9B,IAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE;gBAC9B,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAA;aAChD;iBAAM;gBACL,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;gBAC9B,IAAI,IAAI,CAAC,WAAW,EAAE;oBACpB,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAM,EAAE,CAAM,EAAE,MAAM,CAAC,CAAA;iBACxC;gBACD,IAAI,IAAI,CAAC,gBAAgB,EAAE;oBACzB,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,MAAM,CAAC,CAAC,CAAA;iBAC/C;aACF;SACF;QAED,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAA;QACpB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAC7B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAC7B,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,OAAO,EAAE;YAC9B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;YAClB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;SACrB;QACD,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;SACpB;QACD,IAAI,CAAC,KAAK,GAAG,CAAU,CAAA;QACvB,IAAI,CAAC,KAAK,GAAG,CAAU,CAAA;QACvB,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAA;QACrB,IAAI,CAAC,eAAe,GAAG,CAAC,CAAA;QACxB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAA;QACd,IAAI,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,SAAS,EAAE;YAC3C,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAA;YACzB,IAAI,IAAmC,CAAA;YACvC,OAAO,CAAC,IAAI,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;gBAC3B,IAAI,CAAC,aAAa,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;aAC9B;SACF;IACH,CAAC;CACF;AAxwDD,4BAwwDC","sourcesContent":["/**\n * @module LRUCache\n */\n\n// module-private names and types\ntype Perf = { now: () => number }\nconst perf: Perf =\n typeof performance === 'object' &&\n performance &&\n typeof performance.now === 'function'\n ? performance\n : Date\n\nconst warned = new Set()\n\n// either a function or a class\ntype ForC = ((...a: any[]) => any) | { new (...a: any[]): any }\n\n/* c8 ignore start */\nconst PROCESS = (\n typeof process === 'object' && !!process ? process : {}\n) as { [k: string]: any }\n/* c8 ignore start */\n\nconst emitWarning = (\n msg: string,\n type: string,\n code: string,\n fn: ForC\n) => {\n typeof PROCESS.emitWarning === 'function'\n ? PROCESS.emitWarning(msg, type, code, fn)\n : console.error(`[${code}] ${type}: ${msg}`)\n}\n\nlet AC = globalThis.AbortController\nlet AS = globalThis.AbortSignal\n\n/* c8 ignore start */\nif (typeof AC === 'undefined') {\n //@ts-ignore\n AS = class AbortSignal {\n onabort?: (...a: any[]) => any\n _onabort: ((...a: any[]) => any)[] = []\n reason?: any\n aborted: boolean = false\n addEventListener(_: string, fn: (...a: any[]) => any) {\n this._onabort.push(fn)\n }\n }\n //@ts-ignore\n AC = class AbortController {\n constructor() {\n warnACPolyfill()\n }\n signal = new AS()\n abort(reason: any) {\n if (this.signal.aborted) return\n //@ts-ignore\n this.signal.reason = reason\n //@ts-ignore\n this.signal.aborted = true\n //@ts-ignore\n for (const fn of this.signal._onabort) {\n fn(reason)\n }\n this.signal.onabort?.(reason)\n }\n }\n let printACPolyfillWarning =\n PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'\n const warnACPolyfill = () => {\n if (!printACPolyfillWarning) return\n printACPolyfillWarning = false\n emitWarning(\n 'AbortController is not defined. If using lru-cache in ' +\n 'node 14, load an AbortController polyfill from the ' +\n '`node-abort-controller` package. A minimal polyfill is ' +\n 'provided for use by LRUCache.fetch(), but it should not be ' +\n 'relied upon in other contexts (eg, passing it to other APIs that ' +\n 'use AbortController/AbortSignal might have undesirable effects). ' +\n 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.',\n 'NO_ABORT_CONTROLLER',\n 'ENOTSUP',\n warnACPolyfill\n )\n }\n}\n/* c8 ignore stop */\n\nconst shouldWarn = (code: string) => !warned.has(code)\n\nconst TYPE = Symbol('type')\nexport type PosInt = number & { [TYPE]: 'Positive Integer' }\nexport type Index = number & { [TYPE]: 'LRUCache Index' }\n\nconst isPosInt = (n: any): n is PosInt =>\n n && n === Math.floor(n) && n > 0 && isFinite(n)\n\nexport type UintArray = Uint8Array | Uint16Array | Uint32Array\nexport type NumberArray = UintArray | number[]\n\n/* c8 ignore start */\n// This is a little bit ridiculous, tbh.\n// The maximum array length is 2^32-1 or thereabouts on most JS impls.\n// And well before that point, you're caching the entire world, I mean,\n// that's ~32GB of just integers for the next/prev links, plus whatever\n// else to hold that many keys and values. Just filling the memory with\n// zeroes at init time is brutal when you get that big.\n// But why not be complete?\n// Maybe in the future, these limits will have expanded.\nconst getUintArray = (max: number) =>\n !isPosInt(max)\n ? null\n : max <= Math.pow(2, 8)\n ? Uint8Array\n : max <= Math.pow(2, 16)\n ? Uint16Array\n : max <= Math.pow(2, 32)\n ? Uint32Array\n : max <= Number.MAX_SAFE_INTEGER\n ? ZeroArray\n : null\n/* c8 ignore stop */\n\nclass ZeroArray extends Array {\n constructor(size: number) {\n super(size)\n this.fill(0)\n }\n}\nexport type { ZeroArray }\nexport type { Stack }\n\nexport type StackLike = Stack | Index[]\nclass Stack {\n heap: NumberArray\n length: number\n // private constructor\n static #constructing: boolean = false\n static create(max: number): StackLike {\n const HeapCls = getUintArray(max)\n if (!HeapCls) return []\n Stack.#constructing = true\n const s = new Stack(max, HeapCls)\n Stack.#constructing = false\n return s\n }\n constructor(\n max: number,\n HeapCls: { new (n: number): NumberArray }\n ) {\n /* c8 ignore start */\n if (!Stack.#constructing) {\n throw new TypeError('instantiate Stack using Stack.create(n)')\n }\n /* c8 ignore stop */\n this.heap = new HeapCls(max)\n this.length = 0\n }\n push(n: Index) {\n this.heap[this.length++] = n\n }\n pop(): Index {\n return this.heap[--this.length] as Index\n }\n}\n\n/**\n * Promise representing an in-progress {@link LRUCache#fetch} call\n */\nexport type BackgroundFetch = Promise & {\n __returned: BackgroundFetch | undefined\n __abortController: AbortController\n __staleWhileFetching: V | undefined\n}\n\nexport type DisposeTask = [\n value: V,\n key: K,\n reason: LRUCache.DisposeReason\n]\n\nexport namespace LRUCache {\n /**\n * An integer greater than 0, reflecting the calculated size of items\n */\n export type Size = number\n\n /**\n * Integer greater than 0, representing some number of milliseconds, or the\n * time at which a TTL started counting from.\n */\n export type Milliseconds = number\n\n /**\n * An integer greater than 0, reflecting a number of items\n */\n export type Count = number\n\n /**\n * The reason why an item was removed from the cache, passed\n * to the {@link Disposer} methods.\n *\n * - `evict`: The item was evicted because it is the least recently used,\n * and the cache is full.\n * - `set`: A new value was set, overwriting the old value being disposed.\n * - `delete`: The item was explicitly deleted, either by calling\n * {@link LRUCache#delete}, {@link LRUCache#clear}, or\n * {@link LRUCache#set} with an undefined value.\n * - `expire`: The item was removed due to exceeding its TTL.\n * - `fetch`: A {@link OptionsBase#fetchMethod} operation returned\n * `undefined` or was aborted, causing the item to be deleted.\n */\n export type DisposeReason =\n | 'evict'\n | 'set'\n | 'delete'\n | 'expire'\n | 'fetch'\n /**\n * A method called upon item removal, passed as the\n * {@link OptionsBase.dispose} and/or\n * {@link OptionsBase.disposeAfter} options.\n */\n export type Disposer = (\n value: V,\n key: K,\n reason: DisposeReason\n ) => void\n\n /**\n * A function that returns the effective calculated size\n * of an entry in the cache.\n */\n export type SizeCalculator = (value: V, key: K) => Size\n\n /**\n * Options provided to the\n * {@link OptionsBase.fetchMethod} function.\n */\n export interface FetcherOptions {\n signal: AbortSignal\n options: FetcherFetchOptions\n /**\n * Object provided in the {@link FetchOptions.context} option to\n * {@link LRUCache#fetch}\n */\n context: FC\n }\n\n /**\n * Occasionally, it may be useful to track the internal behavior of the\n * cache, particularly for logging, debugging, or for behavior within the\n * `fetchMethod`. To do this, you can pass a `status` object to the\n * {@link LRUCache#fetch}, {@link LRUCache#get}, {@link LRUCache#set},\n * {@link LRUCache#memo}, and {@link LRUCache#has} methods.\n *\n * The `status` option should be a plain JavaScript object. The following\n * fields will be set on it appropriately, depending on the situation.\n */\n export interface Status {\n /**\n * The status of a set() operation.\n *\n * - add: the item was not found in the cache, and was added\n * - update: the item was in the cache, with the same value provided\n * - replace: the item was in the cache, and replaced\n * - miss: the item was not added to the cache for some reason\n */\n set?: 'add' | 'update' | 'replace' | 'miss'\n\n /**\n * the ttl stored for the item, or undefined if ttls are not used.\n */\n ttl?: Milliseconds\n\n /**\n * the start time for the item, or undefined if ttls are not used.\n */\n start?: Milliseconds\n\n /**\n * The timestamp used for TTL calculation\n */\n now?: Milliseconds\n\n /**\n * the remaining ttl for the item, or undefined if ttls are not used.\n */\n remainingTTL?: Milliseconds\n\n /**\n * The calculated size for the item, if sizes are used.\n */\n entrySize?: Size\n\n /**\n * The total calculated size of the cache, if sizes are used.\n */\n totalCalculatedSize?: Size\n\n /**\n * A flag indicating that the item was not stored, due to exceeding the\n * {@link OptionsBase.maxEntrySize}\n */\n maxEntrySizeExceeded?: true\n\n /**\n * The old value, specified in the case of `set:'update'` or\n * `set:'replace'`\n */\n oldValue?: V\n\n /**\n * The results of a {@link LRUCache#has} operation\n *\n * - hit: the item was found in the cache\n * - stale: the item was found in the cache, but is stale\n * - miss: the item was not found in the cache\n */\n has?: 'hit' | 'stale' | 'miss'\n\n /**\n * The status of a {@link LRUCache#fetch} operation.\n * Note that this can change as the underlying fetch() moves through\n * various states.\n *\n * - inflight: there is another fetch() for this key which is in process\n * - get: there is no {@link OptionsBase.fetchMethod}, so\n * {@link LRUCache#get} was called.\n * - miss: the item is not in cache, and will be fetched.\n * - hit: the item is in the cache, and was resolved immediately.\n * - stale: the item is in the cache, but stale.\n * - refresh: the item is in the cache, and not stale, but\n * {@link FetchOptions.forceRefresh} was specified.\n */\n fetch?: 'get' | 'inflight' | 'miss' | 'hit' | 'stale' | 'refresh'\n\n /**\n * The {@link OptionsBase.fetchMethod} was called\n */\n fetchDispatched?: true\n\n /**\n * The cached value was updated after a successful call to\n * {@link OptionsBase.fetchMethod}\n */\n fetchUpdated?: true\n\n /**\n * The reason for a fetch() rejection. Either the error raised by the\n * {@link OptionsBase.fetchMethod}, or the reason for an\n * AbortSignal.\n */\n fetchError?: Error\n\n /**\n * The fetch received an abort signal\n */\n fetchAborted?: true\n\n /**\n * The abort signal received was ignored, and the fetch was allowed to\n * continue.\n */\n fetchAbortIgnored?: true\n\n /**\n * The fetchMethod promise resolved successfully\n */\n fetchResolved?: true\n\n /**\n * The fetchMethod promise was rejected\n */\n fetchRejected?: true\n\n /**\n * The status of a {@link LRUCache#get} operation.\n *\n * - fetching: The item is currently being fetched. If a previous value\n * is present and allowed, that will be returned.\n * - stale: The item is in the cache, and is stale.\n * - hit: the item is in the cache\n * - miss: the item is not in the cache\n */\n get?: 'stale' | 'hit' | 'miss'\n\n /**\n * A fetch or get operation returned a stale value.\n */\n returnedStale?: true\n }\n\n /**\n * options which override the options set in the LRUCache constructor\n * when calling {@link LRUCache#fetch}.\n *\n * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n * {@link OptionsBase.noDeleteOnFetchRejection},\n * {@link OptionsBase.allowStaleOnFetchRejection},\n * {@link FetchOptions.forceRefresh}, and\n * {@link FetcherOptions.context}\n *\n * Any of these may be modified in the {@link OptionsBase.fetchMethod}\n * function, but the {@link GetOptions} fields will of course have no\n * effect, as the {@link LRUCache#get} call already happened by the time\n * the fetchMethod is called.\n */\n export interface FetcherFetchOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n | 'noDeleteOnFetchRejection'\n | 'allowStaleOnFetchRejection'\n | 'ignoreFetchAbort'\n | 'allowStaleOnFetchAbort'\n > {\n status?: Status\n size?: Size\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#fetch} method.\n */\n export interface FetchOptions\n extends FetcherFetchOptions {\n /**\n * Set to true to force a re-load of the existing data, even if it\n * is not yet stale.\n */\n forceRefresh?: boolean\n /**\n * Context provided to the {@link OptionsBase.fetchMethod} as\n * the {@link FetcherOptions.context} param.\n *\n * If the FC type is specified as unknown (the default),\n * undefined or void, then this is optional. Otherwise, it will\n * be required.\n */\n context?: FC\n signal?: AbortSignal\n status?: Status\n }\n /**\n * Options provided to {@link LRUCache#fetch} when the FC type is something\n * other than `unknown`, `undefined`, or `void`\n */\n export interface FetchOptionsWithContext\n extends FetchOptions {\n context: FC\n }\n /**\n * Options provided to {@link LRUCache#fetch} when the FC type is\n * `undefined` or `void`\n */\n export interface FetchOptionsNoContext\n extends FetchOptions {\n context?: undefined\n }\n\n export interface MemoOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n | 'noDeleteOnFetchRejection'\n | 'allowStaleOnFetchRejection'\n | 'ignoreFetchAbort'\n | 'allowStaleOnFetchAbort'\n > {\n /**\n * Set to true to force a re-load of the existing data, even if it\n * is not yet stale.\n */\n forceRefresh?: boolean\n /**\n * Context provided to the {@link OptionsBase.memoMethod} as\n * the {@link MemoizerOptions.context} param.\n *\n * If the FC type is specified as unknown (the default),\n * undefined or void, then this is optional. Otherwise, it will\n * be required.\n */\n context?: FC\n status?: Status\n }\n /**\n * Options provided to {@link LRUCache#memo} when the FC type is something\n * other than `unknown`, `undefined`, or `void`\n */\n export interface MemoOptionsWithContext\n extends MemoOptions {\n context: FC\n }\n /**\n * Options provided to {@link LRUCache#memo} when the FC type is\n * `undefined` or `void`\n */\n export interface MemoOptionsNoContext\n extends MemoOptions {\n context?: undefined\n }\n\n /**\n * Options provided to the\n * {@link OptionsBase.memoMethod} function.\n */\n export interface MemoizerOptions {\n options: MemoizerMemoOptions\n /**\n * Object provided in the {@link MemoOptions.context} option to\n * {@link LRUCache#memo}\n */\n context: FC\n }\n\n /**\n * options which override the options set in the LRUCache constructor\n * when calling {@link LRUCache#memo}.\n *\n * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n * {@link MemoOptions.forceRefresh}, and\n * {@link MemoerOptions.context}\n *\n * Any of these may be modified in the {@link OptionsBase.memoMethod}\n * function, but the {@link GetOptions} fields will of course have no\n * effect, as the {@link LRUCache#get} call already happened by the time\n * the memoMethod is called.\n */\n export interface MemoizerMemoOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n > {\n status?: Status\n size?: Size\n start?: Milliseconds\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#has} method.\n */\n export interface HasOptions\n extends Pick, 'updateAgeOnHas'> {\n status?: Status\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#get} method.\n */\n export interface GetOptions\n extends Pick<\n OptionsBase,\n 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet'\n > {\n status?: Status\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#peek} method.\n */\n export interface PeekOptions\n extends Pick, 'allowStale'> {}\n\n /**\n * Options that may be passed to the {@link LRUCache#set} method.\n */\n export interface SetOptions\n extends Pick<\n OptionsBase,\n 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'\n > {\n /**\n * If size tracking is enabled, then setting an explicit size\n * in the {@link LRUCache#set} call will prevent calling the\n * {@link OptionsBase.sizeCalculation} function.\n */\n size?: Size\n /**\n * If TTL tracking is enabled, then setting an explicit start\n * time in the {@link LRUCache#set} call will override the\n * default time from `performance.now()` or `Date.now()`.\n *\n * Note that it must be a valid value for whichever time-tracking\n * method is in use.\n */\n start?: Milliseconds\n status?: Status\n }\n\n /**\n * The type signature for the {@link OptionsBase.fetchMethod} option.\n */\n export type Fetcher = (\n key: K,\n staleValue: V | undefined,\n options: FetcherOptions\n ) => Promise | V | undefined | void\n\n /**\n * the type signature for the {@link OptionsBase.memoMethod} option.\n */\n export type Memoizer = (\n key: K,\n staleValue: V | undefined,\n options: MemoizerOptions\n ) => V\n\n /**\n * Options which may be passed to the {@link LRUCache} constructor.\n *\n * Most of these may be overridden in the various options that use\n * them.\n *\n * Despite all being technically optional, the constructor requires that\n * a cache is at minimum limited by one or more of {@link OptionsBase.max},\n * {@link OptionsBase.ttl}, or {@link OptionsBase.maxSize}.\n *\n * If {@link OptionsBase.ttl} is used alone, then it is strongly advised\n * (and in fact required by the type definitions here) that the cache\n * also set {@link OptionsBase.ttlAutopurge}, to prevent potentially\n * unbounded storage.\n *\n * All options are also available on the {@link LRUCache} instance, making\n * it safe to pass an LRUCache instance as the options argumemnt to\n * make another empty cache of the same type.\n *\n * Some options are marked as read-only, because changing them after\n * instantiation is not safe. Changing any of the other options will of\n * course only have an effect on subsequent method calls.\n */\n export interface OptionsBase {\n /**\n * The maximum number of items to store in the cache before evicting\n * old entries. This is read-only on the {@link LRUCache} instance,\n * and may not be overridden.\n *\n * If set, then storage space will be pre-allocated at construction\n * time, and the cache will perform significantly faster.\n *\n * Note that significantly fewer items may be stored, if\n * {@link OptionsBase.maxSize} and/or {@link OptionsBase.ttl} are also\n * set.\n *\n * **It is strongly recommended to set a `max` to prevent unbounded growth\n * of the cache.**\n */\n max?: Count\n\n /**\n * Max time in milliseconds for items to live in cache before they are\n * considered stale. Note that stale items are NOT preemptively removed by\n * default, and MAY live in the cache, contributing to its LRU max, long\n * after they have expired, unless {@link OptionsBase.ttlAutopurge} is\n * set.\n *\n * If set to `0` (the default value), then that means \"do not track\n * TTL\", not \"expire immediately\".\n *\n * Also, as this cache is optimized for LRU/MRU operations, some of\n * the staleness/TTL checks will reduce performance, as they will incur\n * overhead by deleting items.\n *\n * This is not primarily a TTL cache, and does not make strong TTL\n * guarantees. There is no pre-emptive pruning of expired items, but you\n * _may_ set a TTL on the cache, and it will treat expired items as missing\n * when they are fetched, and delete them.\n *\n * Optional, but must be a non-negative integer in ms if specified.\n *\n * This may be overridden by passing an options object to `cache.set()`.\n *\n * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n * positive integer if set.\n *\n * Even if ttl tracking is enabled, **it is strongly recommended to set a\n * `max` to prevent unbounded growth of the cache.**\n *\n * If ttl tracking is enabled, and `max` and `maxSize` are not set,\n * and `ttlAutopurge` is not set, then a warning will be emitted\n * cautioning about the potential for unbounded memory consumption.\n * (The TypeScript definitions will also discourage this.)\n */\n ttl?: Milliseconds\n\n /**\n * Minimum amount of time in ms in which to check for staleness.\n * Defaults to 1, which means that the current time is checked\n * at most once per millisecond.\n *\n * Set to 0 to check the current time every time staleness is tested.\n * (This reduces performance, and is theoretically unnecessary.)\n *\n * Setting this to a higher value will improve performance somewhat\n * while using ttl tracking, albeit at the expense of keeping stale\n * items around a bit longer than their TTLs would indicate.\n *\n * @default 1\n */\n ttlResolution?: Milliseconds\n\n /**\n * Preemptively remove stale items from the cache.\n *\n * Note that this may *significantly* degrade performance, especially if\n * the cache is storing a large number of items. It is almost always best\n * to just leave the stale items in the cache, and let them fall out as new\n * items are added.\n *\n * Note that this means that {@link OptionsBase.allowStale} is a bit\n * pointless, as stale items will be deleted almost as soon as they\n * expire.\n *\n * Use with caution!\n */\n ttlAutopurge?: boolean\n\n /**\n * When using time-expiring entries with `ttl`, setting this to `true` will\n * make each item's age reset to 0 whenever it is retrieved from cache with\n * {@link LRUCache#get}, causing it to not expire. (It can still fall out\n * of cache based on recency of use, of course.)\n *\n * Has no effect if {@link OptionsBase.ttl} is not set.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n */\n updateAgeOnGet?: boolean\n\n /**\n * When using time-expiring entries with `ttl`, setting this to `true` will\n * make each item's age reset to 0 whenever its presence in the cache is\n * checked with {@link LRUCache#has}, causing it to not expire. (It can\n * still fall out of cache based on recency of use, of course.)\n *\n * Has no effect if {@link OptionsBase.ttl} is not set.\n */\n updateAgeOnHas?: boolean\n\n /**\n * Allow {@link LRUCache#get} and {@link LRUCache#fetch} calls to return\n * stale data, if available.\n *\n * By default, if you set `ttl`, stale items will only be deleted from the\n * cache when you `get(key)`. That is, it's not preemptively pruning items,\n * unless {@link OptionsBase.ttlAutopurge} is set.\n *\n * If you set `allowStale:true`, it'll return the stale value *as well as*\n * deleting it. If you don't set this, then it'll return `undefined` when\n * you try to get a stale entry.\n *\n * Note that when a stale entry is fetched, _even if it is returned due to\n * `allowStale` being set_, it is removed from the cache immediately. You\n * can suppress this behavior by setting\n * {@link OptionsBase.noDeleteOnStaleGet}, either in the constructor, or in\n * the options provided to {@link LRUCache#get}.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n * The `cache.has()` method will always return `false` for stale items.\n *\n * Only relevant if a ttl is set.\n */\n allowStale?: boolean\n\n /**\n * Function that is called on items when they are dropped from the\n * cache, as `dispose(value, key, reason)`.\n *\n * This can be handy if you want to close file descriptors or do\n * other cleanup tasks when items are no longer stored in the cache.\n *\n * **NOTE**: It is called _before_ the item has been fully removed\n * from the cache, so if you want to put it right back in, you need\n * to wait until the next tick. If you try to add it back in during\n * the `dispose()` function call, it will break things in subtle and\n * weird ways.\n *\n * Unlike several other options, this may _not_ be overridden by\n * passing an option to `set()`, for performance reasons.\n *\n * The `reason` will be one of the following strings, corresponding\n * to the reason for the item's deletion:\n *\n * - `evict` Item was evicted to make space for a new addition\n * - `set` Item was overwritten by a new value\n * - `expire` Item expired its TTL\n * - `fetch` Item was deleted due to a failed or aborted fetch, or a\n * fetchMethod returning `undefined.\n * - `delete` Item was removed by explicit `cache.delete(key)`,\n * `cache.clear()`, or `cache.set(key, undefined)`.\n */\n dispose?: Disposer\n\n /**\n * The same as {@link OptionsBase.dispose}, but called *after* the entry\n * is completely removed and the cache is once again in a clean state.\n *\n * It is safe to add an item right back into the cache at this point.\n * However, note that it is *very* easy to inadvertently create infinite\n * recursion this way.\n */\n disposeAfter?: Disposer\n\n /**\n * Set to true to suppress calling the\n * {@link OptionsBase.dispose} function if the entry key is\n * still accessible within the cache.\n *\n * This may be overridden by passing an options object to\n * {@link LRUCache#set}.\n *\n * Only relevant if `dispose` or `disposeAfter` are set.\n */\n noDisposeOnSet?: boolean\n\n /**\n * Boolean flag to tell the cache to not update the TTL when setting a new\n * value for an existing key (ie, when updating a value rather than\n * inserting a new value). Note that the TTL value is _always_ set (if\n * provided) when adding a new entry into the cache.\n *\n * Has no effect if a {@link OptionsBase.ttl} is not set.\n *\n * May be passed as an option to {@link LRUCache#set}.\n */\n noUpdateTTL?: boolean\n\n /**\n * Set to a positive integer to track the sizes of items added to the\n * cache, and automatically evict items in order to stay below this size.\n * Note that this may result in fewer than `max` items being stored.\n *\n * Attempting to add an item to the cache whose calculated size is greater\n * that this amount will be a no-op. The item will not be cached, and no\n * other items will be evicted.\n *\n * Optional, must be a positive integer if provided.\n *\n * Sets `maxEntrySize` to the same value, unless a different value is\n * provided for `maxEntrySize`.\n *\n * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n * positive integer if set.\n *\n * Even if size tracking is enabled, **it is strongly recommended to set a\n * `max` to prevent unbounded growth of the cache.**\n *\n * Note also that size tracking can negatively impact performance,\n * though for most cases, only minimally.\n */\n maxSize?: Size\n\n /**\n * The maximum allowed size for any single item in the cache.\n *\n * If a larger item is passed to {@link LRUCache#set} or returned by a\n * {@link OptionsBase.fetchMethod} or {@link OptionsBase.memoMethod}, then\n * it will not be stored in the cache.\n *\n * Attempting to add an item whose calculated size is greater than\n * this amount will not cache the item or evict any old items, but\n * WILL delete an existing value if one is already present.\n *\n * Optional, must be a positive integer if provided. Defaults to\n * the value of `maxSize` if provided.\n */\n maxEntrySize?: Size\n\n /**\n * A function that returns a number indicating the item's size.\n *\n * Requires {@link OptionsBase.maxSize} to be set.\n *\n * If not provided, and {@link OptionsBase.maxSize} or\n * {@link OptionsBase.maxEntrySize} are set, then all\n * {@link LRUCache#set} calls **must** provide an explicit\n * {@link SetOptions.size} or sizeCalculation param.\n */\n sizeCalculation?: SizeCalculator\n\n /**\n * Method that provides the implementation for {@link LRUCache#fetch}\n *\n * ```ts\n * fetchMethod(key, staleValue, { signal, options, context })\n * ```\n *\n * If `fetchMethod` is not provided, then `cache.fetch(key)` is equivalent\n * to `Promise.resolve(cache.get(key))`.\n *\n * If at any time, `signal.aborted` is set to `true`, or if the\n * `signal.onabort` method is called, or if it emits an `'abort'` event\n * which you can listen to with `addEventListener`, then that means that\n * the fetch should be abandoned. This may be passed along to async\n * functions aware of AbortController/AbortSignal behavior.\n *\n * The `fetchMethod` should **only** return `undefined` or a Promise\n * resolving to `undefined` if the AbortController signaled an `abort`\n * event. In all other cases, it should return or resolve to a value\n * suitable for adding to the cache.\n *\n * The `options` object is a union of the options that may be provided to\n * `set()` and `get()`. If they are modified, then that will result in\n * modifying the settings to `cache.set()` when the value is resolved, and\n * in the case of\n * {@link OptionsBase.noDeleteOnFetchRejection} and\n * {@link OptionsBase.allowStaleOnFetchRejection}, the handling of\n * `fetchMethod` failures.\n *\n * For example, a DNS cache may update the TTL based on the value returned\n * from a remote DNS server by changing `options.ttl` in the `fetchMethod`.\n */\n fetchMethod?: Fetcher\n\n /**\n * Method that provides the implementation for {@link LRUCache#memo}\n */\n memoMethod?: Memoizer\n\n /**\n * Set to true to suppress the deletion of stale data when a\n * {@link OptionsBase.fetchMethod} returns a rejected promise.\n */\n noDeleteOnFetchRejection?: boolean\n\n /**\n * Do not delete stale items when they are retrieved with\n * {@link LRUCache#get}.\n *\n * Note that the `get` return value will still be `undefined`\n * unless {@link OptionsBase.allowStale} is true.\n *\n * When using time-expiring entries with `ttl`, by default stale\n * items will be removed from the cache when the key is accessed\n * with `cache.get()`.\n *\n * Setting this option will cause stale items to remain in the cache, until\n * they are explicitly deleted with `cache.delete(key)`, or retrieved with\n * `noDeleteOnStaleGet` set to `false`.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n *\n * Only relevant if a ttl is used.\n */\n noDeleteOnStaleGet?: boolean\n\n /**\n * Set to true to allow returning stale data when a\n * {@link OptionsBase.fetchMethod} throws an error or returns a rejected\n * promise.\n *\n * This differs from using {@link OptionsBase.allowStale} in that stale\n * data will ONLY be returned in the case that the {@link LRUCache#fetch}\n * fails, not any other times.\n *\n * If a `fetchMethod` fails, and there is no stale value available, the\n * `fetch()` will resolve to `undefined`. Ie, all `fetchMethod` errors are\n * suppressed.\n *\n * Implies `noDeleteOnFetchRejection`.\n *\n * This may be set in calls to `fetch()`, or defaulted on the constructor,\n * or overridden by modifying the options object in the `fetchMethod`.\n */\n allowStaleOnFetchRejection?: boolean\n\n /**\n * Set to true to return a stale value from the cache when the\n * `AbortSignal` passed to the {@link OptionsBase.fetchMethod} dispatches\n * an `'abort'` event, whether user-triggered, or due to internal cache\n * behavior.\n *\n * Unless {@link OptionsBase.ignoreFetchAbort} is also set, the underlying\n * {@link OptionsBase.fetchMethod} will still be considered canceled, and\n * any value it returns will be ignored and not cached.\n *\n * Caveat: since fetches are aborted when a new value is explicitly\n * set in the cache, this can lead to fetch returning a stale value,\n * since that was the fallback value _at the moment the `fetch()` was\n * initiated_, even though the new updated value is now present in\n * the cache.\n *\n * For example:\n *\n * ```ts\n * const cache = new LRUCache({\n * ttl: 100,\n * fetchMethod: async (url, oldValue, { signal }) => {\n * const res = await fetch(url, { signal })\n * return await res.json()\n * }\n * })\n * cache.set('https://example.com/', { some: 'data' })\n * // 100ms go by...\n * const result = cache.fetch('https://example.com/')\n * cache.set('https://example.com/', { other: 'thing' })\n * console.log(await result) // { some: 'data' }\n * console.log(cache.get('https://example.com/')) // { other: 'thing' }\n * ```\n */\n allowStaleOnFetchAbort?: boolean\n\n /**\n * Set to true to ignore the `abort` event emitted by the `AbortSignal`\n * object passed to {@link OptionsBase.fetchMethod}, and still cache the\n * resulting resolution value, as long as it is not `undefined`.\n *\n * When used on its own, this means aborted {@link LRUCache#fetch} calls\n * are not immediately resolved or rejected when they are aborted, and\n * instead take the full time to await.\n *\n * When used with {@link OptionsBase.allowStaleOnFetchAbort}, aborted\n * {@link LRUCache#fetch} calls will resolve immediately to their stale\n * cached value or `undefined`, and will continue to process and eventually\n * update the cache when they resolve, as long as the resulting value is\n * not `undefined`, thus supporting a \"return stale on timeout while\n * refreshing\" mechanism by passing `AbortSignal.timeout(n)` as the signal.\n *\n * For example:\n *\n * ```ts\n * const c = new LRUCache({\n * ttl: 100,\n * ignoreFetchAbort: true,\n * allowStaleOnFetchAbort: true,\n * fetchMethod: async (key, oldValue, { signal }) => {\n * // note: do NOT pass the signal to fetch()!\n * // let's say this fetch can take a long time.\n * const res = await fetch(`https://slow-backend-server/${key}`)\n * return await res.json()\n * },\n * })\n *\n * // this will return the stale value after 100ms, while still\n * // updating in the background for next time.\n * const val = await c.fetch('key', { signal: AbortSignal.timeout(100) })\n * ```\n *\n * **Note**: regardless of this setting, an `abort` event _is still\n * emitted on the `AbortSignal` object_, so may result in invalid results\n * when passed to other underlying APIs that use AbortSignals.\n *\n * This may be overridden in the {@link OptionsBase.fetchMethod} or the\n * call to {@link LRUCache#fetch}.\n */\n ignoreFetchAbort?: boolean\n }\n\n export interface OptionsMaxLimit\n extends OptionsBase {\n max: Count\n }\n export interface OptionsTTLLimit\n extends OptionsBase {\n ttl: Milliseconds\n ttlAutopurge: boolean\n }\n export interface OptionsSizeLimit\n extends OptionsBase {\n maxSize: Size\n }\n\n /**\n * The valid safe options for the {@link LRUCache} constructor\n */\n export type Options =\n | OptionsMaxLimit\n | OptionsSizeLimit\n | OptionsTTLLimit\n\n /**\n * Entry objects used by {@link LRUCache#load} and {@link LRUCache#dump},\n * and returned by {@link LRUCache#info}.\n */\n export interface Entry {\n value: V\n ttl?: Milliseconds\n size?: Size\n start?: Milliseconds\n }\n}\n\n/**\n * Default export, the thing you're using this module to get.\n *\n * The `K` and `V` types define the key and value types, respectively. The\n * optional `FC` type defines the type of the `context` object passed to\n * `cache.fetch()` and `cache.memo()`.\n *\n * Keys and values **must not** be `null` or `undefined`.\n *\n * All properties from the options object (with the exception of `max`,\n * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are\n * added as normal public members. (The listed options are read-only getters.)\n *\n * Changing any of these will alter the defaults for subsequent method calls.\n */\nexport class LRUCache\n implements Map\n{\n // options that cannot be changed without disaster\n readonly #max: LRUCache.Count\n readonly #maxSize: LRUCache.Size\n readonly #dispose?: LRUCache.Disposer\n readonly #disposeAfter?: LRUCache.Disposer\n readonly #fetchMethod?: LRUCache.Fetcher\n readonly #memoMethod?: LRUCache.Memoizer\n\n /**\n * {@link LRUCache.OptionsBase.ttl}\n */\n ttl: LRUCache.Milliseconds\n\n /**\n * {@link LRUCache.OptionsBase.ttlResolution}\n */\n ttlResolution: LRUCache.Milliseconds\n /**\n * {@link LRUCache.OptionsBase.ttlAutopurge}\n */\n ttlAutopurge: boolean\n /**\n * {@link LRUCache.OptionsBase.updateAgeOnGet}\n */\n updateAgeOnGet: boolean\n /**\n * {@link LRUCache.OptionsBase.updateAgeOnHas}\n */\n updateAgeOnHas: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStale}\n */\n allowStale: boolean\n\n /**\n * {@link LRUCache.OptionsBase.noDisposeOnSet}\n */\n noDisposeOnSet: boolean\n /**\n * {@link LRUCache.OptionsBase.noUpdateTTL}\n */\n noUpdateTTL: boolean\n /**\n * {@link LRUCache.OptionsBase.maxEntrySize}\n */\n maxEntrySize: LRUCache.Size\n /**\n * {@link LRUCache.OptionsBase.sizeCalculation}\n */\n sizeCalculation?: LRUCache.SizeCalculator\n /**\n * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}\n */\n noDeleteOnFetchRejection: boolean\n /**\n * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}\n */\n noDeleteOnStaleGet: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}\n */\n allowStaleOnFetchAbort: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}\n */\n allowStaleOnFetchRejection: boolean\n /**\n * {@link LRUCache.OptionsBase.ignoreFetchAbort}\n */\n ignoreFetchAbort: boolean\n\n // computed properties\n #size: LRUCache.Count\n #calculatedSize: LRUCache.Size\n #keyMap: Map\n #keyList: (K | undefined)[]\n #valList: (V | BackgroundFetch | undefined)[]\n #next: NumberArray\n #prev: NumberArray\n #head: Index\n #tail: Index\n #free: StackLike\n #disposed?: DisposeTask[]\n #sizes?: ZeroArray\n #starts?: ZeroArray\n #ttls?: ZeroArray\n\n #hasDispose: boolean\n #hasFetchMethod: boolean\n #hasDisposeAfter: boolean\n\n /**\n * Do not call this method unless you need to inspect the\n * inner workings of the cache. If anything returned by this\n * object is modified in any way, strange breakage may occur.\n *\n * These fields are private for a reason!\n *\n * @internal\n */\n static unsafeExposeInternals<\n K extends {},\n V extends {},\n FC extends unknown = unknown\n >(c: LRUCache) {\n return {\n // properties\n starts: c.#starts,\n ttls: c.#ttls,\n sizes: c.#sizes,\n keyMap: c.#keyMap as Map,\n keyList: c.#keyList,\n valList: c.#valList,\n next: c.#next,\n prev: c.#prev,\n get head() {\n return c.#head\n },\n get tail() {\n return c.#tail\n },\n free: c.#free,\n // methods\n isBackgroundFetch: (p: any) => c.#isBackgroundFetch(p),\n backgroundFetch: (\n k: K,\n index: number | undefined,\n options: LRUCache.FetchOptions,\n context: any\n ): BackgroundFetch =>\n c.#backgroundFetch(\n k,\n index as Index | undefined,\n options,\n context\n ),\n moveToTail: (index: number): void =>\n c.#moveToTail(index as Index),\n indexes: (options?: { allowStale: boolean }) =>\n c.#indexes(options),\n rindexes: (options?: { allowStale: boolean }) =>\n c.#rindexes(options),\n isStale: (index: number | undefined) =>\n c.#isStale(index as Index),\n }\n }\n\n // Protected read-only members\n\n /**\n * {@link LRUCache.OptionsBase.max} (read-only)\n */\n get max(): LRUCache.Count {\n return this.#max\n }\n /**\n * {@link LRUCache.OptionsBase.maxSize} (read-only)\n */\n get maxSize(): LRUCache.Count {\n return this.#maxSize\n }\n /**\n * The total computed size of items in the cache (read-only)\n */\n get calculatedSize(): LRUCache.Size {\n return this.#calculatedSize\n }\n /**\n * The number of items stored in the cache (read-only)\n */\n get size(): LRUCache.Count {\n return this.#size\n }\n /**\n * {@link LRUCache.OptionsBase.fetchMethod} (read-only)\n */\n get fetchMethod(): LRUCache.Fetcher | undefined {\n return this.#fetchMethod\n }\n get memoMethod(): LRUCache.Memoizer | undefined {\n return this.#memoMethod\n }\n /**\n * {@link LRUCache.OptionsBase.dispose} (read-only)\n */\n get dispose() {\n return this.#dispose\n }\n /**\n * {@link LRUCache.OptionsBase.disposeAfter} (read-only)\n */\n get disposeAfter() {\n return this.#disposeAfter\n }\n\n constructor(\n options: LRUCache.Options | LRUCache\n ) {\n const {\n max = 0,\n ttl,\n ttlResolution = 1,\n ttlAutopurge,\n updateAgeOnGet,\n updateAgeOnHas,\n allowStale,\n dispose,\n disposeAfter,\n noDisposeOnSet,\n noUpdateTTL,\n maxSize = 0,\n maxEntrySize = 0,\n sizeCalculation,\n fetchMethod,\n memoMethod,\n noDeleteOnFetchRejection,\n noDeleteOnStaleGet,\n allowStaleOnFetchRejection,\n allowStaleOnFetchAbort,\n ignoreFetchAbort,\n } = options\n\n if (max !== 0 && !isPosInt(max)) {\n throw new TypeError('max option must be a nonnegative integer')\n }\n\n const UintArray = max ? getUintArray(max) : Array\n if (!UintArray) {\n throw new Error('invalid max value: ' + max)\n }\n\n this.#max = max\n this.#maxSize = maxSize\n this.maxEntrySize = maxEntrySize || this.#maxSize\n this.sizeCalculation = sizeCalculation\n if (this.sizeCalculation) {\n if (!this.#maxSize && !this.maxEntrySize) {\n throw new TypeError(\n 'cannot set sizeCalculation without setting maxSize or maxEntrySize'\n )\n }\n if (typeof this.sizeCalculation !== 'function') {\n throw new TypeError('sizeCalculation set to non-function')\n }\n }\n\n if (\n memoMethod !== undefined &&\n typeof memoMethod !== 'function'\n ) {\n throw new TypeError('memoMethod must be a function if defined')\n }\n this.#memoMethod = memoMethod\n\n if (\n fetchMethod !== undefined &&\n typeof fetchMethod !== 'function'\n ) {\n throw new TypeError(\n 'fetchMethod must be a function if specified'\n )\n }\n this.#fetchMethod = fetchMethod\n this.#hasFetchMethod = !!fetchMethod\n\n this.#keyMap = new Map()\n this.#keyList = new Array(max).fill(undefined)\n this.#valList = new Array(max).fill(undefined)\n this.#next = new UintArray(max)\n this.#prev = new UintArray(max)\n this.#head = 0 as Index\n this.#tail = 0 as Index\n this.#free = Stack.create(max)\n this.#size = 0\n this.#calculatedSize = 0\n\n if (typeof dispose === 'function') {\n this.#dispose = dispose\n }\n if (typeof disposeAfter === 'function') {\n this.#disposeAfter = disposeAfter\n this.#disposed = []\n } else {\n this.#disposeAfter = undefined\n this.#disposed = undefined\n }\n this.#hasDispose = !!this.#dispose\n this.#hasDisposeAfter = !!this.#disposeAfter\n\n this.noDisposeOnSet = !!noDisposeOnSet\n this.noUpdateTTL = !!noUpdateTTL\n this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection\n this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection\n this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort\n this.ignoreFetchAbort = !!ignoreFetchAbort\n\n // NB: maxEntrySize is set to maxSize if it's set\n if (this.maxEntrySize !== 0) {\n if (this.#maxSize !== 0) {\n if (!isPosInt(this.#maxSize)) {\n throw new TypeError(\n 'maxSize must be a positive integer if specified'\n )\n }\n }\n if (!isPosInt(this.maxEntrySize)) {\n throw new TypeError(\n 'maxEntrySize must be a positive integer if specified'\n )\n }\n this.#initializeSizeTracking()\n }\n\n this.allowStale = !!allowStale\n this.noDeleteOnStaleGet = !!noDeleteOnStaleGet\n this.updateAgeOnGet = !!updateAgeOnGet\n this.updateAgeOnHas = !!updateAgeOnHas\n this.ttlResolution =\n isPosInt(ttlResolution) || ttlResolution === 0\n ? ttlResolution\n : 1\n this.ttlAutopurge = !!ttlAutopurge\n this.ttl = ttl || 0\n if (this.ttl) {\n if (!isPosInt(this.ttl)) {\n throw new TypeError(\n 'ttl must be a positive integer if specified'\n )\n }\n this.#initializeTTLTracking()\n }\n\n // do not allow completely unbounded caches\n if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {\n throw new TypeError(\n 'At least one of max, maxSize, or ttl is required'\n )\n }\n if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {\n const code = 'LRU_CACHE_UNBOUNDED'\n if (shouldWarn(code)) {\n warned.add(code)\n const msg =\n 'TTL caching without ttlAutopurge, max, or maxSize can ' +\n 'result in unbounded memory consumption.'\n emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache)\n }\n }\n }\n\n /**\n * Return the number of ms left in the item's TTL. If item is not in cache,\n * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.\n */\n getRemainingTTL(key: K) {\n return this.#keyMap.has(key) ? Infinity : 0\n }\n\n #initializeTTLTracking() {\n const ttls = new ZeroArray(this.#max)\n const starts = new ZeroArray(this.#max)\n this.#ttls = ttls\n this.#starts = starts\n\n this.#setItemTTL = (index, ttl, start = perf.now()) => {\n starts[index] = ttl !== 0 ? start : 0\n ttls[index] = ttl\n if (ttl !== 0 && this.ttlAutopurge) {\n const t = setTimeout(() => {\n if (this.#isStale(index)) {\n this.#delete(this.#keyList[index] as K, 'expire')\n }\n }, ttl + 1)\n // unref() not supported on all platforms\n /* c8 ignore start */\n if (t.unref) {\n t.unref()\n }\n /* c8 ignore stop */\n }\n }\n\n this.#updateItemAge = index => {\n starts[index] = ttls[index] !== 0 ? perf.now() : 0\n }\n\n this.#statusTTL = (status, index) => {\n if (ttls[index]) {\n const ttl = ttls[index]\n const start = starts[index]\n /* c8 ignore next */\n if (!ttl || !start) return\n status.ttl = ttl\n status.start = start\n status.now = cachedNow || getNow()\n const age = status.now - start\n status.remainingTTL = ttl - age\n }\n }\n\n // debounce calls to perf.now() to 1s so we're not hitting\n // that costly call repeatedly.\n let cachedNow = 0\n const getNow = () => {\n const n = perf.now()\n if (this.ttlResolution > 0) {\n cachedNow = n\n const t = setTimeout(\n () => (cachedNow = 0),\n this.ttlResolution\n )\n // not available on all platforms\n /* c8 ignore start */\n if (t.unref) {\n t.unref()\n }\n /* c8 ignore stop */\n }\n return n\n }\n\n this.getRemainingTTL = key => {\n const index = this.#keyMap.get(key)\n if (index === undefined) {\n return 0\n }\n const ttl = ttls[index]\n const start = starts[index]\n if (!ttl || !start) {\n return Infinity\n }\n const age = (cachedNow || getNow()) - start\n return ttl - age\n }\n\n this.#isStale = index => {\n const s = starts[index]\n const t = ttls[index]\n return !!t && !!s && (cachedNow || getNow()) - s > t\n }\n }\n\n // conditionally set private methods related to TTL\n #updateItemAge: (index: Index) => void = () => {}\n #statusTTL: (status: LRUCache.Status, index: Index) => void =\n () => {}\n #setItemTTL: (\n index: Index,\n ttl: LRUCache.Milliseconds,\n start?: LRUCache.Milliseconds\n // ignore because we never call this if we're not already in TTL mode\n /* c8 ignore start */\n ) => void = () => {}\n /* c8 ignore stop */\n\n #isStale: (index: Index) => boolean = () => false\n\n #initializeSizeTracking() {\n const sizes = new ZeroArray(this.#max)\n this.#calculatedSize = 0\n this.#sizes = sizes\n this.#removeItemSize = index => {\n this.#calculatedSize -= sizes[index] as number\n sizes[index] = 0\n }\n this.#requireSize = (k, v, size, sizeCalculation) => {\n // provisionally accept background fetches.\n // actual value size will be checked when they return.\n if (this.#isBackgroundFetch(v)) {\n return 0\n }\n if (!isPosInt(size)) {\n if (sizeCalculation) {\n if (typeof sizeCalculation !== 'function') {\n throw new TypeError('sizeCalculation must be a function')\n }\n size = sizeCalculation(v, k)\n if (!isPosInt(size)) {\n throw new TypeError(\n 'sizeCalculation return invalid (expect positive integer)'\n )\n }\n } else {\n throw new TypeError(\n 'invalid size value (must be positive integer). ' +\n 'When maxSize or maxEntrySize is used, sizeCalculation ' +\n 'or size must be set.'\n )\n }\n }\n return size\n }\n this.#addItemSize = (\n index: Index,\n size: LRUCache.Size,\n status?: LRUCache.Status\n ) => {\n sizes[index] = size\n if (this.#maxSize) {\n const maxSize = this.#maxSize - (sizes[index] as number)\n while (this.#calculatedSize > maxSize) {\n this.#evict(true)\n }\n }\n this.#calculatedSize += sizes[index] as number\n if (status) {\n status.entrySize = size\n status.totalCalculatedSize = this.#calculatedSize\n }\n }\n }\n\n #removeItemSize: (index: Index) => void = _i => {}\n #addItemSize: (\n index: Index,\n size: LRUCache.Size,\n status?: LRUCache.Status\n ) => void = (_i, _s, _st) => {}\n #requireSize: (\n k: K,\n v: V | BackgroundFetch,\n size?: LRUCache.Size,\n sizeCalculation?: LRUCache.SizeCalculator\n ) => LRUCache.Size = (\n _k: K,\n _v: V | BackgroundFetch,\n size?: LRUCache.Size,\n sizeCalculation?: LRUCache.SizeCalculator\n ) => {\n if (size || sizeCalculation) {\n throw new TypeError(\n 'cannot set size without setting maxSize or maxEntrySize on cache'\n )\n }\n return 0\n };\n\n *#indexes({ allowStale = this.allowStale } = {}) {\n if (this.#size) {\n for (let i = this.#tail; true; ) {\n if (!this.#isValidIndex(i)) {\n break\n }\n if (allowStale || !this.#isStale(i)) {\n yield i\n }\n if (i === this.#head) {\n break\n } else {\n i = this.#prev[i] as Index\n }\n }\n }\n }\n\n *#rindexes({ allowStale = this.allowStale } = {}) {\n if (this.#size) {\n for (let i = this.#head; true; ) {\n if (!this.#isValidIndex(i)) {\n break\n }\n if (allowStale || !this.#isStale(i)) {\n yield i\n }\n if (i === this.#tail) {\n break\n } else {\n i = this.#next[i] as Index\n }\n }\n }\n }\n\n #isValidIndex(index: Index) {\n return (\n index !== undefined &&\n this.#keyMap.get(this.#keyList[index] as K) === index\n )\n }\n\n /**\n * Return a generator yielding `[key, value]` pairs,\n * in order from most recently used to least recently used.\n */\n *entries() {\n for (const i of this.#indexes()) {\n if (\n this.#valList[i] !== undefined &&\n this.#keyList[i] !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield [this.#keyList[i], this.#valList[i]] as [K, V]\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.entries}\n *\n * Return a generator yielding `[key, value]` pairs,\n * in order from least recently used to most recently used.\n */\n *rentries() {\n for (const i of this.#rindexes()) {\n if (\n this.#valList[i] !== undefined &&\n this.#keyList[i] !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield [this.#keyList[i], this.#valList[i]]\n }\n }\n }\n\n /**\n * Return a generator yielding the keys in the cache,\n * in order from most recently used to least recently used.\n */\n *keys() {\n for (const i of this.#indexes()) {\n const k = this.#keyList[i]\n if (\n k !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield k\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.keys}\n *\n * Return a generator yielding the keys in the cache,\n * in order from least recently used to most recently used.\n */\n *rkeys() {\n for (const i of this.#rindexes()) {\n const k = this.#keyList[i]\n if (\n k !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield k\n }\n }\n }\n\n /**\n * Return a generator yielding the values in the cache,\n * in order from most recently used to least recently used.\n */\n *values() {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n if (\n v !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield this.#valList[i] as V\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.values}\n *\n * Return a generator yielding the values in the cache,\n * in order from least recently used to most recently used.\n */\n *rvalues() {\n for (const i of this.#rindexes()) {\n const v = this.#valList[i]\n if (\n v !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield this.#valList[i]\n }\n }\n }\n\n /**\n * Iterating over the cache itself yields the same results as\n * {@link LRUCache.entries}\n */\n [Symbol.iterator]() {\n return this.entries()\n }\n\n /**\n * A String value that is used in the creation of the default string\n * description of an object. Called by the built-in method\n * `Object.prototype.toString`.\n */\n [Symbol.toStringTag] = 'LRUCache'\n\n /**\n * Find a value for which the supplied fn method returns a truthy value,\n * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.\n */\n find(\n fn: (v: V, k: K, self: LRUCache) => boolean,\n getOptions: LRUCache.GetOptions = {}\n ) {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n if (fn(value, this.#keyList[i] as K, this)) {\n return this.get(this.#keyList[i] as K, getOptions)\n }\n }\n }\n\n /**\n * Call the supplied function on each item in the cache, in order from most\n * recently used to least recently used.\n *\n * `fn` is called as `fn(value, key, cache)`.\n *\n * If `thisp` is provided, function will be called in the `this`-context of\n * the provided object, or the cache if no `thisp` object is provided.\n *\n * Does not update age or recenty of use, or iterate over stale values.\n */\n forEach(\n fn: (v: V, k: K, self: LRUCache) => any,\n thisp: any = this\n ) {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n fn.call(thisp, value, this.#keyList[i] as K, this)\n }\n }\n\n /**\n * The same as {@link LRUCache.forEach} but items are iterated over in\n * reverse order. (ie, less recently used items are iterated over first.)\n */\n rforEach(\n fn: (v: V, k: K, self: LRUCache) => any,\n thisp: any = this\n ) {\n for (const i of this.#rindexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n fn.call(thisp, value, this.#keyList[i] as K, this)\n }\n }\n\n /**\n * Delete any stale entries. Returns true if anything was removed,\n * false otherwise.\n */\n purgeStale() {\n let deleted = false\n for (const i of this.#rindexes({ allowStale: true })) {\n if (this.#isStale(i)) {\n this.#delete(this.#keyList[i] as K, 'expire')\n deleted = true\n }\n }\n return deleted\n }\n\n /**\n * Get the extended info about a given entry, to get its value, size, and\n * TTL info simultaneously. Returns `undefined` if the key is not present.\n *\n * Unlike {@link LRUCache#dump}, which is designed to be portable and survive\n * serialization, the `start` value is always the current timestamp, and the\n * `ttl` is a calculated remaining time to live (negative if expired).\n *\n * Always returns stale values, if their info is found in the cache, so be\n * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})\n * if relevant.\n */\n info(key: K): LRUCache.Entry | undefined {\n const i = this.#keyMap.get(key)\n if (i === undefined) return undefined\n const v = this.#valList[i]\n const value: V | undefined = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) return undefined\n const entry: LRUCache.Entry = { value }\n if (this.#ttls && this.#starts) {\n const ttl = this.#ttls[i]\n const start = this.#starts[i]\n if (ttl && start) {\n const remain = ttl - (perf.now() - start)\n entry.ttl = remain\n entry.start = Date.now()\n }\n }\n if (this.#sizes) {\n entry.size = this.#sizes[i]\n }\n return entry\n }\n\n /**\n * Return an array of [key, {@link LRUCache.Entry}] tuples which can be\n * passed to {@link LRLUCache#load}.\n *\n * The `start` fields are calculated relative to a portable `Date.now()`\n * timestamp, even if `performance.now()` is available.\n *\n * Stale entries are always included in the `dump`, even if\n * {@link LRUCache.OptionsBase.allowStale} is false.\n *\n * Note: this returns an actual array, not a generator, so it can be more\n * easily passed around.\n */\n dump() {\n const arr: [K, LRUCache.Entry][] = []\n for (const i of this.#indexes({ allowStale: true })) {\n const key = this.#keyList[i]\n const v = this.#valList[i]\n const value: V | undefined = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined || key === undefined) continue\n const entry: LRUCache.Entry = { value }\n if (this.#ttls && this.#starts) {\n entry.ttl = this.#ttls[i]\n // always dump the start relative to a portable timestamp\n // it's ok for this to be a bit slow, it's a rare operation.\n const age = perf.now() - (this.#starts[i] as number)\n entry.start = Math.floor(Date.now() - age)\n }\n if (this.#sizes) {\n entry.size = this.#sizes[i]\n }\n arr.unshift([key, entry])\n }\n return arr\n }\n\n /**\n * Reset the cache and load in the items in entries in the order listed.\n *\n * The shape of the resulting cache may be different if the same options are\n * not used in both caches.\n *\n * The `start` fields are assumed to be calculated relative to a portable\n * `Date.now()` timestamp, even if `performance.now()` is available.\n */\n load(arr: [K, LRUCache.Entry][]) {\n this.clear()\n for (const [key, entry] of arr) {\n if (entry.start) {\n // entry.start is a portable timestamp, but we may be using\n // node's performance.now(), so calculate the offset, so that\n // we get the intended remaining TTL, no matter how long it's\n // been on ice.\n //\n // it's ok for this to be a bit slow, it's a rare operation.\n const age = Date.now() - entry.start\n entry.start = perf.now() - age\n }\n this.set(key, entry.value, entry)\n }\n }\n\n /**\n * Add a value to the cache.\n *\n * Note: if `undefined` is specified as a value, this is an alias for\n * {@link LRUCache#delete}\n *\n * Fields on the {@link LRUCache.SetOptions} options param will override\n * their corresponding values in the constructor options for the scope\n * of this single `set()` operation.\n *\n * If `start` is provided, then that will set the effective start\n * time for the TTL calculation. Note that this must be a previous\n * value of `performance.now()` if supported, or a previous value of\n * `Date.now()` if not.\n *\n * Options object may also include `size`, which will prevent\n * calling the `sizeCalculation` function and just use the specified\n * number if it is a positive integer, and `noDisposeOnSet` which\n * will prevent calling a `dispose` function in the case of\n * overwrites.\n *\n * If the `size` (or return value of `sizeCalculation`) for a given\n * entry is greater than `maxEntrySize`, then the item will not be\n * added to the cache.\n *\n * Will update the recency of the entry.\n *\n * If the value is `undefined`, then this is an alias for\n * `cache.delete(key)`. `undefined` is never stored in the cache.\n */\n set(\n k: K,\n v: V | BackgroundFetch | undefined,\n setOptions: LRUCache.SetOptions = {}\n ) {\n if (v === undefined) {\n this.delete(k)\n return this\n }\n const {\n ttl = this.ttl,\n start,\n noDisposeOnSet = this.noDisposeOnSet,\n sizeCalculation = this.sizeCalculation,\n status,\n } = setOptions\n let { noUpdateTTL = this.noUpdateTTL } = setOptions\n\n const size = this.#requireSize(\n k,\n v,\n setOptions.size || 0,\n sizeCalculation\n )\n // if the item doesn't fit, don't do anything\n // NB: maxEntrySize set to maxSize by default\n if (this.maxEntrySize && size > this.maxEntrySize) {\n if (status) {\n status.set = 'miss'\n status.maxEntrySizeExceeded = true\n }\n // have to delete, in case something is there already.\n this.#delete(k, 'set')\n return this\n }\n let index = this.#size === 0 ? undefined : this.#keyMap.get(k)\n if (index === undefined) {\n // addition\n index = (\n this.#size === 0\n ? this.#tail\n : this.#free.length !== 0\n ? this.#free.pop()\n : this.#size === this.#max\n ? this.#evict(false)\n : this.#size\n ) as Index\n this.#keyList[index] = k\n this.#valList[index] = v\n this.#keyMap.set(k, index)\n this.#next[this.#tail] = index\n this.#prev[index] = this.#tail\n this.#tail = index\n this.#size++\n this.#addItemSize(index, size, status)\n if (status) status.set = 'add'\n noUpdateTTL = false\n } else {\n // update\n this.#moveToTail(index)\n const oldVal = this.#valList[index] as V | BackgroundFetch\n if (v !== oldVal) {\n if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {\n oldVal.__abortController.abort(new Error('replaced'))\n const { __staleWhileFetching: s } = oldVal\n if (s !== undefined && !noDisposeOnSet) {\n if (this.#hasDispose) {\n this.#dispose?.(s as V, k, 'set')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([s as V, k, 'set'])\n }\n }\n } else if (!noDisposeOnSet) {\n if (this.#hasDispose) {\n this.#dispose?.(oldVal as V, k, 'set')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([oldVal as V, k, 'set'])\n }\n }\n this.#removeItemSize(index)\n this.#addItemSize(index, size, status)\n this.#valList[index] = v\n if (status) {\n status.set = 'replace'\n const oldValue =\n oldVal && this.#isBackgroundFetch(oldVal)\n ? oldVal.__staleWhileFetching\n : oldVal\n if (oldValue !== undefined) status.oldValue = oldValue\n }\n } else if (status) {\n status.set = 'update'\n }\n }\n if (ttl !== 0 && !this.#ttls) {\n this.#initializeTTLTracking()\n }\n if (this.#ttls) {\n if (!noUpdateTTL) {\n this.#setItemTTL(index, ttl, start)\n }\n if (status) this.#statusTTL(status, index)\n }\n if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n return this\n }\n\n /**\n * Evict the least recently used item, returning its value or\n * `undefined` if cache is empty.\n */\n pop(): V | undefined {\n try {\n while (this.#size) {\n const val = this.#valList[this.#head]\n this.#evict(true)\n if (this.#isBackgroundFetch(val)) {\n if (val.__staleWhileFetching) {\n return val.__staleWhileFetching\n }\n } else if (val !== undefined) {\n return val\n }\n }\n } finally {\n if (this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n }\n }\n\n #evict(free: boolean) {\n const head = this.#head\n const k = this.#keyList[head] as K\n const v = this.#valList[head] as V\n if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('evicted'))\n } else if (this.#hasDispose || this.#hasDisposeAfter) {\n if (this.#hasDispose) {\n this.#dispose?.(v, k, 'evict')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v, k, 'evict'])\n }\n }\n this.#removeItemSize(head)\n // if we aren't about to use the index, then null these out\n if (free) {\n this.#keyList[head] = undefined\n this.#valList[head] = undefined\n this.#free.push(head)\n }\n if (this.#size === 1) {\n this.#head = this.#tail = 0 as Index\n this.#free.length = 0\n } else {\n this.#head = this.#next[head] as Index\n }\n this.#keyMap.delete(k)\n this.#size--\n return head\n }\n\n /**\n * Check if a key is in the cache, without updating the recency of use.\n * Will return false if the item is stale, even though it is technically\n * in the cache.\n *\n * Check if a key is in the cache, without updating the recency of\n * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set\n * to `true` in either the options or the constructor.\n *\n * Will return `false` if the item is stale, even though it is technically in\n * the cache. The difference can be determined (if it matters) by using a\n * `status` argument, and inspecting the `has` field.\n *\n * Will not update item age unless\n * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.\n */\n has(k: K, hasOptions: LRUCache.HasOptions = {}) {\n const { updateAgeOnHas = this.updateAgeOnHas, status } =\n hasOptions\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n const v = this.#valList[index]\n if (\n this.#isBackgroundFetch(v) &&\n v.__staleWhileFetching === undefined\n ) {\n return false\n }\n if (!this.#isStale(index)) {\n if (updateAgeOnHas) {\n this.#updateItemAge(index)\n }\n if (status) {\n status.has = 'hit'\n this.#statusTTL(status, index)\n }\n return true\n } else if (status) {\n status.has = 'stale'\n this.#statusTTL(status, index)\n }\n } else if (status) {\n status.has = 'miss'\n }\n return false\n }\n\n /**\n * Like {@link LRUCache#get} but doesn't update recency or delete stale\n * items.\n *\n * Returns `undefined` if the item is stale, unless\n * {@link LRUCache.OptionsBase.allowStale} is set.\n */\n peek(k: K, peekOptions: LRUCache.PeekOptions = {}) {\n const { allowStale = this.allowStale } = peekOptions\n const index = this.#keyMap.get(k)\n if (\n index === undefined ||\n (!allowStale && this.#isStale(index))\n ) {\n return\n }\n const v = this.#valList[index]\n // either stale and allowed, or forcing a refresh of non-stale value\n return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v\n }\n\n #backgroundFetch(\n k: K,\n index: Index | undefined,\n options: LRUCache.FetchOptions,\n context: any\n ): BackgroundFetch {\n const v = index === undefined ? undefined : this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n return v\n }\n\n const ac = new AC()\n const { signal } = options\n // when/if our AC signals, then stop listening to theirs.\n signal?.addEventListener('abort', () => ac.abort(signal.reason), {\n signal: ac.signal,\n })\n\n const fetchOpts = {\n signal: ac.signal,\n options,\n context,\n }\n\n const cb = (\n v: V | undefined,\n updateCache = false\n ): V | undefined => {\n const { aborted } = ac.signal\n const ignoreAbort = options.ignoreFetchAbort && v !== undefined\n if (options.status) {\n if (aborted && !updateCache) {\n options.status.fetchAborted = true\n options.status.fetchError = ac.signal.reason\n if (ignoreAbort) options.status.fetchAbortIgnored = true\n } else {\n options.status.fetchResolved = true\n }\n }\n if (aborted && !ignoreAbort && !updateCache) {\n return fetchFail(ac.signal.reason)\n }\n // either we didn't abort, and are still here, or we did, and ignored\n const bf = p as BackgroundFetch\n if (this.#valList[index as Index] === p) {\n if (v === undefined) {\n if (bf.__staleWhileFetching) {\n this.#valList[index as Index] = bf.__staleWhileFetching\n } else {\n this.#delete(k, 'fetch')\n }\n } else {\n if (options.status) options.status.fetchUpdated = true\n this.set(k, v, fetchOpts.options)\n }\n }\n return v\n }\n\n const eb = (er: any) => {\n if (options.status) {\n options.status.fetchRejected = true\n options.status.fetchError = er\n }\n return fetchFail(er)\n }\n\n const fetchFail = (er: any): V | undefined => {\n const { aborted } = ac.signal\n const allowStaleAborted =\n aborted && options.allowStaleOnFetchAbort\n const allowStale =\n allowStaleAborted || options.allowStaleOnFetchRejection\n const noDelete = allowStale || options.noDeleteOnFetchRejection\n const bf = p as BackgroundFetch\n if (this.#valList[index as Index] === p) {\n // if we allow stale on fetch rejections, then we need to ensure that\n // the stale value is not removed from the cache when the fetch fails.\n const del = !noDelete || bf.__staleWhileFetching === undefined\n if (del) {\n this.#delete(k, 'fetch')\n } else if (!allowStaleAborted) {\n // still replace the *promise* with the stale value,\n // since we are done with the promise at this point.\n // leave it untouched if we're still waiting for an\n // aborted background fetch that hasn't yet returned.\n this.#valList[index as Index] = bf.__staleWhileFetching\n }\n }\n if (allowStale) {\n if (options.status && bf.__staleWhileFetching !== undefined) {\n options.status.returnedStale = true\n }\n return bf.__staleWhileFetching\n } else if (bf.__returned === bf) {\n throw er\n }\n }\n\n const pcall = (\n res: (v: V | undefined) => void,\n rej: (e: any) => void\n ) => {\n const fmp = this.#fetchMethod?.(k, v, fetchOpts)\n if (fmp && fmp instanceof Promise) {\n fmp.then(v => res(v === undefined ? undefined : v), rej)\n }\n // ignored, we go until we finish, regardless.\n // defer check until we are actually aborting,\n // so fetchMethod can override.\n ac.signal.addEventListener('abort', () => {\n if (\n !options.ignoreFetchAbort ||\n options.allowStaleOnFetchAbort\n ) {\n res(undefined)\n // when it eventually resolves, update the cache.\n if (options.allowStaleOnFetchAbort) {\n res = v => cb(v, true)\n }\n }\n })\n }\n\n if (options.status) options.status.fetchDispatched = true\n const p = new Promise(pcall).then(cb, eb)\n const bf: BackgroundFetch = Object.assign(p, {\n __abortController: ac,\n __staleWhileFetching: v,\n __returned: undefined,\n })\n\n if (index === undefined) {\n // internal, don't expose status.\n this.set(k, bf, { ...fetchOpts.options, status: undefined })\n index = this.#keyMap.get(k)\n } else {\n this.#valList[index] = bf\n }\n return bf\n }\n\n #isBackgroundFetch(p: any): p is BackgroundFetch {\n if (!this.#hasFetchMethod) return false\n const b = p as BackgroundFetch\n return (\n !!b &&\n b instanceof Promise &&\n b.hasOwnProperty('__staleWhileFetching') &&\n b.__abortController instanceof AC\n )\n }\n\n /**\n * Make an asynchronous cached fetch using the\n * {@link LRUCache.OptionsBase.fetchMethod} function.\n *\n * If the value is in the cache and not stale, then the returned\n * Promise resolves to the value.\n *\n * If not in the cache, or beyond its TTL staleness, then\n * `fetchMethod(key, staleValue, { options, signal, context })` is\n * called, and the value returned will be added to the cache once\n * resolved.\n *\n * If called with `allowStale`, and an asynchronous fetch is\n * currently in progress to reload a stale value, then the former\n * stale value will be returned.\n *\n * If called with `forceRefresh`, then the cached item will be\n * re-fetched, even if it is not stale. However, if `allowStale` is also\n * set, then the old value will still be returned. This is useful\n * in cases where you want to force a reload of a cached value. If\n * a background fetch is already in progress, then `forceRefresh`\n * has no effect.\n *\n * If multiple fetches for the same key are issued, then they will all be\n * coalesced into a single call to fetchMethod.\n *\n * Note that this means that handling options such as\n * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort},\n * {@link LRUCache.FetchOptions.signal},\n * and {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} will be\n * determined by the FIRST fetch() call for a given key.\n *\n * This is a known (fixable) shortcoming which will be addresed on when\n * someone complains about it, as the fix would involve added complexity and\n * may not be worth the costs for this edge case.\n *\n * If {@link LRUCache.OptionsBase.fetchMethod} is not specified, then this is\n * effectively an alias for `Promise.resolve(cache.get(key))`.\n *\n * When the fetch method resolves to a value, if the fetch has not\n * been aborted due to deletion, eviction, or being overwritten,\n * then it is added to the cache using the options provided.\n *\n * If the key is evicted or deleted before the `fetchMethod`\n * resolves, then the AbortSignal passed to the `fetchMethod` will\n * receive an `abort` event, and the promise returned by `fetch()`\n * will reject with the reason for the abort.\n *\n * If a `signal` is passed to the `fetch()` call, then aborting the\n * signal will abort the fetch and cause the `fetch()` promise to\n * reject with the reason provided.\n *\n * **Setting `context`**\n *\n * If an `FC` type is set to a type other than `unknown`, `void`, or\n * `undefined` in the {@link LRUCache} constructor, then all\n * calls to `cache.fetch()` _must_ provide a `context` option. If\n * set to `undefined` or `void`, then calls to fetch _must not_\n * provide a `context` option.\n *\n * The `context` param allows you to provide arbitrary data that\n * might be relevant in the course of fetching the data. It is only\n * relevant for the course of a single `fetch()` operation, and\n * discarded afterwards.\n *\n * **Note: `fetch()` calls are inflight-unique**\n *\n * If you call `fetch()` multiple times with the same key value,\n * then every call after the first will resolve on the same\n * promise1,\n * _even if they have different settings that would otherwise change\n * the behavior of the fetch_, such as `noDeleteOnFetchRejection`\n * or `ignoreFetchAbort`.\n *\n * In most cases, this is not a problem (in fact, only fetching\n * something once is what you probably want, if you're caching in\n * the first place). If you are changing the fetch() options\n * dramatically between runs, there's a good chance that you might\n * be trying to fit divergent semantics into a single object, and\n * would be better off with multiple cache instances.\n *\n * **1**: Ie, they're not the \"same Promise\", but they resolve at\n * the same time, because they're both waiting on the same\n * underlying fetchMethod response.\n */\n\n fetch(\n k: K,\n fetchOptions: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n ): Promise\n\n // this overload not allowed if context is required\n fetch(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n fetchOptions?: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : never\n ): Promise\n\n async fetch(\n k: K,\n fetchOptions: LRUCache.FetchOptions = {}\n ): Promise {\n const {\n // get options\n allowStale = this.allowStale,\n updateAgeOnGet = this.updateAgeOnGet,\n noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n // set options\n ttl = this.ttl,\n noDisposeOnSet = this.noDisposeOnSet,\n size = 0,\n sizeCalculation = this.sizeCalculation,\n noUpdateTTL = this.noUpdateTTL,\n // fetch exclusive options\n noDeleteOnFetchRejection = this.noDeleteOnFetchRejection,\n allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,\n ignoreFetchAbort = this.ignoreFetchAbort,\n allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,\n context,\n forceRefresh = false,\n status,\n signal,\n } = fetchOptions\n\n if (!this.#hasFetchMethod) {\n if (status) status.fetch = 'get'\n return this.get(k, {\n allowStale,\n updateAgeOnGet,\n noDeleteOnStaleGet,\n status,\n })\n }\n\n const options = {\n allowStale,\n updateAgeOnGet,\n noDeleteOnStaleGet,\n ttl,\n noDisposeOnSet,\n size,\n sizeCalculation,\n noUpdateTTL,\n noDeleteOnFetchRejection,\n allowStaleOnFetchRejection,\n allowStaleOnFetchAbort,\n ignoreFetchAbort,\n status,\n signal,\n }\n\n let index = this.#keyMap.get(k)\n if (index === undefined) {\n if (status) status.fetch = 'miss'\n const p = this.#backgroundFetch(k, index, options, context)\n return (p.__returned = p)\n } else {\n // in cache, maybe already fetching\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n const stale =\n allowStale && v.__staleWhileFetching !== undefined\n if (status) {\n status.fetch = 'inflight'\n if (stale) status.returnedStale = true\n }\n return stale ? v.__staleWhileFetching : (v.__returned = v)\n }\n\n // if we force a refresh, that means do NOT serve the cached value,\n // unless we are already in the process of refreshing the cache.\n const isStale = this.#isStale(index)\n if (!forceRefresh && !isStale) {\n if (status) status.fetch = 'hit'\n this.#moveToTail(index)\n if (updateAgeOnGet) {\n this.#updateItemAge(index)\n }\n if (status) this.#statusTTL(status, index)\n return v\n }\n\n // ok, it is stale or a forced refresh, and not already fetching.\n // refresh the cache.\n const p = this.#backgroundFetch(k, index, options, context)\n const hasStale = p.__staleWhileFetching !== undefined\n const staleVal = hasStale && allowStale\n if (status) {\n status.fetch = isStale ? 'stale' : 'refresh'\n if (staleVal && isStale) status.returnedStale = true\n }\n return staleVal ? p.__staleWhileFetching : (p.__returned = p)\n }\n }\n\n /**\n * In some cases, `cache.fetch()` may resolve to `undefined`, either because\n * a {@link LRUCache.OptionsBase#fetchMethod} was not provided (turning\n * `cache.fetch(k)` into just an async wrapper around `cache.get(k)`) or\n * because `ignoreFetchAbort` was specified (either to the constructor or\n * in the {@link LRUCache.FetchOptions}). Also, the\n * {@link OptionsBase.fetchMethod} may return `undefined` or `void`, making\n * the test even more complicated.\n *\n * Because inferring the cases where `undefined` might be returned are so\n * cumbersome, but testing for `undefined` can also be annoying, this method\n * can be used, which will reject if `this.fetch()` resolves to undefined.\n */\n forceFetch(\n k: K,\n fetchOptions: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n ): Promise\n // this overload not allowed if context is required\n forceFetch(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n fetchOptions?: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : never\n ): Promise\n async forceFetch(\n k: K,\n fetchOptions: LRUCache.FetchOptions = {}\n ): Promise {\n const v = await this.fetch(\n k,\n fetchOptions as unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n )\n if (v === undefined) throw new Error('fetch() returned undefined')\n return v\n }\n\n /**\n * If the key is found in the cache, then this is equivalent to\n * {@link LRUCache#get}. If not, in the cache, then calculate the value using\n * the {@link LRUCache.OptionsBase.memoMethod}, and add it to the cache.\n *\n * If an `FC` type is set to a type other than `unknown`, `void`, or\n * `undefined` in the LRUCache constructor, then all calls to `cache.memo()`\n * _must_ provide a `context` option. If set to `undefined` or `void`, then\n * calls to memo _must not_ provide a `context` option.\n *\n * The `context` param allows you to provide arbitrary data that might be\n * relevant in the course of fetching the data. It is only relevant for the\n * course of a single `memo()` operation, and discarded afterwards.\n */\n memo(\n k: K,\n memoOptions: unknown extends FC\n ? LRUCache.MemoOptions\n : FC extends undefined | void\n ? LRUCache.MemoOptionsNoContext\n : LRUCache.MemoOptionsWithContext\n ): V\n // this overload not allowed if context is required\n memo(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n memoOptions?: unknown extends FC\n ? LRUCache.MemoOptions\n : FC extends undefined | void\n ? LRUCache.MemoOptionsNoContext\n : never\n ): V\n memo(k: K, memoOptions: LRUCache.MemoOptions = {}) {\n const memoMethod = this.#memoMethod\n if (!memoMethod) {\n throw new Error('no memoMethod provided to constructor')\n }\n const { context, forceRefresh, ...options } = memoOptions\n const v = this.get(k, options)\n if (!forceRefresh && v !== undefined) return v\n const vv = memoMethod(k, v, {\n options,\n context,\n } as LRUCache.MemoizerOptions)\n this.set(k, vv, options)\n return vv\n }\n\n /**\n * Return a value from the cache. Will update the recency of the cache\n * entry found.\n *\n * If the key is not found, get() will return `undefined`.\n */\n get(k: K, getOptions: LRUCache.GetOptions = {}) {\n const {\n allowStale = this.allowStale,\n updateAgeOnGet = this.updateAgeOnGet,\n noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n status,\n } = getOptions\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n const value = this.#valList[index]\n const fetching = this.#isBackgroundFetch(value)\n if (status) this.#statusTTL(status, index)\n if (this.#isStale(index)) {\n if (status) status.get = 'stale'\n // delete only if not an in-flight background fetch\n if (!fetching) {\n if (!noDeleteOnStaleGet) {\n this.#delete(k, 'expire')\n }\n if (status && allowStale) status.returnedStale = true\n return allowStale ? value : undefined\n } else {\n if (\n status &&\n allowStale &&\n value.__staleWhileFetching !== undefined\n ) {\n status.returnedStale = true\n }\n return allowStale ? value.__staleWhileFetching : undefined\n }\n } else {\n if (status) status.get = 'hit'\n // if we're currently fetching it, we don't actually have it yet\n // it's not stale, which means this isn't a staleWhileRefetching.\n // If it's not stale, and fetching, AND has a __staleWhileFetching\n // value, then that means the user fetched with {forceRefresh:true},\n // so it's safe to return that value.\n if (fetching) {\n return value.__staleWhileFetching\n }\n this.#moveToTail(index)\n if (updateAgeOnGet) {\n this.#updateItemAge(index)\n }\n return value\n }\n } else if (status) {\n status.get = 'miss'\n }\n }\n\n #connect(p: Index, n: Index) {\n this.#prev[n] = p\n this.#next[p] = n\n }\n\n #moveToTail(index: Index): void {\n // if tail already, nothing to do\n // if head, move head to next[index]\n // else\n // move next[prev[index]] to next[index] (head has no prev)\n // move prev[next[index]] to prev[index]\n // prev[index] = tail\n // next[tail] = index\n // tail = index\n if (index !== this.#tail) {\n if (index === this.#head) {\n this.#head = this.#next[index] as Index\n } else {\n this.#connect(\n this.#prev[index] as Index,\n this.#next[index] as Index\n )\n }\n this.#connect(this.#tail, index)\n this.#tail = index\n }\n }\n\n /**\n * Deletes a key out of the cache.\n *\n * Returns true if the key was deleted, false otherwise.\n */\n delete(k: K) {\n return this.#delete(k, 'delete')\n }\n\n #delete(k: K, reason: LRUCache.DisposeReason) {\n let deleted = false\n if (this.#size !== 0) {\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n deleted = true\n if (this.#size === 1) {\n this.#clear(reason)\n } else {\n this.#removeItemSize(index)\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('deleted'))\n } else if (this.#hasDispose || this.#hasDisposeAfter) {\n if (this.#hasDispose) {\n this.#dispose?.(v as V, k, reason)\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v as V, k, reason])\n }\n }\n this.#keyMap.delete(k)\n this.#keyList[index] = undefined\n this.#valList[index] = undefined\n if (index === this.#tail) {\n this.#tail = this.#prev[index] as Index\n } else if (index === this.#head) {\n this.#head = this.#next[index] as Index\n } else {\n const pi = this.#prev[index] as number\n this.#next[pi] = this.#next[index] as number\n const ni = this.#next[index] as number\n this.#prev[ni] = this.#prev[index] as number\n }\n this.#size--\n this.#free.push(index)\n }\n }\n }\n if (this.#hasDisposeAfter && this.#disposed?.length) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n return deleted\n }\n\n /**\n * Clear the cache entirely, throwing away all values.\n */\n clear() {\n return this.#clear('delete')\n }\n #clear(reason: LRUCache.DisposeReason) {\n for (const index of this.#rindexes({ allowStale: true })) {\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('deleted'))\n } else {\n const k = this.#keyList[index]\n if (this.#hasDispose) {\n this.#dispose?.(v as V, k as K, reason)\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v as V, k as K, reason])\n }\n }\n }\n\n this.#keyMap.clear()\n this.#valList.fill(undefined)\n this.#keyList.fill(undefined)\n if (this.#ttls && this.#starts) {\n this.#ttls.fill(0)\n this.#starts.fill(0)\n }\n if (this.#sizes) {\n this.#sizes.fill(0)\n }\n this.#head = 0 as Index\n this.#tail = 0 as Index\n this.#free.length = 0\n this.#calculatedSize = 0\n this.#size = 0\n if (this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n }\n}\n"]} \ No newline at end of file diff --git a/.github/octokit/node_modules/lru-cache/dist/commonjs/index.min.js b/.github/octokit/node_modules/lru-cache/dist/commonjs/index.min.js new file mode 100644 index 000000000..ad643b0ba --- /dev/null +++ b/.github/octokit/node_modules/lru-cache/dist/commonjs/index.min.js @@ -0,0 +1,2 @@ +"use strict";var G=(l,t,e)=>{if(!t.has(l))throw TypeError("Cannot "+e)};var j=(l,t,e)=>(G(l,t,"read from private field"),e?e.call(l):t.get(l)),I=(l,t,e)=>{if(t.has(l))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(l):t.set(l,e)},x=(l,t,e,i)=>(G(l,t,"write to private field"),i?i.call(l,e):t.set(l,e),e);Object.defineProperty(exports,"__esModule",{value:!0});exports.LRUCache=void 0;var T=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,P=new Set,U=typeof process=="object"&&process?process:{},H=(l,t,e,i)=>{typeof U.emitWarning=="function"?U.emitWarning(l,t,e,i):console.error(`[${e}] ${t}: ${l}`)},D=globalThis.AbortController,N=globalThis.AbortSignal;if(typeof D>"u"){N=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,s){this._onabort.push(s)}},D=class{constructor(){t()}signal=new N;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i)}}};let l=U.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{l&&(l=!1,H("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var V=l=>!P.has(l),Y=Symbol("type"),A=l=>l&&l===Math.floor(l)&&l>0&&isFinite(l),k=l=>A(l)?l<=Math.pow(2,8)?Uint8Array:l<=Math.pow(2,16)?Uint16Array:l<=Math.pow(2,32)?Uint32Array:l<=Number.MAX_SAFE_INTEGER?E:null:null,E=class extends Array{constructor(t){super(t),this.fill(0)}},v,O=class{heap;length;static create(t){let e=k(t);if(!e)return[];x(O,v,!0);let i=new O(t,e);return x(O,v,!1),i}constructor(t,e){if(!j(O,v))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},W=O;v=new WeakMap,I(W,v,!1);var C=class{#g;#f;#p;#w;#R;#W;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#S;#s;#i;#t;#l;#c;#o;#h;#_;#r;#b;#m;#u;#y;#E;#a;static unsafeExposeInternals(t){return{starts:t.#m,ttls:t.#u,sizes:t.#b,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#c,get head(){return t.#o},get tail(){return t.#h},free:t.#_,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,n)=>t.#x(e,i,s,n),moveToTail:e=>t.#C(e),indexes:e=>t.#A(e),rindexes:e=>t.#F(e),isStale:e=>t.#d(e)}}get max(){return this.#g}get maxSize(){return this.#f}get calculatedSize(){return this.#S}get size(){return this.#n}get fetchMethod(){return this.#R}get memoMethod(){return this.#W}get dispose(){return this.#p}get disposeAfter(){return this.#w}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:h,updateAgeOnHas:o,allowStale:r,dispose:g,disposeAfter:b,noDisposeOnSet:f,noUpdateTTL:u,maxSize:c=0,maxEntrySize:F=0,sizeCalculation:d,fetchMethod:S,memoMethod:a,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:m,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:_,ignoreFetchAbort:z}=t;if(e!==0&&!A(e))throw new TypeError("max option must be a nonnegative integer");let y=e?k(e):Array;if(!y)throw new Error("invalid max value: "+e);if(this.#g=e,this.#f=c,this.maxEntrySize=F||this.#f,this.sizeCalculation=d,this.sizeCalculation){if(!this.#f&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(a!==void 0&&typeof a!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#W=a,S!==void 0&&typeof S!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#R=S,this.#E=!!S,this.#s=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#l=new y(e),this.#c=new y(e),this.#o=0,this.#h=0,this.#_=W.create(e),this.#n=0,this.#S=0,typeof g=="function"&&(this.#p=g),typeof b=="function"?(this.#w=b,this.#r=[]):(this.#w=void 0,this.#r=void 0),this.#y=!!this.#p,this.#a=!!this.#w,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!w,this.allowStaleOnFetchRejection=!!p,this.allowStaleOnFetchAbort=!!_,this.ignoreFetchAbort=!!z,this.maxEntrySize!==0){if(this.#f!==0&&!A(this.#f))throw new TypeError("maxSize must be a positive integer if specified");if(!A(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#P()}if(this.allowStale=!!r,this.noDeleteOnStaleGet=!!m,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!o,this.ttlResolution=A(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!A(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#U()}if(this.#g===0&&this.ttl===0&&this.#f===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#g&&!this.#f){let R="LRU_CACHE_UNBOUNDED";V(R)&&(P.add(R),H("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",R,C))}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#U(){let t=new E(this.#g),e=new E(this.#g);this.#u=t,this.#m=e,this.#M=(n,h,o=T.now())=>{if(e[n]=h!==0?o:0,t[n]=h,h!==0&&this.ttlAutopurge){let r=setTimeout(()=>{this.#d(n)&&this.#T(this.#i[n],"expire")},h+1);r.unref&&r.unref()}},this.#v=n=>{e[n]=t[n]!==0?T.now():0},this.#O=(n,h)=>{if(t[h]){let o=t[h],r=e[h];if(!o||!r)return;n.ttl=o,n.start=r,n.now=i||s();let g=n.now-r;n.remainingTTL=o-g}};let i=0,s=()=>{let n=T.now();if(this.ttlResolution>0){i=n;let h=setTimeout(()=>i=0,this.ttlResolution);h.unref&&h.unref()}return n};this.getRemainingTTL=n=>{let h=this.#s.get(n);if(h===void 0)return 0;let o=t[h],r=e[h];if(!o||!r)return 1/0;let g=(i||s())-r;return o-g},this.#d=n=>{let h=e[n],o=t[n];return!!o&&!!h&&(i||s())-h>o}}#v=()=>{};#O=()=>{};#M=()=>{};#d=()=>!1;#P(){let t=new E(this.#g);this.#S=0,this.#b=t,this.#z=e=>{this.#S-=t[e],t[e]=0},this.#G=(e,i,s,n)=>{if(this.#e(i))return 0;if(!A(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,e),!A(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#D=(e,i,s)=>{if(t[e]=i,this.#f){let n=this.#f-t[e];for(;this.#S>n;)this.#L(!0)}this.#S+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#S)}}#z=t=>{};#D=(t,e,i)=>{};#G=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#h;!(!this.#j(e)||((t||!this.#d(e))&&(yield e),e===this.#o));)e=this.#c[e]}*#F({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#o;!(!this.#j(e)||((t||!this.#d(e))&&(yield e),e===this.#h));)e=this.#l[e]}#j(t){return t!==void 0&&this.#s.get(this.#i[t])===t}*entries(){for(let t of this.#A())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*rentries(){for(let t of this.#F())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*keys(){for(let t of this.#A()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*rkeys(){for(let t of this.#F()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*values(){for(let t of this.#A())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(let t of this.#F())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;if(n!==void 0&&t(n,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}rforEach(t,e=this){for(let i of this.#F()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}purgeStale(){let t=!1;for(let e of this.#F({allowStale:!0}))this.#d(e)&&(this.#T(this.#i[e],"expire"),t=!0);return t}info(t){let e=this.#s.get(t);if(e===void 0)return;let i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#u&&this.#m){let h=this.#u[e],o=this.#m[e];if(h&&o){let r=h-(T.now()-o);n.ttl=r,n.start=Date.now()}}return this.#b&&(n.size=this.#b[e]),n}dump(){let t=[];for(let e of this.#A({allowStale:!0})){let i=this.#i[e],s=this.#t[e],n=this.#e(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let h={value:n};if(this.#u&&this.#m){h.ttl=this.#u[e];let o=T.now()-this.#m[e];h.start=Math.floor(Date.now()-o)}this.#b&&(h.size=this.#b[e]),t.unshift([i,h])}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=T.now()-s}this.set(e,i.value,i)}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:n,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:r}=i,{noUpdateTTL:g=this.noUpdateTTL}=i,b=this.#G(t,e,i.size||0,o);if(this.maxEntrySize&&b>this.maxEntrySize)return r&&(r.set="miss",r.maxEntrySizeExceeded=!0),this.#T(t,"set"),this;let f=this.#n===0?void 0:this.#s.get(t);if(f===void 0)f=this.#n===0?this.#h:this.#_.length!==0?this.#_.pop():this.#n===this.#g?this.#L(!1):this.#n,this.#i[f]=t,this.#t[f]=e,this.#s.set(t,f),this.#l[this.#h]=f,this.#c[f]=this.#h,this.#h=f,this.#n++,this.#D(f,b,r),r&&(r.set="add"),g=!1;else{this.#C(f);let u=this.#t[f];if(e!==u){if(this.#E&&this.#e(u)){u.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:c}=u;c!==void 0&&!h&&(this.#y&&this.#p?.(c,t,"set"),this.#a&&this.#r?.push([c,t,"set"]))}else h||(this.#y&&this.#p?.(u,t,"set"),this.#a&&this.#r?.push([u,t,"set"]));if(this.#z(f),this.#D(f,b,r),this.#t[f]=e,r){r.set="replace";let c=u&&this.#e(u)?u.__staleWhileFetching:u;c!==void 0&&(r.oldValue=c)}}else r&&(r.set="update")}if(s!==0&&!this.#u&&this.#U(),this.#u&&(g||this.#M(f,s,n),r&&this.#O(r,f)),!h&&this.#a&&this.#r){let u=this.#r,c;for(;c=u?.shift();)this.#w?.(...c)}return this}pop(){try{for(;this.#n;){let t=this.#t[this.#o];if(this.#L(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#a&&this.#r){let t=this.#r,e;for(;e=t?.shift();)this.#w?.(...e)}}}#L(t){let e=this.#o,i=this.#i[e],s=this.#t[e];return this.#E&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#y||this.#a)&&(this.#y&&this.#p?.(s,i,"evict"),this.#a&&this.#r?.push([s,i,"evict"])),this.#z(e),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#_.push(e)),this.#n===1?(this.#o=this.#h=0,this.#_.length=0):this.#o=this.#l[e],this.#s.delete(i),this.#n--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,n=this.#s.get(t);if(n!==void 0){let h=this.#t[n];if(this.#e(h)&&h.__staleWhileFetching===void 0)return!1;if(this.#d(n))s&&(s.has="stale",this.#O(s,n));else return i&&this.#v(n),s&&(s.has="hit",this.#O(s,n)),!0}else s&&(s.has="miss");return!1}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#s.get(t);if(s===void 0||!i&&this.#d(s))return;let n=this.#t[s];return this.#e(n)?n.__staleWhileFetching:n}#x(t,e,i,s){let n=e===void 0?void 0:this.#t[e];if(this.#e(n))return n;let h=new D,{signal:o}=i;o?.addEventListener("abort",()=>h.abort(o.reason),{signal:h.signal});let r={signal:h.signal,options:i,context:s},g=(d,S=!1)=>{let{aborted:a}=h.signal,w=i.ignoreFetchAbort&&d!==void 0;if(i.status&&(a&&!S?(i.status.fetchAborted=!0,i.status.fetchError=h.signal.reason,w&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),a&&!w&&!S)return f(h.signal.reason);let m=c;return this.#t[e]===c&&(d===void 0?m.__staleWhileFetching?this.#t[e]=m.__staleWhileFetching:this.#T(t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(t,d,r.options))),d},b=d=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=d),f(d)),f=d=>{let{aborted:S}=h.signal,a=S&&i.allowStaleOnFetchAbort,w=a||i.allowStaleOnFetchRejection,m=w||i.noDeleteOnFetchRejection,p=c;if(this.#t[e]===c&&(!m||p.__staleWhileFetching===void 0?this.#T(t,"fetch"):a||(this.#t[e]=p.__staleWhileFetching)),w)return i.status&&p.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw d},u=(d,S)=>{let a=this.#R?.(t,n,r);a&&a instanceof Promise&&a.then(w=>d(w===void 0?void 0:w),S),h.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(d(void 0),i.allowStaleOnFetchAbort&&(d=w=>g(w,!0)))})};i.status&&(i.status.fetchDispatched=!0);let c=new Promise(u).then(g,b),F=Object.assign(c,{__abortController:h,__staleWhileFetching:n,__returned:void 0});return e===void 0?(this.set(t,F,{...r.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=F,F}#e(t){if(!this.#E)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof D}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:r=0,sizeCalculation:g=this.sizeCalculation,noUpdateTTL:b=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:c=this.ignoreFetchAbort,allowStaleOnFetchAbort:F=this.allowStaleOnFetchAbort,context:d,forceRefresh:S=!1,status:a,signal:w}=e;if(!this.#E)return a&&(a.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:a});let m={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:h,noDisposeOnSet:o,size:r,sizeCalculation:g,noUpdateTTL:b,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:F,ignoreFetchAbort:c,status:a,signal:w},p=this.#s.get(t);if(p===void 0){a&&(a.fetch="miss");let _=this.#x(t,p,m,d);return _.__returned=_}else{let _=this.#t[p];if(this.#e(_)){let M=i&&_.__staleWhileFetching!==void 0;return a&&(a.fetch="inflight",M&&(a.returnedStale=!0)),M?_.__staleWhileFetching:_.__returned=_}let z=this.#d(p);if(!S&&!z)return a&&(a.fetch="hit"),this.#C(p),s&&this.#v(p),a&&this.#O(a,p),_;let y=this.#x(t,p,m,d),L=y.__staleWhileFetching!==void 0&&i;return a&&(a.fetch=z?"stale":"refresh",L&&z&&(a.returnedStale=!0)),L?y.__staleWhileFetching:y.__returned=y}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){let i=this.#W;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:n,...h}=e,o=this.get(t,h);if(!n&&o!==void 0)return o;let r=i(t,o,{options:h,context:s});return this.set(t,r,h),r}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:h}=e,o=this.#s.get(t);if(o!==void 0){let r=this.#t[o],g=this.#e(r);return h&&this.#O(h,o),this.#d(o)?(h&&(h.get="stale"),g?(h&&i&&r.__staleWhileFetching!==void 0&&(h.returnedStale=!0),i?r.__staleWhileFetching:void 0):(n||this.#T(t,"expire"),h&&i&&(h.returnedStale=!0),i?r:void 0)):(h&&(h.get="hit"),g?r.__staleWhileFetching:(this.#C(o),s&&this.#v(o),r))}else h&&(h.get="miss")}#I(t,e){this.#c[e]=t,this.#l[t]=e}#C(t){t!==this.#h&&(t===this.#o?this.#o=this.#l[t]:this.#I(this.#c[t],this.#l[t]),this.#I(this.#h,t),this.#h=t)}delete(t){return this.#T(t,"delete")}#T(t,e){let i=!1;if(this.#n!==0){let s=this.#s.get(t);if(s!==void 0)if(i=!0,this.#n===1)this.#N(e);else{this.#z(s);let n=this.#t[s];if(this.#e(n)?n.__abortController.abort(new Error("deleted")):(this.#y||this.#a)&&(this.#y&&this.#p?.(n,t,e),this.#a&&this.#r?.push([n,t,e])),this.#s.delete(t),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#h)this.#h=this.#c[s];else if(s===this.#o)this.#o=this.#l[s];else{let h=this.#c[s];this.#l[h]=this.#l[s];let o=this.#l[s];this.#c[o]=this.#c[s]}this.#n--,this.#_.push(s)}}if(this.#a&&this.#r?.length){let s=this.#r,n;for(;n=s?.shift();)this.#w?.(...n)}return i}clear(){return this.#N("delete")}#N(t){for(let e of this.#F({allowStale:!0})){let i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else{let s=this.#i[e];this.#y&&this.#p?.(i,s,t),this.#a&&this.#r?.push([i,s,t])}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#u&&this.#m&&(this.#u.fill(0),this.#m.fill(0)),this.#b&&this.#b.fill(0),this.#o=0,this.#h=0,this.#_.length=0,this.#S=0,this.#n=0,this.#a&&this.#r){let e=this.#r,i;for(;i=e?.shift();)this.#w?.(...i)}}};exports.LRUCache=C; +//# sourceMappingURL=index.min.js.map diff --git a/.github/octokit/node_modules/lru-cache/dist/commonjs/index.min.js.map b/.github/octokit/node_modules/lru-cache/dist/commonjs/index.min.js.map new file mode 100644 index 000000000..11b43a09e --- /dev/null +++ b/.github/octokit/node_modules/lru-cache/dist/commonjs/index.min.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../src/index.ts"], + "sourcesContent": ["/**\n * @module LRUCache\n */\n\n// module-private names and types\ntype Perf = { now: () => number }\nconst perf: Perf =\n typeof performance === 'object' &&\n performance &&\n typeof performance.now === 'function'\n ? performance\n : Date\n\nconst warned = new Set()\n\n// either a function or a class\ntype ForC = ((...a: any[]) => any) | { new (...a: any[]): any }\n\n/* c8 ignore start */\nconst PROCESS = (\n typeof process === 'object' && !!process ? process : {}\n) as { [k: string]: any }\n/* c8 ignore start */\n\nconst emitWarning = (\n msg: string,\n type: string,\n code: string,\n fn: ForC\n) => {\n typeof PROCESS.emitWarning === 'function'\n ? PROCESS.emitWarning(msg, type, code, fn)\n : console.error(`[${code}] ${type}: ${msg}`)\n}\n\nlet AC = globalThis.AbortController\nlet AS = globalThis.AbortSignal\n\n/* c8 ignore start */\nif (typeof AC === 'undefined') {\n //@ts-ignore\n AS = class AbortSignal {\n onabort?: (...a: any[]) => any\n _onabort: ((...a: any[]) => any)[] = []\n reason?: any\n aborted: boolean = false\n addEventListener(_: string, fn: (...a: any[]) => any) {\n this._onabort.push(fn)\n }\n }\n //@ts-ignore\n AC = class AbortController {\n constructor() {\n warnACPolyfill()\n }\n signal = new AS()\n abort(reason: any) {\n if (this.signal.aborted) return\n //@ts-ignore\n this.signal.reason = reason\n //@ts-ignore\n this.signal.aborted = true\n //@ts-ignore\n for (const fn of this.signal._onabort) {\n fn(reason)\n }\n this.signal.onabort?.(reason)\n }\n }\n let printACPolyfillWarning =\n PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'\n const warnACPolyfill = () => {\n if (!printACPolyfillWarning) return\n printACPolyfillWarning = false\n emitWarning(\n 'AbortController is not defined. If using lru-cache in ' +\n 'node 14, load an AbortController polyfill from the ' +\n '`node-abort-controller` package. A minimal polyfill is ' +\n 'provided for use by LRUCache.fetch(), but it should not be ' +\n 'relied upon in other contexts (eg, passing it to other APIs that ' +\n 'use AbortController/AbortSignal might have undesirable effects). ' +\n 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.',\n 'NO_ABORT_CONTROLLER',\n 'ENOTSUP',\n warnACPolyfill\n )\n }\n}\n/* c8 ignore stop */\n\nconst shouldWarn = (code: string) => !warned.has(code)\n\nconst TYPE = Symbol('type')\nexport type PosInt = number & { [TYPE]: 'Positive Integer' }\nexport type Index = number & { [TYPE]: 'LRUCache Index' }\n\nconst isPosInt = (n: any): n is PosInt =>\n n && n === Math.floor(n) && n > 0 && isFinite(n)\n\nexport type UintArray = Uint8Array | Uint16Array | Uint32Array\nexport type NumberArray = UintArray | number[]\n\n/* c8 ignore start */\n// This is a little bit ridiculous, tbh.\n// The maximum array length is 2^32-1 or thereabouts on most JS impls.\n// And well before that point, you're caching the entire world, I mean,\n// that's ~32GB of just integers for the next/prev links, plus whatever\n// else to hold that many keys and values. Just filling the memory with\n// zeroes at init time is brutal when you get that big.\n// But why not be complete?\n// Maybe in the future, these limits will have expanded.\nconst getUintArray = (max: number) =>\n !isPosInt(max)\n ? null\n : max <= Math.pow(2, 8)\n ? Uint8Array\n : max <= Math.pow(2, 16)\n ? Uint16Array\n : max <= Math.pow(2, 32)\n ? Uint32Array\n : max <= Number.MAX_SAFE_INTEGER\n ? ZeroArray\n : null\n/* c8 ignore stop */\n\nclass ZeroArray extends Array {\n constructor(size: number) {\n super(size)\n this.fill(0)\n }\n}\nexport type { ZeroArray }\nexport type { Stack }\n\nexport type StackLike = Stack | Index[]\nclass Stack {\n heap: NumberArray\n length: number\n // private constructor\n static #constructing: boolean = false\n static create(max: number): StackLike {\n const HeapCls = getUintArray(max)\n if (!HeapCls) return []\n Stack.#constructing = true\n const s = new Stack(max, HeapCls)\n Stack.#constructing = false\n return s\n }\n constructor(\n max: number,\n HeapCls: { new (n: number): NumberArray }\n ) {\n /* c8 ignore start */\n if (!Stack.#constructing) {\n throw new TypeError('instantiate Stack using Stack.create(n)')\n }\n /* c8 ignore stop */\n this.heap = new HeapCls(max)\n this.length = 0\n }\n push(n: Index) {\n this.heap[this.length++] = n\n }\n pop(): Index {\n return this.heap[--this.length] as Index\n }\n}\n\n/**\n * Promise representing an in-progress {@link LRUCache#fetch} call\n */\nexport type BackgroundFetch = Promise & {\n __returned: BackgroundFetch | undefined\n __abortController: AbortController\n __staleWhileFetching: V | undefined\n}\n\nexport type DisposeTask = [\n value: V,\n key: K,\n reason: LRUCache.DisposeReason\n]\n\nexport namespace LRUCache {\n /**\n * An integer greater than 0, reflecting the calculated size of items\n */\n export type Size = number\n\n /**\n * Integer greater than 0, representing some number of milliseconds, or the\n * time at which a TTL started counting from.\n */\n export type Milliseconds = number\n\n /**\n * An integer greater than 0, reflecting a number of items\n */\n export type Count = number\n\n /**\n * The reason why an item was removed from the cache, passed\n * to the {@link Disposer} methods.\n *\n * - `evict`: The item was evicted because it is the least recently used,\n * and the cache is full.\n * - `set`: A new value was set, overwriting the old value being disposed.\n * - `delete`: The item was explicitly deleted, either by calling\n * {@link LRUCache#delete}, {@link LRUCache#clear}, or\n * {@link LRUCache#set} with an undefined value.\n * - `expire`: The item was removed due to exceeding its TTL.\n * - `fetch`: A {@link OptionsBase#fetchMethod} operation returned\n * `undefined` or was aborted, causing the item to be deleted.\n */\n export type DisposeReason =\n | 'evict'\n | 'set'\n | 'delete'\n | 'expire'\n | 'fetch'\n /**\n * A method called upon item removal, passed as the\n * {@link OptionsBase.dispose} and/or\n * {@link OptionsBase.disposeAfter} options.\n */\n export type Disposer = (\n value: V,\n key: K,\n reason: DisposeReason\n ) => void\n\n /**\n * A function that returns the effective calculated size\n * of an entry in the cache.\n */\n export type SizeCalculator = (value: V, key: K) => Size\n\n /**\n * Options provided to the\n * {@link OptionsBase.fetchMethod} function.\n */\n export interface FetcherOptions {\n signal: AbortSignal\n options: FetcherFetchOptions\n /**\n * Object provided in the {@link FetchOptions.context} option to\n * {@link LRUCache#fetch}\n */\n context: FC\n }\n\n /**\n * Occasionally, it may be useful to track the internal behavior of the\n * cache, particularly for logging, debugging, or for behavior within the\n * `fetchMethod`. To do this, you can pass a `status` object to the\n * {@link LRUCache#fetch}, {@link LRUCache#get}, {@link LRUCache#set},\n * {@link LRUCache#memo}, and {@link LRUCache#has} methods.\n *\n * The `status` option should be a plain JavaScript object. The following\n * fields will be set on it appropriately, depending on the situation.\n */\n export interface Status {\n /**\n * The status of a set() operation.\n *\n * - add: the item was not found in the cache, and was added\n * - update: the item was in the cache, with the same value provided\n * - replace: the item was in the cache, and replaced\n * - miss: the item was not added to the cache for some reason\n */\n set?: 'add' | 'update' | 'replace' | 'miss'\n\n /**\n * the ttl stored for the item, or undefined if ttls are not used.\n */\n ttl?: Milliseconds\n\n /**\n * the start time for the item, or undefined if ttls are not used.\n */\n start?: Milliseconds\n\n /**\n * The timestamp used for TTL calculation\n */\n now?: Milliseconds\n\n /**\n * the remaining ttl for the item, or undefined if ttls are not used.\n */\n remainingTTL?: Milliseconds\n\n /**\n * The calculated size for the item, if sizes are used.\n */\n entrySize?: Size\n\n /**\n * The total calculated size of the cache, if sizes are used.\n */\n totalCalculatedSize?: Size\n\n /**\n * A flag indicating that the item was not stored, due to exceeding the\n * {@link OptionsBase.maxEntrySize}\n */\n maxEntrySizeExceeded?: true\n\n /**\n * The old value, specified in the case of `set:'update'` or\n * `set:'replace'`\n */\n oldValue?: V\n\n /**\n * The results of a {@link LRUCache#has} operation\n *\n * - hit: the item was found in the cache\n * - stale: the item was found in the cache, but is stale\n * - miss: the item was not found in the cache\n */\n has?: 'hit' | 'stale' | 'miss'\n\n /**\n * The status of a {@link LRUCache#fetch} operation.\n * Note that this can change as the underlying fetch() moves through\n * various states.\n *\n * - inflight: there is another fetch() for this key which is in process\n * - get: there is no {@link OptionsBase.fetchMethod}, so\n * {@link LRUCache#get} was called.\n * - miss: the item is not in cache, and will be fetched.\n * - hit: the item is in the cache, and was resolved immediately.\n * - stale: the item is in the cache, but stale.\n * - refresh: the item is in the cache, and not stale, but\n * {@link FetchOptions.forceRefresh} was specified.\n */\n fetch?: 'get' | 'inflight' | 'miss' | 'hit' | 'stale' | 'refresh'\n\n /**\n * The {@link OptionsBase.fetchMethod} was called\n */\n fetchDispatched?: true\n\n /**\n * The cached value was updated after a successful call to\n * {@link OptionsBase.fetchMethod}\n */\n fetchUpdated?: true\n\n /**\n * The reason for a fetch() rejection. Either the error raised by the\n * {@link OptionsBase.fetchMethod}, or the reason for an\n * AbortSignal.\n */\n fetchError?: Error\n\n /**\n * The fetch received an abort signal\n */\n fetchAborted?: true\n\n /**\n * The abort signal received was ignored, and the fetch was allowed to\n * continue.\n */\n fetchAbortIgnored?: true\n\n /**\n * The fetchMethod promise resolved successfully\n */\n fetchResolved?: true\n\n /**\n * The fetchMethod promise was rejected\n */\n fetchRejected?: true\n\n /**\n * The status of a {@link LRUCache#get} operation.\n *\n * - fetching: The item is currently being fetched. If a previous value\n * is present and allowed, that will be returned.\n * - stale: The item is in the cache, and is stale.\n * - hit: the item is in the cache\n * - miss: the item is not in the cache\n */\n get?: 'stale' | 'hit' | 'miss'\n\n /**\n * A fetch or get operation returned a stale value.\n */\n returnedStale?: true\n }\n\n /**\n * options which override the options set in the LRUCache constructor\n * when calling {@link LRUCache#fetch}.\n *\n * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n * {@link OptionsBase.noDeleteOnFetchRejection},\n * {@link OptionsBase.allowStaleOnFetchRejection},\n * {@link FetchOptions.forceRefresh}, and\n * {@link FetcherOptions.context}\n *\n * Any of these may be modified in the {@link OptionsBase.fetchMethod}\n * function, but the {@link GetOptions} fields will of course have no\n * effect, as the {@link LRUCache#get} call already happened by the time\n * the fetchMethod is called.\n */\n export interface FetcherFetchOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n | 'noDeleteOnFetchRejection'\n | 'allowStaleOnFetchRejection'\n | 'ignoreFetchAbort'\n | 'allowStaleOnFetchAbort'\n > {\n status?: Status\n size?: Size\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#fetch} method.\n */\n export interface FetchOptions\n extends FetcherFetchOptions {\n /**\n * Set to true to force a re-load of the existing data, even if it\n * is not yet stale.\n */\n forceRefresh?: boolean\n /**\n * Context provided to the {@link OptionsBase.fetchMethod} as\n * the {@link FetcherOptions.context} param.\n *\n * If the FC type is specified as unknown (the default),\n * undefined or void, then this is optional. Otherwise, it will\n * be required.\n */\n context?: FC\n signal?: AbortSignal\n status?: Status\n }\n /**\n * Options provided to {@link LRUCache#fetch} when the FC type is something\n * other than `unknown`, `undefined`, or `void`\n */\n export interface FetchOptionsWithContext\n extends FetchOptions {\n context: FC\n }\n /**\n * Options provided to {@link LRUCache#fetch} when the FC type is\n * `undefined` or `void`\n */\n export interface FetchOptionsNoContext\n extends FetchOptions {\n context?: undefined\n }\n\n export interface MemoOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n | 'noDeleteOnFetchRejection'\n | 'allowStaleOnFetchRejection'\n | 'ignoreFetchAbort'\n | 'allowStaleOnFetchAbort'\n > {\n /**\n * Set to true to force a re-load of the existing data, even if it\n * is not yet stale.\n */\n forceRefresh?: boolean\n /**\n * Context provided to the {@link OptionsBase.memoMethod} as\n * the {@link MemoizerOptions.context} param.\n *\n * If the FC type is specified as unknown (the default),\n * undefined or void, then this is optional. Otherwise, it will\n * be required.\n */\n context?: FC\n status?: Status\n }\n /**\n * Options provided to {@link LRUCache#memo} when the FC type is something\n * other than `unknown`, `undefined`, or `void`\n */\n export interface MemoOptionsWithContext\n extends MemoOptions {\n context: FC\n }\n /**\n * Options provided to {@link LRUCache#memo} when the FC type is\n * `undefined` or `void`\n */\n export interface MemoOptionsNoContext\n extends MemoOptions {\n context?: undefined\n }\n\n /**\n * Options provided to the\n * {@link OptionsBase.memoMethod} function.\n */\n export interface MemoizerOptions {\n options: MemoizerMemoOptions\n /**\n * Object provided in the {@link MemoOptions.context} option to\n * {@link LRUCache#memo}\n */\n context: FC\n }\n\n /**\n * options which override the options set in the LRUCache constructor\n * when calling {@link LRUCache#memo}.\n *\n * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n * {@link MemoOptions.forceRefresh}, and\n * {@link MemoerOptions.context}\n *\n * Any of these may be modified in the {@link OptionsBase.memoMethod}\n * function, but the {@link GetOptions} fields will of course have no\n * effect, as the {@link LRUCache#get} call already happened by the time\n * the memoMethod is called.\n */\n export interface MemoizerMemoOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n > {\n status?: Status\n size?: Size\n start?: Milliseconds\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#has} method.\n */\n export interface HasOptions\n extends Pick, 'updateAgeOnHas'> {\n status?: Status\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#get} method.\n */\n export interface GetOptions\n extends Pick<\n OptionsBase,\n 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet'\n > {\n status?: Status\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#peek} method.\n */\n export interface PeekOptions\n extends Pick, 'allowStale'> {}\n\n /**\n * Options that may be passed to the {@link LRUCache#set} method.\n */\n export interface SetOptions\n extends Pick<\n OptionsBase,\n 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'\n > {\n /**\n * If size tracking is enabled, then setting an explicit size\n * in the {@link LRUCache#set} call will prevent calling the\n * {@link OptionsBase.sizeCalculation} function.\n */\n size?: Size\n /**\n * If TTL tracking is enabled, then setting an explicit start\n * time in the {@link LRUCache#set} call will override the\n * default time from `performance.now()` or `Date.now()`.\n *\n * Note that it must be a valid value for whichever time-tracking\n * method is in use.\n */\n start?: Milliseconds\n status?: Status\n }\n\n /**\n * The type signature for the {@link OptionsBase.fetchMethod} option.\n */\n export type Fetcher = (\n key: K,\n staleValue: V | undefined,\n options: FetcherOptions\n ) => Promise | V | undefined | void\n\n /**\n * the type signature for the {@link OptionsBase.memoMethod} option.\n */\n export type Memoizer = (\n key: K,\n staleValue: V | undefined,\n options: MemoizerOptions\n ) => V\n\n /**\n * Options which may be passed to the {@link LRUCache} constructor.\n *\n * Most of these may be overridden in the various options that use\n * them.\n *\n * Despite all being technically optional, the constructor requires that\n * a cache is at minimum limited by one or more of {@link OptionsBase.max},\n * {@link OptionsBase.ttl}, or {@link OptionsBase.maxSize}.\n *\n * If {@link OptionsBase.ttl} is used alone, then it is strongly advised\n * (and in fact required by the type definitions here) that the cache\n * also set {@link OptionsBase.ttlAutopurge}, to prevent potentially\n * unbounded storage.\n *\n * All options are also available on the {@link LRUCache} instance, making\n * it safe to pass an LRUCache instance as the options argumemnt to\n * make another empty cache of the same type.\n *\n * Some options are marked as read-only, because changing them after\n * instantiation is not safe. Changing any of the other options will of\n * course only have an effect on subsequent method calls.\n */\n export interface OptionsBase {\n /**\n * The maximum number of items to store in the cache before evicting\n * old entries. This is read-only on the {@link LRUCache} instance,\n * and may not be overridden.\n *\n * If set, then storage space will be pre-allocated at construction\n * time, and the cache will perform significantly faster.\n *\n * Note that significantly fewer items may be stored, if\n * {@link OptionsBase.maxSize} and/or {@link OptionsBase.ttl} are also\n * set.\n *\n * **It is strongly recommended to set a `max` to prevent unbounded growth\n * of the cache.**\n */\n max?: Count\n\n /**\n * Max time in milliseconds for items to live in cache before they are\n * considered stale. Note that stale items are NOT preemptively removed by\n * default, and MAY live in the cache, contributing to its LRU max, long\n * after they have expired, unless {@link OptionsBase.ttlAutopurge} is\n * set.\n *\n * If set to `0` (the default value), then that means \"do not track\n * TTL\", not \"expire immediately\".\n *\n * Also, as this cache is optimized for LRU/MRU operations, some of\n * the staleness/TTL checks will reduce performance, as they will incur\n * overhead by deleting items.\n *\n * This is not primarily a TTL cache, and does not make strong TTL\n * guarantees. There is no pre-emptive pruning of expired items, but you\n * _may_ set a TTL on the cache, and it will treat expired items as missing\n * when they are fetched, and delete them.\n *\n * Optional, but must be a non-negative integer in ms if specified.\n *\n * This may be overridden by passing an options object to `cache.set()`.\n *\n * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n * positive integer if set.\n *\n * Even if ttl tracking is enabled, **it is strongly recommended to set a\n * `max` to prevent unbounded growth of the cache.**\n *\n * If ttl tracking is enabled, and `max` and `maxSize` are not set,\n * and `ttlAutopurge` is not set, then a warning will be emitted\n * cautioning about the potential for unbounded memory consumption.\n * (The TypeScript definitions will also discourage this.)\n */\n ttl?: Milliseconds\n\n /**\n * Minimum amount of time in ms in which to check for staleness.\n * Defaults to 1, which means that the current time is checked\n * at most once per millisecond.\n *\n * Set to 0 to check the current time every time staleness is tested.\n * (This reduces performance, and is theoretically unnecessary.)\n *\n * Setting this to a higher value will improve performance somewhat\n * while using ttl tracking, albeit at the expense of keeping stale\n * items around a bit longer than their TTLs would indicate.\n *\n * @default 1\n */\n ttlResolution?: Milliseconds\n\n /**\n * Preemptively remove stale items from the cache.\n *\n * Note that this may *significantly* degrade performance, especially if\n * the cache is storing a large number of items. It is almost always best\n * to just leave the stale items in the cache, and let them fall out as new\n * items are added.\n *\n * Note that this means that {@link OptionsBase.allowStale} is a bit\n * pointless, as stale items will be deleted almost as soon as they\n * expire.\n *\n * Use with caution!\n */\n ttlAutopurge?: boolean\n\n /**\n * When using time-expiring entries with `ttl`, setting this to `true` will\n * make each item's age reset to 0 whenever it is retrieved from cache with\n * {@link LRUCache#get}, causing it to not expire. (It can still fall out\n * of cache based on recency of use, of course.)\n *\n * Has no effect if {@link OptionsBase.ttl} is not set.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n */\n updateAgeOnGet?: boolean\n\n /**\n * When using time-expiring entries with `ttl`, setting this to `true` will\n * make each item's age reset to 0 whenever its presence in the cache is\n * checked with {@link LRUCache#has}, causing it to not expire. (It can\n * still fall out of cache based on recency of use, of course.)\n *\n * Has no effect if {@link OptionsBase.ttl} is not set.\n */\n updateAgeOnHas?: boolean\n\n /**\n * Allow {@link LRUCache#get} and {@link LRUCache#fetch} calls to return\n * stale data, if available.\n *\n * By default, if you set `ttl`, stale items will only be deleted from the\n * cache when you `get(key)`. That is, it's not preemptively pruning items,\n * unless {@link OptionsBase.ttlAutopurge} is set.\n *\n * If you set `allowStale:true`, it'll return the stale value *as well as*\n * deleting it. If you don't set this, then it'll return `undefined` when\n * you try to get a stale entry.\n *\n * Note that when a stale entry is fetched, _even if it is returned due to\n * `allowStale` being set_, it is removed from the cache immediately. You\n * can suppress this behavior by setting\n * {@link OptionsBase.noDeleteOnStaleGet}, either in the constructor, or in\n * the options provided to {@link LRUCache#get}.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n * The `cache.has()` method will always return `false` for stale items.\n *\n * Only relevant if a ttl is set.\n */\n allowStale?: boolean\n\n /**\n * Function that is called on items when they are dropped from the\n * cache, as `dispose(value, key, reason)`.\n *\n * This can be handy if you want to close file descriptors or do\n * other cleanup tasks when items are no longer stored in the cache.\n *\n * **NOTE**: It is called _before_ the item has been fully removed\n * from the cache, so if you want to put it right back in, you need\n * to wait until the next tick. If you try to add it back in during\n * the `dispose()` function call, it will break things in subtle and\n * weird ways.\n *\n * Unlike several other options, this may _not_ be overridden by\n * passing an option to `set()`, for performance reasons.\n *\n * The `reason` will be one of the following strings, corresponding\n * to the reason for the item's deletion:\n *\n * - `evict` Item was evicted to make space for a new addition\n * - `set` Item was overwritten by a new value\n * - `expire` Item expired its TTL\n * - `fetch` Item was deleted due to a failed or aborted fetch, or a\n * fetchMethod returning `undefined.\n * - `delete` Item was removed by explicit `cache.delete(key)`,\n * `cache.clear()`, or `cache.set(key, undefined)`.\n */\n dispose?: Disposer\n\n /**\n * The same as {@link OptionsBase.dispose}, but called *after* the entry\n * is completely removed and the cache is once again in a clean state.\n *\n * It is safe to add an item right back into the cache at this point.\n * However, note that it is *very* easy to inadvertently create infinite\n * recursion this way.\n */\n disposeAfter?: Disposer\n\n /**\n * Set to true to suppress calling the\n * {@link OptionsBase.dispose} function if the entry key is\n * still accessible within the cache.\n *\n * This may be overridden by passing an options object to\n * {@link LRUCache#set}.\n *\n * Only relevant if `dispose` or `disposeAfter` are set.\n */\n noDisposeOnSet?: boolean\n\n /**\n * Boolean flag to tell the cache to not update the TTL when setting a new\n * value for an existing key (ie, when updating a value rather than\n * inserting a new value). Note that the TTL value is _always_ set (if\n * provided) when adding a new entry into the cache.\n *\n * Has no effect if a {@link OptionsBase.ttl} is not set.\n *\n * May be passed as an option to {@link LRUCache#set}.\n */\n noUpdateTTL?: boolean\n\n /**\n * Set to a positive integer to track the sizes of items added to the\n * cache, and automatically evict items in order to stay below this size.\n * Note that this may result in fewer than `max` items being stored.\n *\n * Attempting to add an item to the cache whose calculated size is greater\n * that this amount will be a no-op. The item will not be cached, and no\n * other items will be evicted.\n *\n * Optional, must be a positive integer if provided.\n *\n * Sets `maxEntrySize` to the same value, unless a different value is\n * provided for `maxEntrySize`.\n *\n * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n * positive integer if set.\n *\n * Even if size tracking is enabled, **it is strongly recommended to set a\n * `max` to prevent unbounded growth of the cache.**\n *\n * Note also that size tracking can negatively impact performance,\n * though for most cases, only minimally.\n */\n maxSize?: Size\n\n /**\n * The maximum allowed size for any single item in the cache.\n *\n * If a larger item is passed to {@link LRUCache#set} or returned by a\n * {@link OptionsBase.fetchMethod} or {@link OptionsBase.memoMethod}, then\n * it will not be stored in the cache.\n *\n * Attempting to add an item whose calculated size is greater than\n * this amount will not cache the item or evict any old items, but\n * WILL delete an existing value if one is already present.\n *\n * Optional, must be a positive integer if provided. Defaults to\n * the value of `maxSize` if provided.\n */\n maxEntrySize?: Size\n\n /**\n * A function that returns a number indicating the item's size.\n *\n * Requires {@link OptionsBase.maxSize} to be set.\n *\n * If not provided, and {@link OptionsBase.maxSize} or\n * {@link OptionsBase.maxEntrySize} are set, then all\n * {@link LRUCache#set} calls **must** provide an explicit\n * {@link SetOptions.size} or sizeCalculation param.\n */\n sizeCalculation?: SizeCalculator\n\n /**\n * Method that provides the implementation for {@link LRUCache#fetch}\n *\n * ```ts\n * fetchMethod(key, staleValue, { signal, options, context })\n * ```\n *\n * If `fetchMethod` is not provided, then `cache.fetch(key)` is equivalent\n * to `Promise.resolve(cache.get(key))`.\n *\n * If at any time, `signal.aborted` is set to `true`, or if the\n * `signal.onabort` method is called, or if it emits an `'abort'` event\n * which you can listen to with `addEventListener`, then that means that\n * the fetch should be abandoned. This may be passed along to async\n * functions aware of AbortController/AbortSignal behavior.\n *\n * The `fetchMethod` should **only** return `undefined` or a Promise\n * resolving to `undefined` if the AbortController signaled an `abort`\n * event. In all other cases, it should return or resolve to a value\n * suitable for adding to the cache.\n *\n * The `options` object is a union of the options that may be provided to\n * `set()` and `get()`. If they are modified, then that will result in\n * modifying the settings to `cache.set()` when the value is resolved, and\n * in the case of\n * {@link OptionsBase.noDeleteOnFetchRejection} and\n * {@link OptionsBase.allowStaleOnFetchRejection}, the handling of\n * `fetchMethod` failures.\n *\n * For example, a DNS cache may update the TTL based on the value returned\n * from a remote DNS server by changing `options.ttl` in the `fetchMethod`.\n */\n fetchMethod?: Fetcher\n\n /**\n * Method that provides the implementation for {@link LRUCache#memo}\n */\n memoMethod?: Memoizer\n\n /**\n * Set to true to suppress the deletion of stale data when a\n * {@link OptionsBase.fetchMethod} returns a rejected promise.\n */\n noDeleteOnFetchRejection?: boolean\n\n /**\n * Do not delete stale items when they are retrieved with\n * {@link LRUCache#get}.\n *\n * Note that the `get` return value will still be `undefined`\n * unless {@link OptionsBase.allowStale} is true.\n *\n * When using time-expiring entries with `ttl`, by default stale\n * items will be removed from the cache when the key is accessed\n * with `cache.get()`.\n *\n * Setting this option will cause stale items to remain in the cache, until\n * they are explicitly deleted with `cache.delete(key)`, or retrieved with\n * `noDeleteOnStaleGet` set to `false`.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n *\n * Only relevant if a ttl is used.\n */\n noDeleteOnStaleGet?: boolean\n\n /**\n * Set to true to allow returning stale data when a\n * {@link OptionsBase.fetchMethod} throws an error or returns a rejected\n * promise.\n *\n * This differs from using {@link OptionsBase.allowStale} in that stale\n * data will ONLY be returned in the case that the {@link LRUCache#fetch}\n * fails, not any other times.\n *\n * If a `fetchMethod` fails, and there is no stale value available, the\n * `fetch()` will resolve to `undefined`. Ie, all `fetchMethod` errors are\n * suppressed.\n *\n * Implies `noDeleteOnFetchRejection`.\n *\n * This may be set in calls to `fetch()`, or defaulted on the constructor,\n * or overridden by modifying the options object in the `fetchMethod`.\n */\n allowStaleOnFetchRejection?: boolean\n\n /**\n * Set to true to return a stale value from the cache when the\n * `AbortSignal` passed to the {@link OptionsBase.fetchMethod} dispatches\n * an `'abort'` event, whether user-triggered, or due to internal cache\n * behavior.\n *\n * Unless {@link OptionsBase.ignoreFetchAbort} is also set, the underlying\n * {@link OptionsBase.fetchMethod} will still be considered canceled, and\n * any value it returns will be ignored and not cached.\n *\n * Caveat: since fetches are aborted when a new value is explicitly\n * set in the cache, this can lead to fetch returning a stale value,\n * since that was the fallback value _at the moment the `fetch()` was\n * initiated_, even though the new updated value is now present in\n * the cache.\n *\n * For example:\n *\n * ```ts\n * const cache = new LRUCache({\n * ttl: 100,\n * fetchMethod: async (url, oldValue, { signal }) => {\n * const res = await fetch(url, { signal })\n * return await res.json()\n * }\n * })\n * cache.set('https://example.com/', { some: 'data' })\n * // 100ms go by...\n * const result = cache.fetch('https://example.com/')\n * cache.set('https://example.com/', { other: 'thing' })\n * console.log(await result) // { some: 'data' }\n * console.log(cache.get('https://example.com/')) // { other: 'thing' }\n * ```\n */\n allowStaleOnFetchAbort?: boolean\n\n /**\n * Set to true to ignore the `abort` event emitted by the `AbortSignal`\n * object passed to {@link OptionsBase.fetchMethod}, and still cache the\n * resulting resolution value, as long as it is not `undefined`.\n *\n * When used on its own, this means aborted {@link LRUCache#fetch} calls\n * are not immediately resolved or rejected when they are aborted, and\n * instead take the full time to await.\n *\n * When used with {@link OptionsBase.allowStaleOnFetchAbort}, aborted\n * {@link LRUCache#fetch} calls will resolve immediately to their stale\n * cached value or `undefined`, and will continue to process and eventually\n * update the cache when they resolve, as long as the resulting value is\n * not `undefined`, thus supporting a \"return stale on timeout while\n * refreshing\" mechanism by passing `AbortSignal.timeout(n)` as the signal.\n *\n * For example:\n *\n * ```ts\n * const c = new LRUCache({\n * ttl: 100,\n * ignoreFetchAbort: true,\n * allowStaleOnFetchAbort: true,\n * fetchMethod: async (key, oldValue, { signal }) => {\n * // note: do NOT pass the signal to fetch()!\n * // let's say this fetch can take a long time.\n * const res = await fetch(`https://slow-backend-server/${key}`)\n * return await res.json()\n * },\n * })\n *\n * // this will return the stale value after 100ms, while still\n * // updating in the background for next time.\n * const val = await c.fetch('key', { signal: AbortSignal.timeout(100) })\n * ```\n *\n * **Note**: regardless of this setting, an `abort` event _is still\n * emitted on the `AbortSignal` object_, so may result in invalid results\n * when passed to other underlying APIs that use AbortSignals.\n *\n * This may be overridden in the {@link OptionsBase.fetchMethod} or the\n * call to {@link LRUCache#fetch}.\n */\n ignoreFetchAbort?: boolean\n }\n\n export interface OptionsMaxLimit\n extends OptionsBase {\n max: Count\n }\n export interface OptionsTTLLimit\n extends OptionsBase {\n ttl: Milliseconds\n ttlAutopurge: boolean\n }\n export interface OptionsSizeLimit\n extends OptionsBase {\n maxSize: Size\n }\n\n /**\n * The valid safe options for the {@link LRUCache} constructor\n */\n export type Options =\n | OptionsMaxLimit\n | OptionsSizeLimit\n | OptionsTTLLimit\n\n /**\n * Entry objects used by {@link LRUCache#load} and {@link LRUCache#dump},\n * and returned by {@link LRUCache#info}.\n */\n export interface Entry {\n value: V\n ttl?: Milliseconds\n size?: Size\n start?: Milliseconds\n }\n}\n\n/**\n * Default export, the thing you're using this module to get.\n *\n * The `K` and `V` types define the key and value types, respectively. The\n * optional `FC` type defines the type of the `context` object passed to\n * `cache.fetch()` and `cache.memo()`.\n *\n * Keys and values **must not** be `null` or `undefined`.\n *\n * All properties from the options object (with the exception of `max`,\n * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are\n * added as normal public members. (The listed options are read-only getters.)\n *\n * Changing any of these will alter the defaults for subsequent method calls.\n */\nexport class LRUCache\n implements Map\n{\n // options that cannot be changed without disaster\n readonly #max: LRUCache.Count\n readonly #maxSize: LRUCache.Size\n readonly #dispose?: LRUCache.Disposer\n readonly #disposeAfter?: LRUCache.Disposer\n readonly #fetchMethod?: LRUCache.Fetcher\n readonly #memoMethod?: LRUCache.Memoizer\n\n /**\n * {@link LRUCache.OptionsBase.ttl}\n */\n ttl: LRUCache.Milliseconds\n\n /**\n * {@link LRUCache.OptionsBase.ttlResolution}\n */\n ttlResolution: LRUCache.Milliseconds\n /**\n * {@link LRUCache.OptionsBase.ttlAutopurge}\n */\n ttlAutopurge: boolean\n /**\n * {@link LRUCache.OptionsBase.updateAgeOnGet}\n */\n updateAgeOnGet: boolean\n /**\n * {@link LRUCache.OptionsBase.updateAgeOnHas}\n */\n updateAgeOnHas: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStale}\n */\n allowStale: boolean\n\n /**\n * {@link LRUCache.OptionsBase.noDisposeOnSet}\n */\n noDisposeOnSet: boolean\n /**\n * {@link LRUCache.OptionsBase.noUpdateTTL}\n */\n noUpdateTTL: boolean\n /**\n * {@link LRUCache.OptionsBase.maxEntrySize}\n */\n maxEntrySize: LRUCache.Size\n /**\n * {@link LRUCache.OptionsBase.sizeCalculation}\n */\n sizeCalculation?: LRUCache.SizeCalculator\n /**\n * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}\n */\n noDeleteOnFetchRejection: boolean\n /**\n * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}\n */\n noDeleteOnStaleGet: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}\n */\n allowStaleOnFetchAbort: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}\n */\n allowStaleOnFetchRejection: boolean\n /**\n * {@link LRUCache.OptionsBase.ignoreFetchAbort}\n */\n ignoreFetchAbort: boolean\n\n // computed properties\n #size: LRUCache.Count\n #calculatedSize: LRUCache.Size\n #keyMap: Map\n #keyList: (K | undefined)[]\n #valList: (V | BackgroundFetch | undefined)[]\n #next: NumberArray\n #prev: NumberArray\n #head: Index\n #tail: Index\n #free: StackLike\n #disposed?: DisposeTask[]\n #sizes?: ZeroArray\n #starts?: ZeroArray\n #ttls?: ZeroArray\n\n #hasDispose: boolean\n #hasFetchMethod: boolean\n #hasDisposeAfter: boolean\n\n /**\n * Do not call this method unless you need to inspect the\n * inner workings of the cache. If anything returned by this\n * object is modified in any way, strange breakage may occur.\n *\n * These fields are private for a reason!\n *\n * @internal\n */\n static unsafeExposeInternals<\n K extends {},\n V extends {},\n FC extends unknown = unknown\n >(c: LRUCache) {\n return {\n // properties\n starts: c.#starts,\n ttls: c.#ttls,\n sizes: c.#sizes,\n keyMap: c.#keyMap as Map,\n keyList: c.#keyList,\n valList: c.#valList,\n next: c.#next,\n prev: c.#prev,\n get head() {\n return c.#head\n },\n get tail() {\n return c.#tail\n },\n free: c.#free,\n // methods\n isBackgroundFetch: (p: any) => c.#isBackgroundFetch(p),\n backgroundFetch: (\n k: K,\n index: number | undefined,\n options: LRUCache.FetchOptions,\n context: any\n ): BackgroundFetch =>\n c.#backgroundFetch(\n k,\n index as Index | undefined,\n options,\n context\n ),\n moveToTail: (index: number): void =>\n c.#moveToTail(index as Index),\n indexes: (options?: { allowStale: boolean }) =>\n c.#indexes(options),\n rindexes: (options?: { allowStale: boolean }) =>\n c.#rindexes(options),\n isStale: (index: number | undefined) =>\n c.#isStale(index as Index),\n }\n }\n\n // Protected read-only members\n\n /**\n * {@link LRUCache.OptionsBase.max} (read-only)\n */\n get max(): LRUCache.Count {\n return this.#max\n }\n /**\n * {@link LRUCache.OptionsBase.maxSize} (read-only)\n */\n get maxSize(): LRUCache.Count {\n return this.#maxSize\n }\n /**\n * The total computed size of items in the cache (read-only)\n */\n get calculatedSize(): LRUCache.Size {\n return this.#calculatedSize\n }\n /**\n * The number of items stored in the cache (read-only)\n */\n get size(): LRUCache.Count {\n return this.#size\n }\n /**\n * {@link LRUCache.OptionsBase.fetchMethod} (read-only)\n */\n get fetchMethod(): LRUCache.Fetcher | undefined {\n return this.#fetchMethod\n }\n get memoMethod(): LRUCache.Memoizer | undefined {\n return this.#memoMethod\n }\n /**\n * {@link LRUCache.OptionsBase.dispose} (read-only)\n */\n get dispose() {\n return this.#dispose\n }\n /**\n * {@link LRUCache.OptionsBase.disposeAfter} (read-only)\n */\n get disposeAfter() {\n return this.#disposeAfter\n }\n\n constructor(\n options: LRUCache.Options | LRUCache\n ) {\n const {\n max = 0,\n ttl,\n ttlResolution = 1,\n ttlAutopurge,\n updateAgeOnGet,\n updateAgeOnHas,\n allowStale,\n dispose,\n disposeAfter,\n noDisposeOnSet,\n noUpdateTTL,\n maxSize = 0,\n maxEntrySize = 0,\n sizeCalculation,\n fetchMethod,\n memoMethod,\n noDeleteOnFetchRejection,\n noDeleteOnStaleGet,\n allowStaleOnFetchRejection,\n allowStaleOnFetchAbort,\n ignoreFetchAbort,\n } = options\n\n if (max !== 0 && !isPosInt(max)) {\n throw new TypeError('max option must be a nonnegative integer')\n }\n\n const UintArray = max ? getUintArray(max) : Array\n if (!UintArray) {\n throw new Error('invalid max value: ' + max)\n }\n\n this.#max = max\n this.#maxSize = maxSize\n this.maxEntrySize = maxEntrySize || this.#maxSize\n this.sizeCalculation = sizeCalculation\n if (this.sizeCalculation) {\n if (!this.#maxSize && !this.maxEntrySize) {\n throw new TypeError(\n 'cannot set sizeCalculation without setting maxSize or maxEntrySize'\n )\n }\n if (typeof this.sizeCalculation !== 'function') {\n throw new TypeError('sizeCalculation set to non-function')\n }\n }\n\n if (\n memoMethod !== undefined &&\n typeof memoMethod !== 'function'\n ) {\n throw new TypeError('memoMethod must be a function if defined')\n }\n this.#memoMethod = memoMethod\n\n if (\n fetchMethod !== undefined &&\n typeof fetchMethod !== 'function'\n ) {\n throw new TypeError(\n 'fetchMethod must be a function if specified'\n )\n }\n this.#fetchMethod = fetchMethod\n this.#hasFetchMethod = !!fetchMethod\n\n this.#keyMap = new Map()\n this.#keyList = new Array(max).fill(undefined)\n this.#valList = new Array(max).fill(undefined)\n this.#next = new UintArray(max)\n this.#prev = new UintArray(max)\n this.#head = 0 as Index\n this.#tail = 0 as Index\n this.#free = Stack.create(max)\n this.#size = 0\n this.#calculatedSize = 0\n\n if (typeof dispose === 'function') {\n this.#dispose = dispose\n }\n if (typeof disposeAfter === 'function') {\n this.#disposeAfter = disposeAfter\n this.#disposed = []\n } else {\n this.#disposeAfter = undefined\n this.#disposed = undefined\n }\n this.#hasDispose = !!this.#dispose\n this.#hasDisposeAfter = !!this.#disposeAfter\n\n this.noDisposeOnSet = !!noDisposeOnSet\n this.noUpdateTTL = !!noUpdateTTL\n this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection\n this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection\n this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort\n this.ignoreFetchAbort = !!ignoreFetchAbort\n\n // NB: maxEntrySize is set to maxSize if it's set\n if (this.maxEntrySize !== 0) {\n if (this.#maxSize !== 0) {\n if (!isPosInt(this.#maxSize)) {\n throw new TypeError(\n 'maxSize must be a positive integer if specified'\n )\n }\n }\n if (!isPosInt(this.maxEntrySize)) {\n throw new TypeError(\n 'maxEntrySize must be a positive integer if specified'\n )\n }\n this.#initializeSizeTracking()\n }\n\n this.allowStale = !!allowStale\n this.noDeleteOnStaleGet = !!noDeleteOnStaleGet\n this.updateAgeOnGet = !!updateAgeOnGet\n this.updateAgeOnHas = !!updateAgeOnHas\n this.ttlResolution =\n isPosInt(ttlResolution) || ttlResolution === 0\n ? ttlResolution\n : 1\n this.ttlAutopurge = !!ttlAutopurge\n this.ttl = ttl || 0\n if (this.ttl) {\n if (!isPosInt(this.ttl)) {\n throw new TypeError(\n 'ttl must be a positive integer if specified'\n )\n }\n this.#initializeTTLTracking()\n }\n\n // do not allow completely unbounded caches\n if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {\n throw new TypeError(\n 'At least one of max, maxSize, or ttl is required'\n )\n }\n if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {\n const code = 'LRU_CACHE_UNBOUNDED'\n if (shouldWarn(code)) {\n warned.add(code)\n const msg =\n 'TTL caching without ttlAutopurge, max, or maxSize can ' +\n 'result in unbounded memory consumption.'\n emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache)\n }\n }\n }\n\n /**\n * Return the number of ms left in the item's TTL. If item is not in cache,\n * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.\n */\n getRemainingTTL(key: K) {\n return this.#keyMap.has(key) ? Infinity : 0\n }\n\n #initializeTTLTracking() {\n const ttls = new ZeroArray(this.#max)\n const starts = new ZeroArray(this.#max)\n this.#ttls = ttls\n this.#starts = starts\n\n this.#setItemTTL = (index, ttl, start = perf.now()) => {\n starts[index] = ttl !== 0 ? start : 0\n ttls[index] = ttl\n if (ttl !== 0 && this.ttlAutopurge) {\n const t = setTimeout(() => {\n if (this.#isStale(index)) {\n this.#delete(this.#keyList[index] as K, 'expire')\n }\n }, ttl + 1)\n // unref() not supported on all platforms\n /* c8 ignore start */\n if (t.unref) {\n t.unref()\n }\n /* c8 ignore stop */\n }\n }\n\n this.#updateItemAge = index => {\n starts[index] = ttls[index] !== 0 ? perf.now() : 0\n }\n\n this.#statusTTL = (status, index) => {\n if (ttls[index]) {\n const ttl = ttls[index]\n const start = starts[index]\n /* c8 ignore next */\n if (!ttl || !start) return\n status.ttl = ttl\n status.start = start\n status.now = cachedNow || getNow()\n const age = status.now - start\n status.remainingTTL = ttl - age\n }\n }\n\n // debounce calls to perf.now() to 1s so we're not hitting\n // that costly call repeatedly.\n let cachedNow = 0\n const getNow = () => {\n const n = perf.now()\n if (this.ttlResolution > 0) {\n cachedNow = n\n const t = setTimeout(\n () => (cachedNow = 0),\n this.ttlResolution\n )\n // not available on all platforms\n /* c8 ignore start */\n if (t.unref) {\n t.unref()\n }\n /* c8 ignore stop */\n }\n return n\n }\n\n this.getRemainingTTL = key => {\n const index = this.#keyMap.get(key)\n if (index === undefined) {\n return 0\n }\n const ttl = ttls[index]\n const start = starts[index]\n if (!ttl || !start) {\n return Infinity\n }\n const age = (cachedNow || getNow()) - start\n return ttl - age\n }\n\n this.#isStale = index => {\n const s = starts[index]\n const t = ttls[index]\n return !!t && !!s && (cachedNow || getNow()) - s > t\n }\n }\n\n // conditionally set private methods related to TTL\n #updateItemAge: (index: Index) => void = () => {}\n #statusTTL: (status: LRUCache.Status, index: Index) => void =\n () => {}\n #setItemTTL: (\n index: Index,\n ttl: LRUCache.Milliseconds,\n start?: LRUCache.Milliseconds\n // ignore because we never call this if we're not already in TTL mode\n /* c8 ignore start */\n ) => void = () => {}\n /* c8 ignore stop */\n\n #isStale: (index: Index) => boolean = () => false\n\n #initializeSizeTracking() {\n const sizes = new ZeroArray(this.#max)\n this.#calculatedSize = 0\n this.#sizes = sizes\n this.#removeItemSize = index => {\n this.#calculatedSize -= sizes[index] as number\n sizes[index] = 0\n }\n this.#requireSize = (k, v, size, sizeCalculation) => {\n // provisionally accept background fetches.\n // actual value size will be checked when they return.\n if (this.#isBackgroundFetch(v)) {\n return 0\n }\n if (!isPosInt(size)) {\n if (sizeCalculation) {\n if (typeof sizeCalculation !== 'function') {\n throw new TypeError('sizeCalculation must be a function')\n }\n size = sizeCalculation(v, k)\n if (!isPosInt(size)) {\n throw new TypeError(\n 'sizeCalculation return invalid (expect positive integer)'\n )\n }\n } else {\n throw new TypeError(\n 'invalid size value (must be positive integer). ' +\n 'When maxSize or maxEntrySize is used, sizeCalculation ' +\n 'or size must be set.'\n )\n }\n }\n return size\n }\n this.#addItemSize = (\n index: Index,\n size: LRUCache.Size,\n status?: LRUCache.Status\n ) => {\n sizes[index] = size\n if (this.#maxSize) {\n const maxSize = this.#maxSize - (sizes[index] as number)\n while (this.#calculatedSize > maxSize) {\n this.#evict(true)\n }\n }\n this.#calculatedSize += sizes[index] as number\n if (status) {\n status.entrySize = size\n status.totalCalculatedSize = this.#calculatedSize\n }\n }\n }\n\n #removeItemSize: (index: Index) => void = _i => {}\n #addItemSize: (\n index: Index,\n size: LRUCache.Size,\n status?: LRUCache.Status\n ) => void = (_i, _s, _st) => {}\n #requireSize: (\n k: K,\n v: V | BackgroundFetch,\n size?: LRUCache.Size,\n sizeCalculation?: LRUCache.SizeCalculator\n ) => LRUCache.Size = (\n _k: K,\n _v: V | BackgroundFetch,\n size?: LRUCache.Size,\n sizeCalculation?: LRUCache.SizeCalculator\n ) => {\n if (size || sizeCalculation) {\n throw new TypeError(\n 'cannot set size without setting maxSize or maxEntrySize on cache'\n )\n }\n return 0\n };\n\n *#indexes({ allowStale = this.allowStale } = {}) {\n if (this.#size) {\n for (let i = this.#tail; true; ) {\n if (!this.#isValidIndex(i)) {\n break\n }\n if (allowStale || !this.#isStale(i)) {\n yield i\n }\n if (i === this.#head) {\n break\n } else {\n i = this.#prev[i] as Index\n }\n }\n }\n }\n\n *#rindexes({ allowStale = this.allowStale } = {}) {\n if (this.#size) {\n for (let i = this.#head; true; ) {\n if (!this.#isValidIndex(i)) {\n break\n }\n if (allowStale || !this.#isStale(i)) {\n yield i\n }\n if (i === this.#tail) {\n break\n } else {\n i = this.#next[i] as Index\n }\n }\n }\n }\n\n #isValidIndex(index: Index) {\n return (\n index !== undefined &&\n this.#keyMap.get(this.#keyList[index] as K) === index\n )\n }\n\n /**\n * Return a generator yielding `[key, value]` pairs,\n * in order from most recently used to least recently used.\n */\n *entries() {\n for (const i of this.#indexes()) {\n if (\n this.#valList[i] !== undefined &&\n this.#keyList[i] !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield [this.#keyList[i], this.#valList[i]] as [K, V]\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.entries}\n *\n * Return a generator yielding `[key, value]` pairs,\n * in order from least recently used to most recently used.\n */\n *rentries() {\n for (const i of this.#rindexes()) {\n if (\n this.#valList[i] !== undefined &&\n this.#keyList[i] !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield [this.#keyList[i], this.#valList[i]]\n }\n }\n }\n\n /**\n * Return a generator yielding the keys in the cache,\n * in order from most recently used to least recently used.\n */\n *keys() {\n for (const i of this.#indexes()) {\n const k = this.#keyList[i]\n if (\n k !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield k\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.keys}\n *\n * Return a generator yielding the keys in the cache,\n * in order from least recently used to most recently used.\n */\n *rkeys() {\n for (const i of this.#rindexes()) {\n const k = this.#keyList[i]\n if (\n k !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield k\n }\n }\n }\n\n /**\n * Return a generator yielding the values in the cache,\n * in order from most recently used to least recently used.\n */\n *values() {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n if (\n v !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield this.#valList[i] as V\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.values}\n *\n * Return a generator yielding the values in the cache,\n * in order from least recently used to most recently used.\n */\n *rvalues() {\n for (const i of this.#rindexes()) {\n const v = this.#valList[i]\n if (\n v !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield this.#valList[i]\n }\n }\n }\n\n /**\n * Iterating over the cache itself yields the same results as\n * {@link LRUCache.entries}\n */\n [Symbol.iterator]() {\n return this.entries()\n }\n\n /**\n * A String value that is used in the creation of the default string\n * description of an object. Called by the built-in method\n * `Object.prototype.toString`.\n */\n [Symbol.toStringTag] = 'LRUCache'\n\n /**\n * Find a value for which the supplied fn method returns a truthy value,\n * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.\n */\n find(\n fn: (v: V, k: K, self: LRUCache) => boolean,\n getOptions: LRUCache.GetOptions = {}\n ) {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n if (fn(value, this.#keyList[i] as K, this)) {\n return this.get(this.#keyList[i] as K, getOptions)\n }\n }\n }\n\n /**\n * Call the supplied function on each item in the cache, in order from most\n * recently used to least recently used.\n *\n * `fn` is called as `fn(value, key, cache)`.\n *\n * If `thisp` is provided, function will be called in the `this`-context of\n * the provided object, or the cache if no `thisp` object is provided.\n *\n * Does not update age or recenty of use, or iterate over stale values.\n */\n forEach(\n fn: (v: V, k: K, self: LRUCache) => any,\n thisp: any = this\n ) {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n fn.call(thisp, value, this.#keyList[i] as K, this)\n }\n }\n\n /**\n * The same as {@link LRUCache.forEach} but items are iterated over in\n * reverse order. (ie, less recently used items are iterated over first.)\n */\n rforEach(\n fn: (v: V, k: K, self: LRUCache) => any,\n thisp: any = this\n ) {\n for (const i of this.#rindexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n fn.call(thisp, value, this.#keyList[i] as K, this)\n }\n }\n\n /**\n * Delete any stale entries. Returns true if anything was removed,\n * false otherwise.\n */\n purgeStale() {\n let deleted = false\n for (const i of this.#rindexes({ allowStale: true })) {\n if (this.#isStale(i)) {\n this.#delete(this.#keyList[i] as K, 'expire')\n deleted = true\n }\n }\n return deleted\n }\n\n /**\n * Get the extended info about a given entry, to get its value, size, and\n * TTL info simultaneously. Returns `undefined` if the key is not present.\n *\n * Unlike {@link LRUCache#dump}, which is designed to be portable and survive\n * serialization, the `start` value is always the current timestamp, and the\n * `ttl` is a calculated remaining time to live (negative if expired).\n *\n * Always returns stale values, if their info is found in the cache, so be\n * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})\n * if relevant.\n */\n info(key: K): LRUCache.Entry | undefined {\n const i = this.#keyMap.get(key)\n if (i === undefined) return undefined\n const v = this.#valList[i]\n const value: V | undefined = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) return undefined\n const entry: LRUCache.Entry = { value }\n if (this.#ttls && this.#starts) {\n const ttl = this.#ttls[i]\n const start = this.#starts[i]\n if (ttl && start) {\n const remain = ttl - (perf.now() - start)\n entry.ttl = remain\n entry.start = Date.now()\n }\n }\n if (this.#sizes) {\n entry.size = this.#sizes[i]\n }\n return entry\n }\n\n /**\n * Return an array of [key, {@link LRUCache.Entry}] tuples which can be\n * passed to {@link LRLUCache#load}.\n *\n * The `start` fields are calculated relative to a portable `Date.now()`\n * timestamp, even if `performance.now()` is available.\n *\n * Stale entries are always included in the `dump`, even if\n * {@link LRUCache.OptionsBase.allowStale} is false.\n *\n * Note: this returns an actual array, not a generator, so it can be more\n * easily passed around.\n */\n dump() {\n const arr: [K, LRUCache.Entry][] = []\n for (const i of this.#indexes({ allowStale: true })) {\n const key = this.#keyList[i]\n const v = this.#valList[i]\n const value: V | undefined = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined || key === undefined) continue\n const entry: LRUCache.Entry = { value }\n if (this.#ttls && this.#starts) {\n entry.ttl = this.#ttls[i]\n // always dump the start relative to a portable timestamp\n // it's ok for this to be a bit slow, it's a rare operation.\n const age = perf.now() - (this.#starts[i] as number)\n entry.start = Math.floor(Date.now() - age)\n }\n if (this.#sizes) {\n entry.size = this.#sizes[i]\n }\n arr.unshift([key, entry])\n }\n return arr\n }\n\n /**\n * Reset the cache and load in the items in entries in the order listed.\n *\n * The shape of the resulting cache may be different if the same options are\n * not used in both caches.\n *\n * The `start` fields are assumed to be calculated relative to a portable\n * `Date.now()` timestamp, even if `performance.now()` is available.\n */\n load(arr: [K, LRUCache.Entry][]) {\n this.clear()\n for (const [key, entry] of arr) {\n if (entry.start) {\n // entry.start is a portable timestamp, but we may be using\n // node's performance.now(), so calculate the offset, so that\n // we get the intended remaining TTL, no matter how long it's\n // been on ice.\n //\n // it's ok for this to be a bit slow, it's a rare operation.\n const age = Date.now() - entry.start\n entry.start = perf.now() - age\n }\n this.set(key, entry.value, entry)\n }\n }\n\n /**\n * Add a value to the cache.\n *\n * Note: if `undefined` is specified as a value, this is an alias for\n * {@link LRUCache#delete}\n *\n * Fields on the {@link LRUCache.SetOptions} options param will override\n * their corresponding values in the constructor options for the scope\n * of this single `set()` operation.\n *\n * If `start` is provided, then that will set the effective start\n * time for the TTL calculation. Note that this must be a previous\n * value of `performance.now()` if supported, or a previous value of\n * `Date.now()` if not.\n *\n * Options object may also include `size`, which will prevent\n * calling the `sizeCalculation` function and just use the specified\n * number if it is a positive integer, and `noDisposeOnSet` which\n * will prevent calling a `dispose` function in the case of\n * overwrites.\n *\n * If the `size` (or return value of `sizeCalculation`) for a given\n * entry is greater than `maxEntrySize`, then the item will not be\n * added to the cache.\n *\n * Will update the recency of the entry.\n *\n * If the value is `undefined`, then this is an alias for\n * `cache.delete(key)`. `undefined` is never stored in the cache.\n */\n set(\n k: K,\n v: V | BackgroundFetch | undefined,\n setOptions: LRUCache.SetOptions = {}\n ) {\n if (v === undefined) {\n this.delete(k)\n return this\n }\n const {\n ttl = this.ttl,\n start,\n noDisposeOnSet = this.noDisposeOnSet,\n sizeCalculation = this.sizeCalculation,\n status,\n } = setOptions\n let { noUpdateTTL = this.noUpdateTTL } = setOptions\n\n const size = this.#requireSize(\n k,\n v,\n setOptions.size || 0,\n sizeCalculation\n )\n // if the item doesn't fit, don't do anything\n // NB: maxEntrySize set to maxSize by default\n if (this.maxEntrySize && size > this.maxEntrySize) {\n if (status) {\n status.set = 'miss'\n status.maxEntrySizeExceeded = true\n }\n // have to delete, in case something is there already.\n this.#delete(k, 'set')\n return this\n }\n let index = this.#size === 0 ? undefined : this.#keyMap.get(k)\n if (index === undefined) {\n // addition\n index = (\n this.#size === 0\n ? this.#tail\n : this.#free.length !== 0\n ? this.#free.pop()\n : this.#size === this.#max\n ? this.#evict(false)\n : this.#size\n ) as Index\n this.#keyList[index] = k\n this.#valList[index] = v\n this.#keyMap.set(k, index)\n this.#next[this.#tail] = index\n this.#prev[index] = this.#tail\n this.#tail = index\n this.#size++\n this.#addItemSize(index, size, status)\n if (status) status.set = 'add'\n noUpdateTTL = false\n } else {\n // update\n this.#moveToTail(index)\n const oldVal = this.#valList[index] as V | BackgroundFetch\n if (v !== oldVal) {\n if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {\n oldVal.__abortController.abort(new Error('replaced'))\n const { __staleWhileFetching: s } = oldVal\n if (s !== undefined && !noDisposeOnSet) {\n if (this.#hasDispose) {\n this.#dispose?.(s as V, k, 'set')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([s as V, k, 'set'])\n }\n }\n } else if (!noDisposeOnSet) {\n if (this.#hasDispose) {\n this.#dispose?.(oldVal as V, k, 'set')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([oldVal as V, k, 'set'])\n }\n }\n this.#removeItemSize(index)\n this.#addItemSize(index, size, status)\n this.#valList[index] = v\n if (status) {\n status.set = 'replace'\n const oldValue =\n oldVal && this.#isBackgroundFetch(oldVal)\n ? oldVal.__staleWhileFetching\n : oldVal\n if (oldValue !== undefined) status.oldValue = oldValue\n }\n } else if (status) {\n status.set = 'update'\n }\n }\n if (ttl !== 0 && !this.#ttls) {\n this.#initializeTTLTracking()\n }\n if (this.#ttls) {\n if (!noUpdateTTL) {\n this.#setItemTTL(index, ttl, start)\n }\n if (status) this.#statusTTL(status, index)\n }\n if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n return this\n }\n\n /**\n * Evict the least recently used item, returning its value or\n * `undefined` if cache is empty.\n */\n pop(): V | undefined {\n try {\n while (this.#size) {\n const val = this.#valList[this.#head]\n this.#evict(true)\n if (this.#isBackgroundFetch(val)) {\n if (val.__staleWhileFetching) {\n return val.__staleWhileFetching\n }\n } else if (val !== undefined) {\n return val\n }\n }\n } finally {\n if (this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n }\n }\n\n #evict(free: boolean) {\n const head = this.#head\n const k = this.#keyList[head] as K\n const v = this.#valList[head] as V\n if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('evicted'))\n } else if (this.#hasDispose || this.#hasDisposeAfter) {\n if (this.#hasDispose) {\n this.#dispose?.(v, k, 'evict')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v, k, 'evict'])\n }\n }\n this.#removeItemSize(head)\n // if we aren't about to use the index, then null these out\n if (free) {\n this.#keyList[head] = undefined\n this.#valList[head] = undefined\n this.#free.push(head)\n }\n if (this.#size === 1) {\n this.#head = this.#tail = 0 as Index\n this.#free.length = 0\n } else {\n this.#head = this.#next[head] as Index\n }\n this.#keyMap.delete(k)\n this.#size--\n return head\n }\n\n /**\n * Check if a key is in the cache, without updating the recency of use.\n * Will return false if the item is stale, even though it is technically\n * in the cache.\n *\n * Check if a key is in the cache, without updating the recency of\n * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set\n * to `true` in either the options or the constructor.\n *\n * Will return `false` if the item is stale, even though it is technically in\n * the cache. The difference can be determined (if it matters) by using a\n * `status` argument, and inspecting the `has` field.\n *\n * Will not update item age unless\n * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.\n */\n has(k: K, hasOptions: LRUCache.HasOptions = {}) {\n const { updateAgeOnHas = this.updateAgeOnHas, status } =\n hasOptions\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n const v = this.#valList[index]\n if (\n this.#isBackgroundFetch(v) &&\n v.__staleWhileFetching === undefined\n ) {\n return false\n }\n if (!this.#isStale(index)) {\n if (updateAgeOnHas) {\n this.#updateItemAge(index)\n }\n if (status) {\n status.has = 'hit'\n this.#statusTTL(status, index)\n }\n return true\n } else if (status) {\n status.has = 'stale'\n this.#statusTTL(status, index)\n }\n } else if (status) {\n status.has = 'miss'\n }\n return false\n }\n\n /**\n * Like {@link LRUCache#get} but doesn't update recency or delete stale\n * items.\n *\n * Returns `undefined` if the item is stale, unless\n * {@link LRUCache.OptionsBase.allowStale} is set.\n */\n peek(k: K, peekOptions: LRUCache.PeekOptions = {}) {\n const { allowStale = this.allowStale } = peekOptions\n const index = this.#keyMap.get(k)\n if (\n index === undefined ||\n (!allowStale && this.#isStale(index))\n ) {\n return\n }\n const v = this.#valList[index]\n // either stale and allowed, or forcing a refresh of non-stale value\n return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v\n }\n\n #backgroundFetch(\n k: K,\n index: Index | undefined,\n options: LRUCache.FetchOptions,\n context: any\n ): BackgroundFetch {\n const v = index === undefined ? undefined : this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n return v\n }\n\n const ac = new AC()\n const { signal } = options\n // when/if our AC signals, then stop listening to theirs.\n signal?.addEventListener('abort', () => ac.abort(signal.reason), {\n signal: ac.signal,\n })\n\n const fetchOpts = {\n signal: ac.signal,\n options,\n context,\n }\n\n const cb = (\n v: V | undefined,\n updateCache = false\n ): V | undefined => {\n const { aborted } = ac.signal\n const ignoreAbort = options.ignoreFetchAbort && v !== undefined\n if (options.status) {\n if (aborted && !updateCache) {\n options.status.fetchAborted = true\n options.status.fetchError = ac.signal.reason\n if (ignoreAbort) options.status.fetchAbortIgnored = true\n } else {\n options.status.fetchResolved = true\n }\n }\n if (aborted && !ignoreAbort && !updateCache) {\n return fetchFail(ac.signal.reason)\n }\n // either we didn't abort, and are still here, or we did, and ignored\n const bf = p as BackgroundFetch\n if (this.#valList[index as Index] === p) {\n if (v === undefined) {\n if (bf.__staleWhileFetching) {\n this.#valList[index as Index] = bf.__staleWhileFetching\n } else {\n this.#delete(k, 'fetch')\n }\n } else {\n if (options.status) options.status.fetchUpdated = true\n this.set(k, v, fetchOpts.options)\n }\n }\n return v\n }\n\n const eb = (er: any) => {\n if (options.status) {\n options.status.fetchRejected = true\n options.status.fetchError = er\n }\n return fetchFail(er)\n }\n\n const fetchFail = (er: any): V | undefined => {\n const { aborted } = ac.signal\n const allowStaleAborted =\n aborted && options.allowStaleOnFetchAbort\n const allowStale =\n allowStaleAborted || options.allowStaleOnFetchRejection\n const noDelete = allowStale || options.noDeleteOnFetchRejection\n const bf = p as BackgroundFetch\n if (this.#valList[index as Index] === p) {\n // if we allow stale on fetch rejections, then we need to ensure that\n // the stale value is not removed from the cache when the fetch fails.\n const del = !noDelete || bf.__staleWhileFetching === undefined\n if (del) {\n this.#delete(k, 'fetch')\n } else if (!allowStaleAborted) {\n // still replace the *promise* with the stale value,\n // since we are done with the promise at this point.\n // leave it untouched if we're still waiting for an\n // aborted background fetch that hasn't yet returned.\n this.#valList[index as Index] = bf.__staleWhileFetching\n }\n }\n if (allowStale) {\n if (options.status && bf.__staleWhileFetching !== undefined) {\n options.status.returnedStale = true\n }\n return bf.__staleWhileFetching\n } else if (bf.__returned === bf) {\n throw er\n }\n }\n\n const pcall = (\n res: (v: V | undefined) => void,\n rej: (e: any) => void\n ) => {\n const fmp = this.#fetchMethod?.(k, v, fetchOpts)\n if (fmp && fmp instanceof Promise) {\n fmp.then(v => res(v === undefined ? undefined : v), rej)\n }\n // ignored, we go until we finish, regardless.\n // defer check until we are actually aborting,\n // so fetchMethod can override.\n ac.signal.addEventListener('abort', () => {\n if (\n !options.ignoreFetchAbort ||\n options.allowStaleOnFetchAbort\n ) {\n res(undefined)\n // when it eventually resolves, update the cache.\n if (options.allowStaleOnFetchAbort) {\n res = v => cb(v, true)\n }\n }\n })\n }\n\n if (options.status) options.status.fetchDispatched = true\n const p = new Promise(pcall).then(cb, eb)\n const bf: BackgroundFetch = Object.assign(p, {\n __abortController: ac,\n __staleWhileFetching: v,\n __returned: undefined,\n })\n\n if (index === undefined) {\n // internal, don't expose status.\n this.set(k, bf, { ...fetchOpts.options, status: undefined })\n index = this.#keyMap.get(k)\n } else {\n this.#valList[index] = bf\n }\n return bf\n }\n\n #isBackgroundFetch(p: any): p is BackgroundFetch {\n if (!this.#hasFetchMethod) return false\n const b = p as BackgroundFetch\n return (\n !!b &&\n b instanceof Promise &&\n b.hasOwnProperty('__staleWhileFetching') &&\n b.__abortController instanceof AC\n )\n }\n\n /**\n * Make an asynchronous cached fetch using the\n * {@link LRUCache.OptionsBase.fetchMethod} function.\n *\n * If the value is in the cache and not stale, then the returned\n * Promise resolves to the value.\n *\n * If not in the cache, or beyond its TTL staleness, then\n * `fetchMethod(key, staleValue, { options, signal, context })` is\n * called, and the value returned will be added to the cache once\n * resolved.\n *\n * If called with `allowStale`, and an asynchronous fetch is\n * currently in progress to reload a stale value, then the former\n * stale value will be returned.\n *\n * If called with `forceRefresh`, then the cached item will be\n * re-fetched, even if it is not stale. However, if `allowStale` is also\n * set, then the old value will still be returned. This is useful\n * in cases where you want to force a reload of a cached value. If\n * a background fetch is already in progress, then `forceRefresh`\n * has no effect.\n *\n * If multiple fetches for the same key are issued, then they will all be\n * coalesced into a single call to fetchMethod.\n *\n * Note that this means that handling options such as\n * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort},\n * {@link LRUCache.FetchOptions.signal},\n * and {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} will be\n * determined by the FIRST fetch() call for a given key.\n *\n * This is a known (fixable) shortcoming which will be addresed on when\n * someone complains about it, as the fix would involve added complexity and\n * may not be worth the costs for this edge case.\n *\n * If {@link LRUCache.OptionsBase.fetchMethod} is not specified, then this is\n * effectively an alias for `Promise.resolve(cache.get(key))`.\n *\n * When the fetch method resolves to a value, if the fetch has not\n * been aborted due to deletion, eviction, or being overwritten,\n * then it is added to the cache using the options provided.\n *\n * If the key is evicted or deleted before the `fetchMethod`\n * resolves, then the AbortSignal passed to the `fetchMethod` will\n * receive an `abort` event, and the promise returned by `fetch()`\n * will reject with the reason for the abort.\n *\n * If a `signal` is passed to the `fetch()` call, then aborting the\n * signal will abort the fetch and cause the `fetch()` promise to\n * reject with the reason provided.\n *\n * **Setting `context`**\n *\n * If an `FC` type is set to a type other than `unknown`, `void`, or\n * `undefined` in the {@link LRUCache} constructor, then all\n * calls to `cache.fetch()` _must_ provide a `context` option. If\n * set to `undefined` or `void`, then calls to fetch _must not_\n * provide a `context` option.\n *\n * The `context` param allows you to provide arbitrary data that\n * might be relevant in the course of fetching the data. It is only\n * relevant for the course of a single `fetch()` operation, and\n * discarded afterwards.\n *\n * **Note: `fetch()` calls are inflight-unique**\n *\n * If you call `fetch()` multiple times with the same key value,\n * then every call after the first will resolve on the same\n * promise1,\n * _even if they have different settings that would otherwise change\n * the behavior of the fetch_, such as `noDeleteOnFetchRejection`\n * or `ignoreFetchAbort`.\n *\n * In most cases, this is not a problem (in fact, only fetching\n * something once is what you probably want, if you're caching in\n * the first place). If you are changing the fetch() options\n * dramatically between runs, there's a good chance that you might\n * be trying to fit divergent semantics into a single object, and\n * would be better off with multiple cache instances.\n *\n * **1**: Ie, they're not the \"same Promise\", but they resolve at\n * the same time, because they're both waiting on the same\n * underlying fetchMethod response.\n */\n\n fetch(\n k: K,\n fetchOptions: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n ): Promise\n\n // this overload not allowed if context is required\n fetch(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n fetchOptions?: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : never\n ): Promise\n\n async fetch(\n k: K,\n fetchOptions: LRUCache.FetchOptions = {}\n ): Promise {\n const {\n // get options\n allowStale = this.allowStale,\n updateAgeOnGet = this.updateAgeOnGet,\n noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n // set options\n ttl = this.ttl,\n noDisposeOnSet = this.noDisposeOnSet,\n size = 0,\n sizeCalculation = this.sizeCalculation,\n noUpdateTTL = this.noUpdateTTL,\n // fetch exclusive options\n noDeleteOnFetchRejection = this.noDeleteOnFetchRejection,\n allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,\n ignoreFetchAbort = this.ignoreFetchAbort,\n allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,\n context,\n forceRefresh = false,\n status,\n signal,\n } = fetchOptions\n\n if (!this.#hasFetchMethod) {\n if (status) status.fetch = 'get'\n return this.get(k, {\n allowStale,\n updateAgeOnGet,\n noDeleteOnStaleGet,\n status,\n })\n }\n\n const options = {\n allowStale,\n updateAgeOnGet,\n noDeleteOnStaleGet,\n ttl,\n noDisposeOnSet,\n size,\n sizeCalculation,\n noUpdateTTL,\n noDeleteOnFetchRejection,\n allowStaleOnFetchRejection,\n allowStaleOnFetchAbort,\n ignoreFetchAbort,\n status,\n signal,\n }\n\n let index = this.#keyMap.get(k)\n if (index === undefined) {\n if (status) status.fetch = 'miss'\n const p = this.#backgroundFetch(k, index, options, context)\n return (p.__returned = p)\n } else {\n // in cache, maybe already fetching\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n const stale =\n allowStale && v.__staleWhileFetching !== undefined\n if (status) {\n status.fetch = 'inflight'\n if (stale) status.returnedStale = true\n }\n return stale ? v.__staleWhileFetching : (v.__returned = v)\n }\n\n // if we force a refresh, that means do NOT serve the cached value,\n // unless we are already in the process of refreshing the cache.\n const isStale = this.#isStale(index)\n if (!forceRefresh && !isStale) {\n if (status) status.fetch = 'hit'\n this.#moveToTail(index)\n if (updateAgeOnGet) {\n this.#updateItemAge(index)\n }\n if (status) this.#statusTTL(status, index)\n return v\n }\n\n // ok, it is stale or a forced refresh, and not already fetching.\n // refresh the cache.\n const p = this.#backgroundFetch(k, index, options, context)\n const hasStale = p.__staleWhileFetching !== undefined\n const staleVal = hasStale && allowStale\n if (status) {\n status.fetch = isStale ? 'stale' : 'refresh'\n if (staleVal && isStale) status.returnedStale = true\n }\n return staleVal ? p.__staleWhileFetching : (p.__returned = p)\n }\n }\n\n /**\n * In some cases, `cache.fetch()` may resolve to `undefined`, either because\n * a {@link LRUCache.OptionsBase#fetchMethod} was not provided (turning\n * `cache.fetch(k)` into just an async wrapper around `cache.get(k)`) or\n * because `ignoreFetchAbort` was specified (either to the constructor or\n * in the {@link LRUCache.FetchOptions}). Also, the\n * {@link OptionsBase.fetchMethod} may return `undefined` or `void`, making\n * the test even more complicated.\n *\n * Because inferring the cases where `undefined` might be returned are so\n * cumbersome, but testing for `undefined` can also be annoying, this method\n * can be used, which will reject if `this.fetch()` resolves to undefined.\n */\n forceFetch(\n k: K,\n fetchOptions: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n ): Promise\n // this overload not allowed if context is required\n forceFetch(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n fetchOptions?: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : never\n ): Promise\n async forceFetch(\n k: K,\n fetchOptions: LRUCache.FetchOptions = {}\n ): Promise {\n const v = await this.fetch(\n k,\n fetchOptions as unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n )\n if (v === undefined) throw new Error('fetch() returned undefined')\n return v\n }\n\n /**\n * If the key is found in the cache, then this is equivalent to\n * {@link LRUCache#get}. If not, in the cache, then calculate the value using\n * the {@link LRUCache.OptionsBase.memoMethod}, and add it to the cache.\n *\n * If an `FC` type is set to a type other than `unknown`, `void`, or\n * `undefined` in the LRUCache constructor, then all calls to `cache.memo()`\n * _must_ provide a `context` option. If set to `undefined` or `void`, then\n * calls to memo _must not_ provide a `context` option.\n *\n * The `context` param allows you to provide arbitrary data that might be\n * relevant in the course of fetching the data. It is only relevant for the\n * course of a single `memo()` operation, and discarded afterwards.\n */\n memo(\n k: K,\n memoOptions: unknown extends FC\n ? LRUCache.MemoOptions\n : FC extends undefined | void\n ? LRUCache.MemoOptionsNoContext\n : LRUCache.MemoOptionsWithContext\n ): V\n // this overload not allowed if context is required\n memo(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n memoOptions?: unknown extends FC\n ? LRUCache.MemoOptions\n : FC extends undefined | void\n ? LRUCache.MemoOptionsNoContext\n : never\n ): V\n memo(k: K, memoOptions: LRUCache.MemoOptions = {}) {\n const memoMethod = this.#memoMethod\n if (!memoMethod) {\n throw new Error('no memoMethod provided to constructor')\n }\n const { context, forceRefresh, ...options } = memoOptions\n const v = this.get(k, options)\n if (!forceRefresh && v !== undefined) return v\n const vv = memoMethod(k, v, {\n options,\n context,\n } as LRUCache.MemoizerOptions)\n this.set(k, vv, options)\n return vv\n }\n\n /**\n * Return a value from the cache. Will update the recency of the cache\n * entry found.\n *\n * If the key is not found, get() will return `undefined`.\n */\n get(k: K, getOptions: LRUCache.GetOptions = {}) {\n const {\n allowStale = this.allowStale,\n updateAgeOnGet = this.updateAgeOnGet,\n noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n status,\n } = getOptions\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n const value = this.#valList[index]\n const fetching = this.#isBackgroundFetch(value)\n if (status) this.#statusTTL(status, index)\n if (this.#isStale(index)) {\n if (status) status.get = 'stale'\n // delete only if not an in-flight background fetch\n if (!fetching) {\n if (!noDeleteOnStaleGet) {\n this.#delete(k, 'expire')\n }\n if (status && allowStale) status.returnedStale = true\n return allowStale ? value : undefined\n } else {\n if (\n status &&\n allowStale &&\n value.__staleWhileFetching !== undefined\n ) {\n status.returnedStale = true\n }\n return allowStale ? value.__staleWhileFetching : undefined\n }\n } else {\n if (status) status.get = 'hit'\n // if we're currently fetching it, we don't actually have it yet\n // it's not stale, which means this isn't a staleWhileRefetching.\n // If it's not stale, and fetching, AND has a __staleWhileFetching\n // value, then that means the user fetched with {forceRefresh:true},\n // so it's safe to return that value.\n if (fetching) {\n return value.__staleWhileFetching\n }\n this.#moveToTail(index)\n if (updateAgeOnGet) {\n this.#updateItemAge(index)\n }\n return value\n }\n } else if (status) {\n status.get = 'miss'\n }\n }\n\n #connect(p: Index, n: Index) {\n this.#prev[n] = p\n this.#next[p] = n\n }\n\n #moveToTail(index: Index): void {\n // if tail already, nothing to do\n // if head, move head to next[index]\n // else\n // move next[prev[index]] to next[index] (head has no prev)\n // move prev[next[index]] to prev[index]\n // prev[index] = tail\n // next[tail] = index\n // tail = index\n if (index !== this.#tail) {\n if (index === this.#head) {\n this.#head = this.#next[index] as Index\n } else {\n this.#connect(\n this.#prev[index] as Index,\n this.#next[index] as Index\n )\n }\n this.#connect(this.#tail, index)\n this.#tail = index\n }\n }\n\n /**\n * Deletes a key out of the cache.\n *\n * Returns true if the key was deleted, false otherwise.\n */\n delete(k: K) {\n return this.#delete(k, 'delete')\n }\n\n #delete(k: K, reason: LRUCache.DisposeReason) {\n let deleted = false\n if (this.#size !== 0) {\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n deleted = true\n if (this.#size === 1) {\n this.#clear(reason)\n } else {\n this.#removeItemSize(index)\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('deleted'))\n } else if (this.#hasDispose || this.#hasDisposeAfter) {\n if (this.#hasDispose) {\n this.#dispose?.(v as V, k, reason)\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v as V, k, reason])\n }\n }\n this.#keyMap.delete(k)\n this.#keyList[index] = undefined\n this.#valList[index] = undefined\n if (index === this.#tail) {\n this.#tail = this.#prev[index] as Index\n } else if (index === this.#head) {\n this.#head = this.#next[index] as Index\n } else {\n const pi = this.#prev[index] as number\n this.#next[pi] = this.#next[index] as number\n const ni = this.#next[index] as number\n this.#prev[ni] = this.#prev[index] as number\n }\n this.#size--\n this.#free.push(index)\n }\n }\n }\n if (this.#hasDisposeAfter && this.#disposed?.length) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n return deleted\n }\n\n /**\n * Clear the cache entirely, throwing away all values.\n */\n clear() {\n return this.#clear('delete')\n }\n #clear(reason: LRUCache.DisposeReason) {\n for (const index of this.#rindexes({ allowStale: true })) {\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('deleted'))\n } else {\n const k = this.#keyList[index]\n if (this.#hasDispose) {\n this.#dispose?.(v as V, k as K, reason)\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v as V, k as K, reason])\n }\n }\n }\n\n this.#keyMap.clear()\n this.#valList.fill(undefined)\n this.#keyList.fill(undefined)\n if (this.#ttls && this.#starts) {\n this.#ttls.fill(0)\n this.#starts.fill(0)\n }\n if (this.#sizes) {\n this.#sizes.fill(0)\n }\n this.#head = 0 as Index\n this.#tail = 0 as Index\n this.#free.length = 0\n this.#calculatedSize = 0\n this.#size = 0\n if (this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n }\n}\n"], + "mappings": "+aAMA,IAAMA,EACJ,OAAO,aAAgB,UACvB,aACA,OAAO,YAAY,KAAQ,WACvB,YACA,KAEAC,EAAS,IAAI,IAMbC,EACJ,OAAO,SAAY,UAAc,QAAU,QAAU,CAAA,EAIjDC,EAAc,CAClBC,EACAC,EACAC,EACAC,IACE,CACF,OAAOL,EAAQ,aAAgB,WAC3BA,EAAQ,YAAYE,EAAKC,EAAMC,EAAMC,CAAE,EACvC,QAAQ,MAAM,IAAID,MAASD,MAASD,GAAK,CAC/C,EAEII,EAAK,WAAW,gBAChBC,EAAK,WAAW,YAGpB,GAAI,OAAOD,EAAO,IAAa,CAE7BC,EAAK,KAAiB,CACpB,QACA,SAAqC,CAAA,EACrC,OACA,QAAmB,GACnB,iBAAiBC,EAAWH,EAAwB,CAClD,KAAK,SAAS,KAAKA,CAAE,CACvB,GAGFC,EAAK,KAAqB,CACxB,aAAA,CACEG,EAAc,CAChB,CACA,OAAS,IAAIF,EACb,MAAMG,EAAW,CACf,GAAI,MAAK,OAAO,QAEhB,MAAK,OAAO,OAASA,EAErB,KAAK,OAAO,QAAU,GAEtB,QAAWL,KAAM,KAAK,OAAO,SAC3BA,EAAGK,CAAM,EAEX,KAAK,OAAO,UAAUA,CAAM,EAC9B,GAEF,IAAIC,EACFX,EAAQ,KAAK,8BAAgC,IACzCS,EAAiB,IAAK,CACrBE,IACLA,EAAyB,GACzBV,EACE,maAOA,sBACA,UACAQ,CAAc,EAElB,EAIF,IAAMG,EAAcR,GAAiB,CAACL,EAAO,IAAIK,CAAI,EAE/CS,EAAO,OAAO,MAAM,EAIpBC,EAAYC,GAChBA,GAAKA,IAAM,KAAK,MAAMA,CAAC,GAAKA,EAAI,GAAK,SAASA,CAAC,EAc3CC,EAAgBC,GACnBH,EAASG,CAAG,EAETA,GAAO,KAAK,IAAI,EAAG,CAAC,EACpB,WACAA,GAAO,KAAK,IAAI,EAAG,EAAE,EACrB,YACAA,GAAO,KAAK,IAAI,EAAG,EAAE,EACrB,YACAA,GAAO,OAAO,iBACdC,EACA,KATA,KAYAA,EAAN,cAAwB,KAAa,CACnC,YAAYC,EAAY,CACtB,MAAMA,CAAI,EACV,KAAK,KAAK,CAAC,CACb,KAMIC,EAAN,KAAW,CACT,KACA,OAGA,OAAO,OAAOH,EAAW,CACvB,IAAMI,EAAUL,EAAaC,CAAG,EAChC,GAAI,CAACI,EAAS,MAAO,CAAA,EACrBC,EAAAF,EAAMG,EAAgB,IACtB,IAAMC,EAAI,IAAIJ,EAAMH,EAAKI,CAAO,EAChC,OAAAC,EAAAF,EAAMG,EAAgB,IACfC,CACT,CACA,YACEP,EACAI,EAAyC,CAGzC,GAAI,CAACI,EAAAL,EAAMG,GACT,MAAM,IAAI,UAAU,yCAAyC,EAG/D,KAAK,KAAO,IAAIF,EAAQJ,CAAG,EAC3B,KAAK,OAAS,CAChB,CACA,KAAKF,EAAQ,CACX,KAAK,KAAK,KAAK,QAAQ,EAAIA,CAC7B,CACA,KAAG,CACD,OAAO,KAAK,KAAK,EAAE,KAAK,MAAM,CAChC,GA9BIW,EAANN,EAISG,EAAA,YAAPI,EAJID,EAIGH,EAAyB,IAi9BlC,IAAaK,EAAb,KAAqB,CAIVC,GACAC,GACAC,GACAC,GACAC,GACAC,GAKT,IAKA,cAIA,aAIA,eAIA,eAIA,WAKA,eAIA,YAIA,aAIA,gBAIA,yBAIA,mBAIA,uBAIA,2BAIA,iBAGAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GAEAC,GACAC,GACAC,GAWA,OAAO,sBAILC,EAAqB,CACrB,MAAO,CAEL,OAAQA,EAAEL,GACV,KAAMK,EAAEJ,GACR,MAAOI,EAAEN,GACT,OAAQM,EAAEf,GACV,QAASe,EAAEd,GACX,QAASc,EAAEb,GACX,KAAMa,EAAEZ,GACR,KAAMY,EAAEX,GACR,IAAI,MAAI,CACN,OAAOW,EAAEV,EACX,EACA,IAAI,MAAI,CACN,OAAOU,EAAET,EACX,EACA,KAAMS,EAAER,GAER,kBAAoBS,GAAWD,EAAEE,GAAmBD,CAAC,EACrD,gBAAiB,CACfE,EACAC,EACAC,EACAC,IAEAN,EAAEO,GACAJ,EACAC,EACAC,EACAC,CAAO,EAEX,WAAaF,GACXJ,EAAEQ,GAAYJ,CAAc,EAC9B,QAAUC,GACRL,EAAES,GAASJ,CAAO,EACpB,SAAWA,GACTL,EAAEU,GAAUL,CAAO,EACrB,QAAUD,GACRJ,EAAEW,GAASP,CAAc,EAE/B,CAOA,IAAI,KAAG,CACL,OAAO,KAAK3B,EACd,CAIA,IAAI,SAAO,CACT,OAAO,KAAKC,EACd,CAIA,IAAI,gBAAc,CAChB,OAAO,KAAKM,EACd,CAIA,IAAI,MAAI,CACN,OAAO,KAAKD,EACd,CAIA,IAAI,aAAW,CACb,OAAO,KAAKF,EACd,CACA,IAAI,YAAU,CACZ,OAAO,KAAKC,EACd,CAIA,IAAI,SAAO,CACT,OAAO,KAAKH,EACd,CAIA,IAAI,cAAY,CACd,OAAO,KAAKC,EACd,CAEA,YACEyB,EAAwD,CAExD,GAAM,CACJ,IAAAxC,EAAM,EACN,IAAA+C,EACA,cAAAC,EAAgB,EAChB,aAAAC,EACA,eAAAC,EACA,eAAAC,EACA,WAAAC,EACA,QAAAC,EACA,aAAAC,EACA,eAAAC,EACA,YAAAC,EACA,QAAAC,EAAU,EACV,aAAAC,EAAe,EACf,gBAAAC,EACA,YAAAC,EACA,WAAAC,EACA,yBAAAC,EACA,mBAAAC,EACA,2BAAAC,EACA,uBAAAC,EACA,iBAAAC,CAAgB,EACd1B,EAEJ,GAAIxC,IAAQ,GAAK,CAACH,EAASG,CAAG,EAC5B,MAAM,IAAI,UAAU,0CAA0C,EAGhE,IAAMmE,EAAYnE,EAAMD,EAAaC,CAAG,EAAI,MAC5C,GAAI,CAACmE,EACH,MAAM,IAAI,MAAM,sBAAwBnE,CAAG,EAO7C,GAJA,KAAKY,GAAOZ,EACZ,KAAKa,GAAW4C,EAChB,KAAK,aAAeC,GAAgB,KAAK7C,GACzC,KAAK,gBAAkB8C,EACnB,KAAK,gBAAiB,CACxB,GAAI,CAAC,KAAK9C,IAAY,CAAC,KAAK,aAC1B,MAAM,IAAI,UACR,oEAAoE,EAGxE,GAAI,OAAO,KAAK,iBAAoB,WAClC,MAAM,IAAI,UAAU,qCAAqC,EAI7D,GACEgD,IAAe,QACf,OAAOA,GAAe,WAEtB,MAAM,IAAI,UAAU,0CAA0C,EAIhE,GAFA,KAAK5C,GAAc4C,EAGjBD,IAAgB,QAChB,OAAOA,GAAgB,WAEvB,MAAM,IAAI,UACR,6CAA6C,EAsCjD,GAnCA,KAAK5C,GAAe4C,EACpB,KAAK3B,GAAkB,CAAC,CAAC2B,EAEzB,KAAKxC,GAAU,IAAI,IACnB,KAAKC,GAAW,IAAI,MAAMrB,CAAG,EAAE,KAAK,MAAS,EAC7C,KAAKsB,GAAW,IAAI,MAAMtB,CAAG,EAAE,KAAK,MAAS,EAC7C,KAAKuB,GAAQ,IAAI4C,EAAUnE,CAAG,EAC9B,KAAKwB,GAAQ,IAAI2C,EAAUnE,CAAG,EAC9B,KAAKyB,GAAQ,EACb,KAAKC,GAAQ,EACb,KAAKC,GAAQlB,EAAM,OAAOT,CAAG,EAC7B,KAAKkB,GAAQ,EACb,KAAKC,GAAkB,EAEnB,OAAOkC,GAAY,aACrB,KAAKvC,GAAWuC,GAEd,OAAOC,GAAiB,YAC1B,KAAKvC,GAAgBuC,EACrB,KAAK1B,GAAY,CAAA,IAEjB,KAAKb,GAAgB,OACrB,KAAKa,GAAY,QAEnB,KAAKI,GAAc,CAAC,CAAC,KAAKlB,GAC1B,KAAKoB,GAAmB,CAAC,CAAC,KAAKnB,GAE/B,KAAK,eAAiB,CAAC,CAACwC,EACxB,KAAK,YAAc,CAAC,CAACC,EACrB,KAAK,yBAA2B,CAAC,CAACM,EAClC,KAAK,2BAA6B,CAAC,CAACE,EACpC,KAAK,uBAAyB,CAAC,CAACC,EAChC,KAAK,iBAAmB,CAAC,CAACC,EAGtB,KAAK,eAAiB,EAAG,CAC3B,GAAI,KAAKrD,KAAa,GAChB,CAAChB,EAAS,KAAKgB,EAAQ,EACzB,MAAM,IAAI,UACR,iDAAiD,EAIvD,GAAI,CAAChB,EAAS,KAAK,YAAY,EAC7B,MAAM,IAAI,UACR,sDAAsD,EAG1D,KAAKuE,GAAuB,EAa9B,GAVA,KAAK,WAAa,CAAC,CAAChB,EACpB,KAAK,mBAAqB,CAAC,CAACW,EAC5B,KAAK,eAAiB,CAAC,CAACb,EACxB,KAAK,eAAiB,CAAC,CAACC,EACxB,KAAK,cACHtD,EAASmD,CAAa,GAAKA,IAAkB,EACzCA,EACA,EACN,KAAK,aAAe,CAAC,CAACC,EACtB,KAAK,IAAMF,GAAO,EACd,KAAK,IAAK,CACZ,GAAI,CAAClD,EAAS,KAAK,GAAG,EACpB,MAAM,IAAI,UACR,6CAA6C,EAGjD,KAAKwE,GAAsB,EAI7B,GAAI,KAAKzD,KAAS,GAAK,KAAK,MAAQ,GAAK,KAAKC,KAAa,EACzD,MAAM,IAAI,UACR,kDAAkD,EAGtD,GAAI,CAAC,KAAK,cAAgB,CAAC,KAAKD,IAAQ,CAAC,KAAKC,GAAU,CACtD,IAAM1B,EAAO,sBACTQ,EAAWR,CAAI,IACjBL,EAAO,IAAIK,CAAI,EAIfH,EAFE,gGAEe,wBAAyBG,EAAMwB,CAAQ,GAG9D,CAMA,gBAAgB2D,EAAM,CACpB,OAAO,KAAKlD,GAAQ,IAAIkD,CAAG,EAAI,IAAW,CAC5C,CAEAD,IAAsB,CACpB,IAAME,EAAO,IAAItE,EAAU,KAAKW,EAAI,EAC9B4D,EAAS,IAAIvE,EAAU,KAAKW,EAAI,EACtC,KAAKmB,GAAQwC,EACb,KAAKzC,GAAU0C,EAEf,KAAKC,GAAc,CAAClC,EAAOQ,EAAK2B,EAAQ7F,EAAK,IAAG,IAAM,CAGpD,GAFA2F,EAAOjC,CAAK,EAAIQ,IAAQ,EAAI2B,EAAQ,EACpCH,EAAKhC,CAAK,EAAIQ,EACVA,IAAQ,GAAK,KAAK,aAAc,CAClC,IAAM4B,EAAI,WAAW,IAAK,CACpB,KAAK7B,GAASP,CAAK,GACrB,KAAKqC,GAAQ,KAAKvD,GAASkB,CAAK,EAAQ,QAAQ,CAEpD,EAAGQ,EAAM,CAAC,EAGN4B,EAAE,OACJA,EAAE,MAAK,EAIb,EAEA,KAAKE,GAAiBtC,GAAQ,CAC5BiC,EAAOjC,CAAK,EAAIgC,EAAKhC,CAAK,IAAM,EAAI1D,EAAK,IAAG,EAAK,CACnD,EAEA,KAAKiG,GAAa,CAACC,EAAQxC,IAAS,CAClC,GAAIgC,EAAKhC,CAAK,EAAG,CACf,IAAMQ,EAAMwB,EAAKhC,CAAK,EAChBmC,EAAQF,EAAOjC,CAAK,EAE1B,GAAI,CAACQ,GAAO,CAAC2B,EAAO,OACpBK,EAAO,IAAMhC,EACbgC,EAAO,MAAQL,EACfK,EAAO,IAAMC,GAAaC,EAAM,EAChC,IAAMC,EAAMH,EAAO,IAAML,EACzBK,EAAO,aAAehC,EAAMmC,EAEhC,EAIA,IAAIF,EAAY,EACVC,EAAS,IAAK,CAClB,IAAM,EAAIpG,EAAK,IAAG,EAClB,GAAI,KAAK,cAAgB,EAAG,CAC1BmG,EAAY,EACZ,IAAML,EAAI,WACR,IAAOK,EAAY,EACnB,KAAK,aAAa,EAIhBL,EAAE,OACJA,EAAE,MAAK,EAIX,OAAO,CACT,EAEA,KAAK,gBAAkBL,GAAM,CAC3B,IAAM/B,EAAQ,KAAKnB,GAAQ,IAAIkD,CAAG,EAClC,GAAI/B,IAAU,OACZ,MAAO,GAET,IAAMQ,EAAMwB,EAAKhC,CAAK,EAChBmC,EAAQF,EAAOjC,CAAK,EAC1B,GAAI,CAACQ,GAAO,CAAC2B,EACX,MAAO,KAET,IAAMQ,GAAOF,GAAaC,EAAM,GAAMP,EACtC,OAAO3B,EAAMmC,CACf,EAEA,KAAKpC,GAAWP,GAAQ,CACtB,IAAMhC,EAAIiE,EAAOjC,CAAK,EAChBoC,EAAIJ,EAAKhC,CAAK,EACpB,MAAO,CAAC,CAACoC,GAAK,CAAC,CAACpE,IAAMyE,GAAaC,EAAM,GAAM1E,EAAIoE,CACrD,CACF,CAGAE,GAAyC,IAAK,CAAE,EAChDC,GACE,IAAK,CAAE,EACTL,GAMY,IAAK,CAAE,EAGnB3B,GAAsC,IAAM,GAE5CsB,IAAuB,CACrB,IAAMe,EAAQ,IAAIlF,EAAU,KAAKW,EAAI,EACrC,KAAKO,GAAkB,EACvB,KAAKU,GAASsD,EACd,KAAKC,GAAkB7C,GAAQ,CAC7B,KAAKpB,IAAmBgE,EAAM5C,CAAK,EACnC4C,EAAM5C,CAAK,EAAI,CACjB,EACA,KAAK8C,GAAe,CAAC/C,EAAGgD,EAAGpF,EAAMyD,IAAmB,CAGlD,GAAI,KAAKtB,GAAmBiD,CAAC,EAC3B,MAAO,GAET,GAAI,CAACzF,EAASK,CAAI,EAChB,GAAIyD,EAAiB,CACnB,GAAI,OAAOA,GAAoB,WAC7B,MAAM,IAAI,UAAU,oCAAoC,EAG1D,GADAzD,EAAOyD,EAAgB2B,EAAGhD,CAAC,EACvB,CAACzC,EAASK,CAAI,EAChB,MAAM,IAAI,UACR,0DAA0D,MAI9D,OAAM,IAAI,UACR,2HAEwB,EAI9B,OAAOA,CACT,EACA,KAAKqF,GAAe,CAClBhD,EACArC,EACA6E,IACE,CAEF,GADAI,EAAM5C,CAAK,EAAIrC,EACX,KAAKW,GAAU,CACjB,IAAM4C,EAAU,KAAK5C,GAAYsE,EAAM5C,CAAK,EAC5C,KAAO,KAAKpB,GAAkBsC,GAC5B,KAAK+B,GAAO,EAAI,EAGpB,KAAKrE,IAAmBgE,EAAM5C,CAAK,EAC/BwC,IACFA,EAAO,UAAY7E,EACnB6E,EAAO,oBAAsB,KAAK5D,GAEtC,CACF,CAEAiE,GAA0CK,GAAK,CAAE,EACjDF,GAIY,CAACE,EAAIC,EAAIC,IAAO,CAAE,EAC9BN,GAKqB,CACnBO,EACAC,EACA3F,EACAyD,IACE,CACF,GAAIzD,GAAQyD,EACV,MAAM,IAAI,UACR,kEAAkE,EAGtE,MAAO,EACT,EAEA,CAACf,GAAS,CAAE,WAAAQ,EAAa,KAAK,UAAU,EAAK,CAAA,EAAE,CAC7C,GAAI,KAAKlC,GACP,QAAS4E,EAAI,KAAKpE,GACZ,GAAC,KAAKqE,GAAcD,CAAC,KAGrB1C,GAAc,CAAC,KAAKN,GAASgD,CAAC,KAChC,MAAMA,GAEJA,IAAM,KAAKrE,MAGbqE,EAAI,KAAKtE,GAAMsE,CAAC,CAIxB,CAEA,CAACjD,GAAU,CAAE,WAAAO,EAAa,KAAK,UAAU,EAAK,CAAA,EAAE,CAC9C,GAAI,KAAKlC,GACP,QAAS4E,EAAI,KAAKrE,GACZ,GAAC,KAAKsE,GAAcD,CAAC,KAGrB1C,GAAc,CAAC,KAAKN,GAASgD,CAAC,KAChC,MAAMA,GAEJA,IAAM,KAAKpE,MAGboE,EAAI,KAAKvE,GAAMuE,CAAC,CAIxB,CAEAC,GAAcxD,EAAY,CACxB,OACEA,IAAU,QACV,KAAKnB,GAAQ,IAAI,KAAKC,GAASkB,CAAK,CAAM,IAAMA,CAEpD,CAMA,CAAC,SAAO,CACN,QAAWuD,KAAK,KAAKlD,GAAQ,EAEzB,KAAKtB,GAASwE,CAAC,IAAM,QACrB,KAAKzE,GAASyE,CAAC,IAAM,QACrB,CAAC,KAAKzD,GAAmB,KAAKf,GAASwE,CAAC,CAAC,IAEzC,KAAM,CAAC,KAAKzE,GAASyE,CAAC,EAAG,KAAKxE,GAASwE,CAAC,CAAC,EAG/C,CAQA,CAAC,UAAQ,CACP,QAAWA,KAAK,KAAKjD,GAAS,EAE1B,KAAKvB,GAASwE,CAAC,IAAM,QACrB,KAAKzE,GAASyE,CAAC,IAAM,QACrB,CAAC,KAAKzD,GAAmB,KAAKf,GAASwE,CAAC,CAAC,IAEzC,KAAM,CAAC,KAAKzE,GAASyE,CAAC,EAAG,KAAKxE,GAASwE,CAAC,CAAC,EAG/C,CAMA,CAAC,MAAI,CACH,QAAWA,KAAK,KAAKlD,GAAQ,EAAI,CAC/B,IAAMN,EAAI,KAAKjB,GAASyE,CAAC,EAEvBxD,IAAM,QACN,CAAC,KAAKD,GAAmB,KAAKf,GAASwE,CAAC,CAAC,IAEzC,MAAMxD,GAGZ,CAQA,CAAC,OAAK,CACJ,QAAWwD,KAAK,KAAKjD,GAAS,EAAI,CAChC,IAAMP,EAAI,KAAKjB,GAASyE,CAAC,EAEvBxD,IAAM,QACN,CAAC,KAAKD,GAAmB,KAAKf,GAASwE,CAAC,CAAC,IAEzC,MAAMxD,GAGZ,CAMA,CAAC,QAAM,CACL,QAAWwD,KAAK,KAAKlD,GAAQ,EACjB,KAAKtB,GAASwE,CAAC,IAEjB,QACN,CAAC,KAAKzD,GAAmB,KAAKf,GAASwE,CAAC,CAAC,IAEzC,MAAM,KAAKxE,GAASwE,CAAC,EAG3B,CAQA,CAAC,SAAO,CACN,QAAWA,KAAK,KAAKjD,GAAS,EAClB,KAAKvB,GAASwE,CAAC,IAEjB,QACN,CAAC,KAAKzD,GAAmB,KAAKf,GAASwE,CAAC,CAAC,IAEzC,MAAM,KAAKxE,GAASwE,CAAC,EAG3B,CAMA,CAAC,OAAO,QAAQ,GAAC,CACf,OAAO,KAAK,QAAO,CACrB,CAOA,CAAC,OAAO,WAAW,EAAI,WAMvB,KACE1G,EACA4G,EAA4C,CAAA,EAAE,CAE9C,QAAW,KAAK,KAAKpD,GAAQ,EAAI,CAC/B,IAAM0C,EAAI,KAAKhE,GAAS,CAAC,EACnB2E,EAAQ,KAAK5D,GAAmBiD,CAAC,EACnCA,EAAE,qBACFA,EACJ,GAAIW,IAAU,QACV7G,EAAG6G,EAAO,KAAK5E,GAAS,CAAC,EAAQ,IAAI,EACvC,OAAO,KAAK,IAAI,KAAKA,GAAS,CAAC,EAAQ2E,CAAU,EAGvD,CAaA,QACE5G,EACA8G,EAAa,KAAI,CAEjB,QAAW,KAAK,KAAKtD,GAAQ,EAAI,CAC/B,IAAM0C,EAAI,KAAKhE,GAAS,CAAC,EACnB2E,EAAQ,KAAK5D,GAAmBiD,CAAC,EACnCA,EAAE,qBACFA,EACAW,IAAU,QACd7G,EAAG,KAAK8G,EAAOD,EAAO,KAAK5E,GAAS,CAAC,EAAQ,IAAI,EAErD,CAMA,SACEjC,EACA8G,EAAa,KAAI,CAEjB,QAAW,KAAK,KAAKrD,GAAS,EAAI,CAChC,IAAMyC,EAAI,KAAKhE,GAAS,CAAC,EACnB2E,EAAQ,KAAK5D,GAAmBiD,CAAC,EACnCA,EAAE,qBACFA,EACAW,IAAU,QACd7G,EAAG,KAAK8G,EAAOD,EAAO,KAAK5E,GAAS,CAAC,EAAQ,IAAI,EAErD,CAMA,YAAU,CACR,IAAI8E,EAAU,GACd,QAAWL,KAAK,KAAKjD,GAAU,CAAE,WAAY,EAAI,CAAE,EAC7C,KAAKC,GAASgD,CAAC,IACjB,KAAKlB,GAAQ,KAAKvD,GAASyE,CAAC,EAAQ,QAAQ,EAC5CK,EAAU,IAGd,OAAOA,CACT,CAcA,KAAK7B,EAAM,CACT,IAAMwB,EAAI,KAAK1E,GAAQ,IAAIkD,CAAG,EAC9B,GAAIwB,IAAM,OAAW,OACrB,IAAMR,EAAI,KAAKhE,GAASwE,CAAC,EACnBG,EAAuB,KAAK5D,GAAmBiD,CAAC,EAClDA,EAAE,qBACFA,EACJ,GAAIW,IAAU,OAAW,OACzB,IAAMG,EAA2B,CAAE,MAAAH,CAAK,EACxC,GAAI,KAAKlE,IAAS,KAAKD,GAAS,CAC9B,IAAMiB,EAAM,KAAKhB,GAAM+D,CAAC,EAClBpB,EAAQ,KAAK5C,GAAQgE,CAAC,EAC5B,GAAI/C,GAAO2B,EAAO,CAChB,IAAM2B,EAAStD,GAAOlE,EAAK,IAAG,EAAK6F,GACnC0B,EAAM,IAAMC,EACZD,EAAM,MAAQ,KAAK,IAAG,GAG1B,OAAI,KAAKvE,KACPuE,EAAM,KAAO,KAAKvE,GAAOiE,CAAC,GAErBM,CACT,CAeA,MAAI,CACF,IAAME,EAAgC,CAAA,EACtC,QAAWR,KAAK,KAAKlD,GAAS,CAAE,WAAY,EAAI,CAAE,EAAG,CACnD,IAAM0B,EAAM,KAAKjD,GAASyE,CAAC,EACrBR,EAAI,KAAKhE,GAASwE,CAAC,EACnBG,EAAuB,KAAK5D,GAAmBiD,CAAC,EAClDA,EAAE,qBACFA,EACJ,GAAIW,IAAU,QAAa3B,IAAQ,OAAW,SAC9C,IAAM8B,EAA2B,CAAE,MAAAH,CAAK,EACxC,GAAI,KAAKlE,IAAS,KAAKD,GAAS,CAC9BsE,EAAM,IAAM,KAAKrE,GAAM+D,CAAC,EAGxB,IAAMZ,EAAMrG,EAAK,IAAG,EAAM,KAAKiD,GAAQgE,CAAC,EACxCM,EAAM,MAAQ,KAAK,MAAM,KAAK,IAAG,EAAKlB,CAAG,EAEvC,KAAKrD,KACPuE,EAAM,KAAO,KAAKvE,GAAOiE,CAAC,GAE5BQ,EAAI,QAAQ,CAAChC,EAAK8B,CAAK,CAAC,EAE1B,OAAOE,CACT,CAWA,KAAKA,EAA6B,CAChC,KAAK,MAAK,EACV,OAAW,CAAChC,EAAK8B,CAAK,IAAKE,EAAK,CAC9B,GAAIF,EAAM,MAAO,CAOf,IAAMlB,EAAM,KAAK,IAAG,EAAKkB,EAAM,MAC/BA,EAAM,MAAQvH,EAAK,IAAG,EAAKqG,EAE7B,KAAK,IAAIZ,EAAK8B,EAAM,MAAOA,CAAK,EAEpC,CAgCA,IACE9D,EACAgD,EACAiB,EAA4C,CAAA,EAAE,CAE9C,GAAIjB,IAAM,OACR,YAAK,OAAOhD,CAAC,EACN,KAET,GAAM,CACJ,IAAAS,EAAM,KAAK,IACX,MAAA2B,EACA,eAAAnB,EAAiB,KAAK,eACtB,gBAAAI,EAAkB,KAAK,gBACvB,OAAAoB,CAAM,EACJwB,EACA,CAAE,YAAA/C,EAAc,KAAK,WAAW,EAAK+C,EAEnCrG,EAAO,KAAKmF,GAChB/C,EACAgD,EACAiB,EAAW,MAAQ,EACnB5C,CAAe,EAIjB,GAAI,KAAK,cAAgBzD,EAAO,KAAK,aACnC,OAAI6E,IACFA,EAAO,IAAM,OACbA,EAAO,qBAAuB,IAGhC,KAAKH,GAAQtC,EAAG,KAAK,EACd,KAET,IAAIC,EAAQ,KAAKrB,KAAU,EAAI,OAAY,KAAKE,GAAQ,IAAIkB,CAAC,EAC7D,GAAIC,IAAU,OAEZA,EACE,KAAKrB,KAAU,EACX,KAAKQ,GACL,KAAKC,GAAM,SAAW,EACtB,KAAKA,GAAM,IAAG,EACd,KAAKT,KAAU,KAAKN,GACpB,KAAK4E,GAAO,EAAK,EACjB,KAAKtE,GAEX,KAAKG,GAASkB,CAAK,EAAID,EACvB,KAAKhB,GAASiB,CAAK,EAAI+C,EACvB,KAAKlE,GAAQ,IAAIkB,EAAGC,CAAK,EACzB,KAAKhB,GAAM,KAAKG,EAAK,EAAIa,EACzB,KAAKf,GAAMe,CAAK,EAAI,KAAKb,GACzB,KAAKA,GAAQa,EACb,KAAKrB,KACL,KAAKqE,GAAahD,EAAOrC,EAAM6E,CAAM,EACjCA,IAAQA,EAAO,IAAM,OACzBvB,EAAc,OACT,CAEL,KAAKb,GAAYJ,CAAK,EACtB,IAAMiE,EAAS,KAAKlF,GAASiB,CAAK,EAClC,GAAI+C,IAAMkB,EAAQ,CAChB,GAAI,KAAKvE,IAAmB,KAAKI,GAAmBmE,CAAM,EAAG,CAC3DA,EAAO,kBAAkB,MAAM,IAAI,MAAM,UAAU,CAAC,EACpD,GAAM,CAAE,qBAAsBjG,CAAC,EAAKiG,EAChCjG,IAAM,QAAa,CAACgD,IAClB,KAAKvB,IACP,KAAKlB,KAAWP,EAAQ+B,EAAG,KAAK,EAE9B,KAAKJ,IACP,KAAKN,IAAW,KAAK,CAACrB,EAAQ+B,EAAG,KAAK,CAAC,QAGjCiB,IACN,KAAKvB,IACP,KAAKlB,KAAW0F,EAAalE,EAAG,KAAK,EAEnC,KAAKJ,IACP,KAAKN,IAAW,KAAK,CAAC4E,EAAalE,EAAG,KAAK,CAAC,GAMhD,GAHA,KAAK8C,GAAgB7C,CAAK,EAC1B,KAAKgD,GAAahD,EAAOrC,EAAM6E,CAAM,EACrC,KAAKzD,GAASiB,CAAK,EAAI+C,EACnBP,EAAQ,CACVA,EAAO,IAAM,UACb,IAAM0B,EACJD,GAAU,KAAKnE,GAAmBmE,CAAM,EACpCA,EAAO,qBACPA,EACFC,IAAa,SAAW1B,EAAO,SAAW0B,SAEvC1B,IACTA,EAAO,IAAM,UAYjB,GATIhC,IAAQ,GAAK,CAAC,KAAKhB,IACrB,KAAKsC,GAAsB,EAEzB,KAAKtC,KACFyB,GACH,KAAKiB,GAAYlC,EAAOQ,EAAK2B,CAAK,EAEhCK,GAAQ,KAAKD,GAAWC,EAAQxC,CAAK,GAEvC,CAACgB,GAAkB,KAAKrB,IAAoB,KAAKN,GAAW,CAC9D,IAAM8E,EAAK,KAAK9E,GACZ+E,EACJ,KAAQA,EAAOD,GAAI,MAAK,GACtB,KAAK3F,KAAgB,GAAG4F,CAAI,EAGhC,OAAO,IACT,CAMA,KAAG,CACD,GAAI,CACF,KAAO,KAAKzF,IAAO,CACjB,IAAM0F,EAAM,KAAKtF,GAAS,KAAKG,EAAK,EAEpC,GADA,KAAK+D,GAAO,EAAI,EACZ,KAAKnD,GAAmBuE,CAAG,GAC7B,GAAIA,EAAI,qBACN,OAAOA,EAAI,6BAEJA,IAAQ,OACjB,OAAOA,WAIX,GAAI,KAAK1E,IAAoB,KAAKN,GAAW,CAC3C,IAAM8E,EAAK,KAAK9E,GACZ+E,EACJ,KAAQA,EAAOD,GAAI,MAAK,GACtB,KAAK3F,KAAgB,GAAG4F,CAAI,GAIpC,CAEAnB,GAAOqB,EAAa,CAClB,IAAMC,EAAO,KAAKrF,GACZa,EAAI,KAAKjB,GAASyF,CAAI,EACtBxB,EAAI,KAAKhE,GAASwF,CAAI,EAC5B,OAAI,KAAK7E,IAAmB,KAAKI,GAAmBiD,CAAC,EACnDA,EAAE,kBAAkB,MAAM,IAAI,MAAM,SAAS,CAAC,GACrC,KAAKtD,IAAe,KAAKE,MAC9B,KAAKF,IACP,KAAKlB,KAAWwE,EAAGhD,EAAG,OAAO,EAE3B,KAAKJ,IACP,KAAKN,IAAW,KAAK,CAAC0D,EAAGhD,EAAG,OAAO,CAAC,GAGxC,KAAK8C,GAAgB0B,CAAI,EAErBD,IACF,KAAKxF,GAASyF,CAAI,EAAI,OACtB,KAAKxF,GAASwF,CAAI,EAAI,OACtB,KAAKnF,GAAM,KAAKmF,CAAI,GAElB,KAAK5F,KAAU,GACjB,KAAKO,GAAQ,KAAKC,GAAQ,EAC1B,KAAKC,GAAM,OAAS,GAEpB,KAAKF,GAAQ,KAAKF,GAAMuF,CAAI,EAE9B,KAAK1F,GAAQ,OAAOkB,CAAC,EACrB,KAAKpB,KACE4F,CACT,CAkBA,IAAIxE,EAAMyE,EAA4C,CAAA,EAAE,CACtD,GAAM,CAAE,eAAA5D,EAAiB,KAAK,eAAgB,OAAA4B,CAAM,EAClDgC,EACIxE,EAAQ,KAAKnB,GAAQ,IAAIkB,CAAC,EAChC,GAAIC,IAAU,OAAW,CACvB,IAAM+C,EAAI,KAAKhE,GAASiB,CAAK,EAC7B,GACE,KAAKF,GAAmBiD,CAAC,GACzBA,EAAE,uBAAyB,OAE3B,MAAO,GAET,GAAK,KAAKxC,GAASP,CAAK,EASbwC,IACTA,EAAO,IAAM,QACb,KAAKD,GAAWC,EAAQxC,CAAK,OAV7B,QAAIY,GACF,KAAK0B,GAAetC,CAAK,EAEvBwC,IACFA,EAAO,IAAM,MACb,KAAKD,GAAWC,EAAQxC,CAAK,GAExB,QAKAwC,IACTA,EAAO,IAAM,QAEf,MAAO,EACT,CASA,KAAKzC,EAAM0E,EAA8C,CAAA,EAAE,CACzD,GAAM,CAAE,WAAA5D,EAAa,KAAK,UAAU,EAAK4D,EACnCzE,EAAQ,KAAKnB,GAAQ,IAAIkB,CAAC,EAChC,GACEC,IAAU,QACT,CAACa,GAAc,KAAKN,GAASP,CAAK,EAEnC,OAEF,IAAM+C,EAAI,KAAKhE,GAASiB,CAAK,EAE7B,OAAO,KAAKF,GAAmBiD,CAAC,EAAIA,EAAE,qBAAuBA,CAC/D,CAEA5C,GACEJ,EACAC,EACAC,EACAC,EAAY,CAEZ,IAAM6C,EAAI/C,IAAU,OAAY,OAAY,KAAKjB,GAASiB,CAAK,EAC/D,GAAI,KAAKF,GAAmBiD,CAAC,EAC3B,OAAOA,EAGT,IAAM2B,EAAK,IAAI5H,EACT,CAAE,OAAA6H,CAAM,EAAK1E,EAEnB0E,GAAQ,iBAAiB,QAAS,IAAMD,EAAG,MAAMC,EAAO,MAAM,EAAG,CAC/D,OAAQD,EAAG,OACZ,EAED,IAAME,EAAY,CAChB,OAAQF,EAAG,OACX,QAAAzE,EACA,QAAAC,GAGI2E,EAAK,CACT9B,EACA+B,EAAc,KACG,CACjB,GAAM,CAAE,QAAAC,CAAO,EAAKL,EAAG,OACjBM,EAAc/E,EAAQ,kBAAoB8C,IAAM,OAUtD,GATI9C,EAAQ,SACN8E,GAAW,CAACD,GACd7E,EAAQ,OAAO,aAAe,GAC9BA,EAAQ,OAAO,WAAayE,EAAG,OAAO,OAClCM,IAAa/E,EAAQ,OAAO,kBAAoB,KAEpDA,EAAQ,OAAO,cAAgB,IAG/B8E,GAAW,CAACC,GAAe,CAACF,EAC9B,OAAOG,EAAUP,EAAG,OAAO,MAAM,EAGnC,IAAMQ,EAAKrF,EACX,OAAI,KAAKd,GAASiB,CAAc,IAAMH,IAChCkD,IAAM,OACJmC,EAAG,qBACL,KAAKnG,GAASiB,CAAc,EAAIkF,EAAG,qBAEnC,KAAK7C,GAAQtC,EAAG,OAAO,GAGrBE,EAAQ,SAAQA,EAAQ,OAAO,aAAe,IAClD,KAAK,IAAIF,EAAGgD,EAAG6B,EAAU,OAAO,IAG7B7B,CACT,EAEMoC,EAAMC,IACNnF,EAAQ,SACVA,EAAQ,OAAO,cAAgB,GAC/BA,EAAQ,OAAO,WAAamF,GAEvBH,EAAUG,CAAE,GAGfH,EAAaG,GAA0B,CAC3C,GAAM,CAAE,QAAAL,CAAO,EAAKL,EAAG,OACjBW,EACJN,GAAW9E,EAAQ,uBACfY,EACJwE,GAAqBpF,EAAQ,2BACzBqF,EAAWzE,GAAcZ,EAAQ,yBACjCiF,EAAKrF,EAeX,GAdI,KAAKd,GAASiB,CAAc,IAAMH,IAGxB,CAACyF,GAAYJ,EAAG,uBAAyB,OAEnD,KAAK7C,GAAQtC,EAAG,OAAO,EACbsF,IAKV,KAAKtG,GAASiB,CAAc,EAAIkF,EAAG,uBAGnCrE,EACF,OAAIZ,EAAQ,QAAUiF,EAAG,uBAAyB,SAChDjF,EAAQ,OAAO,cAAgB,IAE1BiF,EAAG,qBACL,GAAIA,EAAG,aAAeA,EAC3B,MAAME,CAEV,EAEMG,EAAQ,CACZC,EACAC,IACE,CACF,IAAMC,EAAM,KAAKjH,KAAesB,EAAGgD,EAAG6B,CAAS,EAC3Cc,GAAOA,aAAe,SACxBA,EAAI,KAAK3C,GAAKyC,EAAIzC,IAAM,OAAY,OAAYA,CAAC,EAAG0C,CAAG,EAKzDf,EAAG,OAAO,iBAAiB,QAAS,IAAK,EAErC,CAACzE,EAAQ,kBACTA,EAAQ,0BAERuF,EAAI,MAAS,EAETvF,EAAQ,yBACVuF,EAAMzC,GAAK8B,EAAG9B,EAAG,EAAI,GAG3B,CAAC,CACH,EAEI9C,EAAQ,SAAQA,EAAQ,OAAO,gBAAkB,IACrD,IAAMJ,EAAI,IAAI,QAAQ0F,CAAK,EAAE,KAAKV,EAAIM,CAAE,EAClCD,EAAyB,OAAO,OAAOrF,EAAG,CAC9C,kBAAmB6E,EACnB,qBAAsB3B,EACtB,WAAY,OACb,EAED,OAAI/C,IAAU,QAEZ,KAAK,IAAID,EAAGmF,EAAI,CAAE,GAAGN,EAAU,QAAS,OAAQ,MAAS,CAAE,EAC3D5E,EAAQ,KAAKnB,GAAQ,IAAIkB,CAAC,GAE1B,KAAKhB,GAASiB,CAAK,EAAIkF,EAElBA,CACT,CAEApF,GAAmBD,EAAM,CACvB,GAAI,CAAC,KAAKH,GAAiB,MAAO,GAClC,IAAMiG,EAAI9F,EACV,MACE,CAAC,CAAC8F,GACFA,aAAa,SACbA,EAAE,eAAe,sBAAsB,GACvCA,EAAE,6BAA6B7I,CAEnC,CA+GA,MAAM,MACJiD,EACA6F,EAAgD,CAAA,EAAE,CAElD,GAAM,CAEJ,WAAA/E,EAAa,KAAK,WAClB,eAAAF,EAAiB,KAAK,eACtB,mBAAAa,EAAqB,KAAK,mBAE1B,IAAAhB,EAAM,KAAK,IACX,eAAAQ,EAAiB,KAAK,eACtB,KAAArD,EAAO,EACP,gBAAAyD,EAAkB,KAAK,gBACvB,YAAAH,EAAc,KAAK,YAEnB,yBAAAM,EAA2B,KAAK,yBAChC,2BAAAE,EAA6B,KAAK,2BAClC,iBAAAE,EAAmB,KAAK,iBACxB,uBAAAD,EAAyB,KAAK,uBAC9B,QAAAxB,EACA,aAAA2F,EAAe,GACf,OAAArD,EACA,OAAAmC,CAAM,EACJiB,EAEJ,GAAI,CAAC,KAAKlG,GACR,OAAI8C,IAAQA,EAAO,MAAQ,OACpB,KAAK,IAAIzC,EAAG,CACjB,WAAAc,EACA,eAAAF,EACA,mBAAAa,EACA,OAAAgB,EACD,EAGH,IAAMvC,EAAU,CACd,WAAAY,EACA,eAAAF,EACA,mBAAAa,EACA,IAAAhB,EACA,eAAAQ,EACA,KAAArD,EACA,gBAAAyD,EACA,YAAAH,EACA,yBAAAM,EACA,2BAAAE,EACA,uBAAAC,EACA,iBAAAC,EACA,OAAAa,EACA,OAAAmC,GAGE3E,EAAQ,KAAKnB,GAAQ,IAAIkB,CAAC,EAC9B,GAAIC,IAAU,OAAW,CACnBwC,IAAQA,EAAO,MAAQ,QAC3B,IAAM3C,EAAI,KAAKM,GAAiBJ,EAAGC,EAAOC,EAASC,CAAO,EAC1D,OAAQL,EAAE,WAAaA,MAClB,CAEL,IAAMkD,EAAI,KAAKhE,GAASiB,CAAK,EAC7B,GAAI,KAAKF,GAAmBiD,CAAC,EAAG,CAC9B,IAAM+C,EACJjF,GAAckC,EAAE,uBAAyB,OAC3C,OAAIP,IACFA,EAAO,MAAQ,WACXsD,IAAOtD,EAAO,cAAgB,KAE7BsD,EAAQ/C,EAAE,qBAAwBA,EAAE,WAAaA,EAK1D,IAAMgD,EAAU,KAAKxF,GAASP,CAAK,EACnC,GAAI,CAAC6F,GAAgB,CAACE,EACpB,OAAIvD,IAAQA,EAAO,MAAQ,OAC3B,KAAKpC,GAAYJ,CAAK,EAClBW,GACF,KAAK2B,GAAetC,CAAK,EAEvBwC,GAAQ,KAAKD,GAAWC,EAAQxC,CAAK,EAClC+C,EAKT,IAAMlD,EAAI,KAAKM,GAAiBJ,EAAGC,EAAOC,EAASC,CAAO,EAEpD8F,EADWnG,EAAE,uBAAyB,QACfgB,EAC7B,OAAI2B,IACFA,EAAO,MAAQuD,EAAU,QAAU,UAC/BC,GAAYD,IAASvD,EAAO,cAAgB,KAE3CwD,EAAWnG,EAAE,qBAAwBA,EAAE,WAAaA,EAE/D,CAoCA,MAAM,WACJE,EACA6F,EAAgD,CAAA,EAAE,CAElD,IAAM7C,EAAI,MAAM,KAAK,MACnBhD,EACA6F,CAI8C,EAEhD,GAAI7C,IAAM,OAAW,MAAM,IAAI,MAAM,4BAA4B,EACjE,OAAOA,CACT,CAqCA,KAAKhD,EAAMkG,EAA8C,CAAA,EAAE,CACzD,IAAM3E,EAAa,KAAK5C,GACxB,GAAI,CAAC4C,EACH,MAAM,IAAI,MAAM,uCAAuC,EAEzD,GAAM,CAAE,QAAApB,EAAS,aAAA2F,EAAc,GAAG5F,CAAO,EAAKgG,EACxClD,EAAI,KAAK,IAAIhD,EAAGE,CAAO,EAC7B,GAAI,CAAC4F,GAAgB9C,IAAM,OAAW,OAAOA,EAC7C,IAAMmD,EAAK5E,EAAWvB,EAAGgD,EAAG,CAC1B,QAAA9C,EACA,QAAAC,EACqC,EACvC,YAAK,IAAIH,EAAGmG,EAAIjG,CAAO,EAChBiG,CACT,CAQA,IAAInG,EAAM0D,EAA4C,CAAA,EAAE,CACtD,GAAM,CACJ,WAAA5C,EAAa,KAAK,WAClB,eAAAF,EAAiB,KAAK,eACtB,mBAAAa,EAAqB,KAAK,mBAC1B,OAAAgB,CAAM,EACJiB,EACEzD,EAAQ,KAAKnB,GAAQ,IAAIkB,CAAC,EAChC,GAAIC,IAAU,OAAW,CACvB,IAAM0D,EAAQ,KAAK3E,GAASiB,CAAK,EAC3BmG,EAAW,KAAKrG,GAAmB4D,CAAK,EAE9C,OADIlB,GAAQ,KAAKD,GAAWC,EAAQxC,CAAK,EACrC,KAAKO,GAASP,CAAK,GACjBwC,IAAQA,EAAO,IAAM,SAEpB2D,GAQD3D,GACA3B,GACA6C,EAAM,uBAAyB,SAE/BlB,EAAO,cAAgB,IAElB3B,EAAa6C,EAAM,qBAAuB,SAb5ClC,GACH,KAAKa,GAAQtC,EAAG,QAAQ,EAEtByC,GAAU3B,IAAY2B,EAAO,cAAgB,IAC1C3B,EAAa6C,EAAQ,UAY1BlB,IAAQA,EAAO,IAAM,OAMrB2D,EACKzC,EAAM,sBAEf,KAAKtD,GAAYJ,CAAK,EAClBW,GACF,KAAK2B,GAAetC,CAAK,EAEpB0D,SAEAlB,IACTA,EAAO,IAAM,OAEjB,CAEA4D,GAASvG,EAAUtC,EAAQ,CACzB,KAAK0B,GAAM1B,CAAC,EAAIsC,EAChB,KAAKb,GAAMa,CAAC,EAAItC,CAClB,CAEA6C,GAAYJ,EAAY,CASlBA,IAAU,KAAKb,KACba,IAAU,KAAKd,GACjB,KAAKA,GAAQ,KAAKF,GAAMgB,CAAK,EAE7B,KAAKoG,GACH,KAAKnH,GAAMe,CAAK,EAChB,KAAKhB,GAAMgB,CAAK,CAAU,EAG9B,KAAKoG,GAAS,KAAKjH,GAAOa,CAAK,EAC/B,KAAKb,GAAQa,EAEjB,CAOA,OAAOD,EAAI,CACT,OAAO,KAAKsC,GAAQtC,EAAG,QAAQ,CACjC,CAEAsC,GAAQtC,EAAM7C,EAA8B,CAC1C,IAAI0G,EAAU,GACd,GAAI,KAAKjF,KAAU,EAAG,CACpB,IAAMqB,EAAQ,KAAKnB,GAAQ,IAAIkB,CAAC,EAChC,GAAIC,IAAU,OAEZ,GADA4D,EAAU,GACN,KAAKjF,KAAU,EACjB,KAAK0H,GAAOnJ,CAAM,MACb,CACL,KAAK2F,GAAgB7C,CAAK,EAC1B,IAAM+C,EAAI,KAAKhE,GAASiB,CAAK,EAc7B,GAbI,KAAKF,GAAmBiD,CAAC,EAC3BA,EAAE,kBAAkB,MAAM,IAAI,MAAM,SAAS,CAAC,GACrC,KAAKtD,IAAe,KAAKE,MAC9B,KAAKF,IACP,KAAKlB,KAAWwE,EAAQhD,EAAG7C,CAAM,EAE/B,KAAKyC,IACP,KAAKN,IAAW,KAAK,CAAC0D,EAAQhD,EAAG7C,CAAM,CAAC,GAG5C,KAAK2B,GAAQ,OAAOkB,CAAC,EACrB,KAAKjB,GAASkB,CAAK,EAAI,OACvB,KAAKjB,GAASiB,CAAK,EAAI,OACnBA,IAAU,KAAKb,GACjB,KAAKA,GAAQ,KAAKF,GAAMe,CAAK,UACpBA,IAAU,KAAKd,GACxB,KAAKA,GAAQ,KAAKF,GAAMgB,CAAK,MACxB,CACL,IAAMsG,EAAK,KAAKrH,GAAMe,CAAK,EAC3B,KAAKhB,GAAMsH,CAAE,EAAI,KAAKtH,GAAMgB,CAAK,EACjC,IAAMuG,EAAK,KAAKvH,GAAMgB,CAAK,EAC3B,KAAKf,GAAMsH,CAAE,EAAI,KAAKtH,GAAMe,CAAK,EAEnC,KAAKrB,KACL,KAAKS,GAAM,KAAKY,CAAK,GAI3B,GAAI,KAAKL,IAAoB,KAAKN,IAAW,OAAQ,CACnD,IAAM8E,EAAK,KAAK9E,GACZ+E,EACJ,KAAQA,EAAOD,GAAI,MAAK,GACtB,KAAK3F,KAAgB,GAAG4F,CAAI,EAGhC,OAAOR,CACT,CAKA,OAAK,CACH,OAAO,KAAKyC,GAAO,QAAQ,CAC7B,CACAA,GAAOnJ,EAA8B,CACnC,QAAW8C,KAAS,KAAKM,GAAU,CAAE,WAAY,EAAI,CAAE,EAAG,CACxD,IAAMyC,EAAI,KAAKhE,GAASiB,CAAK,EAC7B,GAAI,KAAKF,GAAmBiD,CAAC,EAC3BA,EAAE,kBAAkB,MAAM,IAAI,MAAM,SAAS,CAAC,MACzC,CACL,IAAMhD,EAAI,KAAKjB,GAASkB,CAAK,EACzB,KAAKP,IACP,KAAKlB,KAAWwE,EAAQhD,EAAQ7C,CAAM,EAEpC,KAAKyC,IACP,KAAKN,IAAW,KAAK,CAAC0D,EAAQhD,EAAQ7C,CAAM,CAAC,GAoBnD,GAfA,KAAK2B,GAAQ,MAAK,EAClB,KAAKE,GAAS,KAAK,MAAS,EAC5B,KAAKD,GAAS,KAAK,MAAS,EACxB,KAAKU,IAAS,KAAKD,KACrB,KAAKC,GAAM,KAAK,CAAC,EACjB,KAAKD,GAAQ,KAAK,CAAC,GAEjB,KAAKD,IACP,KAAKA,GAAO,KAAK,CAAC,EAEpB,KAAKJ,GAAQ,EACb,KAAKC,GAAQ,EACb,KAAKC,GAAM,OAAS,EACpB,KAAKR,GAAkB,EACvB,KAAKD,GAAQ,EACT,KAAKgB,IAAoB,KAAKN,GAAW,CAC3C,IAAM8E,EAAK,KAAK9E,GACZ+E,EACJ,KAAQA,EAAOD,GAAI,MAAK,GACtB,KAAK3F,KAAgB,GAAG4F,CAAI,EAGlC,GAvwDF,QAAA,SAAAhG", + "names": ["perf", "warned", "PROCESS", "emitWarning", "msg", "type", "code", "fn", "AC", "AS", "_", "warnACPolyfill", "reason", "printACPolyfillWarning", "shouldWarn", "TYPE", "isPosInt", "n", "getUintArray", "max", "ZeroArray", "size", "_Stack", "HeapCls", "__privateSet", "_constructing", "s", "__privateGet", "Stack", "__privateAdd", "LRUCache", "#max", "#maxSize", "#dispose", "#disposeAfter", "#fetchMethod", "#memoMethod", "#size", "#calculatedSize", "#keyMap", "#keyList", "#valList", "#next", "#prev", "#head", "#tail", "#free", "#disposed", "#sizes", "#starts", "#ttls", "#hasDispose", "#hasFetchMethod", "#hasDisposeAfter", "c", "p", "#isBackgroundFetch", "k", "index", "options", "context", "#backgroundFetch", "#moveToTail", "#indexes", "#rindexes", "#isStale", "ttl", "ttlResolution", "ttlAutopurge", "updateAgeOnGet", "updateAgeOnHas", "allowStale", "dispose", "disposeAfter", "noDisposeOnSet", "noUpdateTTL", "maxSize", "maxEntrySize", "sizeCalculation", "fetchMethod", "memoMethod", "noDeleteOnFetchRejection", "noDeleteOnStaleGet", "allowStaleOnFetchRejection", "allowStaleOnFetchAbort", "ignoreFetchAbort", "UintArray", "#initializeSizeTracking", "#initializeTTLTracking", "key", "ttls", "starts", "#setItemTTL", "start", "t", "#delete", "#updateItemAge", "#statusTTL", "status", "cachedNow", "getNow", "age", "sizes", "#removeItemSize", "#requireSize", "v", "#addItemSize", "#evict", "_i", "_s", "_st", "_k", "_v", "i", "#isValidIndex", "getOptions", "value", "thisp", "deleted", "entry", "remain", "arr", "setOptions", "oldVal", "oldValue", "dt", "task", "val", "free", "head", "hasOptions", "peekOptions", "ac", "signal", "fetchOpts", "cb", "updateCache", "aborted", "ignoreAbort", "fetchFail", "bf", "eb", "er", "allowStaleAborted", "noDelete", "pcall", "res", "rej", "fmp", "b", "fetchOptions", "forceRefresh", "stale", "isStale", "staleVal", "memoOptions", "vv", "fetching", "#connect", "#clear", "pi", "ni"] +} diff --git a/.github/octokit/node_modules/lru-cache/dist/commonjs/package.json b/.github/octokit/node_modules/lru-cache/dist/commonjs/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/.github/octokit/node_modules/lru-cache/dist/commonjs/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/.github/octokit/node_modules/lru-cache/dist/esm/index.d.ts b/.github/octokit/node_modules/lru-cache/dist/esm/index.d.ts new file mode 100644 index 000000000..f59de7602 --- /dev/null +++ b/.github/octokit/node_modules/lru-cache/dist/esm/index.d.ts @@ -0,0 +1,1277 @@ +/** + * @module LRUCache + */ +declare const TYPE: unique symbol; +export type PosInt = number & { + [TYPE]: 'Positive Integer'; +}; +export type Index = number & { + [TYPE]: 'LRUCache Index'; +}; +export type UintArray = Uint8Array | Uint16Array | Uint32Array; +export type NumberArray = UintArray | number[]; +declare class ZeroArray extends Array { + constructor(size: number); +} +export type { ZeroArray }; +export type { Stack }; +export type StackLike = Stack | Index[]; +declare class Stack { + #private; + heap: NumberArray; + length: number; + static create(max: number): StackLike; + constructor(max: number, HeapCls: { + new (n: number): NumberArray; + }); + push(n: Index): void; + pop(): Index; +} +/** + * Promise representing an in-progress {@link LRUCache#fetch} call + */ +export type BackgroundFetch = Promise & { + __returned: BackgroundFetch | undefined; + __abortController: AbortController; + __staleWhileFetching: V | undefined; +}; +export type DisposeTask = [ + value: V, + key: K, + reason: LRUCache.DisposeReason +]; +export declare namespace LRUCache { + /** + * An integer greater than 0, reflecting the calculated size of items + */ + type Size = number; + /** + * Integer greater than 0, representing some number of milliseconds, or the + * time at which a TTL started counting from. + */ + type Milliseconds = number; + /** + * An integer greater than 0, reflecting a number of items + */ + type Count = number; + /** + * The reason why an item was removed from the cache, passed + * to the {@link Disposer} methods. + * + * - `evict`: The item was evicted because it is the least recently used, + * and the cache is full. + * - `set`: A new value was set, overwriting the old value being disposed. + * - `delete`: The item was explicitly deleted, either by calling + * {@link LRUCache#delete}, {@link LRUCache#clear}, or + * {@link LRUCache#set} with an undefined value. + * - `expire`: The item was removed due to exceeding its TTL. + * - `fetch`: A {@link OptionsBase#fetchMethod} operation returned + * `undefined` or was aborted, causing the item to be deleted. + */ + type DisposeReason = 'evict' | 'set' | 'delete' | 'expire' | 'fetch'; + /** + * A method called upon item removal, passed as the + * {@link OptionsBase.dispose} and/or + * {@link OptionsBase.disposeAfter} options. + */ + type Disposer = (value: V, key: K, reason: DisposeReason) => void; + /** + * A function that returns the effective calculated size + * of an entry in the cache. + */ + type SizeCalculator = (value: V, key: K) => Size; + /** + * Options provided to the + * {@link OptionsBase.fetchMethod} function. + */ + interface FetcherOptions { + signal: AbortSignal; + options: FetcherFetchOptions; + /** + * Object provided in the {@link FetchOptions.context} option to + * {@link LRUCache#fetch} + */ + context: FC; + } + /** + * Occasionally, it may be useful to track the internal behavior of the + * cache, particularly for logging, debugging, or for behavior within the + * `fetchMethod`. To do this, you can pass a `status` object to the + * {@link LRUCache#fetch}, {@link LRUCache#get}, {@link LRUCache#set}, + * {@link LRUCache#memo}, and {@link LRUCache#has} methods. + * + * The `status` option should be a plain JavaScript object. The following + * fields will be set on it appropriately, depending on the situation. + */ + interface Status { + /** + * The status of a set() operation. + * + * - add: the item was not found in the cache, and was added + * - update: the item was in the cache, with the same value provided + * - replace: the item was in the cache, and replaced + * - miss: the item was not added to the cache for some reason + */ + set?: 'add' | 'update' | 'replace' | 'miss'; + /** + * the ttl stored for the item, or undefined if ttls are not used. + */ + ttl?: Milliseconds; + /** + * the start time for the item, or undefined if ttls are not used. + */ + start?: Milliseconds; + /** + * The timestamp used for TTL calculation + */ + now?: Milliseconds; + /** + * the remaining ttl for the item, or undefined if ttls are not used. + */ + remainingTTL?: Milliseconds; + /** + * The calculated size for the item, if sizes are used. + */ + entrySize?: Size; + /** + * The total calculated size of the cache, if sizes are used. + */ + totalCalculatedSize?: Size; + /** + * A flag indicating that the item was not stored, due to exceeding the + * {@link OptionsBase.maxEntrySize} + */ + maxEntrySizeExceeded?: true; + /** + * The old value, specified in the case of `set:'update'` or + * `set:'replace'` + */ + oldValue?: V; + /** + * The results of a {@link LRUCache#has} operation + * + * - hit: the item was found in the cache + * - stale: the item was found in the cache, but is stale + * - miss: the item was not found in the cache + */ + has?: 'hit' | 'stale' | 'miss'; + /** + * The status of a {@link LRUCache#fetch} operation. + * Note that this can change as the underlying fetch() moves through + * various states. + * + * - inflight: there is another fetch() for this key which is in process + * - get: there is no {@link OptionsBase.fetchMethod}, so + * {@link LRUCache#get} was called. + * - miss: the item is not in cache, and will be fetched. + * - hit: the item is in the cache, and was resolved immediately. + * - stale: the item is in the cache, but stale. + * - refresh: the item is in the cache, and not stale, but + * {@link FetchOptions.forceRefresh} was specified. + */ + fetch?: 'get' | 'inflight' | 'miss' | 'hit' | 'stale' | 'refresh'; + /** + * The {@link OptionsBase.fetchMethod} was called + */ + fetchDispatched?: true; + /** + * The cached value was updated after a successful call to + * {@link OptionsBase.fetchMethod} + */ + fetchUpdated?: true; + /** + * The reason for a fetch() rejection. Either the error raised by the + * {@link OptionsBase.fetchMethod}, or the reason for an + * AbortSignal. + */ + fetchError?: Error; + /** + * The fetch received an abort signal + */ + fetchAborted?: true; + /** + * The abort signal received was ignored, and the fetch was allowed to + * continue. + */ + fetchAbortIgnored?: true; + /** + * The fetchMethod promise resolved successfully + */ + fetchResolved?: true; + /** + * The fetchMethod promise was rejected + */ + fetchRejected?: true; + /** + * The status of a {@link LRUCache#get} operation. + * + * - fetching: The item is currently being fetched. If a previous value + * is present and allowed, that will be returned. + * - stale: The item is in the cache, and is stale. + * - hit: the item is in the cache + * - miss: the item is not in the cache + */ + get?: 'stale' | 'hit' | 'miss'; + /** + * A fetch or get operation returned a stale value. + */ + returnedStale?: true; + } + /** + * options which override the options set in the LRUCache constructor + * when calling {@link LRUCache#fetch}. + * + * This is the union of {@link GetOptions} and {@link SetOptions}, plus + * {@link OptionsBase.noDeleteOnFetchRejection}, + * {@link OptionsBase.allowStaleOnFetchRejection}, + * {@link FetchOptions.forceRefresh}, and + * {@link FetcherOptions.context} + * + * Any of these may be modified in the {@link OptionsBase.fetchMethod} + * function, but the {@link GetOptions} fields will of course have no + * effect, as the {@link LRUCache#get} call already happened by the time + * the fetchMethod is called. + */ + interface FetcherFetchOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet' | 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL' | 'noDeleteOnFetchRejection' | 'allowStaleOnFetchRejection' | 'ignoreFetchAbort' | 'allowStaleOnFetchAbort'> { + status?: Status; + size?: Size; + } + /** + * Options that may be passed to the {@link LRUCache#fetch} method. + */ + interface FetchOptions extends FetcherFetchOptions { + /** + * Set to true to force a re-load of the existing data, even if it + * is not yet stale. + */ + forceRefresh?: boolean; + /** + * Context provided to the {@link OptionsBase.fetchMethod} as + * the {@link FetcherOptions.context} param. + * + * If the FC type is specified as unknown (the default), + * undefined or void, then this is optional. Otherwise, it will + * be required. + */ + context?: FC; + signal?: AbortSignal; + status?: Status; + } + /** + * Options provided to {@link LRUCache#fetch} when the FC type is something + * other than `unknown`, `undefined`, or `void` + */ + interface FetchOptionsWithContext extends FetchOptions { + context: FC; + } + /** + * Options provided to {@link LRUCache#fetch} when the FC type is + * `undefined` or `void` + */ + interface FetchOptionsNoContext extends FetchOptions { + context?: undefined; + } + interface MemoOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet' | 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL' | 'noDeleteOnFetchRejection' | 'allowStaleOnFetchRejection' | 'ignoreFetchAbort' | 'allowStaleOnFetchAbort'> { + /** + * Set to true to force a re-load of the existing data, even if it + * is not yet stale. + */ + forceRefresh?: boolean; + /** + * Context provided to the {@link OptionsBase.memoMethod} as + * the {@link MemoizerOptions.context} param. + * + * If the FC type is specified as unknown (the default), + * undefined or void, then this is optional. Otherwise, it will + * be required. + */ + context?: FC; + status?: Status; + } + /** + * Options provided to {@link LRUCache#memo} when the FC type is something + * other than `unknown`, `undefined`, or `void` + */ + interface MemoOptionsWithContext extends MemoOptions { + context: FC; + } + /** + * Options provided to {@link LRUCache#memo} when the FC type is + * `undefined` or `void` + */ + interface MemoOptionsNoContext extends MemoOptions { + context?: undefined; + } + /** + * Options provided to the + * {@link OptionsBase.memoMethod} function. + */ + interface MemoizerOptions { + options: MemoizerMemoOptions; + /** + * Object provided in the {@link MemoOptions.context} option to + * {@link LRUCache#memo} + */ + context: FC; + } + /** + * options which override the options set in the LRUCache constructor + * when calling {@link LRUCache#memo}. + * + * This is the union of {@link GetOptions} and {@link SetOptions}, plus + * {@link MemoOptions.forceRefresh}, and + * {@link MemoerOptions.context} + * + * Any of these may be modified in the {@link OptionsBase.memoMethod} + * function, but the {@link GetOptions} fields will of course have no + * effect, as the {@link LRUCache#get} call already happened by the time + * the memoMethod is called. + */ + interface MemoizerMemoOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet' | 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'> { + status?: Status; + size?: Size; + start?: Milliseconds; + } + /** + * Options that may be passed to the {@link LRUCache#has} method. + */ + interface HasOptions extends Pick, 'updateAgeOnHas'> { + status?: Status; + } + /** + * Options that may be passed to the {@link LRUCache#get} method. + */ + interface GetOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet'> { + status?: Status; + } + /** + * Options that may be passed to the {@link LRUCache#peek} method. + */ + interface PeekOptions extends Pick, 'allowStale'> { + } + /** + * Options that may be passed to the {@link LRUCache#set} method. + */ + interface SetOptions extends Pick, 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'> { + /** + * If size tracking is enabled, then setting an explicit size + * in the {@link LRUCache#set} call will prevent calling the + * {@link OptionsBase.sizeCalculation} function. + */ + size?: Size; + /** + * If TTL tracking is enabled, then setting an explicit start + * time in the {@link LRUCache#set} call will override the + * default time from `performance.now()` or `Date.now()`. + * + * Note that it must be a valid value for whichever time-tracking + * method is in use. + */ + start?: Milliseconds; + status?: Status; + } + /** + * The type signature for the {@link OptionsBase.fetchMethod} option. + */ + type Fetcher = (key: K, staleValue: V | undefined, options: FetcherOptions) => Promise | V | undefined | void; + /** + * the type signature for the {@link OptionsBase.memoMethod} option. + */ + type Memoizer = (key: K, staleValue: V | undefined, options: MemoizerOptions) => V; + /** + * Options which may be passed to the {@link LRUCache} constructor. + * + * Most of these may be overridden in the various options that use + * them. + * + * Despite all being technically optional, the constructor requires that + * a cache is at minimum limited by one or more of {@link OptionsBase.max}, + * {@link OptionsBase.ttl}, or {@link OptionsBase.maxSize}. + * + * If {@link OptionsBase.ttl} is used alone, then it is strongly advised + * (and in fact required by the type definitions here) that the cache + * also set {@link OptionsBase.ttlAutopurge}, to prevent potentially + * unbounded storage. + * + * All options are also available on the {@link LRUCache} instance, making + * it safe to pass an LRUCache instance as the options argumemnt to + * make another empty cache of the same type. + * + * Some options are marked as read-only, because changing them after + * instantiation is not safe. Changing any of the other options will of + * course only have an effect on subsequent method calls. + */ + interface OptionsBase { + /** + * The maximum number of items to store in the cache before evicting + * old entries. This is read-only on the {@link LRUCache} instance, + * and may not be overridden. + * + * If set, then storage space will be pre-allocated at construction + * time, and the cache will perform significantly faster. + * + * Note that significantly fewer items may be stored, if + * {@link OptionsBase.maxSize} and/or {@link OptionsBase.ttl} are also + * set. + * + * **It is strongly recommended to set a `max` to prevent unbounded growth + * of the cache.** + */ + max?: Count; + /** + * Max time in milliseconds for items to live in cache before they are + * considered stale. Note that stale items are NOT preemptively removed by + * default, and MAY live in the cache, contributing to its LRU max, long + * after they have expired, unless {@link OptionsBase.ttlAutopurge} is + * set. + * + * If set to `0` (the default value), then that means "do not track + * TTL", not "expire immediately". + * + * Also, as this cache is optimized for LRU/MRU operations, some of + * the staleness/TTL checks will reduce performance, as they will incur + * overhead by deleting items. + * + * This is not primarily a TTL cache, and does not make strong TTL + * guarantees. There is no pre-emptive pruning of expired items, but you + * _may_ set a TTL on the cache, and it will treat expired items as missing + * when they are fetched, and delete them. + * + * Optional, but must be a non-negative integer in ms if specified. + * + * This may be overridden by passing an options object to `cache.set()`. + * + * At least one of `max`, `maxSize`, or `TTL` is required. This must be a + * positive integer if set. + * + * Even if ttl tracking is enabled, **it is strongly recommended to set a + * `max` to prevent unbounded growth of the cache.** + * + * If ttl tracking is enabled, and `max` and `maxSize` are not set, + * and `ttlAutopurge` is not set, then a warning will be emitted + * cautioning about the potential for unbounded memory consumption. + * (The TypeScript definitions will also discourage this.) + */ + ttl?: Milliseconds; + /** + * Minimum amount of time in ms in which to check for staleness. + * Defaults to 1, which means that the current time is checked + * at most once per millisecond. + * + * Set to 0 to check the current time every time staleness is tested. + * (This reduces performance, and is theoretically unnecessary.) + * + * Setting this to a higher value will improve performance somewhat + * while using ttl tracking, albeit at the expense of keeping stale + * items around a bit longer than their TTLs would indicate. + * + * @default 1 + */ + ttlResolution?: Milliseconds; + /** + * Preemptively remove stale items from the cache. + * + * Note that this may *significantly* degrade performance, especially if + * the cache is storing a large number of items. It is almost always best + * to just leave the stale items in the cache, and let them fall out as new + * items are added. + * + * Note that this means that {@link OptionsBase.allowStale} is a bit + * pointless, as stale items will be deleted almost as soon as they + * expire. + * + * Use with caution! + */ + ttlAutopurge?: boolean; + /** + * When using time-expiring entries with `ttl`, setting this to `true` will + * make each item's age reset to 0 whenever it is retrieved from cache with + * {@link LRUCache#get}, causing it to not expire. (It can still fall out + * of cache based on recency of use, of course.) + * + * Has no effect if {@link OptionsBase.ttl} is not set. + * + * This may be overridden by passing an options object to `cache.get()`. + */ + updateAgeOnGet?: boolean; + /** + * When using time-expiring entries with `ttl`, setting this to `true` will + * make each item's age reset to 0 whenever its presence in the cache is + * checked with {@link LRUCache#has}, causing it to not expire. (It can + * still fall out of cache based on recency of use, of course.) + * + * Has no effect if {@link OptionsBase.ttl} is not set. + */ + updateAgeOnHas?: boolean; + /** + * Allow {@link LRUCache#get} and {@link LRUCache#fetch} calls to return + * stale data, if available. + * + * By default, if you set `ttl`, stale items will only be deleted from the + * cache when you `get(key)`. That is, it's not preemptively pruning items, + * unless {@link OptionsBase.ttlAutopurge} is set. + * + * If you set `allowStale:true`, it'll return the stale value *as well as* + * deleting it. If you don't set this, then it'll return `undefined` when + * you try to get a stale entry. + * + * Note that when a stale entry is fetched, _even if it is returned due to + * `allowStale` being set_, it is removed from the cache immediately. You + * can suppress this behavior by setting + * {@link OptionsBase.noDeleteOnStaleGet}, either in the constructor, or in + * the options provided to {@link LRUCache#get}. + * + * This may be overridden by passing an options object to `cache.get()`. + * The `cache.has()` method will always return `false` for stale items. + * + * Only relevant if a ttl is set. + */ + allowStale?: boolean; + /** + * Function that is called on items when they are dropped from the + * cache, as `dispose(value, key, reason)`. + * + * This can be handy if you want to close file descriptors or do + * other cleanup tasks when items are no longer stored in the cache. + * + * **NOTE**: It is called _before_ the item has been fully removed + * from the cache, so if you want to put it right back in, you need + * to wait until the next tick. If you try to add it back in during + * the `dispose()` function call, it will break things in subtle and + * weird ways. + * + * Unlike several other options, this may _not_ be overridden by + * passing an option to `set()`, for performance reasons. + * + * The `reason` will be one of the following strings, corresponding + * to the reason for the item's deletion: + * + * - `evict` Item was evicted to make space for a new addition + * - `set` Item was overwritten by a new value + * - `expire` Item expired its TTL + * - `fetch` Item was deleted due to a failed or aborted fetch, or a + * fetchMethod returning `undefined. + * - `delete` Item was removed by explicit `cache.delete(key)`, + * `cache.clear()`, or `cache.set(key, undefined)`. + */ + dispose?: Disposer; + /** + * The same as {@link OptionsBase.dispose}, but called *after* the entry + * is completely removed and the cache is once again in a clean state. + * + * It is safe to add an item right back into the cache at this point. + * However, note that it is *very* easy to inadvertently create infinite + * recursion this way. + */ + disposeAfter?: Disposer; + /** + * Set to true to suppress calling the + * {@link OptionsBase.dispose} function if the entry key is + * still accessible within the cache. + * + * This may be overridden by passing an options object to + * {@link LRUCache#set}. + * + * Only relevant if `dispose` or `disposeAfter` are set. + */ + noDisposeOnSet?: boolean; + /** + * Boolean flag to tell the cache to not update the TTL when setting a new + * value for an existing key (ie, when updating a value rather than + * inserting a new value). Note that the TTL value is _always_ set (if + * provided) when adding a new entry into the cache. + * + * Has no effect if a {@link OptionsBase.ttl} is not set. + * + * May be passed as an option to {@link LRUCache#set}. + */ + noUpdateTTL?: boolean; + /** + * Set to a positive integer to track the sizes of items added to the + * cache, and automatically evict items in order to stay below this size. + * Note that this may result in fewer than `max` items being stored. + * + * Attempting to add an item to the cache whose calculated size is greater + * that this amount will be a no-op. The item will not be cached, and no + * other items will be evicted. + * + * Optional, must be a positive integer if provided. + * + * Sets `maxEntrySize` to the same value, unless a different value is + * provided for `maxEntrySize`. + * + * At least one of `max`, `maxSize`, or `TTL` is required. This must be a + * positive integer if set. + * + * Even if size tracking is enabled, **it is strongly recommended to set a + * `max` to prevent unbounded growth of the cache.** + * + * Note also that size tracking can negatively impact performance, + * though for most cases, only minimally. + */ + maxSize?: Size; + /** + * The maximum allowed size for any single item in the cache. + * + * If a larger item is passed to {@link LRUCache#set} or returned by a + * {@link OptionsBase.fetchMethod} or {@link OptionsBase.memoMethod}, then + * it will not be stored in the cache. + * + * Attempting to add an item whose calculated size is greater than + * this amount will not cache the item or evict any old items, but + * WILL delete an existing value if one is already present. + * + * Optional, must be a positive integer if provided. Defaults to + * the value of `maxSize` if provided. + */ + maxEntrySize?: Size; + /** + * A function that returns a number indicating the item's size. + * + * Requires {@link OptionsBase.maxSize} to be set. + * + * If not provided, and {@link OptionsBase.maxSize} or + * {@link OptionsBase.maxEntrySize} are set, then all + * {@link LRUCache#set} calls **must** provide an explicit + * {@link SetOptions.size} or sizeCalculation param. + */ + sizeCalculation?: SizeCalculator; + /** + * Method that provides the implementation for {@link LRUCache#fetch} + * + * ```ts + * fetchMethod(key, staleValue, { signal, options, context }) + * ``` + * + * If `fetchMethod` is not provided, then `cache.fetch(key)` is equivalent + * to `Promise.resolve(cache.get(key))`. + * + * If at any time, `signal.aborted` is set to `true`, or if the + * `signal.onabort` method is called, or if it emits an `'abort'` event + * which you can listen to with `addEventListener`, then that means that + * the fetch should be abandoned. This may be passed along to async + * functions aware of AbortController/AbortSignal behavior. + * + * The `fetchMethod` should **only** return `undefined` or a Promise + * resolving to `undefined` if the AbortController signaled an `abort` + * event. In all other cases, it should return or resolve to a value + * suitable for adding to the cache. + * + * The `options` object is a union of the options that may be provided to + * `set()` and `get()`. If they are modified, then that will result in + * modifying the settings to `cache.set()` when the value is resolved, and + * in the case of + * {@link OptionsBase.noDeleteOnFetchRejection} and + * {@link OptionsBase.allowStaleOnFetchRejection}, the handling of + * `fetchMethod` failures. + * + * For example, a DNS cache may update the TTL based on the value returned + * from a remote DNS server by changing `options.ttl` in the `fetchMethod`. + */ + fetchMethod?: Fetcher; + /** + * Method that provides the implementation for {@link LRUCache#memo} + */ + memoMethod?: Memoizer; + /** + * Set to true to suppress the deletion of stale data when a + * {@link OptionsBase.fetchMethod} returns a rejected promise. + */ + noDeleteOnFetchRejection?: boolean; + /** + * Do not delete stale items when they are retrieved with + * {@link LRUCache#get}. + * + * Note that the `get` return value will still be `undefined` + * unless {@link OptionsBase.allowStale} is true. + * + * When using time-expiring entries with `ttl`, by default stale + * items will be removed from the cache when the key is accessed + * with `cache.get()`. + * + * Setting this option will cause stale items to remain in the cache, until + * they are explicitly deleted with `cache.delete(key)`, or retrieved with + * `noDeleteOnStaleGet` set to `false`. + * + * This may be overridden by passing an options object to `cache.get()`. + * + * Only relevant if a ttl is used. + */ + noDeleteOnStaleGet?: boolean; + /** + * Set to true to allow returning stale data when a + * {@link OptionsBase.fetchMethod} throws an error or returns a rejected + * promise. + * + * This differs from using {@link OptionsBase.allowStale} in that stale + * data will ONLY be returned in the case that the {@link LRUCache#fetch} + * fails, not any other times. + * + * If a `fetchMethod` fails, and there is no stale value available, the + * `fetch()` will resolve to `undefined`. Ie, all `fetchMethod` errors are + * suppressed. + * + * Implies `noDeleteOnFetchRejection`. + * + * This may be set in calls to `fetch()`, or defaulted on the constructor, + * or overridden by modifying the options object in the `fetchMethod`. + */ + allowStaleOnFetchRejection?: boolean; + /** + * Set to true to return a stale value from the cache when the + * `AbortSignal` passed to the {@link OptionsBase.fetchMethod} dispatches + * an `'abort'` event, whether user-triggered, or due to internal cache + * behavior. + * + * Unless {@link OptionsBase.ignoreFetchAbort} is also set, the underlying + * {@link OptionsBase.fetchMethod} will still be considered canceled, and + * any value it returns will be ignored and not cached. + * + * Caveat: since fetches are aborted when a new value is explicitly + * set in the cache, this can lead to fetch returning a stale value, + * since that was the fallback value _at the moment the `fetch()` was + * initiated_, even though the new updated value is now present in + * the cache. + * + * For example: + * + * ```ts + * const cache = new LRUCache({ + * ttl: 100, + * fetchMethod: async (url, oldValue, { signal }) => { + * const res = await fetch(url, { signal }) + * return await res.json() + * } + * }) + * cache.set('https://example.com/', { some: 'data' }) + * // 100ms go by... + * const result = cache.fetch('https://example.com/') + * cache.set('https://example.com/', { other: 'thing' }) + * console.log(await result) // { some: 'data' } + * console.log(cache.get('https://example.com/')) // { other: 'thing' } + * ``` + */ + allowStaleOnFetchAbort?: boolean; + /** + * Set to true to ignore the `abort` event emitted by the `AbortSignal` + * object passed to {@link OptionsBase.fetchMethod}, and still cache the + * resulting resolution value, as long as it is not `undefined`. + * + * When used on its own, this means aborted {@link LRUCache#fetch} calls + * are not immediately resolved or rejected when they are aborted, and + * instead take the full time to await. + * + * When used with {@link OptionsBase.allowStaleOnFetchAbort}, aborted + * {@link LRUCache#fetch} calls will resolve immediately to their stale + * cached value or `undefined`, and will continue to process and eventually + * update the cache when they resolve, as long as the resulting value is + * not `undefined`, thus supporting a "return stale on timeout while + * refreshing" mechanism by passing `AbortSignal.timeout(n)` as the signal. + * + * For example: + * + * ```ts + * const c = new LRUCache({ + * ttl: 100, + * ignoreFetchAbort: true, + * allowStaleOnFetchAbort: true, + * fetchMethod: async (key, oldValue, { signal }) => { + * // note: do NOT pass the signal to fetch()! + * // let's say this fetch can take a long time. + * const res = await fetch(`https://slow-backend-server/${key}`) + * return await res.json() + * }, + * }) + * + * // this will return the stale value after 100ms, while still + * // updating in the background for next time. + * const val = await c.fetch('key', { signal: AbortSignal.timeout(100) }) + * ``` + * + * **Note**: regardless of this setting, an `abort` event _is still + * emitted on the `AbortSignal` object_, so may result in invalid results + * when passed to other underlying APIs that use AbortSignals. + * + * This may be overridden in the {@link OptionsBase.fetchMethod} or the + * call to {@link LRUCache#fetch}. + */ + ignoreFetchAbort?: boolean; + } + interface OptionsMaxLimit extends OptionsBase { + max: Count; + } + interface OptionsTTLLimit extends OptionsBase { + ttl: Milliseconds; + ttlAutopurge: boolean; + } + interface OptionsSizeLimit extends OptionsBase { + maxSize: Size; + } + /** + * The valid safe options for the {@link LRUCache} constructor + */ + type Options = OptionsMaxLimit | OptionsSizeLimit | OptionsTTLLimit; + /** + * Entry objects used by {@link LRUCache#load} and {@link LRUCache#dump}, + * and returned by {@link LRUCache#info}. + */ + interface Entry { + value: V; + ttl?: Milliseconds; + size?: Size; + start?: Milliseconds; + } +} +/** + * Default export, the thing you're using this module to get. + * + * The `K` and `V` types define the key and value types, respectively. The + * optional `FC` type defines the type of the `context` object passed to + * `cache.fetch()` and `cache.memo()`. + * + * Keys and values **must not** be `null` or `undefined`. + * + * All properties from the options object (with the exception of `max`, + * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are + * added as normal public members. (The listed options are read-only getters.) + * + * Changing any of these will alter the defaults for subsequent method calls. + */ +export declare class LRUCache implements Map { + #private; + /** + * {@link LRUCache.OptionsBase.ttl} + */ + ttl: LRUCache.Milliseconds; + /** + * {@link LRUCache.OptionsBase.ttlResolution} + */ + ttlResolution: LRUCache.Milliseconds; + /** + * {@link LRUCache.OptionsBase.ttlAutopurge} + */ + ttlAutopurge: boolean; + /** + * {@link LRUCache.OptionsBase.updateAgeOnGet} + */ + updateAgeOnGet: boolean; + /** + * {@link LRUCache.OptionsBase.updateAgeOnHas} + */ + updateAgeOnHas: boolean; + /** + * {@link LRUCache.OptionsBase.allowStale} + */ + allowStale: boolean; + /** + * {@link LRUCache.OptionsBase.noDisposeOnSet} + */ + noDisposeOnSet: boolean; + /** + * {@link LRUCache.OptionsBase.noUpdateTTL} + */ + noUpdateTTL: boolean; + /** + * {@link LRUCache.OptionsBase.maxEntrySize} + */ + maxEntrySize: LRUCache.Size; + /** + * {@link LRUCache.OptionsBase.sizeCalculation} + */ + sizeCalculation?: LRUCache.SizeCalculator; + /** + * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection} + */ + noDeleteOnFetchRejection: boolean; + /** + * {@link LRUCache.OptionsBase.noDeleteOnStaleGet} + */ + noDeleteOnStaleGet: boolean; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort} + */ + allowStaleOnFetchAbort: boolean; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} + */ + allowStaleOnFetchRejection: boolean; + /** + * {@link LRUCache.OptionsBase.ignoreFetchAbort} + */ + ignoreFetchAbort: boolean; + /** + * Do not call this method unless you need to inspect the + * inner workings of the cache. If anything returned by this + * object is modified in any way, strange breakage may occur. + * + * These fields are private for a reason! + * + * @internal + */ + static unsafeExposeInternals(c: LRUCache): { + starts: ZeroArray | undefined; + ttls: ZeroArray | undefined; + sizes: ZeroArray | undefined; + keyMap: Map; + keyList: (K | undefined)[]; + valList: (V | BackgroundFetch | undefined)[]; + next: NumberArray; + prev: NumberArray; + readonly head: Index; + readonly tail: Index; + free: StackLike; + isBackgroundFetch: (p: any) => boolean; + backgroundFetch: (k: K, index: number | undefined, options: LRUCache.FetchOptions, context: any) => BackgroundFetch; + moveToTail: (index: number) => void; + indexes: (options?: { + allowStale: boolean; + }) => Generator; + rindexes: (options?: { + allowStale: boolean; + }) => Generator; + isStale: (index: number | undefined) => boolean; + }; + /** + * {@link LRUCache.OptionsBase.max} (read-only) + */ + get max(): LRUCache.Count; + /** + * {@link LRUCache.OptionsBase.maxSize} (read-only) + */ + get maxSize(): LRUCache.Count; + /** + * The total computed size of items in the cache (read-only) + */ + get calculatedSize(): LRUCache.Size; + /** + * The number of items stored in the cache (read-only) + */ + get size(): LRUCache.Count; + /** + * {@link LRUCache.OptionsBase.fetchMethod} (read-only) + */ + get fetchMethod(): LRUCache.Fetcher | undefined; + get memoMethod(): LRUCache.Memoizer | undefined; + /** + * {@link LRUCache.OptionsBase.dispose} (read-only) + */ + get dispose(): LRUCache.Disposer | undefined; + /** + * {@link LRUCache.OptionsBase.disposeAfter} (read-only) + */ + get disposeAfter(): LRUCache.Disposer | undefined; + constructor(options: LRUCache.Options | LRUCache); + /** + * Return the number of ms left in the item's TTL. If item is not in cache, + * returns `0`. Returns `Infinity` if item is in cache without a defined TTL. + */ + getRemainingTTL(key: K): number; + /** + * Return a generator yielding `[key, value]` pairs, + * in order from most recently used to least recently used. + */ + entries(): Generator<[K, V], void, unknown>; + /** + * Inverse order version of {@link LRUCache.entries} + * + * Return a generator yielding `[key, value]` pairs, + * in order from least recently used to most recently used. + */ + rentries(): Generator<(K | V | BackgroundFetch | undefined)[], void, unknown>; + /** + * Return a generator yielding the keys in the cache, + * in order from most recently used to least recently used. + */ + keys(): Generator; + /** + * Inverse order version of {@link LRUCache.keys} + * + * Return a generator yielding the keys in the cache, + * in order from least recently used to most recently used. + */ + rkeys(): Generator; + /** + * Return a generator yielding the values in the cache, + * in order from most recently used to least recently used. + */ + values(): Generator; + /** + * Inverse order version of {@link LRUCache.values} + * + * Return a generator yielding the values in the cache, + * in order from least recently used to most recently used. + */ + rvalues(): Generator | undefined, void, unknown>; + /** + * Iterating over the cache itself yields the same results as + * {@link LRUCache.entries} + */ + [Symbol.iterator](): Generator<[K, V], void, unknown>; + /** + * A String value that is used in the creation of the default string + * description of an object. Called by the built-in method + * `Object.prototype.toString`. + */ + [Symbol.toStringTag]: string; + /** + * Find a value for which the supplied fn method returns a truthy value, + * similar to `Array.find()`. fn is called as `fn(value, key, cache)`. + */ + find(fn: (v: V, k: K, self: LRUCache) => boolean, getOptions?: LRUCache.GetOptions): V | undefined; + /** + * Call the supplied function on each item in the cache, in order from most + * recently used to least recently used. + * + * `fn` is called as `fn(value, key, cache)`. + * + * If `thisp` is provided, function will be called in the `this`-context of + * the provided object, or the cache if no `thisp` object is provided. + * + * Does not update age or recenty of use, or iterate over stale values. + */ + forEach(fn: (v: V, k: K, self: LRUCache) => any, thisp?: any): void; + /** + * The same as {@link LRUCache.forEach} but items are iterated over in + * reverse order. (ie, less recently used items are iterated over first.) + */ + rforEach(fn: (v: V, k: K, self: LRUCache) => any, thisp?: any): void; + /** + * Delete any stale entries. Returns true if anything was removed, + * false otherwise. + */ + purgeStale(): boolean; + /** + * Get the extended info about a given entry, to get its value, size, and + * TTL info simultaneously. Returns `undefined` if the key is not present. + * + * Unlike {@link LRUCache#dump}, which is designed to be portable and survive + * serialization, the `start` value is always the current timestamp, and the + * `ttl` is a calculated remaining time to live (negative if expired). + * + * Always returns stale values, if their info is found in the cache, so be + * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl}) + * if relevant. + */ + info(key: K): LRUCache.Entry | undefined; + /** + * Return an array of [key, {@link LRUCache.Entry}] tuples which can be + * passed to {@link LRLUCache#load}. + * + * The `start` fields are calculated relative to a portable `Date.now()` + * timestamp, even if `performance.now()` is available. + * + * Stale entries are always included in the `dump`, even if + * {@link LRUCache.OptionsBase.allowStale} is false. + * + * Note: this returns an actual array, not a generator, so it can be more + * easily passed around. + */ + dump(): [K, LRUCache.Entry][]; + /** + * Reset the cache and load in the items in entries in the order listed. + * + * The shape of the resulting cache may be different if the same options are + * not used in both caches. + * + * The `start` fields are assumed to be calculated relative to a portable + * `Date.now()` timestamp, even if `performance.now()` is available. + */ + load(arr: [K, LRUCache.Entry][]): void; + /** + * Add a value to the cache. + * + * Note: if `undefined` is specified as a value, this is an alias for + * {@link LRUCache#delete} + * + * Fields on the {@link LRUCache.SetOptions} options param will override + * their corresponding values in the constructor options for the scope + * of this single `set()` operation. + * + * If `start` is provided, then that will set the effective start + * time for the TTL calculation. Note that this must be a previous + * value of `performance.now()` if supported, or a previous value of + * `Date.now()` if not. + * + * Options object may also include `size`, which will prevent + * calling the `sizeCalculation` function and just use the specified + * number if it is a positive integer, and `noDisposeOnSet` which + * will prevent calling a `dispose` function in the case of + * overwrites. + * + * If the `size` (or return value of `sizeCalculation`) for a given + * entry is greater than `maxEntrySize`, then the item will not be + * added to the cache. + * + * Will update the recency of the entry. + * + * If the value is `undefined`, then this is an alias for + * `cache.delete(key)`. `undefined` is never stored in the cache. + */ + set(k: K, v: V | BackgroundFetch | undefined, setOptions?: LRUCache.SetOptions): this; + /** + * Evict the least recently used item, returning its value or + * `undefined` if cache is empty. + */ + pop(): V | undefined; + /** + * Check if a key is in the cache, without updating the recency of use. + * Will return false if the item is stale, even though it is technically + * in the cache. + * + * Check if a key is in the cache, without updating the recency of + * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set + * to `true` in either the options or the constructor. + * + * Will return `false` if the item is stale, even though it is technically in + * the cache. The difference can be determined (if it matters) by using a + * `status` argument, and inspecting the `has` field. + * + * Will not update item age unless + * {@link LRUCache.OptionsBase.updateAgeOnHas} is set. + */ + has(k: K, hasOptions?: LRUCache.HasOptions): boolean; + /** + * Like {@link LRUCache#get} but doesn't update recency or delete stale + * items. + * + * Returns `undefined` if the item is stale, unless + * {@link LRUCache.OptionsBase.allowStale} is set. + */ + peek(k: K, peekOptions?: LRUCache.PeekOptions): V | undefined; + /** + * Make an asynchronous cached fetch using the + * {@link LRUCache.OptionsBase.fetchMethod} function. + * + * If the value is in the cache and not stale, then the returned + * Promise resolves to the value. + * + * If not in the cache, or beyond its TTL staleness, then + * `fetchMethod(key, staleValue, { options, signal, context })` is + * called, and the value returned will be added to the cache once + * resolved. + * + * If called with `allowStale`, and an asynchronous fetch is + * currently in progress to reload a stale value, then the former + * stale value will be returned. + * + * If called with `forceRefresh`, then the cached item will be + * re-fetched, even if it is not stale. However, if `allowStale` is also + * set, then the old value will still be returned. This is useful + * in cases where you want to force a reload of a cached value. If + * a background fetch is already in progress, then `forceRefresh` + * has no effect. + * + * If multiple fetches for the same key are issued, then they will all be + * coalesced into a single call to fetchMethod. + * + * Note that this means that handling options such as + * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}, + * {@link LRUCache.FetchOptions.signal}, + * and {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} will be + * determined by the FIRST fetch() call for a given key. + * + * This is a known (fixable) shortcoming which will be addresed on when + * someone complains about it, as the fix would involve added complexity and + * may not be worth the costs for this edge case. + * + * If {@link LRUCache.OptionsBase.fetchMethod} is not specified, then this is + * effectively an alias for `Promise.resolve(cache.get(key))`. + * + * When the fetch method resolves to a value, if the fetch has not + * been aborted due to deletion, eviction, or being overwritten, + * then it is added to the cache using the options provided. + * + * If the key is evicted or deleted before the `fetchMethod` + * resolves, then the AbortSignal passed to the `fetchMethod` will + * receive an `abort` event, and the promise returned by `fetch()` + * will reject with the reason for the abort. + * + * If a `signal` is passed to the `fetch()` call, then aborting the + * signal will abort the fetch and cause the `fetch()` promise to + * reject with the reason provided. + * + * **Setting `context`** + * + * If an `FC` type is set to a type other than `unknown`, `void`, or + * `undefined` in the {@link LRUCache} constructor, then all + * calls to `cache.fetch()` _must_ provide a `context` option. If + * set to `undefined` or `void`, then calls to fetch _must not_ + * provide a `context` option. + * + * The `context` param allows you to provide arbitrary data that + * might be relevant in the course of fetching the data. It is only + * relevant for the course of a single `fetch()` operation, and + * discarded afterwards. + * + * **Note: `fetch()` calls are inflight-unique** + * + * If you call `fetch()` multiple times with the same key value, + * then every call after the first will resolve on the same + * promise1, + * _even if they have different settings that would otherwise change + * the behavior of the fetch_, such as `noDeleteOnFetchRejection` + * or `ignoreFetchAbort`. + * + * In most cases, this is not a problem (in fact, only fetching + * something once is what you probably want, if you're caching in + * the first place). If you are changing the fetch() options + * dramatically between runs, there's a good chance that you might + * be trying to fit divergent semantics into a single object, and + * would be better off with multiple cache instances. + * + * **1**: Ie, they're not the "same Promise", but they resolve at + * the same time, because they're both waiting on the same + * underlying fetchMethod response. + */ + fetch(k: K, fetchOptions: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : LRUCache.FetchOptionsWithContext): Promise; + fetch(k: unknown extends FC ? K : FC extends undefined | void ? K : never, fetchOptions?: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : never): Promise; + /** + * In some cases, `cache.fetch()` may resolve to `undefined`, either because + * a {@link LRUCache.OptionsBase#fetchMethod} was not provided (turning + * `cache.fetch(k)` into just an async wrapper around `cache.get(k)`) or + * because `ignoreFetchAbort` was specified (either to the constructor or + * in the {@link LRUCache.FetchOptions}). Also, the + * {@link OptionsBase.fetchMethod} may return `undefined` or `void`, making + * the test even more complicated. + * + * Because inferring the cases where `undefined` might be returned are so + * cumbersome, but testing for `undefined` can also be annoying, this method + * can be used, which will reject if `this.fetch()` resolves to undefined. + */ + forceFetch(k: K, fetchOptions: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : LRUCache.FetchOptionsWithContext): Promise; + forceFetch(k: unknown extends FC ? K : FC extends undefined | void ? K : never, fetchOptions?: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : never): Promise; + /** + * If the key is found in the cache, then this is equivalent to + * {@link LRUCache#get}. If not, in the cache, then calculate the value using + * the {@link LRUCache.OptionsBase.memoMethod}, and add it to the cache. + * + * If an `FC` type is set to a type other than `unknown`, `void`, or + * `undefined` in the LRUCache constructor, then all calls to `cache.memo()` + * _must_ provide a `context` option. If set to `undefined` or `void`, then + * calls to memo _must not_ provide a `context` option. + * + * The `context` param allows you to provide arbitrary data that might be + * relevant in the course of fetching the data. It is only relevant for the + * course of a single `memo()` operation, and discarded afterwards. + */ + memo(k: K, memoOptions: unknown extends FC ? LRUCache.MemoOptions : FC extends undefined | void ? LRUCache.MemoOptionsNoContext : LRUCache.MemoOptionsWithContext): V; + memo(k: unknown extends FC ? K : FC extends undefined | void ? K : never, memoOptions?: unknown extends FC ? LRUCache.MemoOptions : FC extends undefined | void ? LRUCache.MemoOptionsNoContext : never): V; + /** + * Return a value from the cache. Will update the recency of the cache + * entry found. + * + * If the key is not found, get() will return `undefined`. + */ + get(k: K, getOptions?: LRUCache.GetOptions): V | undefined; + /** + * Deletes a key out of the cache. + * + * Returns true if the key was deleted, false otherwise. + */ + delete(k: K): boolean; + /** + * Clear the cache entirely, throwing away all values. + */ + clear(): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/.github/octokit/node_modules/lru-cache/dist/esm/index.d.ts.map b/.github/octokit/node_modules/lru-cache/dist/esm/index.d.ts.map new file mode 100644 index 000000000..34d60c505 --- /dev/null +++ b/.github/octokit/node_modules/lru-cache/dist/esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AA0FH,QAAA,MAAM,IAAI,eAAiB,CAAA;AAC3B,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG;IAAE,CAAC,IAAI,CAAC,EAAE,kBAAkB,CAAA;CAAE,CAAA;AAC5D,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG;IAAE,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAA;CAAE,CAAA;AAKzD,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAA;AAC9D,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,MAAM,EAAE,CAAA;AAyB9C,cAAM,SAAU,SAAQ,KAAK,CAAC,MAAM,CAAC;gBACvB,IAAI,EAAE,MAAM;CAIzB;AACD,YAAY,EAAE,SAAS,EAAE,CAAA;AACzB,YAAY,EAAE,KAAK,EAAE,CAAA;AAErB,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,EAAE,CAAA;AACvC,cAAM,KAAK;;IACT,IAAI,EAAE,WAAW,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IAGd,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS;gBASnC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,GAAG,WAAW,CAAA;KAAE;IAU3C,IAAI,CAAC,CAAC,EAAE,KAAK;IAGb,GAAG,IAAI,KAAK;CAGb;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG;IACxD,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA;IAC1C,iBAAiB,EAAE,eAAe,CAAA;IAClC,oBAAoB,EAAE,CAAC,GAAG,SAAS,CAAA;CACpC,CAAA;AAED,MAAM,MAAM,WAAW,CAAC,CAAC,EAAE,CAAC,IAAI;IAC9B,KAAK,EAAE,CAAC;IACR,GAAG,EAAE,CAAC;IACN,MAAM,EAAE,QAAQ,CAAC,aAAa;CAC/B,CAAA;AAED,yBAAiB,QAAQ,CAAC;IACxB;;OAEG;IACH,KAAY,IAAI,GAAG,MAAM,CAAA;IAEzB;;;OAGG;IACH,KAAY,YAAY,GAAG,MAAM,CAAA;IAEjC;;OAEG;IACH,KAAY,KAAK,GAAG,MAAM,CAAA;IAE1B;;;;;;;;;;;;;OAaG;IACH,KAAY,aAAa,GACrB,OAAO,GACP,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,OAAO,CAAA;IACX;;;;OAIG;IACH,KAAY,QAAQ,CAAC,CAAC,EAAE,CAAC,IAAI,CAC3B,KAAK,EAAE,CAAC,EACR,GAAG,EAAE,CAAC,EACN,MAAM,EAAE,aAAa,KAClB,IAAI,CAAA;IAET;;;OAGG;IACH,KAAY,cAAc,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,IAAI,CAAA;IAE7D;;;OAGG;IACH,UAAiB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,OAAO;QAChD,MAAM,EAAE,WAAW,CAAA;QACnB,OAAO,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;QACtC;;;WAGG;QACH,OAAO,EAAE,EAAE,CAAA;KACZ;IAED;;;;;;;;;OASG;IACH,UAAiB,MAAM,CAAC,CAAC;QACvB;;;;;;;WAOG;QACH,GAAG,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAA;QAE3C;;WAEG;QACH,GAAG,CAAC,EAAE,YAAY,CAAA;QAElB;;WAEG;QACH,KAAK,CAAC,EAAE,YAAY,CAAA;QAEpB;;WAEG;QACH,GAAG,CAAC,EAAE,YAAY,CAAA;QAElB;;WAEG;QACH,YAAY,CAAC,EAAE,YAAY,CAAA;QAE3B;;WAEG;QACH,SAAS,CAAC,EAAE,IAAI,CAAA;QAEhB;;WAEG;QACH,mBAAmB,CAAC,EAAE,IAAI,CAAA;QAE1B;;;WAGG;QACH,oBAAoB,CAAC,EAAE,IAAI,CAAA;QAE3B;;;WAGG;QACH,QAAQ,CAAC,EAAE,CAAC,CAAA;QAEZ;;;;;;WAMG;QACH,GAAG,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,MAAM,CAAA;QAE9B;;;;;;;;;;;;;WAaG;QACH,KAAK,CAAC,EAAE,KAAK,GAAG,UAAU,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,CAAA;QAEjE;;WAEG;QACH,eAAe,CAAC,EAAE,IAAI,CAAA;QAEtB;;;WAGG;QACH,YAAY,CAAC,EAAE,IAAI,CAAA;QAEnB;;;;WAIG;QACH,UAAU,CAAC,EAAE,KAAK,CAAA;QAElB;;WAEG;QACH,YAAY,CAAC,EAAE,IAAI,CAAA;QAEnB;;;WAGG;QACH,iBAAiB,CAAC,EAAE,IAAI,CAAA;QAExB;;WAEG;QACH,aAAa,CAAC,EAAE,IAAI,CAAA;QAEpB;;WAEG;QACH,aAAa,CAAC,EAAE,IAAI,CAAA;QAEpB;;;;;;;;WAQG;QACH,GAAG,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,CAAA;QAE9B;;WAEG;QACH,aAAa,CAAC,EAAE,IAAI,CAAA;KACrB;IAED;;;;;;;;;;;;;;OAcG;IACH,UAAiB,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,OAAO,CACrD,SAAQ,IAAI,CACV,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EACnB,YAAY,GACZ,gBAAgB,GAChB,oBAAoB,GACpB,iBAAiB,GACjB,KAAK,GACL,gBAAgB,GAChB,aAAa,GACb,0BAA0B,GAC1B,4BAA4B,GAC5B,kBAAkB,GAClB,wBAAwB,CAC3B;QACD,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;QAClB,IAAI,CAAC,EAAE,IAAI,CAAA;KACZ;IAED;;OAEG;IACH,UAAiB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACpC,SAAQ,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC;;;WAGG;QACH,YAAY,CAAC,EAAE,OAAO,CAAA;QACtB;;;;;;;WAOG;QACH,OAAO,CAAC,EAAE,EAAE,CAAA;QACZ,MAAM,CAAC,EAAE,WAAW,CAAA;QACpB,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;KACnB;IACD;;;OAGG;IACH,UAAiB,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAC/C,SAAQ,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC9B,OAAO,EAAE,EAAE,CAAA;KACZ;IACD;;;OAGG;IACH,UAAiB,qBAAqB,CAAC,CAAC,EAAE,CAAC,CACzC,SAAQ,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC;QACrC,OAAO,CAAC,EAAE,SAAS,CAAA;KACpB;IAED,UAAiB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,OAAO,CAC7C,SAAQ,IAAI,CACV,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EACnB,YAAY,GACZ,gBAAgB,GAChB,oBAAoB,GACpB,iBAAiB,GACjB,KAAK,GACL,gBAAgB,GAChB,aAAa,GACb,0BAA0B,GAC1B,4BAA4B,GAC5B,kBAAkB,GAClB,wBAAwB,CAC3B;QACD;;;WAGG;QACH,YAAY,CAAC,EAAE,OAAO,CAAA;QACtB;;;;;;;WAOG;QACH,OAAO,CAAC,EAAE,EAAE,CAAA;QACZ,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;KACnB;IACD;;;OAGG;IACH,UAAiB,sBAAsB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAC9C,SAAQ,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC7B,OAAO,EAAE,EAAE,CAAA;KACZ;IACD;;;OAGG;IACH,UAAiB,oBAAoB,CAAC,CAAC,EAAE,CAAC,CACxC,SAAQ,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC;QACpC,OAAO,CAAC,EAAE,SAAS,CAAA;KACpB;IAED;;;OAGG;IACH,UAAiB,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,OAAO;QACjD,OAAO,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;QACtC;;;WAGG;QACH,OAAO,EAAE,EAAE,CAAA;KACZ;IAED;;;;;;;;;;;;OAYG;IACH,UAAiB,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,OAAO,CACrD,SAAQ,IAAI,CACV,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EACnB,YAAY,GACZ,gBAAgB,GAChB,oBAAoB,GACpB,iBAAiB,GACjB,KAAK,GACL,gBAAgB,GAChB,aAAa,CAChB;QACD,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;QAClB,IAAI,CAAC,EAAE,IAAI,CAAA;QACX,KAAK,CAAC,EAAE,YAAY,CAAA;KACrB;IAED;;OAEG;IACH,UAAiB,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAClC,SAAQ,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,gBAAgB,CAAC;QACrD,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;KACnB;IAED;;OAEG;IACH,UAAiB,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAClC,SAAQ,IAAI,CACV,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EACrB,YAAY,GAAG,gBAAgB,GAAG,oBAAoB,CACvD;QACD,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;KACnB;IAED;;OAEG;IACH,UAAiB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACnC,SAAQ,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,YAAY,CAAC;KAAG;IAEtD;;OAEG;IACH,UAAiB,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAClC,SAAQ,IAAI,CACV,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EACrB,iBAAiB,GAAG,KAAK,GAAG,gBAAgB,GAAG,aAAa,CAC7D;QACD;;;;WAIG;QACH,IAAI,CAAC,EAAE,IAAI,CAAA;QACX;;;;;;;WAOG;QACH,KAAK,CAAC,EAAE,YAAY,CAAA;QACpB,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;KACnB;IAED;;OAEG;IACH,KAAY,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,OAAO,IAAI,CACxC,GAAG,EAAE,CAAC,EACN,UAAU,EAAE,CAAC,GAAG,SAAS,EACzB,OAAO,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAC9B,OAAO,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,SAAS,GAAG,IAAI,CAAA;IAEzD;;OAEG;IACH,KAAY,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,OAAO,IAAI,CACzC,GAAG,EAAE,CAAC,EACN,UAAU,EAAE,CAAC,GAAG,SAAS,EACzB,OAAO,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAC/B,CAAC,CAAA;IAEN;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,UAAiB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACnC;;;;;;;;;;;;;;WAcG;QACH,GAAG,CAAC,EAAE,KAAK,CAAA;QAEX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAiCG;QACH,GAAG,CAAC,EAAE,YAAY,CAAA;QAElB;;;;;;;;;;;;;WAaG;QACH,aAAa,CAAC,EAAE,YAAY,CAAA;QAE5B;;;;;;;;;;;;;WAaG;QACH,YAAY,CAAC,EAAE,OAAO,CAAA;QAEtB;;;;;;;;;WASG;QACH,cAAc,CAAC,EAAE,OAAO,CAAA;QAExB;;;;;;;WAOG;QACH,cAAc,CAAC,EAAE,OAAO,CAAA;QAExB;;;;;;;;;;;;;;;;;;;;;;WAsBG;QACH,UAAU,CAAC,EAAE,OAAO,CAAA;QAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;WA0BG;QACH,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QAExB;;;;;;;WAOG;QACH,YAAY,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QAE7B;;;;;;;;;WASG;QACH,cAAc,CAAC,EAAE,OAAO,CAAA;QAExB;;;;;;;;;WASG;QACH,WAAW,CAAC,EAAE,OAAO,CAAA;QAErB;;;;;;;;;;;;;;;;;;;;;;WAsBG;QACH,OAAO,CAAC,EAAE,IAAI,CAAA;QAEd;;;;;;;;;;;;;WAaG;QACH,YAAY,CAAC,EAAE,IAAI,CAAA;QAEnB;;;;;;;;;WASG;QACH,eAAe,CAAC,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA+BG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;QAE/B;;WAEG;QACH,UAAU,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;QAE/B;;;WAGG;QACH,wBAAwB,CAAC,EAAE,OAAO,CAAA;QAElC;;;;;;;;;;;;;;;;;;WAkBG;QACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;QAE5B;;;;;;;;;;;;;;;;;WAiBG;QACH,0BAA0B,CAAC,EAAE,OAAO,CAAA;QAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAiCG;QACH,sBAAsB,CAAC,EAAE,OAAO,CAAA;QAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA0CG;QACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAC3B;IAED,UAAiB,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACvC,SAAQ,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC7B,GAAG,EAAE,KAAK,CAAA;KACX;IACD,UAAiB,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACvC,SAAQ,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC7B,GAAG,EAAE,YAAY,CAAA;QACjB,YAAY,EAAE,OAAO,CAAA;KACtB;IACD,UAAiB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACxC,SAAQ,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC7B,OAAO,EAAE,IAAI,CAAA;KACd;IAED;;OAEG;IACH,KAAY,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,IACxB,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GACzB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC1B,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;IAE7B;;;OAGG;IACH,UAAiB,KAAK,CAAC,CAAC;QACtB,KAAK,EAAE,CAAC,CAAA;QACR,GAAG,CAAC,EAAE,YAAY,CAAA;QAClB,IAAI,CAAC,EAAE,IAAI,CAAA;QACX,KAAK,CAAC,EAAE,YAAY,CAAA;KACrB;CACF;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,QAAQ,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,EAAE,EAAE,GAAG,OAAO,CAC5D,YAAW,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;;IAUpB;;OAEG;IACH,GAAG,EAAE,QAAQ,CAAC,YAAY,CAAA;IAE1B;;OAEG;IACH,aAAa,EAAE,QAAQ,CAAC,YAAY,CAAA;IACpC;;OAEG;IACH,YAAY,EAAE,OAAO,CAAA;IACrB;;OAEG;IACH,cAAc,EAAE,OAAO,CAAA;IACvB;;OAEG;IACH,cAAc,EAAE,OAAO,CAAA;IACvB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAA;IAEnB;;OAEG;IACH,cAAc,EAAE,OAAO,CAAA;IACvB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAA;IACpB;;OAEG;IACH,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAA;IAC3B;;OAEG;IACH,eAAe,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAC/C;;OAEG;IACH,wBAAwB,EAAE,OAAO,CAAA;IACjC;;OAEG;IACH,kBAAkB,EAAE,OAAO,CAAA;IAC3B;;OAEG;IACH,sBAAsB,EAAE,OAAO,CAAA;IAC/B;;OAEG;IACH,0BAA0B,EAAE,OAAO,CAAA;IACnC;;OAEG;IACH,gBAAgB,EAAE,OAAO,CAAA;IAsBzB;;;;;;;;OAQG;IACH,MAAM,CAAC,qBAAqB,CAC1B,CAAC,SAAS,EAAE,EACZ,CAAC,SAAS,EAAE,EACZ,EAAE,SAAS,OAAO,GAAG,OAAO,EAC5B,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;;;;;;;;;;;;+BAmBI,GAAG;6BAErB,CAAC,SACG,MAAM,GAAG,SAAS,WAChB,SAAS,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,WAC/B,GAAG,KACX,gBAAgB,CAAC,CAAC;4BAOD,MAAM,KAAG,IAAI;4BAEb;YAAE,UAAU,EAAE,OAAO,CAAA;SAAE;6BAEtB;YAAE,UAAU,EAAE,OAAO,CAAA;SAAE;yBAE3B,MAAM,GAAG,SAAS;;IAOvC;;OAEG;IACH,IAAI,GAAG,IAAI,QAAQ,CAAC,KAAK,CAExB;IACD;;OAEG;IACH,IAAI,OAAO,IAAI,QAAQ,CAAC,KAAK,CAE5B;IACD;;OAEG;IACH,IAAI,cAAc,IAAI,QAAQ,CAAC,IAAI,CAElC;IACD;;OAEG;IACH,IAAI,IAAI,IAAI,QAAQ,CAAC,KAAK,CAEzB;IACD;;OAEG;IACH,IAAI,WAAW,IAAI,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,SAAS,CAExD;IACD,IAAI,UAAU,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,SAAS,CAExD;IACD;;OAEG;IACH,IAAI,OAAO,wCAEV;IACD;;OAEG;IACH,IAAI,YAAY,wCAEf;gBAGC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IA0J1D;;;OAGG;IACH,eAAe,CAAC,GAAG,EAAE,CAAC;IAkOtB;;;OAGG;IACF,OAAO;IAYR;;;;;OAKG;IACF,QAAQ;IAYT;;;OAGG;IACF,IAAI;IAYL;;;;;OAKG;IACF,KAAK;IAYN;;;OAGG;IACF,MAAM;IAYP;;;;;OAKG;IACF,OAAO;IAYR;;;OAGG;IACH,CAAC,MAAM,CAAC,QAAQ,CAAC;IAIjB;;;;OAIG;IACH,CAAC,MAAM,CAAC,WAAW,CAAC,SAAa;IAEjC;;;OAGG;IACH,IAAI,CACF,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,OAAO,EACrD,UAAU,GAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAM;IAchD;;;;;;;;;;OAUG;IACH,OAAO,CACL,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,GAAG,EACjD,KAAK,GAAE,GAAU;IAYnB;;;OAGG;IACH,QAAQ,CACN,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,GAAG,EACjD,KAAK,GAAE,GAAU;IAYnB;;;OAGG;IACH,UAAU;IAWV;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS;IAwB3C;;;;;;;;;;;;OAYG;IACH,IAAI;IAyBJ;;;;;;;;OAQG;IACH,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;IAiBlC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,GAAG,CACD,CAAC,EAAE,CAAC,EACJ,CAAC,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,GAAG,SAAS,EACrC,UAAU,GAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAM;IAgHhD;;;OAGG;IACH,GAAG,IAAI,CAAC,GAAG,SAAS;IAwDpB;;;;;;;;;;;;;;;OAeG;IACH,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,UAAU,GAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAM;IA+BxD;;;;;;OAMG;IACH,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,GAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAM;IAuK3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoFG;IAEH,KAAK,CACH,CAAC,EAAE,CAAC,EACJ,YAAY,EAAE,OAAO,SAAS,EAAE,GAC5B,QAAQ,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC/B,EAAE,SAAS,SAAS,GAAG,IAAI,GAC3B,QAAQ,CAAC,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC,QAAQ,CAAC,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC7C,OAAO,CAAC,SAAS,GAAG,CAAC,CAAC;IAGzB,KAAK,CACH,CAAC,EAAE,OAAO,SAAS,EAAE,GACjB,CAAC,GACD,EAAE,SAAS,SAAS,GAAG,IAAI,GAC3B,CAAC,GACD,KAAK,EACT,YAAY,CAAC,EAAE,OAAO,SAAS,EAAE,GAC7B,QAAQ,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC/B,EAAE,SAAS,SAAS,GAAG,IAAI,GAC3B,QAAQ,CAAC,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC,KAAK,GACR,OAAO,CAAC,SAAS,GAAG,CAAC,CAAC;IAmGzB;;;;;;;;;;;;OAYG;IACH,UAAU,CACR,CAAC,EAAE,CAAC,EACJ,YAAY,EAAE,OAAO,SAAS,EAAE,GAC5B,QAAQ,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC/B,EAAE,SAAS,SAAS,GAAG,IAAI,GAC3B,QAAQ,CAAC,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC,QAAQ,CAAC,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC7C,OAAO,CAAC,CAAC,CAAC;IAEb,UAAU,CACR,CAAC,EAAE,OAAO,SAAS,EAAE,GACjB,CAAC,GACD,EAAE,SAAS,SAAS,GAAG,IAAI,GAC3B,CAAC,GACD,KAAK,EACT,YAAY,CAAC,EAAE,OAAO,SAAS,EAAE,GAC7B,QAAQ,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC/B,EAAE,SAAS,SAAS,GAAG,IAAI,GAC3B,QAAQ,CAAC,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC,KAAK,GACR,OAAO,CAAC,CAAC,CAAC;IAiBb;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,CAAC,EAAE,CAAC,EACJ,WAAW,EAAE,OAAO,SAAS,EAAE,GAC3B,QAAQ,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC9B,EAAE,SAAS,SAAS,GAAG,IAAI,GAC3B,QAAQ,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,GACnC,QAAQ,CAAC,sBAAsB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC5C,CAAC;IAEJ,IAAI,CACF,CAAC,EAAE,OAAO,SAAS,EAAE,GACjB,CAAC,GACD,EAAE,SAAS,SAAS,GAAG,IAAI,GAC3B,CAAC,GACD,KAAK,EACT,WAAW,CAAC,EAAE,OAAO,SAAS,EAAE,GAC5B,QAAQ,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC9B,EAAE,SAAS,SAAS,GAAG,IAAI,GAC3B,QAAQ,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,GACnC,KAAK,GACR,CAAC;IAiBJ;;;;;OAKG;IACH,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,UAAU,GAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAM;IAgFxD;;;;OAIG;IACH,MAAM,CAAC,CAAC,EAAE,CAAC;IAqDX;;OAEG;IACH,KAAK;CA0CN"} \ No newline at end of file diff --git a/.github/octokit/node_modules/lru-cache/dist/esm/index.js b/.github/octokit/node_modules/lru-cache/dist/esm/index.js new file mode 100644 index 000000000..555654a57 --- /dev/null +++ b/.github/octokit/node_modules/lru-cache/dist/esm/index.js @@ -0,0 +1,1542 @@ +/** + * @module LRUCache + */ +const perf = typeof performance === 'object' && + performance && + typeof performance.now === 'function' + ? performance + : Date; +const warned = new Set(); +/* c8 ignore start */ +const PROCESS = (typeof process === 'object' && !!process ? process : {}); +/* c8 ignore start */ +const emitWarning = (msg, type, code, fn) => { + typeof PROCESS.emitWarning === 'function' + ? PROCESS.emitWarning(msg, type, code, fn) + : console.error(`[${code}] ${type}: ${msg}`); +}; +let AC = globalThis.AbortController; +let AS = globalThis.AbortSignal; +/* c8 ignore start */ +if (typeof AC === 'undefined') { + //@ts-ignore + AS = class AbortSignal { + onabort; + _onabort = []; + reason; + aborted = false; + addEventListener(_, fn) { + this._onabort.push(fn); + } + }; + //@ts-ignore + AC = class AbortController { + constructor() { + warnACPolyfill(); + } + signal = new AS(); + abort(reason) { + if (this.signal.aborted) + return; + //@ts-ignore + this.signal.reason = reason; + //@ts-ignore + this.signal.aborted = true; + //@ts-ignore + for (const fn of this.signal._onabort) { + fn(reason); + } + this.signal.onabort?.(reason); + } + }; + let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'; + const warnACPolyfill = () => { + if (!printACPolyfillWarning) + return; + printACPolyfillWarning = false; + emitWarning('AbortController is not defined. If using lru-cache in ' + + 'node 14, load an AbortController polyfill from the ' + + '`node-abort-controller` package. A minimal polyfill is ' + + 'provided for use by LRUCache.fetch(), but it should not be ' + + 'relied upon in other contexts (eg, passing it to other APIs that ' + + 'use AbortController/AbortSignal might have undesirable effects). ' + + 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.', 'NO_ABORT_CONTROLLER', 'ENOTSUP', warnACPolyfill); + }; +} +/* c8 ignore stop */ +const shouldWarn = (code) => !warned.has(code); +const TYPE = Symbol('type'); +const isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n); +/* c8 ignore start */ +// This is a little bit ridiculous, tbh. +// The maximum array length is 2^32-1 or thereabouts on most JS impls. +// And well before that point, you're caching the entire world, I mean, +// that's ~32GB of just integers for the next/prev links, plus whatever +// else to hold that many keys and values. Just filling the memory with +// zeroes at init time is brutal when you get that big. +// But why not be complete? +// Maybe in the future, these limits will have expanded. +const getUintArray = (max) => !isPosInt(max) + ? null + : max <= Math.pow(2, 8) + ? Uint8Array + : max <= Math.pow(2, 16) + ? Uint16Array + : max <= Math.pow(2, 32) + ? Uint32Array + : max <= Number.MAX_SAFE_INTEGER + ? ZeroArray + : null; +/* c8 ignore stop */ +class ZeroArray extends Array { + constructor(size) { + super(size); + this.fill(0); + } +} +class Stack { + heap; + length; + // private constructor + static #constructing = false; + static create(max) { + const HeapCls = getUintArray(max); + if (!HeapCls) + return []; + Stack.#constructing = true; + const s = new Stack(max, HeapCls); + Stack.#constructing = false; + return s; + } + constructor(max, HeapCls) { + /* c8 ignore start */ + if (!Stack.#constructing) { + throw new TypeError('instantiate Stack using Stack.create(n)'); + } + /* c8 ignore stop */ + this.heap = new HeapCls(max); + this.length = 0; + } + push(n) { + this.heap[this.length++] = n; + } + pop() { + return this.heap[--this.length]; + } +} +/** + * Default export, the thing you're using this module to get. + * + * The `K` and `V` types define the key and value types, respectively. The + * optional `FC` type defines the type of the `context` object passed to + * `cache.fetch()` and `cache.memo()`. + * + * Keys and values **must not** be `null` or `undefined`. + * + * All properties from the options object (with the exception of `max`, + * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are + * added as normal public members. (The listed options are read-only getters.) + * + * Changing any of these will alter the defaults for subsequent method calls. + */ +export class LRUCache { + // options that cannot be changed without disaster + #max; + #maxSize; + #dispose; + #disposeAfter; + #fetchMethod; + #memoMethod; + /** + * {@link LRUCache.OptionsBase.ttl} + */ + ttl; + /** + * {@link LRUCache.OptionsBase.ttlResolution} + */ + ttlResolution; + /** + * {@link LRUCache.OptionsBase.ttlAutopurge} + */ + ttlAutopurge; + /** + * {@link LRUCache.OptionsBase.updateAgeOnGet} + */ + updateAgeOnGet; + /** + * {@link LRUCache.OptionsBase.updateAgeOnHas} + */ + updateAgeOnHas; + /** + * {@link LRUCache.OptionsBase.allowStale} + */ + allowStale; + /** + * {@link LRUCache.OptionsBase.noDisposeOnSet} + */ + noDisposeOnSet; + /** + * {@link LRUCache.OptionsBase.noUpdateTTL} + */ + noUpdateTTL; + /** + * {@link LRUCache.OptionsBase.maxEntrySize} + */ + maxEntrySize; + /** + * {@link LRUCache.OptionsBase.sizeCalculation} + */ + sizeCalculation; + /** + * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection} + */ + noDeleteOnFetchRejection; + /** + * {@link LRUCache.OptionsBase.noDeleteOnStaleGet} + */ + noDeleteOnStaleGet; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort} + */ + allowStaleOnFetchAbort; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} + */ + allowStaleOnFetchRejection; + /** + * {@link LRUCache.OptionsBase.ignoreFetchAbort} + */ + ignoreFetchAbort; + // computed properties + #size; + #calculatedSize; + #keyMap; + #keyList; + #valList; + #next; + #prev; + #head; + #tail; + #free; + #disposed; + #sizes; + #starts; + #ttls; + #hasDispose; + #hasFetchMethod; + #hasDisposeAfter; + /** + * Do not call this method unless you need to inspect the + * inner workings of the cache. If anything returned by this + * object is modified in any way, strange breakage may occur. + * + * These fields are private for a reason! + * + * @internal + */ + static unsafeExposeInternals(c) { + return { + // properties + starts: c.#starts, + ttls: c.#ttls, + sizes: c.#sizes, + keyMap: c.#keyMap, + keyList: c.#keyList, + valList: c.#valList, + next: c.#next, + prev: c.#prev, + get head() { + return c.#head; + }, + get tail() { + return c.#tail; + }, + free: c.#free, + // methods + isBackgroundFetch: (p) => c.#isBackgroundFetch(p), + backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context), + moveToTail: (index) => c.#moveToTail(index), + indexes: (options) => c.#indexes(options), + rindexes: (options) => c.#rindexes(options), + isStale: (index) => c.#isStale(index), + }; + } + // Protected read-only members + /** + * {@link LRUCache.OptionsBase.max} (read-only) + */ + get max() { + return this.#max; + } + /** + * {@link LRUCache.OptionsBase.maxSize} (read-only) + */ + get maxSize() { + return this.#maxSize; + } + /** + * The total computed size of items in the cache (read-only) + */ + get calculatedSize() { + return this.#calculatedSize; + } + /** + * The number of items stored in the cache (read-only) + */ + get size() { + return this.#size; + } + /** + * {@link LRUCache.OptionsBase.fetchMethod} (read-only) + */ + get fetchMethod() { + return this.#fetchMethod; + } + get memoMethod() { + return this.#memoMethod; + } + /** + * {@link LRUCache.OptionsBase.dispose} (read-only) + */ + get dispose() { + return this.#dispose; + } + /** + * {@link LRUCache.OptionsBase.disposeAfter} (read-only) + */ + get disposeAfter() { + return this.#disposeAfter; + } + constructor(options) { + const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, memoMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort, } = options; + if (max !== 0 && !isPosInt(max)) { + throw new TypeError('max option must be a nonnegative integer'); + } + const UintArray = max ? getUintArray(max) : Array; + if (!UintArray) { + throw new Error('invalid max value: ' + max); + } + this.#max = max; + this.#maxSize = maxSize; + this.maxEntrySize = maxEntrySize || this.#maxSize; + this.sizeCalculation = sizeCalculation; + if (this.sizeCalculation) { + if (!this.#maxSize && !this.maxEntrySize) { + throw new TypeError('cannot set sizeCalculation without setting maxSize or maxEntrySize'); + } + if (typeof this.sizeCalculation !== 'function') { + throw new TypeError('sizeCalculation set to non-function'); + } + } + if (memoMethod !== undefined && + typeof memoMethod !== 'function') { + throw new TypeError('memoMethod must be a function if defined'); + } + this.#memoMethod = memoMethod; + if (fetchMethod !== undefined && + typeof fetchMethod !== 'function') { + throw new TypeError('fetchMethod must be a function if specified'); + } + this.#fetchMethod = fetchMethod; + this.#hasFetchMethod = !!fetchMethod; + this.#keyMap = new Map(); + this.#keyList = new Array(max).fill(undefined); + this.#valList = new Array(max).fill(undefined); + this.#next = new UintArray(max); + this.#prev = new UintArray(max); + this.#head = 0; + this.#tail = 0; + this.#free = Stack.create(max); + this.#size = 0; + this.#calculatedSize = 0; + if (typeof dispose === 'function') { + this.#dispose = dispose; + } + if (typeof disposeAfter === 'function') { + this.#disposeAfter = disposeAfter; + this.#disposed = []; + } + else { + this.#disposeAfter = undefined; + this.#disposed = undefined; + } + this.#hasDispose = !!this.#dispose; + this.#hasDisposeAfter = !!this.#disposeAfter; + this.noDisposeOnSet = !!noDisposeOnSet; + this.noUpdateTTL = !!noUpdateTTL; + this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection; + this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection; + this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort; + this.ignoreFetchAbort = !!ignoreFetchAbort; + // NB: maxEntrySize is set to maxSize if it's set + if (this.maxEntrySize !== 0) { + if (this.#maxSize !== 0) { + if (!isPosInt(this.#maxSize)) { + throw new TypeError('maxSize must be a positive integer if specified'); + } + } + if (!isPosInt(this.maxEntrySize)) { + throw new TypeError('maxEntrySize must be a positive integer if specified'); + } + this.#initializeSizeTracking(); + } + this.allowStale = !!allowStale; + this.noDeleteOnStaleGet = !!noDeleteOnStaleGet; + this.updateAgeOnGet = !!updateAgeOnGet; + this.updateAgeOnHas = !!updateAgeOnHas; + this.ttlResolution = + isPosInt(ttlResolution) || ttlResolution === 0 + ? ttlResolution + : 1; + this.ttlAutopurge = !!ttlAutopurge; + this.ttl = ttl || 0; + if (this.ttl) { + if (!isPosInt(this.ttl)) { + throw new TypeError('ttl must be a positive integer if specified'); + } + this.#initializeTTLTracking(); + } + // do not allow completely unbounded caches + if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) { + throw new TypeError('At least one of max, maxSize, or ttl is required'); + } + if (!this.ttlAutopurge && !this.#max && !this.#maxSize) { + const code = 'LRU_CACHE_UNBOUNDED'; + if (shouldWarn(code)) { + warned.add(code); + const msg = 'TTL caching without ttlAutopurge, max, or maxSize can ' + + 'result in unbounded memory consumption.'; + emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache); + } + } + } + /** + * Return the number of ms left in the item's TTL. If item is not in cache, + * returns `0`. Returns `Infinity` if item is in cache without a defined TTL. + */ + getRemainingTTL(key) { + return this.#keyMap.has(key) ? Infinity : 0; + } + #initializeTTLTracking() { + const ttls = new ZeroArray(this.#max); + const starts = new ZeroArray(this.#max); + this.#ttls = ttls; + this.#starts = starts; + this.#setItemTTL = (index, ttl, start = perf.now()) => { + starts[index] = ttl !== 0 ? start : 0; + ttls[index] = ttl; + if (ttl !== 0 && this.ttlAutopurge) { + const t = setTimeout(() => { + if (this.#isStale(index)) { + this.#delete(this.#keyList[index], 'expire'); + } + }, ttl + 1); + // unref() not supported on all platforms + /* c8 ignore start */ + if (t.unref) { + t.unref(); + } + /* c8 ignore stop */ + } + }; + this.#updateItemAge = index => { + starts[index] = ttls[index] !== 0 ? perf.now() : 0; + }; + this.#statusTTL = (status, index) => { + if (ttls[index]) { + const ttl = ttls[index]; + const start = starts[index]; + /* c8 ignore next */ + if (!ttl || !start) + return; + status.ttl = ttl; + status.start = start; + status.now = cachedNow || getNow(); + const age = status.now - start; + status.remainingTTL = ttl - age; + } + }; + // debounce calls to perf.now() to 1s so we're not hitting + // that costly call repeatedly. + let cachedNow = 0; + const getNow = () => { + const n = perf.now(); + if (this.ttlResolution > 0) { + cachedNow = n; + const t = setTimeout(() => (cachedNow = 0), this.ttlResolution); + // not available on all platforms + /* c8 ignore start */ + if (t.unref) { + t.unref(); + } + /* c8 ignore stop */ + } + return n; + }; + this.getRemainingTTL = key => { + const index = this.#keyMap.get(key); + if (index === undefined) { + return 0; + } + const ttl = ttls[index]; + const start = starts[index]; + if (!ttl || !start) { + return Infinity; + } + const age = (cachedNow || getNow()) - start; + return ttl - age; + }; + this.#isStale = index => { + const s = starts[index]; + const t = ttls[index]; + return !!t && !!s && (cachedNow || getNow()) - s > t; + }; + } + // conditionally set private methods related to TTL + #updateItemAge = () => { }; + #statusTTL = () => { }; + #setItemTTL = () => { }; + /* c8 ignore stop */ + #isStale = () => false; + #initializeSizeTracking() { + const sizes = new ZeroArray(this.#max); + this.#calculatedSize = 0; + this.#sizes = sizes; + this.#removeItemSize = index => { + this.#calculatedSize -= sizes[index]; + sizes[index] = 0; + }; + this.#requireSize = (k, v, size, sizeCalculation) => { + // provisionally accept background fetches. + // actual value size will be checked when they return. + if (this.#isBackgroundFetch(v)) { + return 0; + } + if (!isPosInt(size)) { + if (sizeCalculation) { + if (typeof sizeCalculation !== 'function') { + throw new TypeError('sizeCalculation must be a function'); + } + size = sizeCalculation(v, k); + if (!isPosInt(size)) { + throw new TypeError('sizeCalculation return invalid (expect positive integer)'); + } + } + else { + throw new TypeError('invalid size value (must be positive integer). ' + + 'When maxSize or maxEntrySize is used, sizeCalculation ' + + 'or size must be set.'); + } + } + return size; + }; + this.#addItemSize = (index, size, status) => { + sizes[index] = size; + if (this.#maxSize) { + const maxSize = this.#maxSize - sizes[index]; + while (this.#calculatedSize > maxSize) { + this.#evict(true); + } + } + this.#calculatedSize += sizes[index]; + if (status) { + status.entrySize = size; + status.totalCalculatedSize = this.#calculatedSize; + } + }; + } + #removeItemSize = _i => { }; + #addItemSize = (_i, _s, _st) => { }; + #requireSize = (_k, _v, size, sizeCalculation) => { + if (size || sizeCalculation) { + throw new TypeError('cannot set size without setting maxSize or maxEntrySize on cache'); + } + return 0; + }; + *#indexes({ allowStale = this.allowStale } = {}) { + if (this.#size) { + for (let i = this.#tail; true;) { + if (!this.#isValidIndex(i)) { + break; + } + if (allowStale || !this.#isStale(i)) { + yield i; + } + if (i === this.#head) { + break; + } + else { + i = this.#prev[i]; + } + } + } + } + *#rindexes({ allowStale = this.allowStale } = {}) { + if (this.#size) { + for (let i = this.#head; true;) { + if (!this.#isValidIndex(i)) { + break; + } + if (allowStale || !this.#isStale(i)) { + yield i; + } + if (i === this.#tail) { + break; + } + else { + i = this.#next[i]; + } + } + } + } + #isValidIndex(index) { + return (index !== undefined && + this.#keyMap.get(this.#keyList[index]) === index); + } + /** + * Return a generator yielding `[key, value]` pairs, + * in order from most recently used to least recently used. + */ + *entries() { + for (const i of this.#indexes()) { + if (this.#valList[i] !== undefined && + this.#keyList[i] !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield [this.#keyList[i], this.#valList[i]]; + } + } + } + /** + * Inverse order version of {@link LRUCache.entries} + * + * Return a generator yielding `[key, value]` pairs, + * in order from least recently used to most recently used. + */ + *rentries() { + for (const i of this.#rindexes()) { + if (this.#valList[i] !== undefined && + this.#keyList[i] !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield [this.#keyList[i], this.#valList[i]]; + } + } + } + /** + * Return a generator yielding the keys in the cache, + * in order from most recently used to least recently used. + */ + *keys() { + for (const i of this.#indexes()) { + const k = this.#keyList[i]; + if (k !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield k; + } + } + } + /** + * Inverse order version of {@link LRUCache.keys} + * + * Return a generator yielding the keys in the cache, + * in order from least recently used to most recently used. + */ + *rkeys() { + for (const i of this.#rindexes()) { + const k = this.#keyList[i]; + if (k !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield k; + } + } + } + /** + * Return a generator yielding the values in the cache, + * in order from most recently used to least recently used. + */ + *values() { + for (const i of this.#indexes()) { + const v = this.#valList[i]; + if (v !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield this.#valList[i]; + } + } + } + /** + * Inverse order version of {@link LRUCache.values} + * + * Return a generator yielding the values in the cache, + * in order from least recently used to most recently used. + */ + *rvalues() { + for (const i of this.#rindexes()) { + const v = this.#valList[i]; + if (v !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield this.#valList[i]; + } + } + } + /** + * Iterating over the cache itself yields the same results as + * {@link LRUCache.entries} + */ + [Symbol.iterator]() { + return this.entries(); + } + /** + * A String value that is used in the creation of the default string + * description of an object. Called by the built-in method + * `Object.prototype.toString`. + */ + [Symbol.toStringTag] = 'LRUCache'; + /** + * Find a value for which the supplied fn method returns a truthy value, + * similar to `Array.find()`. fn is called as `fn(value, key, cache)`. + */ + find(fn, getOptions = {}) { + for (const i of this.#indexes()) { + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + continue; + if (fn(value, this.#keyList[i], this)) { + return this.get(this.#keyList[i], getOptions); + } + } + } + /** + * Call the supplied function on each item in the cache, in order from most + * recently used to least recently used. + * + * `fn` is called as `fn(value, key, cache)`. + * + * If `thisp` is provided, function will be called in the `this`-context of + * the provided object, or the cache if no `thisp` object is provided. + * + * Does not update age or recenty of use, or iterate over stale values. + */ + forEach(fn, thisp = this) { + for (const i of this.#indexes()) { + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + continue; + fn.call(thisp, value, this.#keyList[i], this); + } + } + /** + * The same as {@link LRUCache.forEach} but items are iterated over in + * reverse order. (ie, less recently used items are iterated over first.) + */ + rforEach(fn, thisp = this) { + for (const i of this.#rindexes()) { + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + continue; + fn.call(thisp, value, this.#keyList[i], this); + } + } + /** + * Delete any stale entries. Returns true if anything was removed, + * false otherwise. + */ + purgeStale() { + let deleted = false; + for (const i of this.#rindexes({ allowStale: true })) { + if (this.#isStale(i)) { + this.#delete(this.#keyList[i], 'expire'); + deleted = true; + } + } + return deleted; + } + /** + * Get the extended info about a given entry, to get its value, size, and + * TTL info simultaneously. Returns `undefined` if the key is not present. + * + * Unlike {@link LRUCache#dump}, which is designed to be portable and survive + * serialization, the `start` value is always the current timestamp, and the + * `ttl` is a calculated remaining time to live (negative if expired). + * + * Always returns stale values, if their info is found in the cache, so be + * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl}) + * if relevant. + */ + info(key) { + const i = this.#keyMap.get(key); + if (i === undefined) + return undefined; + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + return undefined; + const entry = { value }; + if (this.#ttls && this.#starts) { + const ttl = this.#ttls[i]; + const start = this.#starts[i]; + if (ttl && start) { + const remain = ttl - (perf.now() - start); + entry.ttl = remain; + entry.start = Date.now(); + } + } + if (this.#sizes) { + entry.size = this.#sizes[i]; + } + return entry; + } + /** + * Return an array of [key, {@link LRUCache.Entry}] tuples which can be + * passed to {@link LRLUCache#load}. + * + * The `start` fields are calculated relative to a portable `Date.now()` + * timestamp, even if `performance.now()` is available. + * + * Stale entries are always included in the `dump`, even if + * {@link LRUCache.OptionsBase.allowStale} is false. + * + * Note: this returns an actual array, not a generator, so it can be more + * easily passed around. + */ + dump() { + const arr = []; + for (const i of this.#indexes({ allowStale: true })) { + const key = this.#keyList[i]; + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined || key === undefined) + continue; + const entry = { value }; + if (this.#ttls && this.#starts) { + entry.ttl = this.#ttls[i]; + // always dump the start relative to a portable timestamp + // it's ok for this to be a bit slow, it's a rare operation. + const age = perf.now() - this.#starts[i]; + entry.start = Math.floor(Date.now() - age); + } + if (this.#sizes) { + entry.size = this.#sizes[i]; + } + arr.unshift([key, entry]); + } + return arr; + } + /** + * Reset the cache and load in the items in entries in the order listed. + * + * The shape of the resulting cache may be different if the same options are + * not used in both caches. + * + * The `start` fields are assumed to be calculated relative to a portable + * `Date.now()` timestamp, even if `performance.now()` is available. + */ + load(arr) { + this.clear(); + for (const [key, entry] of arr) { + if (entry.start) { + // entry.start is a portable timestamp, but we may be using + // node's performance.now(), so calculate the offset, so that + // we get the intended remaining TTL, no matter how long it's + // been on ice. + // + // it's ok for this to be a bit slow, it's a rare operation. + const age = Date.now() - entry.start; + entry.start = perf.now() - age; + } + this.set(key, entry.value, entry); + } + } + /** + * Add a value to the cache. + * + * Note: if `undefined` is specified as a value, this is an alias for + * {@link LRUCache#delete} + * + * Fields on the {@link LRUCache.SetOptions} options param will override + * their corresponding values in the constructor options for the scope + * of this single `set()` operation. + * + * If `start` is provided, then that will set the effective start + * time for the TTL calculation. Note that this must be a previous + * value of `performance.now()` if supported, or a previous value of + * `Date.now()` if not. + * + * Options object may also include `size`, which will prevent + * calling the `sizeCalculation` function and just use the specified + * number if it is a positive integer, and `noDisposeOnSet` which + * will prevent calling a `dispose` function in the case of + * overwrites. + * + * If the `size` (or return value of `sizeCalculation`) for a given + * entry is greater than `maxEntrySize`, then the item will not be + * added to the cache. + * + * Will update the recency of the entry. + * + * If the value is `undefined`, then this is an alias for + * `cache.delete(key)`. `undefined` is never stored in the cache. + */ + set(k, v, setOptions = {}) { + if (v === undefined) { + this.delete(k); + return this; + } + const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status, } = setOptions; + let { noUpdateTTL = this.noUpdateTTL } = setOptions; + const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation); + // if the item doesn't fit, don't do anything + // NB: maxEntrySize set to maxSize by default + if (this.maxEntrySize && size > this.maxEntrySize) { + if (status) { + status.set = 'miss'; + status.maxEntrySizeExceeded = true; + } + // have to delete, in case something is there already. + this.#delete(k, 'set'); + return this; + } + let index = this.#size === 0 ? undefined : this.#keyMap.get(k); + if (index === undefined) { + // addition + index = (this.#size === 0 + ? this.#tail + : this.#free.length !== 0 + ? this.#free.pop() + : this.#size === this.#max + ? this.#evict(false) + : this.#size); + this.#keyList[index] = k; + this.#valList[index] = v; + this.#keyMap.set(k, index); + this.#next[this.#tail] = index; + this.#prev[index] = this.#tail; + this.#tail = index; + this.#size++; + this.#addItemSize(index, size, status); + if (status) + status.set = 'add'; + noUpdateTTL = false; + } + else { + // update + this.#moveToTail(index); + const oldVal = this.#valList[index]; + if (v !== oldVal) { + if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) { + oldVal.__abortController.abort(new Error('replaced')); + const { __staleWhileFetching: s } = oldVal; + if (s !== undefined && !noDisposeOnSet) { + if (this.#hasDispose) { + this.#dispose?.(s, k, 'set'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([s, k, 'set']); + } + } + } + else if (!noDisposeOnSet) { + if (this.#hasDispose) { + this.#dispose?.(oldVal, k, 'set'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([oldVal, k, 'set']); + } + } + this.#removeItemSize(index); + this.#addItemSize(index, size, status); + this.#valList[index] = v; + if (status) { + status.set = 'replace'; + const oldValue = oldVal && this.#isBackgroundFetch(oldVal) + ? oldVal.__staleWhileFetching + : oldVal; + if (oldValue !== undefined) + status.oldValue = oldValue; + } + } + else if (status) { + status.set = 'update'; + } + } + if (ttl !== 0 && !this.#ttls) { + this.#initializeTTLTracking(); + } + if (this.#ttls) { + if (!noUpdateTTL) { + this.#setItemTTL(index, ttl, start); + } + if (status) + this.#statusTTL(status, index); + } + if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + return this; + } + /** + * Evict the least recently used item, returning its value or + * `undefined` if cache is empty. + */ + pop() { + try { + while (this.#size) { + const val = this.#valList[this.#head]; + this.#evict(true); + if (this.#isBackgroundFetch(val)) { + if (val.__staleWhileFetching) { + return val.__staleWhileFetching; + } + } + else if (val !== undefined) { + return val; + } + } + } + finally { + if (this.#hasDisposeAfter && this.#disposed) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + } + } + #evict(free) { + const head = this.#head; + const k = this.#keyList[head]; + const v = this.#valList[head]; + if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) { + v.__abortController.abort(new Error('evicted')); + } + else if (this.#hasDispose || this.#hasDisposeAfter) { + if (this.#hasDispose) { + this.#dispose?.(v, k, 'evict'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([v, k, 'evict']); + } + } + this.#removeItemSize(head); + // if we aren't about to use the index, then null these out + if (free) { + this.#keyList[head] = undefined; + this.#valList[head] = undefined; + this.#free.push(head); + } + if (this.#size === 1) { + this.#head = this.#tail = 0; + this.#free.length = 0; + } + else { + this.#head = this.#next[head]; + } + this.#keyMap.delete(k); + this.#size--; + return head; + } + /** + * Check if a key is in the cache, without updating the recency of use. + * Will return false if the item is stale, even though it is technically + * in the cache. + * + * Check if a key is in the cache, without updating the recency of + * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set + * to `true` in either the options or the constructor. + * + * Will return `false` if the item is stale, even though it is technically in + * the cache. The difference can be determined (if it matters) by using a + * `status` argument, and inspecting the `has` field. + * + * Will not update item age unless + * {@link LRUCache.OptionsBase.updateAgeOnHas} is set. + */ + has(k, hasOptions = {}) { + const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions; + const index = this.#keyMap.get(k); + if (index !== undefined) { + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v) && + v.__staleWhileFetching === undefined) { + return false; + } + if (!this.#isStale(index)) { + if (updateAgeOnHas) { + this.#updateItemAge(index); + } + if (status) { + status.has = 'hit'; + this.#statusTTL(status, index); + } + return true; + } + else if (status) { + status.has = 'stale'; + this.#statusTTL(status, index); + } + } + else if (status) { + status.has = 'miss'; + } + return false; + } + /** + * Like {@link LRUCache#get} but doesn't update recency or delete stale + * items. + * + * Returns `undefined` if the item is stale, unless + * {@link LRUCache.OptionsBase.allowStale} is set. + */ + peek(k, peekOptions = {}) { + const { allowStale = this.allowStale } = peekOptions; + const index = this.#keyMap.get(k); + if (index === undefined || + (!allowStale && this.#isStale(index))) { + return; + } + const v = this.#valList[index]; + // either stale and allowed, or forcing a refresh of non-stale value + return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; + } + #backgroundFetch(k, index, options, context) { + const v = index === undefined ? undefined : this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + return v; + } + const ac = new AC(); + const { signal } = options; + // when/if our AC signals, then stop listening to theirs. + signal?.addEventListener('abort', () => ac.abort(signal.reason), { + signal: ac.signal, + }); + const fetchOpts = { + signal: ac.signal, + options, + context, + }; + const cb = (v, updateCache = false) => { + const { aborted } = ac.signal; + const ignoreAbort = options.ignoreFetchAbort && v !== undefined; + if (options.status) { + if (aborted && !updateCache) { + options.status.fetchAborted = true; + options.status.fetchError = ac.signal.reason; + if (ignoreAbort) + options.status.fetchAbortIgnored = true; + } + else { + options.status.fetchResolved = true; + } + } + if (aborted && !ignoreAbort && !updateCache) { + return fetchFail(ac.signal.reason); + } + // either we didn't abort, and are still here, or we did, and ignored + const bf = p; + if (this.#valList[index] === p) { + if (v === undefined) { + if (bf.__staleWhileFetching) { + this.#valList[index] = bf.__staleWhileFetching; + } + else { + this.#delete(k, 'fetch'); + } + } + else { + if (options.status) + options.status.fetchUpdated = true; + this.set(k, v, fetchOpts.options); + } + } + return v; + }; + const eb = (er) => { + if (options.status) { + options.status.fetchRejected = true; + options.status.fetchError = er; + } + return fetchFail(er); + }; + const fetchFail = (er) => { + const { aborted } = ac.signal; + const allowStaleAborted = aborted && options.allowStaleOnFetchAbort; + const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection; + const noDelete = allowStale || options.noDeleteOnFetchRejection; + const bf = p; + if (this.#valList[index] === p) { + // if we allow stale on fetch rejections, then we need to ensure that + // the stale value is not removed from the cache when the fetch fails. + const del = !noDelete || bf.__staleWhileFetching === undefined; + if (del) { + this.#delete(k, 'fetch'); + } + else if (!allowStaleAborted) { + // still replace the *promise* with the stale value, + // since we are done with the promise at this point. + // leave it untouched if we're still waiting for an + // aborted background fetch that hasn't yet returned. + this.#valList[index] = bf.__staleWhileFetching; + } + } + if (allowStale) { + if (options.status && bf.__staleWhileFetching !== undefined) { + options.status.returnedStale = true; + } + return bf.__staleWhileFetching; + } + else if (bf.__returned === bf) { + throw er; + } + }; + const pcall = (res, rej) => { + const fmp = this.#fetchMethod?.(k, v, fetchOpts); + if (fmp && fmp instanceof Promise) { + fmp.then(v => res(v === undefined ? undefined : v), rej); + } + // ignored, we go until we finish, regardless. + // defer check until we are actually aborting, + // so fetchMethod can override. + ac.signal.addEventListener('abort', () => { + if (!options.ignoreFetchAbort || + options.allowStaleOnFetchAbort) { + res(undefined); + // when it eventually resolves, update the cache. + if (options.allowStaleOnFetchAbort) { + res = v => cb(v, true); + } + } + }); + }; + if (options.status) + options.status.fetchDispatched = true; + const p = new Promise(pcall).then(cb, eb); + const bf = Object.assign(p, { + __abortController: ac, + __staleWhileFetching: v, + __returned: undefined, + }); + if (index === undefined) { + // internal, don't expose status. + this.set(k, bf, { ...fetchOpts.options, status: undefined }); + index = this.#keyMap.get(k); + } + else { + this.#valList[index] = bf; + } + return bf; + } + #isBackgroundFetch(p) { + if (!this.#hasFetchMethod) + return false; + const b = p; + return (!!b && + b instanceof Promise && + b.hasOwnProperty('__staleWhileFetching') && + b.__abortController instanceof AC); + } + async fetch(k, fetchOptions = {}) { + const { + // get options + allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, + // set options + ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL, + // fetch exclusive options + noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal, } = fetchOptions; + if (!this.#hasFetchMethod) { + if (status) + status.fetch = 'get'; + return this.get(k, { + allowStale, + updateAgeOnGet, + noDeleteOnStaleGet, + status, + }); + } + const options = { + allowStale, + updateAgeOnGet, + noDeleteOnStaleGet, + ttl, + noDisposeOnSet, + size, + sizeCalculation, + noUpdateTTL, + noDeleteOnFetchRejection, + allowStaleOnFetchRejection, + allowStaleOnFetchAbort, + ignoreFetchAbort, + status, + signal, + }; + let index = this.#keyMap.get(k); + if (index === undefined) { + if (status) + status.fetch = 'miss'; + const p = this.#backgroundFetch(k, index, options, context); + return (p.__returned = p); + } + else { + // in cache, maybe already fetching + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + const stale = allowStale && v.__staleWhileFetching !== undefined; + if (status) { + status.fetch = 'inflight'; + if (stale) + status.returnedStale = true; + } + return stale ? v.__staleWhileFetching : (v.__returned = v); + } + // if we force a refresh, that means do NOT serve the cached value, + // unless we are already in the process of refreshing the cache. + const isStale = this.#isStale(index); + if (!forceRefresh && !isStale) { + if (status) + status.fetch = 'hit'; + this.#moveToTail(index); + if (updateAgeOnGet) { + this.#updateItemAge(index); + } + if (status) + this.#statusTTL(status, index); + return v; + } + // ok, it is stale or a forced refresh, and not already fetching. + // refresh the cache. + const p = this.#backgroundFetch(k, index, options, context); + const hasStale = p.__staleWhileFetching !== undefined; + const staleVal = hasStale && allowStale; + if (status) { + status.fetch = isStale ? 'stale' : 'refresh'; + if (staleVal && isStale) + status.returnedStale = true; + } + return staleVal ? p.__staleWhileFetching : (p.__returned = p); + } + } + async forceFetch(k, fetchOptions = {}) { + const v = await this.fetch(k, fetchOptions); + if (v === undefined) + throw new Error('fetch() returned undefined'); + return v; + } + memo(k, memoOptions = {}) { + const memoMethod = this.#memoMethod; + if (!memoMethod) { + throw new Error('no memoMethod provided to constructor'); + } + const { context, forceRefresh, ...options } = memoOptions; + const v = this.get(k, options); + if (!forceRefresh && v !== undefined) + return v; + const vv = memoMethod(k, v, { + options, + context, + }); + this.set(k, vv, options); + return vv; + } + /** + * Return a value from the cache. Will update the recency of the cache + * entry found. + * + * If the key is not found, get() will return `undefined`. + */ + get(k, getOptions = {}) { + const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status, } = getOptions; + const index = this.#keyMap.get(k); + if (index !== undefined) { + const value = this.#valList[index]; + const fetching = this.#isBackgroundFetch(value); + if (status) + this.#statusTTL(status, index); + if (this.#isStale(index)) { + if (status) + status.get = 'stale'; + // delete only if not an in-flight background fetch + if (!fetching) { + if (!noDeleteOnStaleGet) { + this.#delete(k, 'expire'); + } + if (status && allowStale) + status.returnedStale = true; + return allowStale ? value : undefined; + } + else { + if (status && + allowStale && + value.__staleWhileFetching !== undefined) { + status.returnedStale = true; + } + return allowStale ? value.__staleWhileFetching : undefined; + } + } + else { + if (status) + status.get = 'hit'; + // if we're currently fetching it, we don't actually have it yet + // it's not stale, which means this isn't a staleWhileRefetching. + // If it's not stale, and fetching, AND has a __staleWhileFetching + // value, then that means the user fetched with {forceRefresh:true}, + // so it's safe to return that value. + if (fetching) { + return value.__staleWhileFetching; + } + this.#moveToTail(index); + if (updateAgeOnGet) { + this.#updateItemAge(index); + } + return value; + } + } + else if (status) { + status.get = 'miss'; + } + } + #connect(p, n) { + this.#prev[n] = p; + this.#next[p] = n; + } + #moveToTail(index) { + // if tail already, nothing to do + // if head, move head to next[index] + // else + // move next[prev[index]] to next[index] (head has no prev) + // move prev[next[index]] to prev[index] + // prev[index] = tail + // next[tail] = index + // tail = index + if (index !== this.#tail) { + if (index === this.#head) { + this.#head = this.#next[index]; + } + else { + this.#connect(this.#prev[index], this.#next[index]); + } + this.#connect(this.#tail, index); + this.#tail = index; + } + } + /** + * Deletes a key out of the cache. + * + * Returns true if the key was deleted, false otherwise. + */ + delete(k) { + return this.#delete(k, 'delete'); + } + #delete(k, reason) { + let deleted = false; + if (this.#size !== 0) { + const index = this.#keyMap.get(k); + if (index !== undefined) { + deleted = true; + if (this.#size === 1) { + this.#clear(reason); + } + else { + this.#removeItemSize(index); + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + v.__abortController.abort(new Error('deleted')); + } + else if (this.#hasDispose || this.#hasDisposeAfter) { + if (this.#hasDispose) { + this.#dispose?.(v, k, reason); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([v, k, reason]); + } + } + this.#keyMap.delete(k); + this.#keyList[index] = undefined; + this.#valList[index] = undefined; + if (index === this.#tail) { + this.#tail = this.#prev[index]; + } + else if (index === this.#head) { + this.#head = this.#next[index]; + } + else { + const pi = this.#prev[index]; + this.#next[pi] = this.#next[index]; + const ni = this.#next[index]; + this.#prev[ni] = this.#prev[index]; + } + this.#size--; + this.#free.push(index); + } + } + } + if (this.#hasDisposeAfter && this.#disposed?.length) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + return deleted; + } + /** + * Clear the cache entirely, throwing away all values. + */ + clear() { + return this.#clear('delete'); + } + #clear(reason) { + for (const index of this.#rindexes({ allowStale: true })) { + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + v.__abortController.abort(new Error('deleted')); + } + else { + const k = this.#keyList[index]; + if (this.#hasDispose) { + this.#dispose?.(v, k, reason); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([v, k, reason]); + } + } + } + this.#keyMap.clear(); + this.#valList.fill(undefined); + this.#keyList.fill(undefined); + if (this.#ttls && this.#starts) { + this.#ttls.fill(0); + this.#starts.fill(0); + } + if (this.#sizes) { + this.#sizes.fill(0); + } + this.#head = 0; + this.#tail = 0; + this.#free.length = 0; + this.#calculatedSize = 0; + this.#size = 0; + if (this.#hasDisposeAfter && this.#disposed) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + } +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/.github/octokit/node_modules/lru-cache/dist/esm/index.js.map b/.github/octokit/node_modules/lru-cache/dist/esm/index.js.map new file mode 100644 index 000000000..8f7ac5310 --- /dev/null +++ b/.github/octokit/node_modules/lru-cache/dist/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,IAAI,GACR,OAAO,WAAW,KAAK,QAAQ;IAC/B,WAAW;IACX,OAAO,WAAW,CAAC,GAAG,KAAK,UAAU;IACnC,CAAC,CAAC,WAAW;IACb,CAAC,CAAC,IAAI,CAAA;AAEV,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAA;AAKhC,qBAAqB;AACrB,MAAM,OAAO,GAAG,CACd,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAChC,CAAA;AACzB,qBAAqB;AAErB,MAAM,WAAW,GAAG,CAClB,GAAW,EACX,IAAY,EACZ,IAAY,EACZ,EAAQ,EACR,EAAE;IACF,OAAO,OAAO,CAAC,WAAW,KAAK,UAAU;QACvC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC;QAC1C,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,IAAI,KAAK,GAAG,EAAE,CAAC,CAAA;AAChD,CAAC,CAAA;AAED,IAAI,EAAE,GAAG,UAAU,CAAC,eAAe,CAAA;AACnC,IAAI,EAAE,GAAG,UAAU,CAAC,WAAW,CAAA;AAE/B,qBAAqB;AACrB,IAAI,OAAO,EAAE,KAAK,WAAW,EAAE;IAC7B,YAAY;IACZ,EAAE,GAAG,MAAM,WAAW;QACpB,OAAO,CAAuB;QAC9B,QAAQ,GAA6B,EAAE,CAAA;QACvC,MAAM,CAAM;QACZ,OAAO,GAAY,KAAK,CAAA;QACxB,gBAAgB,CAAC,CAAS,EAAE,EAAwB;YAClD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QACxB,CAAC;KACF,CAAA;IACD,YAAY;IACZ,EAAE,GAAG,MAAM,eAAe;QACxB;YACE,cAAc,EAAE,CAAA;QAClB,CAAC;QACD,MAAM,GAAG,IAAI,EAAE,EAAE,CAAA;QACjB,KAAK,CAAC,MAAW;YACf,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO;gBAAE,OAAM;YAC/B,YAAY;YACZ,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAA;YAC3B,YAAY;YACZ,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG,IAAI,CAAA;YAC1B,YAAY;YACZ,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;gBACrC,EAAE,CAAC,MAAM,CAAC,CAAA;aACX;YACD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAA;QAC/B,CAAC;KACF,CAAA;IACD,IAAI,sBAAsB,GACxB,OAAO,CAAC,GAAG,EAAE,2BAA2B,KAAK,GAAG,CAAA;IAClD,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,IAAI,CAAC,sBAAsB;YAAE,OAAM;QACnC,sBAAsB,GAAG,KAAK,CAAA;QAC9B,WAAW,CACT,wDAAwD;YACtD,qDAAqD;YACrD,yDAAyD;YACzD,6DAA6D;YAC7D,mEAAmE;YACnE,mEAAmE;YACnE,qEAAqE,EACvE,qBAAqB,EACrB,SAAS,EACT,cAAc,CACf,CAAA;IACH,CAAC,CAAA;CACF;AACD,oBAAoB;AAEpB,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AAEtD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;AAI3B,MAAM,QAAQ,GAAG,CAAC,CAAM,EAAe,EAAE,CACvC,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAA;AAKlD,qBAAqB;AACrB,wCAAwC;AACxC,sEAAsE;AACtE,uEAAuE;AACvE,uEAAuE;AACvE,wEAAwE;AACxE,uDAAuD;AACvD,2BAA2B;AAC3B,wDAAwD;AACxD,MAAM,YAAY,GAAG,CAAC,GAAW,EAAE,EAAE,CACnC,CAAC,QAAQ,CAAC,GAAG,CAAC;IACZ,CAAC,CAAC,IAAI;IACN,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;QACvB,CAAC,CAAC,UAAU;QACZ,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC;YACxB,CAAC,CAAC,WAAW;YACb,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC;gBACxB,CAAC,CAAC,WAAW;gBACb,CAAC,CAAC,GAAG,IAAI,MAAM,CAAC,gBAAgB;oBAChC,CAAC,CAAC,SAAS;oBACX,CAAC,CAAC,IAAI,CAAA;AACV,oBAAoB;AAEpB,MAAM,SAAU,SAAQ,KAAa;IACnC,YAAY,IAAY;QACtB,KAAK,CAAC,IAAI,CAAC,CAAA;QACX,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACd,CAAC;CACF;AAKD,MAAM,KAAK;IACT,IAAI,CAAa;IACjB,MAAM,CAAQ;IACd,sBAAsB;IACtB,MAAM,CAAC,aAAa,GAAY,KAAK,CAAA;IACrC,MAAM,CAAC,MAAM,CAAC,GAAW;QACvB,MAAM,OAAO,GAAG,YAAY,CAAC,GAAG,CAAC,CAAA;QACjC,IAAI,CAAC,OAAO;YAAE,OAAO,EAAE,CAAA;QACvB,KAAK,CAAC,aAAa,GAAG,IAAI,CAAA;QAC1B,MAAM,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;QACjC,KAAK,CAAC,aAAa,GAAG,KAAK,CAAA;QAC3B,OAAO,CAAC,CAAA;IACV,CAAC;IACD,YACE,GAAW,EACX,OAAyC;QAEzC,qBAAqB;QACrB,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE;YACxB,MAAM,IAAI,SAAS,CAAC,yCAAyC,CAAC,CAAA;SAC/D;QACD,oBAAoB;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,CAAA;QAC5B,IAAI,CAAC,MAAM,GAAG,CAAC,CAAA;IACjB,CAAC;IACD,IAAI,CAAC,CAAQ;QACX,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAA;IAC9B,CAAC;IACD,GAAG;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,MAAM,CAAU,CAAA;IAC1C,CAAC;;AAw6BH;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,QAAQ;IAGnB,kDAAkD;IACzC,IAAI,CAAgB;IACpB,QAAQ,CAAe;IACvB,QAAQ,CAA0B;IAClC,aAAa,CAA0B;IACvC,YAAY,CAA6B;IACzC,WAAW,CAA8B;IAElD;;OAEG;IACH,GAAG,CAAuB;IAE1B;;OAEG;IACH,aAAa,CAAuB;IACpC;;OAEG;IACH,YAAY,CAAS;IACrB;;OAEG;IACH,cAAc,CAAS;IACvB;;OAEG;IACH,cAAc,CAAS;IACvB;;OAEG;IACH,UAAU,CAAS;IAEnB;;OAEG;IACH,cAAc,CAAS;IACvB;;OAEG;IACH,WAAW,CAAS;IACpB;;OAEG;IACH,YAAY,CAAe;IAC3B;;OAEG;IACH,eAAe,CAAgC;IAC/C;;OAEG;IACH,wBAAwB,CAAS;IACjC;;OAEG;IACH,kBAAkB,CAAS;IAC3B;;OAEG;IACH,sBAAsB,CAAS;IAC/B;;OAEG;IACH,0BAA0B,CAAS;IACnC;;OAEG;IACH,gBAAgB,CAAS;IAEzB,sBAAsB;IACtB,KAAK,CAAgB;IACrB,eAAe,CAAe;IAC9B,OAAO,CAAe;IACtB,QAAQ,CAAmB;IAC3B,QAAQ,CAAwC;IAChD,KAAK,CAAa;IAClB,KAAK,CAAa;IAClB,KAAK,CAAO;IACZ,KAAK,CAAO;IACZ,KAAK,CAAW;IAChB,SAAS,CAAsB;IAC/B,MAAM,CAAY;IAClB,OAAO,CAAY;IACnB,KAAK,CAAY;IAEjB,WAAW,CAAS;IACpB,eAAe,CAAS;IACxB,gBAAgB,CAAS;IAEzB;;;;;;;;OAQG;IACH,MAAM,CAAC,qBAAqB,CAI1B,CAAqB;QACrB,OAAO;YACL,aAAa;YACb,MAAM,EAAE,CAAC,CAAC,OAAO;YACjB,IAAI,EAAE,CAAC,CAAC,KAAK;YACb,KAAK,EAAE,CAAC,CAAC,MAAM;YACf,MAAM,EAAE,CAAC,CAAC,OAAyB;YACnC,OAAO,EAAE,CAAC,CAAC,QAAQ;YACnB,OAAO,EAAE,CAAC,CAAC,QAAQ;YACnB,IAAI,EAAE,CAAC,CAAC,KAAK;YACb,IAAI,EAAE,CAAC,CAAC,KAAK;YACb,IAAI,IAAI;gBACN,OAAO,CAAC,CAAC,KAAK,CAAA;YAChB,CAAC;YACD,IAAI,IAAI;gBACN,OAAO,CAAC,CAAC,KAAK,CAAA;YAChB,CAAC;YACD,IAAI,EAAE,CAAC,CAAC,KAAK;YACb,UAAU;YACV,iBAAiB,EAAE,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC;YACtD,eAAe,EAAE,CACf,CAAI,EACJ,KAAyB,EACzB,OAAwC,EACxC,OAAY,EACQ,EAAE,CACtB,CAAC,CAAC,gBAAgB,CAChB,CAAC,EACD,KAA0B,EAC1B,OAAO,EACP,OAAO,CACR;YACH,UAAU,EAAE,CAAC,KAAa,EAAQ,EAAE,CAClC,CAAC,CAAC,WAAW,CAAC,KAAc,CAAC;YAC/B,OAAO,EAAE,CAAC,OAAiC,EAAE,EAAE,CAC7C,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;YACrB,QAAQ,EAAE,CAAC,OAAiC,EAAE,EAAE,CAC9C,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC;YACtB,OAAO,EAAE,CAAC,KAAyB,EAAE,EAAE,CACrC,CAAC,CAAC,QAAQ,CAAC,KAAc,CAAC;SAC7B,CAAA;IACH,CAAC;IAED,8BAA8B;IAE9B;;OAEG;IACH,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,IAAI,CAAA;IAClB,CAAC;IACD;;OAEG;IACH,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAA;IACtB,CAAC;IACD;;OAEG;IACH,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,eAAe,CAAA;IAC7B,CAAC;IACD;;OAEG;IACH,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;IACD;;OAEG;IACH,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAA;IAC1B,CAAC;IACD,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,WAAW,CAAA;IACzB,CAAC;IACD;;OAEG;IACH,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAA;IACtB,CAAC;IACD;;OAEG;IACH,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,aAAa,CAAA;IAC3B,CAAC;IAED,YACE,OAAwD;QAExD,MAAM,EACJ,GAAG,GAAG,CAAC,EACP,GAAG,EACH,aAAa,GAAG,CAAC,EACjB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,UAAU,EACV,OAAO,EACP,YAAY,EACZ,cAAc,EACd,WAAW,EACX,OAAO,GAAG,CAAC,EACX,YAAY,GAAG,CAAC,EAChB,eAAe,EACf,WAAW,EACX,UAAU,EACV,wBAAwB,EACxB,kBAAkB,EAClB,0BAA0B,EAC1B,sBAAsB,EACtB,gBAAgB,GACjB,GAAG,OAAO,CAAA;QAEX,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC/B,MAAM,IAAI,SAAS,CAAC,0CAA0C,CAAC,CAAA;SAChE;QAED,MAAM,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;QACjD,IAAI,CAAC,SAAS,EAAE;YACd,MAAM,IAAI,KAAK,CAAC,qBAAqB,GAAG,GAAG,CAAC,CAAA;SAC7C;QAED,IAAI,CAAC,IAAI,GAAG,GAAG,CAAA;QACf,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;QACvB,IAAI,CAAC,YAAY,GAAG,YAAY,IAAI,IAAI,CAAC,QAAQ,CAAA;QACjD,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;QACtC,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;gBACxC,MAAM,IAAI,SAAS,CACjB,oEAAoE,CACrE,CAAA;aACF;YACD,IAAI,OAAO,IAAI,CAAC,eAAe,KAAK,UAAU,EAAE;gBAC9C,MAAM,IAAI,SAAS,CAAC,qCAAqC,CAAC,CAAA;aAC3D;SACF;QAED,IACE,UAAU,KAAK,SAAS;YACxB,OAAO,UAAU,KAAK,UAAU,EAChC;YACA,MAAM,IAAI,SAAS,CAAC,0CAA0C,CAAC,CAAA;SAChE;QACD,IAAI,CAAC,WAAW,GAAG,UAAU,CAAA;QAE7B,IACE,WAAW,KAAK,SAAS;YACzB,OAAO,WAAW,KAAK,UAAU,EACjC;YACA,MAAM,IAAI,SAAS,CACjB,6CAA6C,CAC9C,CAAA;SACF;QACD,IAAI,CAAC,YAAY,GAAG,WAAW,CAAA;QAC/B,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,WAAW,CAAA;QAEpC,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,EAAE,CAAA;QACxB,IAAI,CAAC,QAAQ,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAC9C,IAAI,CAAC,QAAQ,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAC9C,IAAI,CAAC,KAAK,GAAG,IAAI,SAAS,CAAC,GAAG,CAAC,CAAA;QAC/B,IAAI,CAAC,KAAK,GAAG,IAAI,SAAS,CAAC,GAAG,CAAC,CAAA;QAC/B,IAAI,CAAC,KAAK,GAAG,CAAU,CAAA;QACvB,IAAI,CAAC,KAAK,GAAG,CAAU,CAAA;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QAC9B,IAAI,CAAC,KAAK,GAAG,CAAC,CAAA;QACd,IAAI,CAAC,eAAe,GAAG,CAAC,CAAA;QAExB,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;YACjC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;SACxB;QACD,IAAI,OAAO,YAAY,KAAK,UAAU,EAAE;YACtC,IAAI,CAAC,aAAa,GAAG,YAAY,CAAA;YACjC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAA;SACpB;aAAM;YACL,IAAI,CAAC,aAAa,GAAG,SAAS,CAAA;YAC9B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;SAC3B;QACD,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAA;QAClC,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,aAAa,CAAA;QAE5C,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,cAAc,CAAA;QACtC,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,WAAW,CAAA;QAChC,IAAI,CAAC,wBAAwB,GAAG,CAAC,CAAC,wBAAwB,CAAA;QAC1D,IAAI,CAAC,0BAA0B,GAAG,CAAC,CAAC,0BAA0B,CAAA;QAC9D,IAAI,CAAC,sBAAsB,GAAG,CAAC,CAAC,sBAAsB,CAAA;QACtD,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC,gBAAgB,CAAA;QAE1C,iDAAiD;QACjD,IAAI,IAAI,CAAC,YAAY,KAAK,CAAC,EAAE;YAC3B,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC,EAAE;gBACvB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;oBAC5B,MAAM,IAAI,SAAS,CACjB,iDAAiD,CAClD,CAAA;iBACF;aACF;YACD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE;gBAChC,MAAM,IAAI,SAAS,CACjB,sDAAsD,CACvD,CAAA;aACF;YACD,IAAI,CAAC,uBAAuB,EAAE,CAAA;SAC/B;QAED,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,CAAA;QAC9B,IAAI,CAAC,kBAAkB,GAAG,CAAC,CAAC,kBAAkB,CAAA;QAC9C,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,cAAc,CAAA;QACtC,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,cAAc,CAAA;QACtC,IAAI,CAAC,aAAa;YAChB,QAAQ,CAAC,aAAa,CAAC,IAAI,aAAa,KAAK,CAAC;gBAC5C,CAAC,CAAC,aAAa;gBACf,CAAC,CAAC,CAAC,CAAA;QACP,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,YAAY,CAAA;QAClC,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,CAAA;QACnB,IAAI,IAAI,CAAC,GAAG,EAAE;YACZ,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;gBACvB,MAAM,IAAI,SAAS,CACjB,6CAA6C,CAC9C,CAAA;aACF;YACD,IAAI,CAAC,sBAAsB,EAAE,CAAA;SAC9B;QAED,2CAA2C;QAC3C,IAAI,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC,EAAE;YAC5D,MAAM,IAAI,SAAS,CACjB,kDAAkD,CACnD,CAAA;SACF;QACD,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YACtD,MAAM,IAAI,GAAG,qBAAqB,CAAA;YAClC,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE;gBACpB,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;gBAChB,MAAM,GAAG,GACP,wDAAwD;oBACxD,yCAAyC,CAAA;gBAC3C,WAAW,CAAC,GAAG,EAAE,uBAAuB,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;aAC1D;SACF;IACH,CAAC;IAED;;;OAGG;IACH,eAAe,CAAC,GAAM;QACpB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;IAC7C,CAAC;IAED,sBAAsB;QACpB,MAAM,IAAI,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACrC,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACvC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QACjB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;QAErB,IAAI,CAAC,WAAW,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE;YACpD,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;YACrC,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,CAAA;YACjB,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,CAAC,YAAY,EAAE;gBAClC,MAAM,CAAC,GAAG,UAAU,CAAC,GAAG,EAAE;oBACxB,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;wBACxB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAM,EAAE,QAAQ,CAAC,CAAA;qBAClD;gBACH,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,CAAA;gBACX,yCAAyC;gBACzC,qBAAqB;gBACrB,IAAI,CAAC,CAAC,KAAK,EAAE;oBACX,CAAC,CAAC,KAAK,EAAE,CAAA;iBACV;gBACD,oBAAoB;aACrB;QACH,CAAC,CAAA;QAED,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,EAAE;YAC5B,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;QACpD,CAAC,CAAA;QAED,IAAI,CAAC,UAAU,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAClC,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE;gBACf,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAA;gBACvB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;gBAC3B,oBAAoB;gBACpB,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK;oBAAE,OAAM;gBAC1B,MAAM,CAAC,GAAG,GAAG,GAAG,CAAA;gBAChB,MAAM,CAAC,KAAK,GAAG,KAAK,CAAA;gBACpB,MAAM,CAAC,GAAG,GAAG,SAAS,IAAI,MAAM,EAAE,CAAA;gBAClC,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,GAAG,KAAK,CAAA;gBAC9B,MAAM,CAAC,YAAY,GAAG,GAAG,GAAG,GAAG,CAAA;aAChC;QACH,CAAC,CAAA;QAED,0DAA0D;QAC1D,+BAA+B;QAC/B,IAAI,SAAS,GAAG,CAAC,CAAA;QACjB,MAAM,MAAM,GAAG,GAAG,EAAE;YAClB,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;YACpB,IAAI,IAAI,CAAC,aAAa,GAAG,CAAC,EAAE;gBAC1B,SAAS,GAAG,CAAC,CAAA;gBACb,MAAM,CAAC,GAAG,UAAU,CAClB,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EACrB,IAAI,CAAC,aAAa,CACnB,CAAA;gBACD,iCAAiC;gBACjC,qBAAqB;gBACrB,IAAI,CAAC,CAAC,KAAK,EAAE;oBACX,CAAC,CAAC,KAAK,EAAE,CAAA;iBACV;gBACD,oBAAoB;aACrB;YACD,OAAO,CAAC,CAAA;QACV,CAAC,CAAA;QAED,IAAI,CAAC,eAAe,GAAG,GAAG,CAAC,EAAE;YAC3B,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;YACnC,IAAI,KAAK,KAAK,SAAS,EAAE;gBACvB,OAAO,CAAC,CAAA;aACT;YACD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAA;YACvB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;YAC3B,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE;gBAClB,OAAO,QAAQ,CAAA;aAChB;YACD,MAAM,GAAG,GAAG,CAAC,SAAS,IAAI,MAAM,EAAE,CAAC,GAAG,KAAK,CAAA;YAC3C,OAAO,GAAG,GAAG,GAAG,CAAA;QAClB,CAAC,CAAA;QAED,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,EAAE;YACtB,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;YACvB,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAA;YACrB,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QACtD,CAAC,CAAA;IACH,CAAC;IAED,mDAAmD;IACnD,cAAc,GAA2B,GAAG,EAAE,GAAE,CAAC,CAAA;IACjD,UAAU,GACR,GAAG,EAAE,GAAE,CAAC,CAAA;IACV,WAAW,GAMC,GAAG,EAAE,GAAE,CAAC,CAAA;IACpB,oBAAoB;IAEpB,QAAQ,GAA8B,GAAG,EAAE,CAAC,KAAK,CAAA;IAEjD,uBAAuB;QACrB,MAAM,KAAK,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACtC,IAAI,CAAC,eAAe,GAAG,CAAC,CAAA;QACxB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;QACnB,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,EAAE;YAC7B,IAAI,CAAC,eAAe,IAAI,KAAK,CAAC,KAAK,CAAW,CAAA;YAC9C,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAClB,CAAC,CAAA;QACD,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE;YAClD,2CAA2C;YAC3C,sDAAsD;YACtD,IAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE;gBAC9B,OAAO,CAAC,CAAA;aACT;YACD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;gBACnB,IAAI,eAAe,EAAE;oBACnB,IAAI,OAAO,eAAe,KAAK,UAAU,EAAE;wBACzC,MAAM,IAAI,SAAS,CAAC,oCAAoC,CAAC,CAAA;qBAC1D;oBACD,IAAI,GAAG,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;oBAC5B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;wBACnB,MAAM,IAAI,SAAS,CACjB,0DAA0D,CAC3D,CAAA;qBACF;iBACF;qBAAM;oBACL,MAAM,IAAI,SAAS,CACjB,iDAAiD;wBAC/C,wDAAwD;wBACxD,sBAAsB,CACzB,CAAA;iBACF;aACF;YACD,OAAO,IAAI,CAAA;QACb,CAAC,CAAA;QACD,IAAI,CAAC,YAAY,GAAG,CAClB,KAAY,EACZ,IAAmB,EACnB,MAA2B,EAC3B,EAAE;YACF,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,CAAA;YACnB,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACjB,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,GAAI,KAAK,CAAC,KAAK,CAAY,CAAA;gBACxD,OAAO,IAAI,CAAC,eAAe,GAAG,OAAO,EAAE;oBACrC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;iBAClB;aACF;YACD,IAAI,CAAC,eAAe,IAAI,KAAK,CAAC,KAAK,CAAW,CAAA;YAC9C,IAAI,MAAM,EAAE;gBACV,MAAM,CAAC,SAAS,GAAG,IAAI,CAAA;gBACvB,MAAM,CAAC,mBAAmB,GAAG,IAAI,CAAC,eAAe,CAAA;aAClD;QACH,CAAC,CAAA;IACH,CAAC;IAED,eAAe,GAA2B,EAAE,CAAC,EAAE,GAAE,CAAC,CAAA;IAClD,YAAY,GAIA,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,GAAE,CAAC,CAAA;IAC/B,YAAY,GAKS,CACnB,EAAK,EACL,EAA0B,EAC1B,IAAoB,EACpB,eAA+C,EAC/C,EAAE;QACF,IAAI,IAAI,IAAI,eAAe,EAAE;YAC3B,MAAM,IAAI,SAAS,CACjB,kEAAkE,CACnE,CAAA;SACF;QACD,OAAO,CAAC,CAAA;IACV,CAAC,CAAC;IAEF,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,EAAE;QAC7C,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,IAAI,GAAI;gBAC/B,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE;oBAC1B,MAAK;iBACN;gBACD,IAAI,UAAU,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;oBACnC,MAAM,CAAC,CAAA;iBACR;gBACD,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,EAAE;oBACpB,MAAK;iBACN;qBAAM;oBACL,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAU,CAAA;iBAC3B;aACF;SACF;IACH,CAAC;IAED,CAAC,SAAS,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,EAAE;QAC9C,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,IAAI,GAAI;gBAC/B,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE;oBAC1B,MAAK;iBACN;gBACD,IAAI,UAAU,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;oBACnC,MAAM,CAAC,CAAA;iBACR;gBACD,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,EAAE;oBACpB,MAAK;iBACN;qBAAM;oBACL,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAU,CAAA;iBAC3B;aACF;SACF;IACH,CAAC;IAED,aAAa,CAAC,KAAY;QACxB,OAAO,CACL,KAAK,KAAK,SAAS;YACnB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAM,CAAC,KAAK,KAAK,CACtD,CAAA;IACH,CAAC;IAED;;;OAGG;IACH,CAAC,OAAO;QACN,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YAC/B,IACE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,SAAS;gBAC9B,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,SAAS;gBAC9B,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAC1C;gBACA,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAW,CAAA;aACrD;SACF;IACH,CAAC;IAED;;;;;OAKG;IACH,CAAC,QAAQ;QACP,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE,EAAE;YAChC,IACE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,SAAS;gBAC9B,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,SAAS;gBAC9B,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAC1C;gBACA,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;aAC3C;SACF;IACH,CAAC;IAED;;;OAGG;IACH,CAAC,IAAI;QACH,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YAC/B,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YAC1B,IACE,CAAC,KAAK,SAAS;gBACf,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAC1C;gBACA,MAAM,CAAC,CAAA;aACR;SACF;IACH,CAAC;IAED;;;;;OAKG;IACH,CAAC,KAAK;QACJ,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE,EAAE;YAChC,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YAC1B,IACE,CAAC,KAAK,SAAS;gBACf,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAC1C;gBACA,MAAM,CAAC,CAAA;aACR;SACF;IACH,CAAC;IAED;;;OAGG;IACH,CAAC,MAAM;QACL,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YAC/B,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YAC1B,IACE,CAAC,KAAK,SAAS;gBACf,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAC1C;gBACA,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAM,CAAA;aAC5B;SACF;IACH,CAAC;IAED;;;;;OAKG;IACH,CAAC,OAAO;QACN,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE,EAAE;YAChC,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YAC1B,IACE,CAAC,KAAK,SAAS;gBACf,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAC1C;gBACA,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;aACvB;SACF;IACH,CAAC;IAED;;;OAGG;IACH,CAAC,MAAM,CAAC,QAAQ,CAAC;QACf,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;IACvB,CAAC;IAED;;;;OAIG;IACH,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,UAAU,CAAA;IAEjC;;;OAGG;IACH,IAAI,CACF,EAAqD,EACrD,aAA4C,EAAE;QAE9C,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YAC/B,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YAC1B,MAAM,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;gBACtC,CAAC,CAAC,CAAC,CAAC,oBAAoB;gBACxB,CAAC,CAAC,CAAC,CAAA;YACL,IAAI,KAAK,KAAK,SAAS;gBAAE,SAAQ;YACjC,IAAI,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAM,EAAE,IAAI,CAAC,EAAE;gBAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAM,EAAE,UAAU,CAAC,CAAA;aACnD;SACF;IACH,CAAC;IAED;;;;;;;;;;OAUG;IACH,OAAO,CACL,EAAiD,EACjD,QAAa,IAAI;QAEjB,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YAC/B,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YAC1B,MAAM,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;gBACtC,CAAC,CAAC,CAAC,CAAC,oBAAoB;gBACxB,CAAC,CAAC,CAAC,CAAA;YACL,IAAI,KAAK,KAAK,SAAS;gBAAE,SAAQ;YACjC,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAM,EAAE,IAAI,CAAC,CAAA;SACnD;IACH,CAAC;IAED;;;OAGG;IACH,QAAQ,CACN,EAAiD,EACjD,QAAa,IAAI;QAEjB,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE,EAAE;YAChC,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YAC1B,MAAM,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;gBACtC,CAAC,CAAC,CAAC,CAAC,oBAAoB;gBACxB,CAAC,CAAC,CAAC,CAAA;YACL,IAAI,KAAK,KAAK,SAAS;gBAAE,SAAQ;YACjC,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAM,EAAE,IAAI,CAAC,CAAA;SACnD;IACH,CAAC;IAED;;;OAGG;IACH,UAAU;QACR,IAAI,OAAO,GAAG,KAAK,CAAA;QACnB,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,EAAE;YACpD,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;gBACpB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAM,EAAE,QAAQ,CAAC,CAAA;gBAC7C,OAAO,GAAG,IAAI,CAAA;aACf;SACF;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,GAAM;QACT,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QAC/B,IAAI,CAAC,KAAK,SAAS;YAAE,OAAO,SAAS,CAAA;QACrC,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;QAC1B,MAAM,KAAK,GAAkB,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;YACrD,CAAC,CAAC,CAAC,CAAC,oBAAoB;YACxB,CAAC,CAAC,CAAC,CAAA;QACL,IAAI,KAAK,KAAK,SAAS;YAAE,OAAO,SAAS,CAAA;QACzC,MAAM,KAAK,GAAsB,EAAE,KAAK,EAAE,CAAA;QAC1C,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,OAAO,EAAE;YAC9B,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;YACzB,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;YAC7B,IAAI,GAAG,IAAI,KAAK,EAAE;gBAChB,MAAM,MAAM,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAA;gBACzC,KAAK,CAAC,GAAG,GAAG,MAAM,CAAA;gBAClB,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;aACzB;SACF;QACD,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;SAC5B;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,IAAI;QACF,MAAM,GAAG,GAA6B,EAAE,CAAA;QACxC,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,EAAE;YACnD,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YAC5B,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YAC1B,MAAM,KAAK,GAAkB,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;gBACrD,CAAC,CAAC,CAAC,CAAC,oBAAoB;gBACxB,CAAC,CAAC,CAAC,CAAA;YACL,IAAI,KAAK,KAAK,SAAS,IAAI,GAAG,KAAK,SAAS;gBAAE,SAAQ;YACtD,MAAM,KAAK,GAAsB,EAAE,KAAK,EAAE,CAAA;YAC1C,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,OAAO,EAAE;gBAC9B,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;gBACzB,yDAAyD;gBACzD,4DAA4D;gBAC5D,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,GAAI,IAAI,CAAC,OAAO,CAAC,CAAC,CAAY,CAAA;gBACpD,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,CAAA;aAC3C;YACD,IAAI,IAAI,CAAC,MAAM,EAAE;gBACf,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;aAC5B;YACD,GAAG,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAA;SAC1B;QACD,OAAO,GAAG,CAAA;IACZ,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CAAC,GAA6B;QAChC,IAAI,CAAC,KAAK,EAAE,CAAA;QACZ,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,GAAG,EAAE;YAC9B,IAAI,KAAK,CAAC,KAAK,EAAE;gBACf,2DAA2D;gBAC3D,6DAA6D;gBAC7D,6DAA6D;gBAC7D,eAAe;gBACf,EAAE;gBACF,4DAA4D;gBAC5D,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,KAAK,CAAA;gBACpC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,CAAA;aAC/B;YACD,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;SAClC;IACH,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,GAAG,CACD,CAAI,EACJ,CAAqC,EACrC,aAA4C,EAAE;QAE9C,IAAI,CAAC,KAAK,SAAS,EAAE;YACnB,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;YACd,OAAO,IAAI,CAAA;SACZ;QACD,MAAM,EACJ,GAAG,GAAG,IAAI,CAAC,GAAG,EACd,KAAK,EACL,cAAc,GAAG,IAAI,CAAC,cAAc,EACpC,eAAe,GAAG,IAAI,CAAC,eAAe,EACtC,MAAM,GACP,GAAG,UAAU,CAAA;QACd,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC,WAAW,EAAE,GAAG,UAAU,CAAA;QAEnD,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,CAC5B,CAAC,EACD,CAAC,EACD,UAAU,CAAC,IAAI,IAAI,CAAC,EACpB,eAAe,CAChB,CAAA;QACD,6CAA6C;QAC7C,6CAA6C;QAC7C,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,GAAG,IAAI,CAAC,YAAY,EAAE;YACjD,IAAI,MAAM,EAAE;gBACV,MAAM,CAAC,GAAG,GAAG,MAAM,CAAA;gBACnB,MAAM,CAAC,oBAAoB,GAAG,IAAI,CAAA;aACnC;YACD,sDAAsD;YACtD,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;YACtB,OAAO,IAAI,CAAA;SACZ;QACD,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;QAC9D,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,WAAW;YACX,KAAK,GAAG,CACN,IAAI,CAAC,KAAK,KAAK,CAAC;gBACd,CAAC,CAAC,IAAI,CAAC,KAAK;gBACZ,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;oBACzB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE;oBAClB,CAAC,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI;wBAC1B,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;wBACpB,CAAC,CAAC,IAAI,CAAC,KAAK,CACN,CAAA;YACV,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YACxB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YACxB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;YAC1B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAA;YAC9B,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAA;YAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;YAClB,IAAI,CAAC,KAAK,EAAE,CAAA;YACZ,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;YACtC,IAAI,MAAM;gBAAE,MAAM,CAAC,GAAG,GAAG,KAAK,CAAA;YAC9B,WAAW,GAAG,KAAK,CAAA;SACpB;aAAM;YACL,SAAS;YACT,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;YACvB,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAA2B,CAAA;YAC7D,IAAI,CAAC,KAAK,MAAM,EAAE;gBAChB,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE;oBAC3D,MAAM,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,CAAA;oBACrD,MAAM,EAAE,oBAAoB,EAAE,CAAC,EAAE,GAAG,MAAM,CAAA;oBAC1C,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,cAAc,EAAE;wBACtC,IAAI,IAAI,CAAC,WAAW,EAAE;4BACpB,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAM,EAAE,CAAC,EAAE,KAAK,CAAC,CAAA;yBAClC;wBACD,IAAI,IAAI,CAAC,gBAAgB,EAAE;4BACzB,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAM,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CAAA;yBACzC;qBACF;iBACF;qBAAM,IAAI,CAAC,cAAc,EAAE;oBAC1B,IAAI,IAAI,CAAC,WAAW,EAAE;wBACpB,IAAI,CAAC,QAAQ,EAAE,CAAC,MAAW,EAAE,CAAC,EAAE,KAAK,CAAC,CAAA;qBACvC;oBACD,IAAI,IAAI,CAAC,gBAAgB,EAAE;wBACzB,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,MAAW,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CAAA;qBAC9C;iBACF;gBACD,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAA;gBAC3B,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;gBACtC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBACxB,IAAI,MAAM,EAAE;oBACV,MAAM,CAAC,GAAG,GAAG,SAAS,CAAA;oBACtB,MAAM,QAAQ,GACZ,MAAM,IAAI,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC;wBACvC,CAAC,CAAC,MAAM,CAAC,oBAAoB;wBAC7B,CAAC,CAAC,MAAM,CAAA;oBACZ,IAAI,QAAQ,KAAK,SAAS;wBAAE,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAA;iBACvD;aACF;iBAAM,IAAI,MAAM,EAAE;gBACjB,MAAM,CAAC,GAAG,GAAG,QAAQ,CAAA;aACtB;SACF;QACD,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YAC5B,IAAI,CAAC,sBAAsB,EAAE,CAAA;SAC9B;QACD,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,IAAI,CAAC,WAAW,EAAE;gBAChB,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,CAAA;aACpC;YACD,IAAI,MAAM;gBAAE,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;SAC3C;QACD,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,SAAS,EAAE;YAC9D,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAA;YACzB,IAAI,IAAmC,CAAA;YACvC,OAAO,CAAC,IAAI,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;gBAC3B,IAAI,CAAC,aAAa,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;aAC9B;SACF;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;OAGG;IACH,GAAG;QACD,IAAI;YACF,OAAO,IAAI,CAAC,KAAK,EAAE;gBACjB,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;gBACrC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;gBACjB,IAAI,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE;oBAChC,IAAI,GAAG,CAAC,oBAAoB,EAAE;wBAC5B,OAAO,GAAG,CAAC,oBAAoB,CAAA;qBAChC;iBACF;qBAAM,IAAI,GAAG,KAAK,SAAS,EAAE;oBAC5B,OAAO,GAAG,CAAA;iBACX;aACF;SACF;gBAAS;YACR,IAAI,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,SAAS,EAAE;gBAC3C,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAA;gBACzB,IAAI,IAAmC,CAAA;gBACvC,OAAO,CAAC,IAAI,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;oBAC3B,IAAI,CAAC,aAAa,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;iBAC9B;aACF;SACF;IACH,CAAC;IAED,MAAM,CAAC,IAAa;QAClB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAA;QACvB,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAM,CAAA;QAClC,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAM,CAAA;QAClC,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE;YACtD,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAA;SAChD;aAAM,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACpD,IAAI,IAAI,CAAC,WAAW,EAAE;gBACpB,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAA;aAC/B;YACD,IAAI,IAAI,CAAC,gBAAgB,EAAE;gBACzB,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,CAAA;aACtC;SACF;QACD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAA;QAC1B,2DAA2D;QAC3D,IAAI,IAAI,EAAE;YACR,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,SAAS,CAAA;YAC/B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,SAAS,CAAA;YAC/B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;SACtB;QACD,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC,EAAE;YACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,CAAU,CAAA;YACpC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAA;SACtB;aAAM;YACL,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAU,CAAA;SACvC;QACD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QACtB,IAAI,CAAC,KAAK,EAAE,CAAA;QACZ,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,GAAG,CAAC,CAAI,EAAE,aAA4C,EAAE;QACtD,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,GACpD,UAAU,CAAA;QACZ,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;QACjC,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;YAC9B,IACE,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;gBAC1B,CAAC,CAAC,oBAAoB,KAAK,SAAS,EACpC;gBACA,OAAO,KAAK,CAAA;aACb;YACD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;gBACzB,IAAI,cAAc,EAAE;oBAClB,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAA;iBAC3B;gBACD,IAAI,MAAM,EAAE;oBACV,MAAM,CAAC,GAAG,GAAG,KAAK,CAAA;oBAClB,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;iBAC/B;gBACD,OAAO,IAAI,CAAA;aACZ;iBAAM,IAAI,MAAM,EAAE;gBACjB,MAAM,CAAC,GAAG,GAAG,OAAO,CAAA;gBACpB,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;aAC/B;SACF;aAAM,IAAI,MAAM,EAAE;YACjB,MAAM,CAAC,GAAG,GAAG,MAAM,CAAA;SACpB;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAED;;;;;;OAMG;IACH,IAAI,CAAC,CAAI,EAAE,cAA8C,EAAE;QACzD,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,WAAW,CAAA;QACpD,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;QACjC,IACE,KAAK,KAAK,SAAS;YACnB,CAAC,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EACrC;YACA,OAAM;SACP;QACD,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;QAC9B,oEAAoE;QACpE,OAAO,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAA;IAChE,CAAC;IAED,gBAAgB,CACd,CAAI,EACJ,KAAwB,EACxB,OAAwC,EACxC,OAAY;QAEZ,MAAM,CAAC,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;QAChE,IAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE;YAC9B,OAAO,CAAC,CAAA;SACT;QAED,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE,CAAA;QACnB,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;QAC1B,yDAAyD;QACzD,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;YAC/D,MAAM,EAAE,EAAE,CAAC,MAAM;SAClB,CAAC,CAAA;QAEF,MAAM,SAAS,GAAG;YAChB,MAAM,EAAE,EAAE,CAAC,MAAM;YACjB,OAAO;YACP,OAAO;SACR,CAAA;QAED,MAAM,EAAE,GAAG,CACT,CAAgB,EAChB,WAAW,GAAG,KAAK,EACJ,EAAE;YACjB,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAA;YAC7B,MAAM,WAAW,GAAG,OAAO,CAAC,gBAAgB,IAAI,CAAC,KAAK,SAAS,CAAA;YAC/D,IAAI,OAAO,CAAC,MAAM,EAAE;gBAClB,IAAI,OAAO,IAAI,CAAC,WAAW,EAAE;oBAC3B,OAAO,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAA;oBAClC,OAAO,CAAC,MAAM,CAAC,UAAU,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAA;oBAC5C,IAAI,WAAW;wBAAE,OAAO,CAAC,MAAM,CAAC,iBAAiB,GAAG,IAAI,CAAA;iBACzD;qBAAM;oBACL,OAAO,CAAC,MAAM,CAAC,aAAa,GAAG,IAAI,CAAA;iBACpC;aACF;YACD,IAAI,OAAO,IAAI,CAAC,WAAW,IAAI,CAAC,WAAW,EAAE;gBAC3C,OAAO,SAAS,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;aACnC;YACD,qEAAqE;YACrE,MAAM,EAAE,GAAG,CAAuB,CAAA;YAClC,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAc,CAAC,KAAK,CAAC,EAAE;gBACvC,IAAI,CAAC,KAAK,SAAS,EAAE;oBACnB,IAAI,EAAE,CAAC,oBAAoB,EAAE;wBAC3B,IAAI,CAAC,QAAQ,CAAC,KAAc,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAA;qBACxD;yBAAM;wBACL,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;qBACzB;iBACF;qBAAM;oBACL,IAAI,OAAO,CAAC,MAAM;wBAAE,OAAO,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAA;oBACtD,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;iBAClC;aACF;YACD,OAAO,CAAC,CAAA;QACV,CAAC,CAAA;QAED,MAAM,EAAE,GAAG,CAAC,EAAO,EAAE,EAAE;YACrB,IAAI,OAAO,CAAC,MAAM,EAAE;gBAClB,OAAO,CAAC,MAAM,CAAC,aAAa,GAAG,IAAI,CAAA;gBACnC,OAAO,CAAC,MAAM,CAAC,UAAU,GAAG,EAAE,CAAA;aAC/B;YACD,OAAO,SAAS,CAAC,EAAE,CAAC,CAAA;QACtB,CAAC,CAAA;QAED,MAAM,SAAS,GAAG,CAAC,EAAO,EAAiB,EAAE;YAC3C,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAA;YAC7B,MAAM,iBAAiB,GACrB,OAAO,IAAI,OAAO,CAAC,sBAAsB,CAAA;YAC3C,MAAM,UAAU,GACd,iBAAiB,IAAI,OAAO,CAAC,0BAA0B,CAAA;YACzD,MAAM,QAAQ,GAAG,UAAU,IAAI,OAAO,CAAC,wBAAwB,CAAA;YAC/D,MAAM,EAAE,GAAG,CAAuB,CAAA;YAClC,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAc,CAAC,KAAK,CAAC,EAAE;gBACvC,qEAAqE;gBACrE,sEAAsE;gBACtE,MAAM,GAAG,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC,oBAAoB,KAAK,SAAS,CAAA;gBAC9D,IAAI,GAAG,EAAE;oBACP,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;iBACzB;qBAAM,IAAI,CAAC,iBAAiB,EAAE;oBAC7B,oDAAoD;oBACpD,oDAAoD;oBACpD,mDAAmD;oBACnD,qDAAqD;oBACrD,IAAI,CAAC,QAAQ,CAAC,KAAc,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAA;iBACxD;aACF;YACD,IAAI,UAAU,EAAE;gBACd,IAAI,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,oBAAoB,KAAK,SAAS,EAAE;oBAC3D,OAAO,CAAC,MAAM,CAAC,aAAa,GAAG,IAAI,CAAA;iBACpC;gBACD,OAAO,EAAE,CAAC,oBAAoB,CAAA;aAC/B;iBAAM,IAAI,EAAE,CAAC,UAAU,KAAK,EAAE,EAAE;gBAC/B,MAAM,EAAE,CAAA;aACT;QACH,CAAC,CAAA;QAED,MAAM,KAAK,GAAG,CACZ,GAA+B,EAC/B,GAAqB,EACrB,EAAE;YACF,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAA;YAChD,IAAI,GAAG,IAAI,GAAG,YAAY,OAAO,EAAE;gBACjC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;aACzD;YACD,8CAA8C;YAC9C,8CAA8C;YAC9C,+BAA+B;YAC/B,EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;gBACvC,IACE,CAAC,OAAO,CAAC,gBAAgB;oBACzB,OAAO,CAAC,sBAAsB,EAC9B;oBACA,GAAG,CAAC,SAAS,CAAC,CAAA;oBACd,iDAAiD;oBACjD,IAAI,OAAO,CAAC,sBAAsB,EAAE;wBAClC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;qBACvB;iBACF;YACH,CAAC,CAAC,CAAA;QACJ,CAAC,CAAA;QAED,IAAI,OAAO,CAAC,MAAM;YAAE,OAAO,CAAC,MAAM,CAAC,eAAe,GAAG,IAAI,CAAA;QACzD,MAAM,CAAC,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;QACzC,MAAM,EAAE,GAAuB,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE;YAC9C,iBAAiB,EAAE,EAAE;YACrB,oBAAoB,EAAE,CAAC;YACvB,UAAU,EAAE,SAAS;SACtB,CAAC,CAAA;QAEF,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,iCAAiC;YACjC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAA;YAC5D,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;SAC5B;aAAM;YACL,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,CAAA;SAC1B;QACD,OAAO,EAAE,CAAA;IACX,CAAC;IAED,kBAAkB,CAAC,CAAM;QACvB,IAAI,CAAC,IAAI,CAAC,eAAe;YAAE,OAAO,KAAK,CAAA;QACvC,MAAM,CAAC,GAAG,CAAuB,CAAA;QACjC,OAAO,CACL,CAAC,CAAC,CAAC;YACH,CAAC,YAAY,OAAO;YACpB,CAAC,CAAC,cAAc,CAAC,sBAAsB,CAAC;YACxC,CAAC,CAAC,iBAAiB,YAAY,EAAE,CAClC,CAAA;IACH,CAAC;IA+GD,KAAK,CAAC,KAAK,CACT,CAAI,EACJ,eAAgD,EAAE;QAElD,MAAM;QACJ,cAAc;QACd,UAAU,GAAG,IAAI,CAAC,UAAU,EAC5B,cAAc,GAAG,IAAI,CAAC,cAAc,EACpC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB;QAC5C,cAAc;QACd,GAAG,GAAG,IAAI,CAAC,GAAG,EACd,cAAc,GAAG,IAAI,CAAC,cAAc,EACpC,IAAI,GAAG,CAAC,EACR,eAAe,GAAG,IAAI,CAAC,eAAe,EACtC,WAAW,GAAG,IAAI,CAAC,WAAW;QAC9B,0BAA0B;QAC1B,wBAAwB,GAAG,IAAI,CAAC,wBAAwB,EACxD,0BAA0B,GAAG,IAAI,CAAC,0BAA0B,EAC5D,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,EACxC,sBAAsB,GAAG,IAAI,CAAC,sBAAsB,EACpD,OAAO,EACP,YAAY,GAAG,KAAK,EACpB,MAAM,EACN,MAAM,GACP,GAAG,YAAY,CAAA;QAEhB,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;YACzB,IAAI,MAAM;gBAAE,MAAM,CAAC,KAAK,GAAG,KAAK,CAAA;YAChC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE;gBACjB,UAAU;gBACV,cAAc;gBACd,kBAAkB;gBAClB,MAAM;aACP,CAAC,CAAA;SACH;QAED,MAAM,OAAO,GAAG;YACd,UAAU;YACV,cAAc;YACd,kBAAkB;YAClB,GAAG;YACH,cAAc;YACd,IAAI;YACJ,eAAe;YACf,WAAW;YACX,wBAAwB;YACxB,0BAA0B;YAC1B,sBAAsB;YACtB,gBAAgB;YAChB,MAAM;YACN,MAAM;SACP,CAAA;QAED,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;QAC/B,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,IAAI,MAAM;gBAAE,MAAM,CAAC,KAAK,GAAG,MAAM,CAAA;YACjC,MAAM,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;YAC3D,OAAO,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,CAAA;SAC1B;aAAM;YACL,mCAAmC;YACnC,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;YAC9B,IAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE;gBAC9B,MAAM,KAAK,GACT,UAAU,IAAI,CAAC,CAAC,oBAAoB,KAAK,SAAS,CAAA;gBACpD,IAAI,MAAM,EAAE;oBACV,MAAM,CAAC,KAAK,GAAG,UAAU,CAAA;oBACzB,IAAI,KAAK;wBAAE,MAAM,CAAC,aAAa,GAAG,IAAI,CAAA;iBACvC;gBACD,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,CAAA;aAC3D;YAED,mEAAmE;YACnE,gEAAgE;YAChE,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;YACpC,IAAI,CAAC,YAAY,IAAI,CAAC,OAAO,EAAE;gBAC7B,IAAI,MAAM;oBAAE,MAAM,CAAC,KAAK,GAAG,KAAK,CAAA;gBAChC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;gBACvB,IAAI,cAAc,EAAE;oBAClB,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAA;iBAC3B;gBACD,IAAI,MAAM;oBAAE,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;gBAC1C,OAAO,CAAC,CAAA;aACT;YAED,iEAAiE;YACjE,qBAAqB;YACrB,MAAM,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;YAC3D,MAAM,QAAQ,GAAG,CAAC,CAAC,oBAAoB,KAAK,SAAS,CAAA;YACrD,MAAM,QAAQ,GAAG,QAAQ,IAAI,UAAU,CAAA;YACvC,IAAI,MAAM,EAAE;gBACV,MAAM,CAAC,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAA;gBAC5C,IAAI,QAAQ,IAAI,OAAO;oBAAE,MAAM,CAAC,aAAa,GAAG,IAAI,CAAA;aACrD;YACD,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,CAAA;SAC9D;IACH,CAAC;IAoCD,KAAK,CAAC,UAAU,CACd,CAAI,EACJ,eAAgD,EAAE;QAElD,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CACxB,CAAC,EACD,YAI8C,CAC/C,CAAA;QACD,IAAI,CAAC,KAAK,SAAS;YAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;QAClE,OAAO,CAAC,CAAA;IACV,CAAC;IAqCD,IAAI,CAAC,CAAI,EAAE,cAA8C,EAAE;QACzD,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAA;QACnC,IAAI,CAAC,UAAU,EAAE;YACf,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;SACzD;QACD,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,OAAO,EAAE,GAAG,WAAW,CAAA;QACzD,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;QAC9B,IAAI,CAAC,YAAY,IAAI,CAAC,KAAK,SAAS;YAAE,OAAO,CAAC,CAAA;QAC9C,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE;YAC1B,OAAO;YACP,OAAO;SAC8B,CAAC,CAAA;QACxC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;QACxB,OAAO,EAAE,CAAA;IACX,CAAC;IAED;;;;;OAKG;IACH,GAAG,CAAC,CAAI,EAAE,aAA4C,EAAE;QACtD,MAAM,EACJ,UAAU,GAAG,IAAI,CAAC,UAAU,EAC5B,cAAc,GAAG,IAAI,CAAC,cAAc,EACpC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,EAC5C,MAAM,GACP,GAAG,UAAU,CAAA;QACd,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;QACjC,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;YAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAA;YAC/C,IAAI,MAAM;gBAAE,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;YAC1C,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;gBACxB,IAAI,MAAM;oBAAE,MAAM,CAAC,GAAG,GAAG,OAAO,CAAA;gBAChC,mDAAmD;gBACnD,IAAI,CAAC,QAAQ,EAAE;oBACb,IAAI,CAAC,kBAAkB,EAAE;wBACvB,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAA;qBAC1B;oBACD,IAAI,MAAM,IAAI,UAAU;wBAAE,MAAM,CAAC,aAAa,GAAG,IAAI,CAAA;oBACrD,OAAO,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAA;iBACtC;qBAAM;oBACL,IACE,MAAM;wBACN,UAAU;wBACV,KAAK,CAAC,oBAAoB,KAAK,SAAS,EACxC;wBACA,MAAM,CAAC,aAAa,GAAG,IAAI,CAAA;qBAC5B;oBACD,OAAO,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAC,SAAS,CAAA;iBAC3D;aACF;iBAAM;gBACL,IAAI,MAAM;oBAAE,MAAM,CAAC,GAAG,GAAG,KAAK,CAAA;gBAC9B,gEAAgE;gBAChE,iEAAiE;gBACjE,kEAAkE;gBAClE,oEAAoE;gBACpE,qCAAqC;gBACrC,IAAI,QAAQ,EAAE;oBACZ,OAAO,KAAK,CAAC,oBAAoB,CAAA;iBAClC;gBACD,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;gBACvB,IAAI,cAAc,EAAE;oBAClB,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAA;iBAC3B;gBACD,OAAO,KAAK,CAAA;aACb;SACF;aAAM,IAAI,MAAM,EAAE;YACjB,MAAM,CAAC,GAAG,GAAG,MAAM,CAAA;SACpB;IACH,CAAC;IAED,QAAQ,CAAC,CAAQ,EAAE,CAAQ;QACzB,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;QACjB,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;IACnB,CAAC;IAED,WAAW,CAAC,KAAY;QACtB,iCAAiC;QACjC,oCAAoC;QACpC,OAAO;QACP,6DAA6D;QAC7D,0CAA0C;QAC1C,qBAAqB;QACrB,qBAAqB;QACrB,eAAe;QACf,IAAI,KAAK,KAAK,IAAI,CAAC,KAAK,EAAE;YACxB,IAAI,KAAK,KAAK,IAAI,CAAC,KAAK,EAAE;gBACxB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAU,CAAA;aACxC;iBAAM;gBACL,IAAI,CAAC,QAAQ,CACX,IAAI,CAAC,KAAK,CAAC,KAAK,CAAU,EAC1B,IAAI,CAAC,KAAK,CAAC,KAAK,CAAU,CAC3B,CAAA;aACF;YACD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;YAChC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;SACnB;IACH,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,CAAI;QACT,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAA;IAClC,CAAC;IAED,OAAO,CAAC,CAAI,EAAE,MAA8B;QAC1C,IAAI,OAAO,GAAG,KAAK,CAAA;QACnB,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC,EAAE;YACpB,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;YACjC,IAAI,KAAK,KAAK,SAAS,EAAE;gBACvB,OAAO,GAAG,IAAI,CAAA;gBACd,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC,EAAE;oBACpB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;iBACpB;qBAAM;oBACL,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAA;oBAC3B,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;oBAC9B,IAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE;wBAC9B,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAA;qBAChD;yBAAM,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,gBAAgB,EAAE;wBACpD,IAAI,IAAI,CAAC,WAAW,EAAE;4BACpB,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAA;yBACnC;wBACD,IAAI,IAAI,CAAC,gBAAgB,EAAE;4BACzB,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAA;yBAC1C;qBACF;oBACD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;oBACtB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,SAAS,CAAA;oBAChC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,SAAS,CAAA;oBAChC,IAAI,KAAK,KAAK,IAAI,CAAC,KAAK,EAAE;wBACxB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAU,CAAA;qBACxC;yBAAM,IAAI,KAAK,KAAK,IAAI,CAAC,KAAK,EAAE;wBAC/B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAU,CAAA;qBACxC;yBAAM;wBACL,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAW,CAAA;wBACtC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAW,CAAA;wBAC5C,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAW,CAAA;wBACtC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAW,CAAA;qBAC7C;oBACD,IAAI,CAAC,KAAK,EAAE,CAAA;oBACZ,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;iBACvB;aACF;SACF;QACD,IAAI,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE;YACnD,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAA;YACzB,IAAI,IAAmC,CAAA;YACvC,OAAO,CAAC,IAAI,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;gBAC3B,IAAI,CAAC,aAAa,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;aAC9B;SACF;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;IAED;;OAEG;IACH,KAAK;QACH,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IAC9B,CAAC;IACD,MAAM,CAAC,MAA8B;QACnC,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,EAAE;YACxD,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;YAC9B,IAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE;gBAC9B,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAA;aAChD;iBAAM;gBACL,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;gBAC9B,IAAI,IAAI,CAAC,WAAW,EAAE;oBACpB,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAM,EAAE,CAAM,EAAE,MAAM,CAAC,CAAA;iBACxC;gBACD,IAAI,IAAI,CAAC,gBAAgB,EAAE;oBACzB,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,MAAM,CAAC,CAAC,CAAA;iBAC/C;aACF;SACF;QAED,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAA;QACpB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAC7B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAC7B,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,OAAO,EAAE;YAC9B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;YAClB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;SACrB;QACD,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;SACpB;QACD,IAAI,CAAC,KAAK,GAAG,CAAU,CAAA;QACvB,IAAI,CAAC,KAAK,GAAG,CAAU,CAAA;QACvB,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAA;QACrB,IAAI,CAAC,eAAe,GAAG,CAAC,CAAA;QACxB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAA;QACd,IAAI,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,SAAS,EAAE;YAC3C,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAA;YACzB,IAAI,IAAmC,CAAA;YACvC,OAAO,CAAC,IAAI,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;gBAC3B,IAAI,CAAC,aAAa,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;aAC9B;SACF;IACH,CAAC;CACF","sourcesContent":["/**\n * @module LRUCache\n */\n\n// module-private names and types\ntype Perf = { now: () => number }\nconst perf: Perf =\n typeof performance === 'object' &&\n performance &&\n typeof performance.now === 'function'\n ? performance\n : Date\n\nconst warned = new Set()\n\n// either a function or a class\ntype ForC = ((...a: any[]) => any) | { new (...a: any[]): any }\n\n/* c8 ignore start */\nconst PROCESS = (\n typeof process === 'object' && !!process ? process : {}\n) as { [k: string]: any }\n/* c8 ignore start */\n\nconst emitWarning = (\n msg: string,\n type: string,\n code: string,\n fn: ForC\n) => {\n typeof PROCESS.emitWarning === 'function'\n ? PROCESS.emitWarning(msg, type, code, fn)\n : console.error(`[${code}] ${type}: ${msg}`)\n}\n\nlet AC = globalThis.AbortController\nlet AS = globalThis.AbortSignal\n\n/* c8 ignore start */\nif (typeof AC === 'undefined') {\n //@ts-ignore\n AS = class AbortSignal {\n onabort?: (...a: any[]) => any\n _onabort: ((...a: any[]) => any)[] = []\n reason?: any\n aborted: boolean = false\n addEventListener(_: string, fn: (...a: any[]) => any) {\n this._onabort.push(fn)\n }\n }\n //@ts-ignore\n AC = class AbortController {\n constructor() {\n warnACPolyfill()\n }\n signal = new AS()\n abort(reason: any) {\n if (this.signal.aborted) return\n //@ts-ignore\n this.signal.reason = reason\n //@ts-ignore\n this.signal.aborted = true\n //@ts-ignore\n for (const fn of this.signal._onabort) {\n fn(reason)\n }\n this.signal.onabort?.(reason)\n }\n }\n let printACPolyfillWarning =\n PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'\n const warnACPolyfill = () => {\n if (!printACPolyfillWarning) return\n printACPolyfillWarning = false\n emitWarning(\n 'AbortController is not defined. If using lru-cache in ' +\n 'node 14, load an AbortController polyfill from the ' +\n '`node-abort-controller` package. A minimal polyfill is ' +\n 'provided for use by LRUCache.fetch(), but it should not be ' +\n 'relied upon in other contexts (eg, passing it to other APIs that ' +\n 'use AbortController/AbortSignal might have undesirable effects). ' +\n 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.',\n 'NO_ABORT_CONTROLLER',\n 'ENOTSUP',\n warnACPolyfill\n )\n }\n}\n/* c8 ignore stop */\n\nconst shouldWarn = (code: string) => !warned.has(code)\n\nconst TYPE = Symbol('type')\nexport type PosInt = number & { [TYPE]: 'Positive Integer' }\nexport type Index = number & { [TYPE]: 'LRUCache Index' }\n\nconst isPosInt = (n: any): n is PosInt =>\n n && n === Math.floor(n) && n > 0 && isFinite(n)\n\nexport type UintArray = Uint8Array | Uint16Array | Uint32Array\nexport type NumberArray = UintArray | number[]\n\n/* c8 ignore start */\n// This is a little bit ridiculous, tbh.\n// The maximum array length is 2^32-1 or thereabouts on most JS impls.\n// And well before that point, you're caching the entire world, I mean,\n// that's ~32GB of just integers for the next/prev links, plus whatever\n// else to hold that many keys and values. Just filling the memory with\n// zeroes at init time is brutal when you get that big.\n// But why not be complete?\n// Maybe in the future, these limits will have expanded.\nconst getUintArray = (max: number) =>\n !isPosInt(max)\n ? null\n : max <= Math.pow(2, 8)\n ? Uint8Array\n : max <= Math.pow(2, 16)\n ? Uint16Array\n : max <= Math.pow(2, 32)\n ? Uint32Array\n : max <= Number.MAX_SAFE_INTEGER\n ? ZeroArray\n : null\n/* c8 ignore stop */\n\nclass ZeroArray extends Array {\n constructor(size: number) {\n super(size)\n this.fill(0)\n }\n}\nexport type { ZeroArray }\nexport type { Stack }\n\nexport type StackLike = Stack | Index[]\nclass Stack {\n heap: NumberArray\n length: number\n // private constructor\n static #constructing: boolean = false\n static create(max: number): StackLike {\n const HeapCls = getUintArray(max)\n if (!HeapCls) return []\n Stack.#constructing = true\n const s = new Stack(max, HeapCls)\n Stack.#constructing = false\n return s\n }\n constructor(\n max: number,\n HeapCls: { new (n: number): NumberArray }\n ) {\n /* c8 ignore start */\n if (!Stack.#constructing) {\n throw new TypeError('instantiate Stack using Stack.create(n)')\n }\n /* c8 ignore stop */\n this.heap = new HeapCls(max)\n this.length = 0\n }\n push(n: Index) {\n this.heap[this.length++] = n\n }\n pop(): Index {\n return this.heap[--this.length] as Index\n }\n}\n\n/**\n * Promise representing an in-progress {@link LRUCache#fetch} call\n */\nexport type BackgroundFetch = Promise & {\n __returned: BackgroundFetch | undefined\n __abortController: AbortController\n __staleWhileFetching: V | undefined\n}\n\nexport type DisposeTask = [\n value: V,\n key: K,\n reason: LRUCache.DisposeReason\n]\n\nexport namespace LRUCache {\n /**\n * An integer greater than 0, reflecting the calculated size of items\n */\n export type Size = number\n\n /**\n * Integer greater than 0, representing some number of milliseconds, or the\n * time at which a TTL started counting from.\n */\n export type Milliseconds = number\n\n /**\n * An integer greater than 0, reflecting a number of items\n */\n export type Count = number\n\n /**\n * The reason why an item was removed from the cache, passed\n * to the {@link Disposer} methods.\n *\n * - `evict`: The item was evicted because it is the least recently used,\n * and the cache is full.\n * - `set`: A new value was set, overwriting the old value being disposed.\n * - `delete`: The item was explicitly deleted, either by calling\n * {@link LRUCache#delete}, {@link LRUCache#clear}, or\n * {@link LRUCache#set} with an undefined value.\n * - `expire`: The item was removed due to exceeding its TTL.\n * - `fetch`: A {@link OptionsBase#fetchMethod} operation returned\n * `undefined` or was aborted, causing the item to be deleted.\n */\n export type DisposeReason =\n | 'evict'\n | 'set'\n | 'delete'\n | 'expire'\n | 'fetch'\n /**\n * A method called upon item removal, passed as the\n * {@link OptionsBase.dispose} and/or\n * {@link OptionsBase.disposeAfter} options.\n */\n export type Disposer = (\n value: V,\n key: K,\n reason: DisposeReason\n ) => void\n\n /**\n * A function that returns the effective calculated size\n * of an entry in the cache.\n */\n export type SizeCalculator = (value: V, key: K) => Size\n\n /**\n * Options provided to the\n * {@link OptionsBase.fetchMethod} function.\n */\n export interface FetcherOptions {\n signal: AbortSignal\n options: FetcherFetchOptions\n /**\n * Object provided in the {@link FetchOptions.context} option to\n * {@link LRUCache#fetch}\n */\n context: FC\n }\n\n /**\n * Occasionally, it may be useful to track the internal behavior of the\n * cache, particularly for logging, debugging, or for behavior within the\n * `fetchMethod`. To do this, you can pass a `status` object to the\n * {@link LRUCache#fetch}, {@link LRUCache#get}, {@link LRUCache#set},\n * {@link LRUCache#memo}, and {@link LRUCache#has} methods.\n *\n * The `status` option should be a plain JavaScript object. The following\n * fields will be set on it appropriately, depending on the situation.\n */\n export interface Status {\n /**\n * The status of a set() operation.\n *\n * - add: the item was not found in the cache, and was added\n * - update: the item was in the cache, with the same value provided\n * - replace: the item was in the cache, and replaced\n * - miss: the item was not added to the cache for some reason\n */\n set?: 'add' | 'update' | 'replace' | 'miss'\n\n /**\n * the ttl stored for the item, or undefined if ttls are not used.\n */\n ttl?: Milliseconds\n\n /**\n * the start time for the item, or undefined if ttls are not used.\n */\n start?: Milliseconds\n\n /**\n * The timestamp used for TTL calculation\n */\n now?: Milliseconds\n\n /**\n * the remaining ttl for the item, or undefined if ttls are not used.\n */\n remainingTTL?: Milliseconds\n\n /**\n * The calculated size for the item, if sizes are used.\n */\n entrySize?: Size\n\n /**\n * The total calculated size of the cache, if sizes are used.\n */\n totalCalculatedSize?: Size\n\n /**\n * A flag indicating that the item was not stored, due to exceeding the\n * {@link OptionsBase.maxEntrySize}\n */\n maxEntrySizeExceeded?: true\n\n /**\n * The old value, specified in the case of `set:'update'` or\n * `set:'replace'`\n */\n oldValue?: V\n\n /**\n * The results of a {@link LRUCache#has} operation\n *\n * - hit: the item was found in the cache\n * - stale: the item was found in the cache, but is stale\n * - miss: the item was not found in the cache\n */\n has?: 'hit' | 'stale' | 'miss'\n\n /**\n * The status of a {@link LRUCache#fetch} operation.\n * Note that this can change as the underlying fetch() moves through\n * various states.\n *\n * - inflight: there is another fetch() for this key which is in process\n * - get: there is no {@link OptionsBase.fetchMethod}, so\n * {@link LRUCache#get} was called.\n * - miss: the item is not in cache, and will be fetched.\n * - hit: the item is in the cache, and was resolved immediately.\n * - stale: the item is in the cache, but stale.\n * - refresh: the item is in the cache, and not stale, but\n * {@link FetchOptions.forceRefresh} was specified.\n */\n fetch?: 'get' | 'inflight' | 'miss' | 'hit' | 'stale' | 'refresh'\n\n /**\n * The {@link OptionsBase.fetchMethod} was called\n */\n fetchDispatched?: true\n\n /**\n * The cached value was updated after a successful call to\n * {@link OptionsBase.fetchMethod}\n */\n fetchUpdated?: true\n\n /**\n * The reason for a fetch() rejection. Either the error raised by the\n * {@link OptionsBase.fetchMethod}, or the reason for an\n * AbortSignal.\n */\n fetchError?: Error\n\n /**\n * The fetch received an abort signal\n */\n fetchAborted?: true\n\n /**\n * The abort signal received was ignored, and the fetch was allowed to\n * continue.\n */\n fetchAbortIgnored?: true\n\n /**\n * The fetchMethod promise resolved successfully\n */\n fetchResolved?: true\n\n /**\n * The fetchMethod promise was rejected\n */\n fetchRejected?: true\n\n /**\n * The status of a {@link LRUCache#get} operation.\n *\n * - fetching: The item is currently being fetched. If a previous value\n * is present and allowed, that will be returned.\n * - stale: The item is in the cache, and is stale.\n * - hit: the item is in the cache\n * - miss: the item is not in the cache\n */\n get?: 'stale' | 'hit' | 'miss'\n\n /**\n * A fetch or get operation returned a stale value.\n */\n returnedStale?: true\n }\n\n /**\n * options which override the options set in the LRUCache constructor\n * when calling {@link LRUCache#fetch}.\n *\n * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n * {@link OptionsBase.noDeleteOnFetchRejection},\n * {@link OptionsBase.allowStaleOnFetchRejection},\n * {@link FetchOptions.forceRefresh}, and\n * {@link FetcherOptions.context}\n *\n * Any of these may be modified in the {@link OptionsBase.fetchMethod}\n * function, but the {@link GetOptions} fields will of course have no\n * effect, as the {@link LRUCache#get} call already happened by the time\n * the fetchMethod is called.\n */\n export interface FetcherFetchOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n | 'noDeleteOnFetchRejection'\n | 'allowStaleOnFetchRejection'\n | 'ignoreFetchAbort'\n | 'allowStaleOnFetchAbort'\n > {\n status?: Status\n size?: Size\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#fetch} method.\n */\n export interface FetchOptions\n extends FetcherFetchOptions {\n /**\n * Set to true to force a re-load of the existing data, even if it\n * is not yet stale.\n */\n forceRefresh?: boolean\n /**\n * Context provided to the {@link OptionsBase.fetchMethod} as\n * the {@link FetcherOptions.context} param.\n *\n * If the FC type is specified as unknown (the default),\n * undefined or void, then this is optional. Otherwise, it will\n * be required.\n */\n context?: FC\n signal?: AbortSignal\n status?: Status\n }\n /**\n * Options provided to {@link LRUCache#fetch} when the FC type is something\n * other than `unknown`, `undefined`, or `void`\n */\n export interface FetchOptionsWithContext\n extends FetchOptions {\n context: FC\n }\n /**\n * Options provided to {@link LRUCache#fetch} when the FC type is\n * `undefined` or `void`\n */\n export interface FetchOptionsNoContext\n extends FetchOptions {\n context?: undefined\n }\n\n export interface MemoOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n | 'noDeleteOnFetchRejection'\n | 'allowStaleOnFetchRejection'\n | 'ignoreFetchAbort'\n | 'allowStaleOnFetchAbort'\n > {\n /**\n * Set to true to force a re-load of the existing data, even if it\n * is not yet stale.\n */\n forceRefresh?: boolean\n /**\n * Context provided to the {@link OptionsBase.memoMethod} as\n * the {@link MemoizerOptions.context} param.\n *\n * If the FC type is specified as unknown (the default),\n * undefined or void, then this is optional. Otherwise, it will\n * be required.\n */\n context?: FC\n status?: Status\n }\n /**\n * Options provided to {@link LRUCache#memo} when the FC type is something\n * other than `unknown`, `undefined`, or `void`\n */\n export interface MemoOptionsWithContext\n extends MemoOptions {\n context: FC\n }\n /**\n * Options provided to {@link LRUCache#memo} when the FC type is\n * `undefined` or `void`\n */\n export interface MemoOptionsNoContext\n extends MemoOptions {\n context?: undefined\n }\n\n /**\n * Options provided to the\n * {@link OptionsBase.memoMethod} function.\n */\n export interface MemoizerOptions {\n options: MemoizerMemoOptions\n /**\n * Object provided in the {@link MemoOptions.context} option to\n * {@link LRUCache#memo}\n */\n context: FC\n }\n\n /**\n * options which override the options set in the LRUCache constructor\n * when calling {@link LRUCache#memo}.\n *\n * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n * {@link MemoOptions.forceRefresh}, and\n * {@link MemoerOptions.context}\n *\n * Any of these may be modified in the {@link OptionsBase.memoMethod}\n * function, but the {@link GetOptions} fields will of course have no\n * effect, as the {@link LRUCache#get} call already happened by the time\n * the memoMethod is called.\n */\n export interface MemoizerMemoOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n > {\n status?: Status\n size?: Size\n start?: Milliseconds\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#has} method.\n */\n export interface HasOptions\n extends Pick, 'updateAgeOnHas'> {\n status?: Status\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#get} method.\n */\n export interface GetOptions\n extends Pick<\n OptionsBase,\n 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet'\n > {\n status?: Status\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#peek} method.\n */\n export interface PeekOptions\n extends Pick, 'allowStale'> {}\n\n /**\n * Options that may be passed to the {@link LRUCache#set} method.\n */\n export interface SetOptions\n extends Pick<\n OptionsBase,\n 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'\n > {\n /**\n * If size tracking is enabled, then setting an explicit size\n * in the {@link LRUCache#set} call will prevent calling the\n * {@link OptionsBase.sizeCalculation} function.\n */\n size?: Size\n /**\n * If TTL tracking is enabled, then setting an explicit start\n * time in the {@link LRUCache#set} call will override the\n * default time from `performance.now()` or `Date.now()`.\n *\n * Note that it must be a valid value for whichever time-tracking\n * method is in use.\n */\n start?: Milliseconds\n status?: Status\n }\n\n /**\n * The type signature for the {@link OptionsBase.fetchMethod} option.\n */\n export type Fetcher = (\n key: K,\n staleValue: V | undefined,\n options: FetcherOptions\n ) => Promise | V | undefined | void\n\n /**\n * the type signature for the {@link OptionsBase.memoMethod} option.\n */\n export type Memoizer = (\n key: K,\n staleValue: V | undefined,\n options: MemoizerOptions\n ) => V\n\n /**\n * Options which may be passed to the {@link LRUCache} constructor.\n *\n * Most of these may be overridden in the various options that use\n * them.\n *\n * Despite all being technically optional, the constructor requires that\n * a cache is at minimum limited by one or more of {@link OptionsBase.max},\n * {@link OptionsBase.ttl}, or {@link OptionsBase.maxSize}.\n *\n * If {@link OptionsBase.ttl} is used alone, then it is strongly advised\n * (and in fact required by the type definitions here) that the cache\n * also set {@link OptionsBase.ttlAutopurge}, to prevent potentially\n * unbounded storage.\n *\n * All options are also available on the {@link LRUCache} instance, making\n * it safe to pass an LRUCache instance as the options argumemnt to\n * make another empty cache of the same type.\n *\n * Some options are marked as read-only, because changing them after\n * instantiation is not safe. Changing any of the other options will of\n * course only have an effect on subsequent method calls.\n */\n export interface OptionsBase {\n /**\n * The maximum number of items to store in the cache before evicting\n * old entries. This is read-only on the {@link LRUCache} instance,\n * and may not be overridden.\n *\n * If set, then storage space will be pre-allocated at construction\n * time, and the cache will perform significantly faster.\n *\n * Note that significantly fewer items may be stored, if\n * {@link OptionsBase.maxSize} and/or {@link OptionsBase.ttl} are also\n * set.\n *\n * **It is strongly recommended to set a `max` to prevent unbounded growth\n * of the cache.**\n */\n max?: Count\n\n /**\n * Max time in milliseconds for items to live in cache before they are\n * considered stale. Note that stale items are NOT preemptively removed by\n * default, and MAY live in the cache, contributing to its LRU max, long\n * after they have expired, unless {@link OptionsBase.ttlAutopurge} is\n * set.\n *\n * If set to `0` (the default value), then that means \"do not track\n * TTL\", not \"expire immediately\".\n *\n * Also, as this cache is optimized for LRU/MRU operations, some of\n * the staleness/TTL checks will reduce performance, as they will incur\n * overhead by deleting items.\n *\n * This is not primarily a TTL cache, and does not make strong TTL\n * guarantees. There is no pre-emptive pruning of expired items, but you\n * _may_ set a TTL on the cache, and it will treat expired items as missing\n * when they are fetched, and delete them.\n *\n * Optional, but must be a non-negative integer in ms if specified.\n *\n * This may be overridden by passing an options object to `cache.set()`.\n *\n * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n * positive integer if set.\n *\n * Even if ttl tracking is enabled, **it is strongly recommended to set a\n * `max` to prevent unbounded growth of the cache.**\n *\n * If ttl tracking is enabled, and `max` and `maxSize` are not set,\n * and `ttlAutopurge` is not set, then a warning will be emitted\n * cautioning about the potential for unbounded memory consumption.\n * (The TypeScript definitions will also discourage this.)\n */\n ttl?: Milliseconds\n\n /**\n * Minimum amount of time in ms in which to check for staleness.\n * Defaults to 1, which means that the current time is checked\n * at most once per millisecond.\n *\n * Set to 0 to check the current time every time staleness is tested.\n * (This reduces performance, and is theoretically unnecessary.)\n *\n * Setting this to a higher value will improve performance somewhat\n * while using ttl tracking, albeit at the expense of keeping stale\n * items around a bit longer than their TTLs would indicate.\n *\n * @default 1\n */\n ttlResolution?: Milliseconds\n\n /**\n * Preemptively remove stale items from the cache.\n *\n * Note that this may *significantly* degrade performance, especially if\n * the cache is storing a large number of items. It is almost always best\n * to just leave the stale items in the cache, and let them fall out as new\n * items are added.\n *\n * Note that this means that {@link OptionsBase.allowStale} is a bit\n * pointless, as stale items will be deleted almost as soon as they\n * expire.\n *\n * Use with caution!\n */\n ttlAutopurge?: boolean\n\n /**\n * When using time-expiring entries with `ttl`, setting this to `true` will\n * make each item's age reset to 0 whenever it is retrieved from cache with\n * {@link LRUCache#get}, causing it to not expire. (It can still fall out\n * of cache based on recency of use, of course.)\n *\n * Has no effect if {@link OptionsBase.ttl} is not set.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n */\n updateAgeOnGet?: boolean\n\n /**\n * When using time-expiring entries with `ttl`, setting this to `true` will\n * make each item's age reset to 0 whenever its presence in the cache is\n * checked with {@link LRUCache#has}, causing it to not expire. (It can\n * still fall out of cache based on recency of use, of course.)\n *\n * Has no effect if {@link OptionsBase.ttl} is not set.\n */\n updateAgeOnHas?: boolean\n\n /**\n * Allow {@link LRUCache#get} and {@link LRUCache#fetch} calls to return\n * stale data, if available.\n *\n * By default, if you set `ttl`, stale items will only be deleted from the\n * cache when you `get(key)`. That is, it's not preemptively pruning items,\n * unless {@link OptionsBase.ttlAutopurge} is set.\n *\n * If you set `allowStale:true`, it'll return the stale value *as well as*\n * deleting it. If you don't set this, then it'll return `undefined` when\n * you try to get a stale entry.\n *\n * Note that when a stale entry is fetched, _even if it is returned due to\n * `allowStale` being set_, it is removed from the cache immediately. You\n * can suppress this behavior by setting\n * {@link OptionsBase.noDeleteOnStaleGet}, either in the constructor, or in\n * the options provided to {@link LRUCache#get}.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n * The `cache.has()` method will always return `false` for stale items.\n *\n * Only relevant if a ttl is set.\n */\n allowStale?: boolean\n\n /**\n * Function that is called on items when they are dropped from the\n * cache, as `dispose(value, key, reason)`.\n *\n * This can be handy if you want to close file descriptors or do\n * other cleanup tasks when items are no longer stored in the cache.\n *\n * **NOTE**: It is called _before_ the item has been fully removed\n * from the cache, so if you want to put it right back in, you need\n * to wait until the next tick. If you try to add it back in during\n * the `dispose()` function call, it will break things in subtle and\n * weird ways.\n *\n * Unlike several other options, this may _not_ be overridden by\n * passing an option to `set()`, for performance reasons.\n *\n * The `reason` will be one of the following strings, corresponding\n * to the reason for the item's deletion:\n *\n * - `evict` Item was evicted to make space for a new addition\n * - `set` Item was overwritten by a new value\n * - `expire` Item expired its TTL\n * - `fetch` Item was deleted due to a failed or aborted fetch, or a\n * fetchMethod returning `undefined.\n * - `delete` Item was removed by explicit `cache.delete(key)`,\n * `cache.clear()`, or `cache.set(key, undefined)`.\n */\n dispose?: Disposer\n\n /**\n * The same as {@link OptionsBase.dispose}, but called *after* the entry\n * is completely removed and the cache is once again in a clean state.\n *\n * It is safe to add an item right back into the cache at this point.\n * However, note that it is *very* easy to inadvertently create infinite\n * recursion this way.\n */\n disposeAfter?: Disposer\n\n /**\n * Set to true to suppress calling the\n * {@link OptionsBase.dispose} function if the entry key is\n * still accessible within the cache.\n *\n * This may be overridden by passing an options object to\n * {@link LRUCache#set}.\n *\n * Only relevant if `dispose` or `disposeAfter` are set.\n */\n noDisposeOnSet?: boolean\n\n /**\n * Boolean flag to tell the cache to not update the TTL when setting a new\n * value for an existing key (ie, when updating a value rather than\n * inserting a new value). Note that the TTL value is _always_ set (if\n * provided) when adding a new entry into the cache.\n *\n * Has no effect if a {@link OptionsBase.ttl} is not set.\n *\n * May be passed as an option to {@link LRUCache#set}.\n */\n noUpdateTTL?: boolean\n\n /**\n * Set to a positive integer to track the sizes of items added to the\n * cache, and automatically evict items in order to stay below this size.\n * Note that this may result in fewer than `max` items being stored.\n *\n * Attempting to add an item to the cache whose calculated size is greater\n * that this amount will be a no-op. The item will not be cached, and no\n * other items will be evicted.\n *\n * Optional, must be a positive integer if provided.\n *\n * Sets `maxEntrySize` to the same value, unless a different value is\n * provided for `maxEntrySize`.\n *\n * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n * positive integer if set.\n *\n * Even if size tracking is enabled, **it is strongly recommended to set a\n * `max` to prevent unbounded growth of the cache.**\n *\n * Note also that size tracking can negatively impact performance,\n * though for most cases, only minimally.\n */\n maxSize?: Size\n\n /**\n * The maximum allowed size for any single item in the cache.\n *\n * If a larger item is passed to {@link LRUCache#set} or returned by a\n * {@link OptionsBase.fetchMethod} or {@link OptionsBase.memoMethod}, then\n * it will not be stored in the cache.\n *\n * Attempting to add an item whose calculated size is greater than\n * this amount will not cache the item or evict any old items, but\n * WILL delete an existing value if one is already present.\n *\n * Optional, must be a positive integer if provided. Defaults to\n * the value of `maxSize` if provided.\n */\n maxEntrySize?: Size\n\n /**\n * A function that returns a number indicating the item's size.\n *\n * Requires {@link OptionsBase.maxSize} to be set.\n *\n * If not provided, and {@link OptionsBase.maxSize} or\n * {@link OptionsBase.maxEntrySize} are set, then all\n * {@link LRUCache#set} calls **must** provide an explicit\n * {@link SetOptions.size} or sizeCalculation param.\n */\n sizeCalculation?: SizeCalculator\n\n /**\n * Method that provides the implementation for {@link LRUCache#fetch}\n *\n * ```ts\n * fetchMethod(key, staleValue, { signal, options, context })\n * ```\n *\n * If `fetchMethod` is not provided, then `cache.fetch(key)` is equivalent\n * to `Promise.resolve(cache.get(key))`.\n *\n * If at any time, `signal.aborted` is set to `true`, or if the\n * `signal.onabort` method is called, or if it emits an `'abort'` event\n * which you can listen to with `addEventListener`, then that means that\n * the fetch should be abandoned. This may be passed along to async\n * functions aware of AbortController/AbortSignal behavior.\n *\n * The `fetchMethod` should **only** return `undefined` or a Promise\n * resolving to `undefined` if the AbortController signaled an `abort`\n * event. In all other cases, it should return or resolve to a value\n * suitable for adding to the cache.\n *\n * The `options` object is a union of the options that may be provided to\n * `set()` and `get()`. If they are modified, then that will result in\n * modifying the settings to `cache.set()` when the value is resolved, and\n * in the case of\n * {@link OptionsBase.noDeleteOnFetchRejection} and\n * {@link OptionsBase.allowStaleOnFetchRejection}, the handling of\n * `fetchMethod` failures.\n *\n * For example, a DNS cache may update the TTL based on the value returned\n * from a remote DNS server by changing `options.ttl` in the `fetchMethod`.\n */\n fetchMethod?: Fetcher\n\n /**\n * Method that provides the implementation for {@link LRUCache#memo}\n */\n memoMethod?: Memoizer\n\n /**\n * Set to true to suppress the deletion of stale data when a\n * {@link OptionsBase.fetchMethod} returns a rejected promise.\n */\n noDeleteOnFetchRejection?: boolean\n\n /**\n * Do not delete stale items when they are retrieved with\n * {@link LRUCache#get}.\n *\n * Note that the `get` return value will still be `undefined`\n * unless {@link OptionsBase.allowStale} is true.\n *\n * When using time-expiring entries with `ttl`, by default stale\n * items will be removed from the cache when the key is accessed\n * with `cache.get()`.\n *\n * Setting this option will cause stale items to remain in the cache, until\n * they are explicitly deleted with `cache.delete(key)`, or retrieved with\n * `noDeleteOnStaleGet` set to `false`.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n *\n * Only relevant if a ttl is used.\n */\n noDeleteOnStaleGet?: boolean\n\n /**\n * Set to true to allow returning stale data when a\n * {@link OptionsBase.fetchMethod} throws an error or returns a rejected\n * promise.\n *\n * This differs from using {@link OptionsBase.allowStale} in that stale\n * data will ONLY be returned in the case that the {@link LRUCache#fetch}\n * fails, not any other times.\n *\n * If a `fetchMethod` fails, and there is no stale value available, the\n * `fetch()` will resolve to `undefined`. Ie, all `fetchMethod` errors are\n * suppressed.\n *\n * Implies `noDeleteOnFetchRejection`.\n *\n * This may be set in calls to `fetch()`, or defaulted on the constructor,\n * or overridden by modifying the options object in the `fetchMethod`.\n */\n allowStaleOnFetchRejection?: boolean\n\n /**\n * Set to true to return a stale value from the cache when the\n * `AbortSignal` passed to the {@link OptionsBase.fetchMethod} dispatches\n * an `'abort'` event, whether user-triggered, or due to internal cache\n * behavior.\n *\n * Unless {@link OptionsBase.ignoreFetchAbort} is also set, the underlying\n * {@link OptionsBase.fetchMethod} will still be considered canceled, and\n * any value it returns will be ignored and not cached.\n *\n * Caveat: since fetches are aborted when a new value is explicitly\n * set in the cache, this can lead to fetch returning a stale value,\n * since that was the fallback value _at the moment the `fetch()` was\n * initiated_, even though the new updated value is now present in\n * the cache.\n *\n * For example:\n *\n * ```ts\n * const cache = new LRUCache({\n * ttl: 100,\n * fetchMethod: async (url, oldValue, { signal }) => {\n * const res = await fetch(url, { signal })\n * return await res.json()\n * }\n * })\n * cache.set('https://example.com/', { some: 'data' })\n * // 100ms go by...\n * const result = cache.fetch('https://example.com/')\n * cache.set('https://example.com/', { other: 'thing' })\n * console.log(await result) // { some: 'data' }\n * console.log(cache.get('https://example.com/')) // { other: 'thing' }\n * ```\n */\n allowStaleOnFetchAbort?: boolean\n\n /**\n * Set to true to ignore the `abort` event emitted by the `AbortSignal`\n * object passed to {@link OptionsBase.fetchMethod}, and still cache the\n * resulting resolution value, as long as it is not `undefined`.\n *\n * When used on its own, this means aborted {@link LRUCache#fetch} calls\n * are not immediately resolved or rejected when they are aborted, and\n * instead take the full time to await.\n *\n * When used with {@link OptionsBase.allowStaleOnFetchAbort}, aborted\n * {@link LRUCache#fetch} calls will resolve immediately to their stale\n * cached value or `undefined`, and will continue to process and eventually\n * update the cache when they resolve, as long as the resulting value is\n * not `undefined`, thus supporting a \"return stale on timeout while\n * refreshing\" mechanism by passing `AbortSignal.timeout(n)` as the signal.\n *\n * For example:\n *\n * ```ts\n * const c = new LRUCache({\n * ttl: 100,\n * ignoreFetchAbort: true,\n * allowStaleOnFetchAbort: true,\n * fetchMethod: async (key, oldValue, { signal }) => {\n * // note: do NOT pass the signal to fetch()!\n * // let's say this fetch can take a long time.\n * const res = await fetch(`https://slow-backend-server/${key}`)\n * return await res.json()\n * },\n * })\n *\n * // this will return the stale value after 100ms, while still\n * // updating in the background for next time.\n * const val = await c.fetch('key', { signal: AbortSignal.timeout(100) })\n * ```\n *\n * **Note**: regardless of this setting, an `abort` event _is still\n * emitted on the `AbortSignal` object_, so may result in invalid results\n * when passed to other underlying APIs that use AbortSignals.\n *\n * This may be overridden in the {@link OptionsBase.fetchMethod} or the\n * call to {@link LRUCache#fetch}.\n */\n ignoreFetchAbort?: boolean\n }\n\n export interface OptionsMaxLimit\n extends OptionsBase {\n max: Count\n }\n export interface OptionsTTLLimit\n extends OptionsBase {\n ttl: Milliseconds\n ttlAutopurge: boolean\n }\n export interface OptionsSizeLimit\n extends OptionsBase {\n maxSize: Size\n }\n\n /**\n * The valid safe options for the {@link LRUCache} constructor\n */\n export type Options =\n | OptionsMaxLimit\n | OptionsSizeLimit\n | OptionsTTLLimit\n\n /**\n * Entry objects used by {@link LRUCache#load} and {@link LRUCache#dump},\n * and returned by {@link LRUCache#info}.\n */\n export interface Entry {\n value: V\n ttl?: Milliseconds\n size?: Size\n start?: Milliseconds\n }\n}\n\n/**\n * Default export, the thing you're using this module to get.\n *\n * The `K` and `V` types define the key and value types, respectively. The\n * optional `FC` type defines the type of the `context` object passed to\n * `cache.fetch()` and `cache.memo()`.\n *\n * Keys and values **must not** be `null` or `undefined`.\n *\n * All properties from the options object (with the exception of `max`,\n * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are\n * added as normal public members. (The listed options are read-only getters.)\n *\n * Changing any of these will alter the defaults for subsequent method calls.\n */\nexport class LRUCache\n implements Map\n{\n // options that cannot be changed without disaster\n readonly #max: LRUCache.Count\n readonly #maxSize: LRUCache.Size\n readonly #dispose?: LRUCache.Disposer\n readonly #disposeAfter?: LRUCache.Disposer\n readonly #fetchMethod?: LRUCache.Fetcher\n readonly #memoMethod?: LRUCache.Memoizer\n\n /**\n * {@link LRUCache.OptionsBase.ttl}\n */\n ttl: LRUCache.Milliseconds\n\n /**\n * {@link LRUCache.OptionsBase.ttlResolution}\n */\n ttlResolution: LRUCache.Milliseconds\n /**\n * {@link LRUCache.OptionsBase.ttlAutopurge}\n */\n ttlAutopurge: boolean\n /**\n * {@link LRUCache.OptionsBase.updateAgeOnGet}\n */\n updateAgeOnGet: boolean\n /**\n * {@link LRUCache.OptionsBase.updateAgeOnHas}\n */\n updateAgeOnHas: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStale}\n */\n allowStale: boolean\n\n /**\n * {@link LRUCache.OptionsBase.noDisposeOnSet}\n */\n noDisposeOnSet: boolean\n /**\n * {@link LRUCache.OptionsBase.noUpdateTTL}\n */\n noUpdateTTL: boolean\n /**\n * {@link LRUCache.OptionsBase.maxEntrySize}\n */\n maxEntrySize: LRUCache.Size\n /**\n * {@link LRUCache.OptionsBase.sizeCalculation}\n */\n sizeCalculation?: LRUCache.SizeCalculator\n /**\n * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}\n */\n noDeleteOnFetchRejection: boolean\n /**\n * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}\n */\n noDeleteOnStaleGet: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}\n */\n allowStaleOnFetchAbort: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}\n */\n allowStaleOnFetchRejection: boolean\n /**\n * {@link LRUCache.OptionsBase.ignoreFetchAbort}\n */\n ignoreFetchAbort: boolean\n\n // computed properties\n #size: LRUCache.Count\n #calculatedSize: LRUCache.Size\n #keyMap: Map\n #keyList: (K | undefined)[]\n #valList: (V | BackgroundFetch | undefined)[]\n #next: NumberArray\n #prev: NumberArray\n #head: Index\n #tail: Index\n #free: StackLike\n #disposed?: DisposeTask[]\n #sizes?: ZeroArray\n #starts?: ZeroArray\n #ttls?: ZeroArray\n\n #hasDispose: boolean\n #hasFetchMethod: boolean\n #hasDisposeAfter: boolean\n\n /**\n * Do not call this method unless you need to inspect the\n * inner workings of the cache. If anything returned by this\n * object is modified in any way, strange breakage may occur.\n *\n * These fields are private for a reason!\n *\n * @internal\n */\n static unsafeExposeInternals<\n K extends {},\n V extends {},\n FC extends unknown = unknown\n >(c: LRUCache) {\n return {\n // properties\n starts: c.#starts,\n ttls: c.#ttls,\n sizes: c.#sizes,\n keyMap: c.#keyMap as Map,\n keyList: c.#keyList,\n valList: c.#valList,\n next: c.#next,\n prev: c.#prev,\n get head() {\n return c.#head\n },\n get tail() {\n return c.#tail\n },\n free: c.#free,\n // methods\n isBackgroundFetch: (p: any) => c.#isBackgroundFetch(p),\n backgroundFetch: (\n k: K,\n index: number | undefined,\n options: LRUCache.FetchOptions,\n context: any\n ): BackgroundFetch =>\n c.#backgroundFetch(\n k,\n index as Index | undefined,\n options,\n context\n ),\n moveToTail: (index: number): void =>\n c.#moveToTail(index as Index),\n indexes: (options?: { allowStale: boolean }) =>\n c.#indexes(options),\n rindexes: (options?: { allowStale: boolean }) =>\n c.#rindexes(options),\n isStale: (index: number | undefined) =>\n c.#isStale(index as Index),\n }\n }\n\n // Protected read-only members\n\n /**\n * {@link LRUCache.OptionsBase.max} (read-only)\n */\n get max(): LRUCache.Count {\n return this.#max\n }\n /**\n * {@link LRUCache.OptionsBase.maxSize} (read-only)\n */\n get maxSize(): LRUCache.Count {\n return this.#maxSize\n }\n /**\n * The total computed size of items in the cache (read-only)\n */\n get calculatedSize(): LRUCache.Size {\n return this.#calculatedSize\n }\n /**\n * The number of items stored in the cache (read-only)\n */\n get size(): LRUCache.Count {\n return this.#size\n }\n /**\n * {@link LRUCache.OptionsBase.fetchMethod} (read-only)\n */\n get fetchMethod(): LRUCache.Fetcher | undefined {\n return this.#fetchMethod\n }\n get memoMethod(): LRUCache.Memoizer | undefined {\n return this.#memoMethod\n }\n /**\n * {@link LRUCache.OptionsBase.dispose} (read-only)\n */\n get dispose() {\n return this.#dispose\n }\n /**\n * {@link LRUCache.OptionsBase.disposeAfter} (read-only)\n */\n get disposeAfter() {\n return this.#disposeAfter\n }\n\n constructor(\n options: LRUCache.Options | LRUCache\n ) {\n const {\n max = 0,\n ttl,\n ttlResolution = 1,\n ttlAutopurge,\n updateAgeOnGet,\n updateAgeOnHas,\n allowStale,\n dispose,\n disposeAfter,\n noDisposeOnSet,\n noUpdateTTL,\n maxSize = 0,\n maxEntrySize = 0,\n sizeCalculation,\n fetchMethod,\n memoMethod,\n noDeleteOnFetchRejection,\n noDeleteOnStaleGet,\n allowStaleOnFetchRejection,\n allowStaleOnFetchAbort,\n ignoreFetchAbort,\n } = options\n\n if (max !== 0 && !isPosInt(max)) {\n throw new TypeError('max option must be a nonnegative integer')\n }\n\n const UintArray = max ? getUintArray(max) : Array\n if (!UintArray) {\n throw new Error('invalid max value: ' + max)\n }\n\n this.#max = max\n this.#maxSize = maxSize\n this.maxEntrySize = maxEntrySize || this.#maxSize\n this.sizeCalculation = sizeCalculation\n if (this.sizeCalculation) {\n if (!this.#maxSize && !this.maxEntrySize) {\n throw new TypeError(\n 'cannot set sizeCalculation without setting maxSize or maxEntrySize'\n )\n }\n if (typeof this.sizeCalculation !== 'function') {\n throw new TypeError('sizeCalculation set to non-function')\n }\n }\n\n if (\n memoMethod !== undefined &&\n typeof memoMethod !== 'function'\n ) {\n throw new TypeError('memoMethod must be a function if defined')\n }\n this.#memoMethod = memoMethod\n\n if (\n fetchMethod !== undefined &&\n typeof fetchMethod !== 'function'\n ) {\n throw new TypeError(\n 'fetchMethod must be a function if specified'\n )\n }\n this.#fetchMethod = fetchMethod\n this.#hasFetchMethod = !!fetchMethod\n\n this.#keyMap = new Map()\n this.#keyList = new Array(max).fill(undefined)\n this.#valList = new Array(max).fill(undefined)\n this.#next = new UintArray(max)\n this.#prev = new UintArray(max)\n this.#head = 0 as Index\n this.#tail = 0 as Index\n this.#free = Stack.create(max)\n this.#size = 0\n this.#calculatedSize = 0\n\n if (typeof dispose === 'function') {\n this.#dispose = dispose\n }\n if (typeof disposeAfter === 'function') {\n this.#disposeAfter = disposeAfter\n this.#disposed = []\n } else {\n this.#disposeAfter = undefined\n this.#disposed = undefined\n }\n this.#hasDispose = !!this.#dispose\n this.#hasDisposeAfter = !!this.#disposeAfter\n\n this.noDisposeOnSet = !!noDisposeOnSet\n this.noUpdateTTL = !!noUpdateTTL\n this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection\n this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection\n this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort\n this.ignoreFetchAbort = !!ignoreFetchAbort\n\n // NB: maxEntrySize is set to maxSize if it's set\n if (this.maxEntrySize !== 0) {\n if (this.#maxSize !== 0) {\n if (!isPosInt(this.#maxSize)) {\n throw new TypeError(\n 'maxSize must be a positive integer if specified'\n )\n }\n }\n if (!isPosInt(this.maxEntrySize)) {\n throw new TypeError(\n 'maxEntrySize must be a positive integer if specified'\n )\n }\n this.#initializeSizeTracking()\n }\n\n this.allowStale = !!allowStale\n this.noDeleteOnStaleGet = !!noDeleteOnStaleGet\n this.updateAgeOnGet = !!updateAgeOnGet\n this.updateAgeOnHas = !!updateAgeOnHas\n this.ttlResolution =\n isPosInt(ttlResolution) || ttlResolution === 0\n ? ttlResolution\n : 1\n this.ttlAutopurge = !!ttlAutopurge\n this.ttl = ttl || 0\n if (this.ttl) {\n if (!isPosInt(this.ttl)) {\n throw new TypeError(\n 'ttl must be a positive integer if specified'\n )\n }\n this.#initializeTTLTracking()\n }\n\n // do not allow completely unbounded caches\n if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {\n throw new TypeError(\n 'At least one of max, maxSize, or ttl is required'\n )\n }\n if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {\n const code = 'LRU_CACHE_UNBOUNDED'\n if (shouldWarn(code)) {\n warned.add(code)\n const msg =\n 'TTL caching without ttlAutopurge, max, or maxSize can ' +\n 'result in unbounded memory consumption.'\n emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache)\n }\n }\n }\n\n /**\n * Return the number of ms left in the item's TTL. If item is not in cache,\n * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.\n */\n getRemainingTTL(key: K) {\n return this.#keyMap.has(key) ? Infinity : 0\n }\n\n #initializeTTLTracking() {\n const ttls = new ZeroArray(this.#max)\n const starts = new ZeroArray(this.#max)\n this.#ttls = ttls\n this.#starts = starts\n\n this.#setItemTTL = (index, ttl, start = perf.now()) => {\n starts[index] = ttl !== 0 ? start : 0\n ttls[index] = ttl\n if (ttl !== 0 && this.ttlAutopurge) {\n const t = setTimeout(() => {\n if (this.#isStale(index)) {\n this.#delete(this.#keyList[index] as K, 'expire')\n }\n }, ttl + 1)\n // unref() not supported on all platforms\n /* c8 ignore start */\n if (t.unref) {\n t.unref()\n }\n /* c8 ignore stop */\n }\n }\n\n this.#updateItemAge = index => {\n starts[index] = ttls[index] !== 0 ? perf.now() : 0\n }\n\n this.#statusTTL = (status, index) => {\n if (ttls[index]) {\n const ttl = ttls[index]\n const start = starts[index]\n /* c8 ignore next */\n if (!ttl || !start) return\n status.ttl = ttl\n status.start = start\n status.now = cachedNow || getNow()\n const age = status.now - start\n status.remainingTTL = ttl - age\n }\n }\n\n // debounce calls to perf.now() to 1s so we're not hitting\n // that costly call repeatedly.\n let cachedNow = 0\n const getNow = () => {\n const n = perf.now()\n if (this.ttlResolution > 0) {\n cachedNow = n\n const t = setTimeout(\n () => (cachedNow = 0),\n this.ttlResolution\n )\n // not available on all platforms\n /* c8 ignore start */\n if (t.unref) {\n t.unref()\n }\n /* c8 ignore stop */\n }\n return n\n }\n\n this.getRemainingTTL = key => {\n const index = this.#keyMap.get(key)\n if (index === undefined) {\n return 0\n }\n const ttl = ttls[index]\n const start = starts[index]\n if (!ttl || !start) {\n return Infinity\n }\n const age = (cachedNow || getNow()) - start\n return ttl - age\n }\n\n this.#isStale = index => {\n const s = starts[index]\n const t = ttls[index]\n return !!t && !!s && (cachedNow || getNow()) - s > t\n }\n }\n\n // conditionally set private methods related to TTL\n #updateItemAge: (index: Index) => void = () => {}\n #statusTTL: (status: LRUCache.Status, index: Index) => void =\n () => {}\n #setItemTTL: (\n index: Index,\n ttl: LRUCache.Milliseconds,\n start?: LRUCache.Milliseconds\n // ignore because we never call this if we're not already in TTL mode\n /* c8 ignore start */\n ) => void = () => {}\n /* c8 ignore stop */\n\n #isStale: (index: Index) => boolean = () => false\n\n #initializeSizeTracking() {\n const sizes = new ZeroArray(this.#max)\n this.#calculatedSize = 0\n this.#sizes = sizes\n this.#removeItemSize = index => {\n this.#calculatedSize -= sizes[index] as number\n sizes[index] = 0\n }\n this.#requireSize = (k, v, size, sizeCalculation) => {\n // provisionally accept background fetches.\n // actual value size will be checked when they return.\n if (this.#isBackgroundFetch(v)) {\n return 0\n }\n if (!isPosInt(size)) {\n if (sizeCalculation) {\n if (typeof sizeCalculation !== 'function') {\n throw new TypeError('sizeCalculation must be a function')\n }\n size = sizeCalculation(v, k)\n if (!isPosInt(size)) {\n throw new TypeError(\n 'sizeCalculation return invalid (expect positive integer)'\n )\n }\n } else {\n throw new TypeError(\n 'invalid size value (must be positive integer). ' +\n 'When maxSize or maxEntrySize is used, sizeCalculation ' +\n 'or size must be set.'\n )\n }\n }\n return size\n }\n this.#addItemSize = (\n index: Index,\n size: LRUCache.Size,\n status?: LRUCache.Status\n ) => {\n sizes[index] = size\n if (this.#maxSize) {\n const maxSize = this.#maxSize - (sizes[index] as number)\n while (this.#calculatedSize > maxSize) {\n this.#evict(true)\n }\n }\n this.#calculatedSize += sizes[index] as number\n if (status) {\n status.entrySize = size\n status.totalCalculatedSize = this.#calculatedSize\n }\n }\n }\n\n #removeItemSize: (index: Index) => void = _i => {}\n #addItemSize: (\n index: Index,\n size: LRUCache.Size,\n status?: LRUCache.Status\n ) => void = (_i, _s, _st) => {}\n #requireSize: (\n k: K,\n v: V | BackgroundFetch,\n size?: LRUCache.Size,\n sizeCalculation?: LRUCache.SizeCalculator\n ) => LRUCache.Size = (\n _k: K,\n _v: V | BackgroundFetch,\n size?: LRUCache.Size,\n sizeCalculation?: LRUCache.SizeCalculator\n ) => {\n if (size || sizeCalculation) {\n throw new TypeError(\n 'cannot set size without setting maxSize or maxEntrySize on cache'\n )\n }\n return 0\n };\n\n *#indexes({ allowStale = this.allowStale } = {}) {\n if (this.#size) {\n for (let i = this.#tail; true; ) {\n if (!this.#isValidIndex(i)) {\n break\n }\n if (allowStale || !this.#isStale(i)) {\n yield i\n }\n if (i === this.#head) {\n break\n } else {\n i = this.#prev[i] as Index\n }\n }\n }\n }\n\n *#rindexes({ allowStale = this.allowStale } = {}) {\n if (this.#size) {\n for (let i = this.#head; true; ) {\n if (!this.#isValidIndex(i)) {\n break\n }\n if (allowStale || !this.#isStale(i)) {\n yield i\n }\n if (i === this.#tail) {\n break\n } else {\n i = this.#next[i] as Index\n }\n }\n }\n }\n\n #isValidIndex(index: Index) {\n return (\n index !== undefined &&\n this.#keyMap.get(this.#keyList[index] as K) === index\n )\n }\n\n /**\n * Return a generator yielding `[key, value]` pairs,\n * in order from most recently used to least recently used.\n */\n *entries() {\n for (const i of this.#indexes()) {\n if (\n this.#valList[i] !== undefined &&\n this.#keyList[i] !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield [this.#keyList[i], this.#valList[i]] as [K, V]\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.entries}\n *\n * Return a generator yielding `[key, value]` pairs,\n * in order from least recently used to most recently used.\n */\n *rentries() {\n for (const i of this.#rindexes()) {\n if (\n this.#valList[i] !== undefined &&\n this.#keyList[i] !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield [this.#keyList[i], this.#valList[i]]\n }\n }\n }\n\n /**\n * Return a generator yielding the keys in the cache,\n * in order from most recently used to least recently used.\n */\n *keys() {\n for (const i of this.#indexes()) {\n const k = this.#keyList[i]\n if (\n k !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield k\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.keys}\n *\n * Return a generator yielding the keys in the cache,\n * in order from least recently used to most recently used.\n */\n *rkeys() {\n for (const i of this.#rindexes()) {\n const k = this.#keyList[i]\n if (\n k !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield k\n }\n }\n }\n\n /**\n * Return a generator yielding the values in the cache,\n * in order from most recently used to least recently used.\n */\n *values() {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n if (\n v !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield this.#valList[i] as V\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.values}\n *\n * Return a generator yielding the values in the cache,\n * in order from least recently used to most recently used.\n */\n *rvalues() {\n for (const i of this.#rindexes()) {\n const v = this.#valList[i]\n if (\n v !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield this.#valList[i]\n }\n }\n }\n\n /**\n * Iterating over the cache itself yields the same results as\n * {@link LRUCache.entries}\n */\n [Symbol.iterator]() {\n return this.entries()\n }\n\n /**\n * A String value that is used in the creation of the default string\n * description of an object. Called by the built-in method\n * `Object.prototype.toString`.\n */\n [Symbol.toStringTag] = 'LRUCache'\n\n /**\n * Find a value for which the supplied fn method returns a truthy value,\n * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.\n */\n find(\n fn: (v: V, k: K, self: LRUCache) => boolean,\n getOptions: LRUCache.GetOptions = {}\n ) {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n if (fn(value, this.#keyList[i] as K, this)) {\n return this.get(this.#keyList[i] as K, getOptions)\n }\n }\n }\n\n /**\n * Call the supplied function on each item in the cache, in order from most\n * recently used to least recently used.\n *\n * `fn` is called as `fn(value, key, cache)`.\n *\n * If `thisp` is provided, function will be called in the `this`-context of\n * the provided object, or the cache if no `thisp` object is provided.\n *\n * Does not update age or recenty of use, or iterate over stale values.\n */\n forEach(\n fn: (v: V, k: K, self: LRUCache) => any,\n thisp: any = this\n ) {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n fn.call(thisp, value, this.#keyList[i] as K, this)\n }\n }\n\n /**\n * The same as {@link LRUCache.forEach} but items are iterated over in\n * reverse order. (ie, less recently used items are iterated over first.)\n */\n rforEach(\n fn: (v: V, k: K, self: LRUCache) => any,\n thisp: any = this\n ) {\n for (const i of this.#rindexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n fn.call(thisp, value, this.#keyList[i] as K, this)\n }\n }\n\n /**\n * Delete any stale entries. Returns true if anything was removed,\n * false otherwise.\n */\n purgeStale() {\n let deleted = false\n for (const i of this.#rindexes({ allowStale: true })) {\n if (this.#isStale(i)) {\n this.#delete(this.#keyList[i] as K, 'expire')\n deleted = true\n }\n }\n return deleted\n }\n\n /**\n * Get the extended info about a given entry, to get its value, size, and\n * TTL info simultaneously. Returns `undefined` if the key is not present.\n *\n * Unlike {@link LRUCache#dump}, which is designed to be portable and survive\n * serialization, the `start` value is always the current timestamp, and the\n * `ttl` is a calculated remaining time to live (negative if expired).\n *\n * Always returns stale values, if their info is found in the cache, so be\n * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})\n * if relevant.\n */\n info(key: K): LRUCache.Entry | undefined {\n const i = this.#keyMap.get(key)\n if (i === undefined) return undefined\n const v = this.#valList[i]\n const value: V | undefined = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) return undefined\n const entry: LRUCache.Entry = { value }\n if (this.#ttls && this.#starts) {\n const ttl = this.#ttls[i]\n const start = this.#starts[i]\n if (ttl && start) {\n const remain = ttl - (perf.now() - start)\n entry.ttl = remain\n entry.start = Date.now()\n }\n }\n if (this.#sizes) {\n entry.size = this.#sizes[i]\n }\n return entry\n }\n\n /**\n * Return an array of [key, {@link LRUCache.Entry}] tuples which can be\n * passed to {@link LRLUCache#load}.\n *\n * The `start` fields are calculated relative to a portable `Date.now()`\n * timestamp, even if `performance.now()` is available.\n *\n * Stale entries are always included in the `dump`, even if\n * {@link LRUCache.OptionsBase.allowStale} is false.\n *\n * Note: this returns an actual array, not a generator, so it can be more\n * easily passed around.\n */\n dump() {\n const arr: [K, LRUCache.Entry][] = []\n for (const i of this.#indexes({ allowStale: true })) {\n const key = this.#keyList[i]\n const v = this.#valList[i]\n const value: V | undefined = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined || key === undefined) continue\n const entry: LRUCache.Entry = { value }\n if (this.#ttls && this.#starts) {\n entry.ttl = this.#ttls[i]\n // always dump the start relative to a portable timestamp\n // it's ok for this to be a bit slow, it's a rare operation.\n const age = perf.now() - (this.#starts[i] as number)\n entry.start = Math.floor(Date.now() - age)\n }\n if (this.#sizes) {\n entry.size = this.#sizes[i]\n }\n arr.unshift([key, entry])\n }\n return arr\n }\n\n /**\n * Reset the cache and load in the items in entries in the order listed.\n *\n * The shape of the resulting cache may be different if the same options are\n * not used in both caches.\n *\n * The `start` fields are assumed to be calculated relative to a portable\n * `Date.now()` timestamp, even if `performance.now()` is available.\n */\n load(arr: [K, LRUCache.Entry][]) {\n this.clear()\n for (const [key, entry] of arr) {\n if (entry.start) {\n // entry.start is a portable timestamp, but we may be using\n // node's performance.now(), so calculate the offset, so that\n // we get the intended remaining TTL, no matter how long it's\n // been on ice.\n //\n // it's ok for this to be a bit slow, it's a rare operation.\n const age = Date.now() - entry.start\n entry.start = perf.now() - age\n }\n this.set(key, entry.value, entry)\n }\n }\n\n /**\n * Add a value to the cache.\n *\n * Note: if `undefined` is specified as a value, this is an alias for\n * {@link LRUCache#delete}\n *\n * Fields on the {@link LRUCache.SetOptions} options param will override\n * their corresponding values in the constructor options for the scope\n * of this single `set()` operation.\n *\n * If `start` is provided, then that will set the effective start\n * time for the TTL calculation. Note that this must be a previous\n * value of `performance.now()` if supported, or a previous value of\n * `Date.now()` if not.\n *\n * Options object may also include `size`, which will prevent\n * calling the `sizeCalculation` function and just use the specified\n * number if it is a positive integer, and `noDisposeOnSet` which\n * will prevent calling a `dispose` function in the case of\n * overwrites.\n *\n * If the `size` (or return value of `sizeCalculation`) for a given\n * entry is greater than `maxEntrySize`, then the item will not be\n * added to the cache.\n *\n * Will update the recency of the entry.\n *\n * If the value is `undefined`, then this is an alias for\n * `cache.delete(key)`. `undefined` is never stored in the cache.\n */\n set(\n k: K,\n v: V | BackgroundFetch | undefined,\n setOptions: LRUCache.SetOptions = {}\n ) {\n if (v === undefined) {\n this.delete(k)\n return this\n }\n const {\n ttl = this.ttl,\n start,\n noDisposeOnSet = this.noDisposeOnSet,\n sizeCalculation = this.sizeCalculation,\n status,\n } = setOptions\n let { noUpdateTTL = this.noUpdateTTL } = setOptions\n\n const size = this.#requireSize(\n k,\n v,\n setOptions.size || 0,\n sizeCalculation\n )\n // if the item doesn't fit, don't do anything\n // NB: maxEntrySize set to maxSize by default\n if (this.maxEntrySize && size > this.maxEntrySize) {\n if (status) {\n status.set = 'miss'\n status.maxEntrySizeExceeded = true\n }\n // have to delete, in case something is there already.\n this.#delete(k, 'set')\n return this\n }\n let index = this.#size === 0 ? undefined : this.#keyMap.get(k)\n if (index === undefined) {\n // addition\n index = (\n this.#size === 0\n ? this.#tail\n : this.#free.length !== 0\n ? this.#free.pop()\n : this.#size === this.#max\n ? this.#evict(false)\n : this.#size\n ) as Index\n this.#keyList[index] = k\n this.#valList[index] = v\n this.#keyMap.set(k, index)\n this.#next[this.#tail] = index\n this.#prev[index] = this.#tail\n this.#tail = index\n this.#size++\n this.#addItemSize(index, size, status)\n if (status) status.set = 'add'\n noUpdateTTL = false\n } else {\n // update\n this.#moveToTail(index)\n const oldVal = this.#valList[index] as V | BackgroundFetch\n if (v !== oldVal) {\n if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {\n oldVal.__abortController.abort(new Error('replaced'))\n const { __staleWhileFetching: s } = oldVal\n if (s !== undefined && !noDisposeOnSet) {\n if (this.#hasDispose) {\n this.#dispose?.(s as V, k, 'set')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([s as V, k, 'set'])\n }\n }\n } else if (!noDisposeOnSet) {\n if (this.#hasDispose) {\n this.#dispose?.(oldVal as V, k, 'set')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([oldVal as V, k, 'set'])\n }\n }\n this.#removeItemSize(index)\n this.#addItemSize(index, size, status)\n this.#valList[index] = v\n if (status) {\n status.set = 'replace'\n const oldValue =\n oldVal && this.#isBackgroundFetch(oldVal)\n ? oldVal.__staleWhileFetching\n : oldVal\n if (oldValue !== undefined) status.oldValue = oldValue\n }\n } else if (status) {\n status.set = 'update'\n }\n }\n if (ttl !== 0 && !this.#ttls) {\n this.#initializeTTLTracking()\n }\n if (this.#ttls) {\n if (!noUpdateTTL) {\n this.#setItemTTL(index, ttl, start)\n }\n if (status) this.#statusTTL(status, index)\n }\n if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n return this\n }\n\n /**\n * Evict the least recently used item, returning its value or\n * `undefined` if cache is empty.\n */\n pop(): V | undefined {\n try {\n while (this.#size) {\n const val = this.#valList[this.#head]\n this.#evict(true)\n if (this.#isBackgroundFetch(val)) {\n if (val.__staleWhileFetching) {\n return val.__staleWhileFetching\n }\n } else if (val !== undefined) {\n return val\n }\n }\n } finally {\n if (this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n }\n }\n\n #evict(free: boolean) {\n const head = this.#head\n const k = this.#keyList[head] as K\n const v = this.#valList[head] as V\n if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('evicted'))\n } else if (this.#hasDispose || this.#hasDisposeAfter) {\n if (this.#hasDispose) {\n this.#dispose?.(v, k, 'evict')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v, k, 'evict'])\n }\n }\n this.#removeItemSize(head)\n // if we aren't about to use the index, then null these out\n if (free) {\n this.#keyList[head] = undefined\n this.#valList[head] = undefined\n this.#free.push(head)\n }\n if (this.#size === 1) {\n this.#head = this.#tail = 0 as Index\n this.#free.length = 0\n } else {\n this.#head = this.#next[head] as Index\n }\n this.#keyMap.delete(k)\n this.#size--\n return head\n }\n\n /**\n * Check if a key is in the cache, without updating the recency of use.\n * Will return false if the item is stale, even though it is technically\n * in the cache.\n *\n * Check if a key is in the cache, without updating the recency of\n * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set\n * to `true` in either the options or the constructor.\n *\n * Will return `false` if the item is stale, even though it is technically in\n * the cache. The difference can be determined (if it matters) by using a\n * `status` argument, and inspecting the `has` field.\n *\n * Will not update item age unless\n * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.\n */\n has(k: K, hasOptions: LRUCache.HasOptions = {}) {\n const { updateAgeOnHas = this.updateAgeOnHas, status } =\n hasOptions\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n const v = this.#valList[index]\n if (\n this.#isBackgroundFetch(v) &&\n v.__staleWhileFetching === undefined\n ) {\n return false\n }\n if (!this.#isStale(index)) {\n if (updateAgeOnHas) {\n this.#updateItemAge(index)\n }\n if (status) {\n status.has = 'hit'\n this.#statusTTL(status, index)\n }\n return true\n } else if (status) {\n status.has = 'stale'\n this.#statusTTL(status, index)\n }\n } else if (status) {\n status.has = 'miss'\n }\n return false\n }\n\n /**\n * Like {@link LRUCache#get} but doesn't update recency or delete stale\n * items.\n *\n * Returns `undefined` if the item is stale, unless\n * {@link LRUCache.OptionsBase.allowStale} is set.\n */\n peek(k: K, peekOptions: LRUCache.PeekOptions = {}) {\n const { allowStale = this.allowStale } = peekOptions\n const index = this.#keyMap.get(k)\n if (\n index === undefined ||\n (!allowStale && this.#isStale(index))\n ) {\n return\n }\n const v = this.#valList[index]\n // either stale and allowed, or forcing a refresh of non-stale value\n return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v\n }\n\n #backgroundFetch(\n k: K,\n index: Index | undefined,\n options: LRUCache.FetchOptions,\n context: any\n ): BackgroundFetch {\n const v = index === undefined ? undefined : this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n return v\n }\n\n const ac = new AC()\n const { signal } = options\n // when/if our AC signals, then stop listening to theirs.\n signal?.addEventListener('abort', () => ac.abort(signal.reason), {\n signal: ac.signal,\n })\n\n const fetchOpts = {\n signal: ac.signal,\n options,\n context,\n }\n\n const cb = (\n v: V | undefined,\n updateCache = false\n ): V | undefined => {\n const { aborted } = ac.signal\n const ignoreAbort = options.ignoreFetchAbort && v !== undefined\n if (options.status) {\n if (aborted && !updateCache) {\n options.status.fetchAborted = true\n options.status.fetchError = ac.signal.reason\n if (ignoreAbort) options.status.fetchAbortIgnored = true\n } else {\n options.status.fetchResolved = true\n }\n }\n if (aborted && !ignoreAbort && !updateCache) {\n return fetchFail(ac.signal.reason)\n }\n // either we didn't abort, and are still here, or we did, and ignored\n const bf = p as BackgroundFetch\n if (this.#valList[index as Index] === p) {\n if (v === undefined) {\n if (bf.__staleWhileFetching) {\n this.#valList[index as Index] = bf.__staleWhileFetching\n } else {\n this.#delete(k, 'fetch')\n }\n } else {\n if (options.status) options.status.fetchUpdated = true\n this.set(k, v, fetchOpts.options)\n }\n }\n return v\n }\n\n const eb = (er: any) => {\n if (options.status) {\n options.status.fetchRejected = true\n options.status.fetchError = er\n }\n return fetchFail(er)\n }\n\n const fetchFail = (er: any): V | undefined => {\n const { aborted } = ac.signal\n const allowStaleAborted =\n aborted && options.allowStaleOnFetchAbort\n const allowStale =\n allowStaleAborted || options.allowStaleOnFetchRejection\n const noDelete = allowStale || options.noDeleteOnFetchRejection\n const bf = p as BackgroundFetch\n if (this.#valList[index as Index] === p) {\n // if we allow stale on fetch rejections, then we need to ensure that\n // the stale value is not removed from the cache when the fetch fails.\n const del = !noDelete || bf.__staleWhileFetching === undefined\n if (del) {\n this.#delete(k, 'fetch')\n } else if (!allowStaleAborted) {\n // still replace the *promise* with the stale value,\n // since we are done with the promise at this point.\n // leave it untouched if we're still waiting for an\n // aborted background fetch that hasn't yet returned.\n this.#valList[index as Index] = bf.__staleWhileFetching\n }\n }\n if (allowStale) {\n if (options.status && bf.__staleWhileFetching !== undefined) {\n options.status.returnedStale = true\n }\n return bf.__staleWhileFetching\n } else if (bf.__returned === bf) {\n throw er\n }\n }\n\n const pcall = (\n res: (v: V | undefined) => void,\n rej: (e: any) => void\n ) => {\n const fmp = this.#fetchMethod?.(k, v, fetchOpts)\n if (fmp && fmp instanceof Promise) {\n fmp.then(v => res(v === undefined ? undefined : v), rej)\n }\n // ignored, we go until we finish, regardless.\n // defer check until we are actually aborting,\n // so fetchMethod can override.\n ac.signal.addEventListener('abort', () => {\n if (\n !options.ignoreFetchAbort ||\n options.allowStaleOnFetchAbort\n ) {\n res(undefined)\n // when it eventually resolves, update the cache.\n if (options.allowStaleOnFetchAbort) {\n res = v => cb(v, true)\n }\n }\n })\n }\n\n if (options.status) options.status.fetchDispatched = true\n const p = new Promise(pcall).then(cb, eb)\n const bf: BackgroundFetch = Object.assign(p, {\n __abortController: ac,\n __staleWhileFetching: v,\n __returned: undefined,\n })\n\n if (index === undefined) {\n // internal, don't expose status.\n this.set(k, bf, { ...fetchOpts.options, status: undefined })\n index = this.#keyMap.get(k)\n } else {\n this.#valList[index] = bf\n }\n return bf\n }\n\n #isBackgroundFetch(p: any): p is BackgroundFetch {\n if (!this.#hasFetchMethod) return false\n const b = p as BackgroundFetch\n return (\n !!b &&\n b instanceof Promise &&\n b.hasOwnProperty('__staleWhileFetching') &&\n b.__abortController instanceof AC\n )\n }\n\n /**\n * Make an asynchronous cached fetch using the\n * {@link LRUCache.OptionsBase.fetchMethod} function.\n *\n * If the value is in the cache and not stale, then the returned\n * Promise resolves to the value.\n *\n * If not in the cache, or beyond its TTL staleness, then\n * `fetchMethod(key, staleValue, { options, signal, context })` is\n * called, and the value returned will be added to the cache once\n * resolved.\n *\n * If called with `allowStale`, and an asynchronous fetch is\n * currently in progress to reload a stale value, then the former\n * stale value will be returned.\n *\n * If called with `forceRefresh`, then the cached item will be\n * re-fetched, even if it is not stale. However, if `allowStale` is also\n * set, then the old value will still be returned. This is useful\n * in cases where you want to force a reload of a cached value. If\n * a background fetch is already in progress, then `forceRefresh`\n * has no effect.\n *\n * If multiple fetches for the same key are issued, then they will all be\n * coalesced into a single call to fetchMethod.\n *\n * Note that this means that handling options such as\n * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort},\n * {@link LRUCache.FetchOptions.signal},\n * and {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} will be\n * determined by the FIRST fetch() call for a given key.\n *\n * This is a known (fixable) shortcoming which will be addresed on when\n * someone complains about it, as the fix would involve added complexity and\n * may not be worth the costs for this edge case.\n *\n * If {@link LRUCache.OptionsBase.fetchMethod} is not specified, then this is\n * effectively an alias for `Promise.resolve(cache.get(key))`.\n *\n * When the fetch method resolves to a value, if the fetch has not\n * been aborted due to deletion, eviction, or being overwritten,\n * then it is added to the cache using the options provided.\n *\n * If the key is evicted or deleted before the `fetchMethod`\n * resolves, then the AbortSignal passed to the `fetchMethod` will\n * receive an `abort` event, and the promise returned by `fetch()`\n * will reject with the reason for the abort.\n *\n * If a `signal` is passed to the `fetch()` call, then aborting the\n * signal will abort the fetch and cause the `fetch()` promise to\n * reject with the reason provided.\n *\n * **Setting `context`**\n *\n * If an `FC` type is set to a type other than `unknown`, `void`, or\n * `undefined` in the {@link LRUCache} constructor, then all\n * calls to `cache.fetch()` _must_ provide a `context` option. If\n * set to `undefined` or `void`, then calls to fetch _must not_\n * provide a `context` option.\n *\n * The `context` param allows you to provide arbitrary data that\n * might be relevant in the course of fetching the data. It is only\n * relevant for the course of a single `fetch()` operation, and\n * discarded afterwards.\n *\n * **Note: `fetch()` calls are inflight-unique**\n *\n * If you call `fetch()` multiple times with the same key value,\n * then every call after the first will resolve on the same\n * promise1,\n * _even if they have different settings that would otherwise change\n * the behavior of the fetch_, such as `noDeleteOnFetchRejection`\n * or `ignoreFetchAbort`.\n *\n * In most cases, this is not a problem (in fact, only fetching\n * something once is what you probably want, if you're caching in\n * the first place). If you are changing the fetch() options\n * dramatically between runs, there's a good chance that you might\n * be trying to fit divergent semantics into a single object, and\n * would be better off with multiple cache instances.\n *\n * **1**: Ie, they're not the \"same Promise\", but they resolve at\n * the same time, because they're both waiting on the same\n * underlying fetchMethod response.\n */\n\n fetch(\n k: K,\n fetchOptions: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n ): Promise\n\n // this overload not allowed if context is required\n fetch(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n fetchOptions?: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : never\n ): Promise\n\n async fetch(\n k: K,\n fetchOptions: LRUCache.FetchOptions = {}\n ): Promise {\n const {\n // get options\n allowStale = this.allowStale,\n updateAgeOnGet = this.updateAgeOnGet,\n noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n // set options\n ttl = this.ttl,\n noDisposeOnSet = this.noDisposeOnSet,\n size = 0,\n sizeCalculation = this.sizeCalculation,\n noUpdateTTL = this.noUpdateTTL,\n // fetch exclusive options\n noDeleteOnFetchRejection = this.noDeleteOnFetchRejection,\n allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,\n ignoreFetchAbort = this.ignoreFetchAbort,\n allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,\n context,\n forceRefresh = false,\n status,\n signal,\n } = fetchOptions\n\n if (!this.#hasFetchMethod) {\n if (status) status.fetch = 'get'\n return this.get(k, {\n allowStale,\n updateAgeOnGet,\n noDeleteOnStaleGet,\n status,\n })\n }\n\n const options = {\n allowStale,\n updateAgeOnGet,\n noDeleteOnStaleGet,\n ttl,\n noDisposeOnSet,\n size,\n sizeCalculation,\n noUpdateTTL,\n noDeleteOnFetchRejection,\n allowStaleOnFetchRejection,\n allowStaleOnFetchAbort,\n ignoreFetchAbort,\n status,\n signal,\n }\n\n let index = this.#keyMap.get(k)\n if (index === undefined) {\n if (status) status.fetch = 'miss'\n const p = this.#backgroundFetch(k, index, options, context)\n return (p.__returned = p)\n } else {\n // in cache, maybe already fetching\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n const stale =\n allowStale && v.__staleWhileFetching !== undefined\n if (status) {\n status.fetch = 'inflight'\n if (stale) status.returnedStale = true\n }\n return stale ? v.__staleWhileFetching : (v.__returned = v)\n }\n\n // if we force a refresh, that means do NOT serve the cached value,\n // unless we are already in the process of refreshing the cache.\n const isStale = this.#isStale(index)\n if (!forceRefresh && !isStale) {\n if (status) status.fetch = 'hit'\n this.#moveToTail(index)\n if (updateAgeOnGet) {\n this.#updateItemAge(index)\n }\n if (status) this.#statusTTL(status, index)\n return v\n }\n\n // ok, it is stale or a forced refresh, and not already fetching.\n // refresh the cache.\n const p = this.#backgroundFetch(k, index, options, context)\n const hasStale = p.__staleWhileFetching !== undefined\n const staleVal = hasStale && allowStale\n if (status) {\n status.fetch = isStale ? 'stale' : 'refresh'\n if (staleVal && isStale) status.returnedStale = true\n }\n return staleVal ? p.__staleWhileFetching : (p.__returned = p)\n }\n }\n\n /**\n * In some cases, `cache.fetch()` may resolve to `undefined`, either because\n * a {@link LRUCache.OptionsBase#fetchMethod} was not provided (turning\n * `cache.fetch(k)` into just an async wrapper around `cache.get(k)`) or\n * because `ignoreFetchAbort` was specified (either to the constructor or\n * in the {@link LRUCache.FetchOptions}). Also, the\n * {@link OptionsBase.fetchMethod} may return `undefined` or `void`, making\n * the test even more complicated.\n *\n * Because inferring the cases where `undefined` might be returned are so\n * cumbersome, but testing for `undefined` can also be annoying, this method\n * can be used, which will reject if `this.fetch()` resolves to undefined.\n */\n forceFetch(\n k: K,\n fetchOptions: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n ): Promise\n // this overload not allowed if context is required\n forceFetch(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n fetchOptions?: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : never\n ): Promise\n async forceFetch(\n k: K,\n fetchOptions: LRUCache.FetchOptions = {}\n ): Promise {\n const v = await this.fetch(\n k,\n fetchOptions as unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n )\n if (v === undefined) throw new Error('fetch() returned undefined')\n return v\n }\n\n /**\n * If the key is found in the cache, then this is equivalent to\n * {@link LRUCache#get}. If not, in the cache, then calculate the value using\n * the {@link LRUCache.OptionsBase.memoMethod}, and add it to the cache.\n *\n * If an `FC` type is set to a type other than `unknown`, `void`, or\n * `undefined` in the LRUCache constructor, then all calls to `cache.memo()`\n * _must_ provide a `context` option. If set to `undefined` or `void`, then\n * calls to memo _must not_ provide a `context` option.\n *\n * The `context` param allows you to provide arbitrary data that might be\n * relevant in the course of fetching the data. It is only relevant for the\n * course of a single `memo()` operation, and discarded afterwards.\n */\n memo(\n k: K,\n memoOptions: unknown extends FC\n ? LRUCache.MemoOptions\n : FC extends undefined | void\n ? LRUCache.MemoOptionsNoContext\n : LRUCache.MemoOptionsWithContext\n ): V\n // this overload not allowed if context is required\n memo(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n memoOptions?: unknown extends FC\n ? LRUCache.MemoOptions\n : FC extends undefined | void\n ? LRUCache.MemoOptionsNoContext\n : never\n ): V\n memo(k: K, memoOptions: LRUCache.MemoOptions = {}) {\n const memoMethod = this.#memoMethod\n if (!memoMethod) {\n throw new Error('no memoMethod provided to constructor')\n }\n const { context, forceRefresh, ...options } = memoOptions\n const v = this.get(k, options)\n if (!forceRefresh && v !== undefined) return v\n const vv = memoMethod(k, v, {\n options,\n context,\n } as LRUCache.MemoizerOptions)\n this.set(k, vv, options)\n return vv\n }\n\n /**\n * Return a value from the cache. Will update the recency of the cache\n * entry found.\n *\n * If the key is not found, get() will return `undefined`.\n */\n get(k: K, getOptions: LRUCache.GetOptions = {}) {\n const {\n allowStale = this.allowStale,\n updateAgeOnGet = this.updateAgeOnGet,\n noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n status,\n } = getOptions\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n const value = this.#valList[index]\n const fetching = this.#isBackgroundFetch(value)\n if (status) this.#statusTTL(status, index)\n if (this.#isStale(index)) {\n if (status) status.get = 'stale'\n // delete only if not an in-flight background fetch\n if (!fetching) {\n if (!noDeleteOnStaleGet) {\n this.#delete(k, 'expire')\n }\n if (status && allowStale) status.returnedStale = true\n return allowStale ? value : undefined\n } else {\n if (\n status &&\n allowStale &&\n value.__staleWhileFetching !== undefined\n ) {\n status.returnedStale = true\n }\n return allowStale ? value.__staleWhileFetching : undefined\n }\n } else {\n if (status) status.get = 'hit'\n // if we're currently fetching it, we don't actually have it yet\n // it's not stale, which means this isn't a staleWhileRefetching.\n // If it's not stale, and fetching, AND has a __staleWhileFetching\n // value, then that means the user fetched with {forceRefresh:true},\n // so it's safe to return that value.\n if (fetching) {\n return value.__staleWhileFetching\n }\n this.#moveToTail(index)\n if (updateAgeOnGet) {\n this.#updateItemAge(index)\n }\n return value\n }\n } else if (status) {\n status.get = 'miss'\n }\n }\n\n #connect(p: Index, n: Index) {\n this.#prev[n] = p\n this.#next[p] = n\n }\n\n #moveToTail(index: Index): void {\n // if tail already, nothing to do\n // if head, move head to next[index]\n // else\n // move next[prev[index]] to next[index] (head has no prev)\n // move prev[next[index]] to prev[index]\n // prev[index] = tail\n // next[tail] = index\n // tail = index\n if (index !== this.#tail) {\n if (index === this.#head) {\n this.#head = this.#next[index] as Index\n } else {\n this.#connect(\n this.#prev[index] as Index,\n this.#next[index] as Index\n )\n }\n this.#connect(this.#tail, index)\n this.#tail = index\n }\n }\n\n /**\n * Deletes a key out of the cache.\n *\n * Returns true if the key was deleted, false otherwise.\n */\n delete(k: K) {\n return this.#delete(k, 'delete')\n }\n\n #delete(k: K, reason: LRUCache.DisposeReason) {\n let deleted = false\n if (this.#size !== 0) {\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n deleted = true\n if (this.#size === 1) {\n this.#clear(reason)\n } else {\n this.#removeItemSize(index)\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('deleted'))\n } else if (this.#hasDispose || this.#hasDisposeAfter) {\n if (this.#hasDispose) {\n this.#dispose?.(v as V, k, reason)\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v as V, k, reason])\n }\n }\n this.#keyMap.delete(k)\n this.#keyList[index] = undefined\n this.#valList[index] = undefined\n if (index === this.#tail) {\n this.#tail = this.#prev[index] as Index\n } else if (index === this.#head) {\n this.#head = this.#next[index] as Index\n } else {\n const pi = this.#prev[index] as number\n this.#next[pi] = this.#next[index] as number\n const ni = this.#next[index] as number\n this.#prev[ni] = this.#prev[index] as number\n }\n this.#size--\n this.#free.push(index)\n }\n }\n }\n if (this.#hasDisposeAfter && this.#disposed?.length) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n return deleted\n }\n\n /**\n * Clear the cache entirely, throwing away all values.\n */\n clear() {\n return this.#clear('delete')\n }\n #clear(reason: LRUCache.DisposeReason) {\n for (const index of this.#rindexes({ allowStale: true })) {\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('deleted'))\n } else {\n const k = this.#keyList[index]\n if (this.#hasDispose) {\n this.#dispose?.(v as V, k as K, reason)\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v as V, k as K, reason])\n }\n }\n }\n\n this.#keyMap.clear()\n this.#valList.fill(undefined)\n this.#keyList.fill(undefined)\n if (this.#ttls && this.#starts) {\n this.#ttls.fill(0)\n this.#starts.fill(0)\n }\n if (this.#sizes) {\n this.#sizes.fill(0)\n }\n this.#head = 0 as Index\n this.#tail = 0 as Index\n this.#free.length = 0\n this.#calculatedSize = 0\n this.#size = 0\n if (this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n }\n}\n"]} \ No newline at end of file diff --git a/.github/octokit/node_modules/lru-cache/dist/esm/index.min.js b/.github/octokit/node_modules/lru-cache/dist/esm/index.min.js new file mode 100644 index 000000000..4571d0254 --- /dev/null +++ b/.github/octokit/node_modules/lru-cache/dist/esm/index.min.js @@ -0,0 +1,2 @@ +var G=(l,t,e)=>{if(!t.has(l))throw TypeError("Cannot "+e)};var I=(l,t,e)=>(G(l,t,"read from private field"),e?e.call(l):t.get(l)),j=(l,t,e)=>{if(t.has(l))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(l):t.set(l,e)},x=(l,t,e,i)=>(G(l,t,"write to private field"),i?i.call(l,e):t.set(l,e),e);var T=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,P=new Set,M=typeof process=="object"&&process?process:{},H=(l,t,e,i)=>{typeof M.emitWarning=="function"?M.emitWarning(l,t,e,i):console.error(`[${e}] ${t}: ${l}`)},W=globalThis.AbortController,N=globalThis.AbortSignal;if(typeof W>"u"){N=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,s){this._onabort.push(s)}},W=class{constructor(){t()}signal=new N;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i)}}};let l=M.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{l&&(l=!1,H("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var V=l=>!P.has(l),Y=Symbol("type"),A=l=>l&&l===Math.floor(l)&&l>0&&isFinite(l),k=l=>A(l)?l<=Math.pow(2,8)?Uint8Array:l<=Math.pow(2,16)?Uint16Array:l<=Math.pow(2,32)?Uint32Array:l<=Number.MAX_SAFE_INTEGER?O:null:null,O=class extends Array{constructor(t){super(t),this.fill(0)}},z,E=class{heap;length;static create(t){let e=k(t);if(!e)return[];x(E,z,!0);let i=new E(t,e);return x(E,z,!1),i}constructor(t,e){if(!I(E,z))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},R=E;z=new WeakMap,j(R,z,!1);var D=class{#g;#f;#p;#w;#R;#W;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#S;#s;#i;#t;#l;#c;#o;#h;#_;#r;#m;#b;#u;#y;#O;#a;static unsafeExposeInternals(t){return{starts:t.#b,ttls:t.#u,sizes:t.#m,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#c,get head(){return t.#o},get tail(){return t.#h},free:t.#_,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,n)=>t.#x(e,i,s,n),moveToTail:e=>t.#C(e),indexes:e=>t.#A(e),rindexes:e=>t.#F(e),isStale:e=>t.#d(e)}}get max(){return this.#g}get maxSize(){return this.#f}get calculatedSize(){return this.#S}get size(){return this.#n}get fetchMethod(){return this.#R}get memoMethod(){return this.#W}get dispose(){return this.#p}get disposeAfter(){return this.#w}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:h,updateAgeOnHas:o,allowStale:r,dispose:g,disposeAfter:m,noDisposeOnSet:f,noUpdateTTL:u,maxSize:c=0,maxEntrySize:F=0,sizeCalculation:d,fetchMethod:S,memoMethod:a,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:_,ignoreFetchAbort:v}=t;if(e!==0&&!A(e))throw new TypeError("max option must be a nonnegative integer");let y=e?k(e):Array;if(!y)throw new Error("invalid max value: "+e);if(this.#g=e,this.#f=c,this.maxEntrySize=F||this.#f,this.sizeCalculation=d,this.sizeCalculation){if(!this.#f&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(a!==void 0&&typeof a!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#W=a,S!==void 0&&typeof S!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#R=S,this.#O=!!S,this.#s=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#l=new y(e),this.#c=new y(e),this.#o=0,this.#h=0,this.#_=R.create(e),this.#n=0,this.#S=0,typeof g=="function"&&(this.#p=g),typeof m=="function"?(this.#w=m,this.#r=[]):(this.#w=void 0,this.#r=void 0),this.#y=!!this.#p,this.#a=!!this.#w,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!w,this.allowStaleOnFetchRejection=!!p,this.allowStaleOnFetchAbort=!!_,this.ignoreFetchAbort=!!v,this.maxEntrySize!==0){if(this.#f!==0&&!A(this.#f))throw new TypeError("maxSize must be a positive integer if specified");if(!A(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#P()}if(this.allowStale=!!r,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!o,this.ttlResolution=A(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!A(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#M()}if(this.#g===0&&this.ttl===0&&this.#f===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#g&&!this.#f){let C="LRU_CACHE_UNBOUNDED";V(C)&&(P.add(C),H("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",C,D))}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#M(){let t=new O(this.#g),e=new O(this.#g);this.#u=t,this.#b=e,this.#U=(n,h,o=T.now())=>{if(e[n]=h!==0?o:0,t[n]=h,h!==0&&this.ttlAutopurge){let r=setTimeout(()=>{this.#d(n)&&this.#T(this.#i[n],"expire")},h+1);r.unref&&r.unref()}},this.#z=n=>{e[n]=t[n]!==0?T.now():0},this.#E=(n,h)=>{if(t[h]){let o=t[h],r=e[h];if(!o||!r)return;n.ttl=o,n.start=r,n.now=i||s();let g=n.now-r;n.remainingTTL=o-g}};let i=0,s=()=>{let n=T.now();if(this.ttlResolution>0){i=n;let h=setTimeout(()=>i=0,this.ttlResolution);h.unref&&h.unref()}return n};this.getRemainingTTL=n=>{let h=this.#s.get(n);if(h===void 0)return 0;let o=t[h],r=e[h];if(!o||!r)return 1/0;let g=(i||s())-r;return o-g},this.#d=n=>{let h=e[n],o=t[n];return!!o&&!!h&&(i||s())-h>o}}#z=()=>{};#E=()=>{};#U=()=>{};#d=()=>!1;#P(){let t=new O(this.#g);this.#S=0,this.#m=t,this.#v=e=>{this.#S-=t[e],t[e]=0},this.#G=(e,i,s,n)=>{if(this.#e(i))return 0;if(!A(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,e),!A(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#D=(e,i,s)=>{if(t[e]=i,this.#f){let n=this.#f-t[e];for(;this.#S>n;)this.#L(!0)}this.#S+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#S)}}#v=t=>{};#D=(t,e,i)=>{};#G=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#h;!(!this.#I(e)||((t||!this.#d(e))&&(yield e),e===this.#o));)e=this.#c[e]}*#F({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#o;!(!this.#I(e)||((t||!this.#d(e))&&(yield e),e===this.#h));)e=this.#l[e]}#I(t){return t!==void 0&&this.#s.get(this.#i[t])===t}*entries(){for(let t of this.#A())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*rentries(){for(let t of this.#F())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*keys(){for(let t of this.#A()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*rkeys(){for(let t of this.#F()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*values(){for(let t of this.#A())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(let t of this.#F())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;if(n!==void 0&&t(n,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}rforEach(t,e=this){for(let i of this.#F()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}purgeStale(){let t=!1;for(let e of this.#F({allowStale:!0}))this.#d(e)&&(this.#T(this.#i[e],"expire"),t=!0);return t}info(t){let e=this.#s.get(t);if(e===void 0)return;let i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#u&&this.#b){let h=this.#u[e],o=this.#b[e];if(h&&o){let r=h-(T.now()-o);n.ttl=r,n.start=Date.now()}}return this.#m&&(n.size=this.#m[e]),n}dump(){let t=[];for(let e of this.#A({allowStale:!0})){let i=this.#i[e],s=this.#t[e],n=this.#e(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let h={value:n};if(this.#u&&this.#b){h.ttl=this.#u[e];let o=T.now()-this.#b[e];h.start=Math.floor(Date.now()-o)}this.#m&&(h.size=this.#m[e]),t.unshift([i,h])}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=T.now()-s}this.set(e,i.value,i)}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:n,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:r}=i,{noUpdateTTL:g=this.noUpdateTTL}=i,m=this.#G(t,e,i.size||0,o);if(this.maxEntrySize&&m>this.maxEntrySize)return r&&(r.set="miss",r.maxEntrySizeExceeded=!0),this.#T(t,"set"),this;let f=this.#n===0?void 0:this.#s.get(t);if(f===void 0)f=this.#n===0?this.#h:this.#_.length!==0?this.#_.pop():this.#n===this.#g?this.#L(!1):this.#n,this.#i[f]=t,this.#t[f]=e,this.#s.set(t,f),this.#l[this.#h]=f,this.#c[f]=this.#h,this.#h=f,this.#n++,this.#D(f,m,r),r&&(r.set="add"),g=!1;else{this.#C(f);let u=this.#t[f];if(e!==u){if(this.#O&&this.#e(u)){u.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:c}=u;c!==void 0&&!h&&(this.#y&&this.#p?.(c,t,"set"),this.#a&&this.#r?.push([c,t,"set"]))}else h||(this.#y&&this.#p?.(u,t,"set"),this.#a&&this.#r?.push([u,t,"set"]));if(this.#v(f),this.#D(f,m,r),this.#t[f]=e,r){r.set="replace";let c=u&&this.#e(u)?u.__staleWhileFetching:u;c!==void 0&&(r.oldValue=c)}}else r&&(r.set="update")}if(s!==0&&!this.#u&&this.#M(),this.#u&&(g||this.#U(f,s,n),r&&this.#E(r,f)),!h&&this.#a&&this.#r){let u=this.#r,c;for(;c=u?.shift();)this.#w?.(...c)}return this}pop(){try{for(;this.#n;){let t=this.#t[this.#o];if(this.#L(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#a&&this.#r){let t=this.#r,e;for(;e=t?.shift();)this.#w?.(...e)}}}#L(t){let e=this.#o,i=this.#i[e],s=this.#t[e];return this.#O&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#y||this.#a)&&(this.#y&&this.#p?.(s,i,"evict"),this.#a&&this.#r?.push([s,i,"evict"])),this.#v(e),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#_.push(e)),this.#n===1?(this.#o=this.#h=0,this.#_.length=0):this.#o=this.#l[e],this.#s.delete(i),this.#n--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,n=this.#s.get(t);if(n!==void 0){let h=this.#t[n];if(this.#e(h)&&h.__staleWhileFetching===void 0)return!1;if(this.#d(n))s&&(s.has="stale",this.#E(s,n));else return i&&this.#z(n),s&&(s.has="hit",this.#E(s,n)),!0}else s&&(s.has="miss");return!1}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#s.get(t);if(s===void 0||!i&&this.#d(s))return;let n=this.#t[s];return this.#e(n)?n.__staleWhileFetching:n}#x(t,e,i,s){let n=e===void 0?void 0:this.#t[e];if(this.#e(n))return n;let h=new W,{signal:o}=i;o?.addEventListener("abort",()=>h.abort(o.reason),{signal:h.signal});let r={signal:h.signal,options:i,context:s},g=(d,S=!1)=>{let{aborted:a}=h.signal,w=i.ignoreFetchAbort&&d!==void 0;if(i.status&&(a&&!S?(i.status.fetchAborted=!0,i.status.fetchError=h.signal.reason,w&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),a&&!w&&!S)return f(h.signal.reason);let b=c;return this.#t[e]===c&&(d===void 0?b.__staleWhileFetching?this.#t[e]=b.__staleWhileFetching:this.#T(t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(t,d,r.options))),d},m=d=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=d),f(d)),f=d=>{let{aborted:S}=h.signal,a=S&&i.allowStaleOnFetchAbort,w=a||i.allowStaleOnFetchRejection,b=w||i.noDeleteOnFetchRejection,p=c;if(this.#t[e]===c&&(!b||p.__staleWhileFetching===void 0?this.#T(t,"fetch"):a||(this.#t[e]=p.__staleWhileFetching)),w)return i.status&&p.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw d},u=(d,S)=>{let a=this.#R?.(t,n,r);a&&a instanceof Promise&&a.then(w=>d(w===void 0?void 0:w),S),h.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(d(void 0),i.allowStaleOnFetchAbort&&(d=w=>g(w,!0)))})};i.status&&(i.status.fetchDispatched=!0);let c=new Promise(u).then(g,m),F=Object.assign(c,{__abortController:h,__staleWhileFetching:n,__returned:void 0});return e===void 0?(this.set(t,F,{...r.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=F,F}#e(t){if(!this.#O)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof W}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:r=0,sizeCalculation:g=this.sizeCalculation,noUpdateTTL:m=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:c=this.ignoreFetchAbort,allowStaleOnFetchAbort:F=this.allowStaleOnFetchAbort,context:d,forceRefresh:S=!1,status:a,signal:w}=e;if(!this.#O)return a&&(a.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:a});let b={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:h,noDisposeOnSet:o,size:r,sizeCalculation:g,noUpdateTTL:m,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:F,ignoreFetchAbort:c,status:a,signal:w},p=this.#s.get(t);if(p===void 0){a&&(a.fetch="miss");let _=this.#x(t,p,b,d);return _.__returned=_}else{let _=this.#t[p];if(this.#e(_)){let U=i&&_.__staleWhileFetching!==void 0;return a&&(a.fetch="inflight",U&&(a.returnedStale=!0)),U?_.__staleWhileFetching:_.__returned=_}let v=this.#d(p);if(!S&&!v)return a&&(a.fetch="hit"),this.#C(p),s&&this.#z(p),a&&this.#E(a,p),_;let y=this.#x(t,p,b,d),L=y.__staleWhileFetching!==void 0&&i;return a&&(a.fetch=v?"stale":"refresh",L&&v&&(a.returnedStale=!0)),L?y.__staleWhileFetching:y.__returned=y}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){let i=this.#W;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:n,...h}=e,o=this.get(t,h);if(!n&&o!==void 0)return o;let r=i(t,o,{options:h,context:s});return this.set(t,r,h),r}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:h}=e,o=this.#s.get(t);if(o!==void 0){let r=this.#t[o],g=this.#e(r);return h&&this.#E(h,o),this.#d(o)?(h&&(h.get="stale"),g?(h&&i&&r.__staleWhileFetching!==void 0&&(h.returnedStale=!0),i?r.__staleWhileFetching:void 0):(n||this.#T(t,"expire"),h&&i&&(h.returnedStale=!0),i?r:void 0)):(h&&(h.get="hit"),g?r.__staleWhileFetching:(this.#C(o),s&&this.#z(o),r))}else h&&(h.get="miss")}#j(t,e){this.#c[e]=t,this.#l[t]=e}#C(t){t!==this.#h&&(t===this.#o?this.#o=this.#l[t]:this.#j(this.#c[t],this.#l[t]),this.#j(this.#h,t),this.#h=t)}delete(t){return this.#T(t,"delete")}#T(t,e){let i=!1;if(this.#n!==0){let s=this.#s.get(t);if(s!==void 0)if(i=!0,this.#n===1)this.#N(e);else{this.#v(s);let n=this.#t[s];if(this.#e(n)?n.__abortController.abort(new Error("deleted")):(this.#y||this.#a)&&(this.#y&&this.#p?.(n,t,e),this.#a&&this.#r?.push([n,t,e])),this.#s.delete(t),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#h)this.#h=this.#c[s];else if(s===this.#o)this.#o=this.#l[s];else{let h=this.#c[s];this.#l[h]=this.#l[s];let o=this.#l[s];this.#c[o]=this.#c[s]}this.#n--,this.#_.push(s)}}if(this.#a&&this.#r?.length){let s=this.#r,n;for(;n=s?.shift();)this.#w?.(...n)}return i}clear(){return this.#N("delete")}#N(t){for(let e of this.#F({allowStale:!0})){let i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else{let s=this.#i[e];this.#y&&this.#p?.(i,s,t),this.#a&&this.#r?.push([i,s,t])}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#u&&this.#b&&(this.#u.fill(0),this.#b.fill(0)),this.#m&&this.#m.fill(0),this.#o=0,this.#h=0,this.#_.length=0,this.#S=0,this.#n=0,this.#a&&this.#r){let e=this.#r,i;for(;i=e?.shift();)this.#w?.(...i)}}};export{D as LRUCache}; +//# sourceMappingURL=index.min.js.map diff --git a/.github/octokit/node_modules/lru-cache/dist/esm/index.min.js.map b/.github/octokit/node_modules/lru-cache/dist/esm/index.min.js.map new file mode 100644 index 000000000..117a9dec9 --- /dev/null +++ b/.github/octokit/node_modules/lru-cache/dist/esm/index.min.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../src/index.ts"], + "sourcesContent": ["/**\n * @module LRUCache\n */\n\n// module-private names and types\ntype Perf = { now: () => number }\nconst perf: Perf =\n typeof performance === 'object' &&\n performance &&\n typeof performance.now === 'function'\n ? performance\n : Date\n\nconst warned = new Set()\n\n// either a function or a class\ntype ForC = ((...a: any[]) => any) | { new (...a: any[]): any }\n\n/* c8 ignore start */\nconst PROCESS = (\n typeof process === 'object' && !!process ? process : {}\n) as { [k: string]: any }\n/* c8 ignore start */\n\nconst emitWarning = (\n msg: string,\n type: string,\n code: string,\n fn: ForC\n) => {\n typeof PROCESS.emitWarning === 'function'\n ? PROCESS.emitWarning(msg, type, code, fn)\n : console.error(`[${code}] ${type}: ${msg}`)\n}\n\nlet AC = globalThis.AbortController\nlet AS = globalThis.AbortSignal\n\n/* c8 ignore start */\nif (typeof AC === 'undefined') {\n //@ts-ignore\n AS = class AbortSignal {\n onabort?: (...a: any[]) => any\n _onabort: ((...a: any[]) => any)[] = []\n reason?: any\n aborted: boolean = false\n addEventListener(_: string, fn: (...a: any[]) => any) {\n this._onabort.push(fn)\n }\n }\n //@ts-ignore\n AC = class AbortController {\n constructor() {\n warnACPolyfill()\n }\n signal = new AS()\n abort(reason: any) {\n if (this.signal.aborted) return\n //@ts-ignore\n this.signal.reason = reason\n //@ts-ignore\n this.signal.aborted = true\n //@ts-ignore\n for (const fn of this.signal._onabort) {\n fn(reason)\n }\n this.signal.onabort?.(reason)\n }\n }\n let printACPolyfillWarning =\n PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'\n const warnACPolyfill = () => {\n if (!printACPolyfillWarning) return\n printACPolyfillWarning = false\n emitWarning(\n 'AbortController is not defined. If using lru-cache in ' +\n 'node 14, load an AbortController polyfill from the ' +\n '`node-abort-controller` package. A minimal polyfill is ' +\n 'provided for use by LRUCache.fetch(), but it should not be ' +\n 'relied upon in other contexts (eg, passing it to other APIs that ' +\n 'use AbortController/AbortSignal might have undesirable effects). ' +\n 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.',\n 'NO_ABORT_CONTROLLER',\n 'ENOTSUP',\n warnACPolyfill\n )\n }\n}\n/* c8 ignore stop */\n\nconst shouldWarn = (code: string) => !warned.has(code)\n\nconst TYPE = Symbol('type')\nexport type PosInt = number & { [TYPE]: 'Positive Integer' }\nexport type Index = number & { [TYPE]: 'LRUCache Index' }\n\nconst isPosInt = (n: any): n is PosInt =>\n n && n === Math.floor(n) && n > 0 && isFinite(n)\n\nexport type UintArray = Uint8Array | Uint16Array | Uint32Array\nexport type NumberArray = UintArray | number[]\n\n/* c8 ignore start */\n// This is a little bit ridiculous, tbh.\n// The maximum array length is 2^32-1 or thereabouts on most JS impls.\n// And well before that point, you're caching the entire world, I mean,\n// that's ~32GB of just integers for the next/prev links, plus whatever\n// else to hold that many keys and values. Just filling the memory with\n// zeroes at init time is brutal when you get that big.\n// But why not be complete?\n// Maybe in the future, these limits will have expanded.\nconst getUintArray = (max: number) =>\n !isPosInt(max)\n ? null\n : max <= Math.pow(2, 8)\n ? Uint8Array\n : max <= Math.pow(2, 16)\n ? Uint16Array\n : max <= Math.pow(2, 32)\n ? Uint32Array\n : max <= Number.MAX_SAFE_INTEGER\n ? ZeroArray\n : null\n/* c8 ignore stop */\n\nclass ZeroArray extends Array {\n constructor(size: number) {\n super(size)\n this.fill(0)\n }\n}\nexport type { ZeroArray }\nexport type { Stack }\n\nexport type StackLike = Stack | Index[]\nclass Stack {\n heap: NumberArray\n length: number\n // private constructor\n static #constructing: boolean = false\n static create(max: number): StackLike {\n const HeapCls = getUintArray(max)\n if (!HeapCls) return []\n Stack.#constructing = true\n const s = new Stack(max, HeapCls)\n Stack.#constructing = false\n return s\n }\n constructor(\n max: number,\n HeapCls: { new (n: number): NumberArray }\n ) {\n /* c8 ignore start */\n if (!Stack.#constructing) {\n throw new TypeError('instantiate Stack using Stack.create(n)')\n }\n /* c8 ignore stop */\n this.heap = new HeapCls(max)\n this.length = 0\n }\n push(n: Index) {\n this.heap[this.length++] = n\n }\n pop(): Index {\n return this.heap[--this.length] as Index\n }\n}\n\n/**\n * Promise representing an in-progress {@link LRUCache#fetch} call\n */\nexport type BackgroundFetch = Promise & {\n __returned: BackgroundFetch | undefined\n __abortController: AbortController\n __staleWhileFetching: V | undefined\n}\n\nexport type DisposeTask = [\n value: V,\n key: K,\n reason: LRUCache.DisposeReason\n]\n\nexport namespace LRUCache {\n /**\n * An integer greater than 0, reflecting the calculated size of items\n */\n export type Size = number\n\n /**\n * Integer greater than 0, representing some number of milliseconds, or the\n * time at which a TTL started counting from.\n */\n export type Milliseconds = number\n\n /**\n * An integer greater than 0, reflecting a number of items\n */\n export type Count = number\n\n /**\n * The reason why an item was removed from the cache, passed\n * to the {@link Disposer} methods.\n *\n * - `evict`: The item was evicted because it is the least recently used,\n * and the cache is full.\n * - `set`: A new value was set, overwriting the old value being disposed.\n * - `delete`: The item was explicitly deleted, either by calling\n * {@link LRUCache#delete}, {@link LRUCache#clear}, or\n * {@link LRUCache#set} with an undefined value.\n * - `expire`: The item was removed due to exceeding its TTL.\n * - `fetch`: A {@link OptionsBase#fetchMethod} operation returned\n * `undefined` or was aborted, causing the item to be deleted.\n */\n export type DisposeReason =\n | 'evict'\n | 'set'\n | 'delete'\n | 'expire'\n | 'fetch'\n /**\n * A method called upon item removal, passed as the\n * {@link OptionsBase.dispose} and/or\n * {@link OptionsBase.disposeAfter} options.\n */\n export type Disposer = (\n value: V,\n key: K,\n reason: DisposeReason\n ) => void\n\n /**\n * A function that returns the effective calculated size\n * of an entry in the cache.\n */\n export type SizeCalculator = (value: V, key: K) => Size\n\n /**\n * Options provided to the\n * {@link OptionsBase.fetchMethod} function.\n */\n export interface FetcherOptions {\n signal: AbortSignal\n options: FetcherFetchOptions\n /**\n * Object provided in the {@link FetchOptions.context} option to\n * {@link LRUCache#fetch}\n */\n context: FC\n }\n\n /**\n * Occasionally, it may be useful to track the internal behavior of the\n * cache, particularly for logging, debugging, or for behavior within the\n * `fetchMethod`. To do this, you can pass a `status` object to the\n * {@link LRUCache#fetch}, {@link LRUCache#get}, {@link LRUCache#set},\n * {@link LRUCache#memo}, and {@link LRUCache#has} methods.\n *\n * The `status` option should be a plain JavaScript object. The following\n * fields will be set on it appropriately, depending on the situation.\n */\n export interface Status {\n /**\n * The status of a set() operation.\n *\n * - add: the item was not found in the cache, and was added\n * - update: the item was in the cache, with the same value provided\n * - replace: the item was in the cache, and replaced\n * - miss: the item was not added to the cache for some reason\n */\n set?: 'add' | 'update' | 'replace' | 'miss'\n\n /**\n * the ttl stored for the item, or undefined if ttls are not used.\n */\n ttl?: Milliseconds\n\n /**\n * the start time for the item, or undefined if ttls are not used.\n */\n start?: Milliseconds\n\n /**\n * The timestamp used for TTL calculation\n */\n now?: Milliseconds\n\n /**\n * the remaining ttl for the item, or undefined if ttls are not used.\n */\n remainingTTL?: Milliseconds\n\n /**\n * The calculated size for the item, if sizes are used.\n */\n entrySize?: Size\n\n /**\n * The total calculated size of the cache, if sizes are used.\n */\n totalCalculatedSize?: Size\n\n /**\n * A flag indicating that the item was not stored, due to exceeding the\n * {@link OptionsBase.maxEntrySize}\n */\n maxEntrySizeExceeded?: true\n\n /**\n * The old value, specified in the case of `set:'update'` or\n * `set:'replace'`\n */\n oldValue?: V\n\n /**\n * The results of a {@link LRUCache#has} operation\n *\n * - hit: the item was found in the cache\n * - stale: the item was found in the cache, but is stale\n * - miss: the item was not found in the cache\n */\n has?: 'hit' | 'stale' | 'miss'\n\n /**\n * The status of a {@link LRUCache#fetch} operation.\n * Note that this can change as the underlying fetch() moves through\n * various states.\n *\n * - inflight: there is another fetch() for this key which is in process\n * - get: there is no {@link OptionsBase.fetchMethod}, so\n * {@link LRUCache#get} was called.\n * - miss: the item is not in cache, and will be fetched.\n * - hit: the item is in the cache, and was resolved immediately.\n * - stale: the item is in the cache, but stale.\n * - refresh: the item is in the cache, and not stale, but\n * {@link FetchOptions.forceRefresh} was specified.\n */\n fetch?: 'get' | 'inflight' | 'miss' | 'hit' | 'stale' | 'refresh'\n\n /**\n * The {@link OptionsBase.fetchMethod} was called\n */\n fetchDispatched?: true\n\n /**\n * The cached value was updated after a successful call to\n * {@link OptionsBase.fetchMethod}\n */\n fetchUpdated?: true\n\n /**\n * The reason for a fetch() rejection. Either the error raised by the\n * {@link OptionsBase.fetchMethod}, or the reason for an\n * AbortSignal.\n */\n fetchError?: Error\n\n /**\n * The fetch received an abort signal\n */\n fetchAborted?: true\n\n /**\n * The abort signal received was ignored, and the fetch was allowed to\n * continue.\n */\n fetchAbortIgnored?: true\n\n /**\n * The fetchMethod promise resolved successfully\n */\n fetchResolved?: true\n\n /**\n * The fetchMethod promise was rejected\n */\n fetchRejected?: true\n\n /**\n * The status of a {@link LRUCache#get} operation.\n *\n * - fetching: The item is currently being fetched. If a previous value\n * is present and allowed, that will be returned.\n * - stale: The item is in the cache, and is stale.\n * - hit: the item is in the cache\n * - miss: the item is not in the cache\n */\n get?: 'stale' | 'hit' | 'miss'\n\n /**\n * A fetch or get operation returned a stale value.\n */\n returnedStale?: true\n }\n\n /**\n * options which override the options set in the LRUCache constructor\n * when calling {@link LRUCache#fetch}.\n *\n * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n * {@link OptionsBase.noDeleteOnFetchRejection},\n * {@link OptionsBase.allowStaleOnFetchRejection},\n * {@link FetchOptions.forceRefresh}, and\n * {@link FetcherOptions.context}\n *\n * Any of these may be modified in the {@link OptionsBase.fetchMethod}\n * function, but the {@link GetOptions} fields will of course have no\n * effect, as the {@link LRUCache#get} call already happened by the time\n * the fetchMethod is called.\n */\n export interface FetcherFetchOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n | 'noDeleteOnFetchRejection'\n | 'allowStaleOnFetchRejection'\n | 'ignoreFetchAbort'\n | 'allowStaleOnFetchAbort'\n > {\n status?: Status\n size?: Size\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#fetch} method.\n */\n export interface FetchOptions\n extends FetcherFetchOptions {\n /**\n * Set to true to force a re-load of the existing data, even if it\n * is not yet stale.\n */\n forceRefresh?: boolean\n /**\n * Context provided to the {@link OptionsBase.fetchMethod} as\n * the {@link FetcherOptions.context} param.\n *\n * If the FC type is specified as unknown (the default),\n * undefined or void, then this is optional. Otherwise, it will\n * be required.\n */\n context?: FC\n signal?: AbortSignal\n status?: Status\n }\n /**\n * Options provided to {@link LRUCache#fetch} when the FC type is something\n * other than `unknown`, `undefined`, or `void`\n */\n export interface FetchOptionsWithContext\n extends FetchOptions {\n context: FC\n }\n /**\n * Options provided to {@link LRUCache#fetch} when the FC type is\n * `undefined` or `void`\n */\n export interface FetchOptionsNoContext\n extends FetchOptions {\n context?: undefined\n }\n\n export interface MemoOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n | 'noDeleteOnFetchRejection'\n | 'allowStaleOnFetchRejection'\n | 'ignoreFetchAbort'\n | 'allowStaleOnFetchAbort'\n > {\n /**\n * Set to true to force a re-load of the existing data, even if it\n * is not yet stale.\n */\n forceRefresh?: boolean\n /**\n * Context provided to the {@link OptionsBase.memoMethod} as\n * the {@link MemoizerOptions.context} param.\n *\n * If the FC type is specified as unknown (the default),\n * undefined or void, then this is optional. Otherwise, it will\n * be required.\n */\n context?: FC\n status?: Status\n }\n /**\n * Options provided to {@link LRUCache#memo} when the FC type is something\n * other than `unknown`, `undefined`, or `void`\n */\n export interface MemoOptionsWithContext\n extends MemoOptions {\n context: FC\n }\n /**\n * Options provided to {@link LRUCache#memo} when the FC type is\n * `undefined` or `void`\n */\n export interface MemoOptionsNoContext\n extends MemoOptions {\n context?: undefined\n }\n\n /**\n * Options provided to the\n * {@link OptionsBase.memoMethod} function.\n */\n export interface MemoizerOptions {\n options: MemoizerMemoOptions\n /**\n * Object provided in the {@link MemoOptions.context} option to\n * {@link LRUCache#memo}\n */\n context: FC\n }\n\n /**\n * options which override the options set in the LRUCache constructor\n * when calling {@link LRUCache#memo}.\n *\n * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n * {@link MemoOptions.forceRefresh}, and\n * {@link MemoerOptions.context}\n *\n * Any of these may be modified in the {@link OptionsBase.memoMethod}\n * function, but the {@link GetOptions} fields will of course have no\n * effect, as the {@link LRUCache#get} call already happened by the time\n * the memoMethod is called.\n */\n export interface MemoizerMemoOptions\n extends Pick<\n OptionsBase,\n | 'allowStale'\n | 'updateAgeOnGet'\n | 'noDeleteOnStaleGet'\n | 'sizeCalculation'\n | 'ttl'\n | 'noDisposeOnSet'\n | 'noUpdateTTL'\n > {\n status?: Status\n size?: Size\n start?: Milliseconds\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#has} method.\n */\n export interface HasOptions\n extends Pick, 'updateAgeOnHas'> {\n status?: Status\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#get} method.\n */\n export interface GetOptions\n extends Pick<\n OptionsBase,\n 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet'\n > {\n status?: Status\n }\n\n /**\n * Options that may be passed to the {@link LRUCache#peek} method.\n */\n export interface PeekOptions\n extends Pick, 'allowStale'> {}\n\n /**\n * Options that may be passed to the {@link LRUCache#set} method.\n */\n export interface SetOptions\n extends Pick<\n OptionsBase,\n 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'\n > {\n /**\n * If size tracking is enabled, then setting an explicit size\n * in the {@link LRUCache#set} call will prevent calling the\n * {@link OptionsBase.sizeCalculation} function.\n */\n size?: Size\n /**\n * If TTL tracking is enabled, then setting an explicit start\n * time in the {@link LRUCache#set} call will override the\n * default time from `performance.now()` or `Date.now()`.\n *\n * Note that it must be a valid value for whichever time-tracking\n * method is in use.\n */\n start?: Milliseconds\n status?: Status\n }\n\n /**\n * The type signature for the {@link OptionsBase.fetchMethod} option.\n */\n export type Fetcher = (\n key: K,\n staleValue: V | undefined,\n options: FetcherOptions\n ) => Promise | V | undefined | void\n\n /**\n * the type signature for the {@link OptionsBase.memoMethod} option.\n */\n export type Memoizer = (\n key: K,\n staleValue: V | undefined,\n options: MemoizerOptions\n ) => V\n\n /**\n * Options which may be passed to the {@link LRUCache} constructor.\n *\n * Most of these may be overridden in the various options that use\n * them.\n *\n * Despite all being technically optional, the constructor requires that\n * a cache is at minimum limited by one or more of {@link OptionsBase.max},\n * {@link OptionsBase.ttl}, or {@link OptionsBase.maxSize}.\n *\n * If {@link OptionsBase.ttl} is used alone, then it is strongly advised\n * (and in fact required by the type definitions here) that the cache\n * also set {@link OptionsBase.ttlAutopurge}, to prevent potentially\n * unbounded storage.\n *\n * All options are also available on the {@link LRUCache} instance, making\n * it safe to pass an LRUCache instance as the options argumemnt to\n * make another empty cache of the same type.\n *\n * Some options are marked as read-only, because changing them after\n * instantiation is not safe. Changing any of the other options will of\n * course only have an effect on subsequent method calls.\n */\n export interface OptionsBase {\n /**\n * The maximum number of items to store in the cache before evicting\n * old entries. This is read-only on the {@link LRUCache} instance,\n * and may not be overridden.\n *\n * If set, then storage space will be pre-allocated at construction\n * time, and the cache will perform significantly faster.\n *\n * Note that significantly fewer items may be stored, if\n * {@link OptionsBase.maxSize} and/or {@link OptionsBase.ttl} are also\n * set.\n *\n * **It is strongly recommended to set a `max` to prevent unbounded growth\n * of the cache.**\n */\n max?: Count\n\n /**\n * Max time in milliseconds for items to live in cache before they are\n * considered stale. Note that stale items are NOT preemptively removed by\n * default, and MAY live in the cache, contributing to its LRU max, long\n * after they have expired, unless {@link OptionsBase.ttlAutopurge} is\n * set.\n *\n * If set to `0` (the default value), then that means \"do not track\n * TTL\", not \"expire immediately\".\n *\n * Also, as this cache is optimized for LRU/MRU operations, some of\n * the staleness/TTL checks will reduce performance, as they will incur\n * overhead by deleting items.\n *\n * This is not primarily a TTL cache, and does not make strong TTL\n * guarantees. There is no pre-emptive pruning of expired items, but you\n * _may_ set a TTL on the cache, and it will treat expired items as missing\n * when they are fetched, and delete them.\n *\n * Optional, but must be a non-negative integer in ms if specified.\n *\n * This may be overridden by passing an options object to `cache.set()`.\n *\n * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n * positive integer if set.\n *\n * Even if ttl tracking is enabled, **it is strongly recommended to set a\n * `max` to prevent unbounded growth of the cache.**\n *\n * If ttl tracking is enabled, and `max` and `maxSize` are not set,\n * and `ttlAutopurge` is not set, then a warning will be emitted\n * cautioning about the potential for unbounded memory consumption.\n * (The TypeScript definitions will also discourage this.)\n */\n ttl?: Milliseconds\n\n /**\n * Minimum amount of time in ms in which to check for staleness.\n * Defaults to 1, which means that the current time is checked\n * at most once per millisecond.\n *\n * Set to 0 to check the current time every time staleness is tested.\n * (This reduces performance, and is theoretically unnecessary.)\n *\n * Setting this to a higher value will improve performance somewhat\n * while using ttl tracking, albeit at the expense of keeping stale\n * items around a bit longer than their TTLs would indicate.\n *\n * @default 1\n */\n ttlResolution?: Milliseconds\n\n /**\n * Preemptively remove stale items from the cache.\n *\n * Note that this may *significantly* degrade performance, especially if\n * the cache is storing a large number of items. It is almost always best\n * to just leave the stale items in the cache, and let them fall out as new\n * items are added.\n *\n * Note that this means that {@link OptionsBase.allowStale} is a bit\n * pointless, as stale items will be deleted almost as soon as they\n * expire.\n *\n * Use with caution!\n */\n ttlAutopurge?: boolean\n\n /**\n * When using time-expiring entries with `ttl`, setting this to `true` will\n * make each item's age reset to 0 whenever it is retrieved from cache with\n * {@link LRUCache#get}, causing it to not expire. (It can still fall out\n * of cache based on recency of use, of course.)\n *\n * Has no effect if {@link OptionsBase.ttl} is not set.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n */\n updateAgeOnGet?: boolean\n\n /**\n * When using time-expiring entries with `ttl`, setting this to `true` will\n * make each item's age reset to 0 whenever its presence in the cache is\n * checked with {@link LRUCache#has}, causing it to not expire. (It can\n * still fall out of cache based on recency of use, of course.)\n *\n * Has no effect if {@link OptionsBase.ttl} is not set.\n */\n updateAgeOnHas?: boolean\n\n /**\n * Allow {@link LRUCache#get} and {@link LRUCache#fetch} calls to return\n * stale data, if available.\n *\n * By default, if you set `ttl`, stale items will only be deleted from the\n * cache when you `get(key)`. That is, it's not preemptively pruning items,\n * unless {@link OptionsBase.ttlAutopurge} is set.\n *\n * If you set `allowStale:true`, it'll return the stale value *as well as*\n * deleting it. If you don't set this, then it'll return `undefined` when\n * you try to get a stale entry.\n *\n * Note that when a stale entry is fetched, _even if it is returned due to\n * `allowStale` being set_, it is removed from the cache immediately. You\n * can suppress this behavior by setting\n * {@link OptionsBase.noDeleteOnStaleGet}, either in the constructor, or in\n * the options provided to {@link LRUCache#get}.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n * The `cache.has()` method will always return `false` for stale items.\n *\n * Only relevant if a ttl is set.\n */\n allowStale?: boolean\n\n /**\n * Function that is called on items when they are dropped from the\n * cache, as `dispose(value, key, reason)`.\n *\n * This can be handy if you want to close file descriptors or do\n * other cleanup tasks when items are no longer stored in the cache.\n *\n * **NOTE**: It is called _before_ the item has been fully removed\n * from the cache, so if you want to put it right back in, you need\n * to wait until the next tick. If you try to add it back in during\n * the `dispose()` function call, it will break things in subtle and\n * weird ways.\n *\n * Unlike several other options, this may _not_ be overridden by\n * passing an option to `set()`, for performance reasons.\n *\n * The `reason` will be one of the following strings, corresponding\n * to the reason for the item's deletion:\n *\n * - `evict` Item was evicted to make space for a new addition\n * - `set` Item was overwritten by a new value\n * - `expire` Item expired its TTL\n * - `fetch` Item was deleted due to a failed or aborted fetch, or a\n * fetchMethod returning `undefined.\n * - `delete` Item was removed by explicit `cache.delete(key)`,\n * `cache.clear()`, or `cache.set(key, undefined)`.\n */\n dispose?: Disposer\n\n /**\n * The same as {@link OptionsBase.dispose}, but called *after* the entry\n * is completely removed and the cache is once again in a clean state.\n *\n * It is safe to add an item right back into the cache at this point.\n * However, note that it is *very* easy to inadvertently create infinite\n * recursion this way.\n */\n disposeAfter?: Disposer\n\n /**\n * Set to true to suppress calling the\n * {@link OptionsBase.dispose} function if the entry key is\n * still accessible within the cache.\n *\n * This may be overridden by passing an options object to\n * {@link LRUCache#set}.\n *\n * Only relevant if `dispose` or `disposeAfter` are set.\n */\n noDisposeOnSet?: boolean\n\n /**\n * Boolean flag to tell the cache to not update the TTL when setting a new\n * value for an existing key (ie, when updating a value rather than\n * inserting a new value). Note that the TTL value is _always_ set (if\n * provided) when adding a new entry into the cache.\n *\n * Has no effect if a {@link OptionsBase.ttl} is not set.\n *\n * May be passed as an option to {@link LRUCache#set}.\n */\n noUpdateTTL?: boolean\n\n /**\n * Set to a positive integer to track the sizes of items added to the\n * cache, and automatically evict items in order to stay below this size.\n * Note that this may result in fewer than `max` items being stored.\n *\n * Attempting to add an item to the cache whose calculated size is greater\n * that this amount will be a no-op. The item will not be cached, and no\n * other items will be evicted.\n *\n * Optional, must be a positive integer if provided.\n *\n * Sets `maxEntrySize` to the same value, unless a different value is\n * provided for `maxEntrySize`.\n *\n * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n * positive integer if set.\n *\n * Even if size tracking is enabled, **it is strongly recommended to set a\n * `max` to prevent unbounded growth of the cache.**\n *\n * Note also that size tracking can negatively impact performance,\n * though for most cases, only minimally.\n */\n maxSize?: Size\n\n /**\n * The maximum allowed size for any single item in the cache.\n *\n * If a larger item is passed to {@link LRUCache#set} or returned by a\n * {@link OptionsBase.fetchMethod} or {@link OptionsBase.memoMethod}, then\n * it will not be stored in the cache.\n *\n * Attempting to add an item whose calculated size is greater than\n * this amount will not cache the item or evict any old items, but\n * WILL delete an existing value if one is already present.\n *\n * Optional, must be a positive integer if provided. Defaults to\n * the value of `maxSize` if provided.\n */\n maxEntrySize?: Size\n\n /**\n * A function that returns a number indicating the item's size.\n *\n * Requires {@link OptionsBase.maxSize} to be set.\n *\n * If not provided, and {@link OptionsBase.maxSize} or\n * {@link OptionsBase.maxEntrySize} are set, then all\n * {@link LRUCache#set} calls **must** provide an explicit\n * {@link SetOptions.size} or sizeCalculation param.\n */\n sizeCalculation?: SizeCalculator\n\n /**\n * Method that provides the implementation for {@link LRUCache#fetch}\n *\n * ```ts\n * fetchMethod(key, staleValue, { signal, options, context })\n * ```\n *\n * If `fetchMethod` is not provided, then `cache.fetch(key)` is equivalent\n * to `Promise.resolve(cache.get(key))`.\n *\n * If at any time, `signal.aborted` is set to `true`, or if the\n * `signal.onabort` method is called, or if it emits an `'abort'` event\n * which you can listen to with `addEventListener`, then that means that\n * the fetch should be abandoned. This may be passed along to async\n * functions aware of AbortController/AbortSignal behavior.\n *\n * The `fetchMethod` should **only** return `undefined` or a Promise\n * resolving to `undefined` if the AbortController signaled an `abort`\n * event. In all other cases, it should return or resolve to a value\n * suitable for adding to the cache.\n *\n * The `options` object is a union of the options that may be provided to\n * `set()` and `get()`. If they are modified, then that will result in\n * modifying the settings to `cache.set()` when the value is resolved, and\n * in the case of\n * {@link OptionsBase.noDeleteOnFetchRejection} and\n * {@link OptionsBase.allowStaleOnFetchRejection}, the handling of\n * `fetchMethod` failures.\n *\n * For example, a DNS cache may update the TTL based on the value returned\n * from a remote DNS server by changing `options.ttl` in the `fetchMethod`.\n */\n fetchMethod?: Fetcher\n\n /**\n * Method that provides the implementation for {@link LRUCache#memo}\n */\n memoMethod?: Memoizer\n\n /**\n * Set to true to suppress the deletion of stale data when a\n * {@link OptionsBase.fetchMethod} returns a rejected promise.\n */\n noDeleteOnFetchRejection?: boolean\n\n /**\n * Do not delete stale items when they are retrieved with\n * {@link LRUCache#get}.\n *\n * Note that the `get` return value will still be `undefined`\n * unless {@link OptionsBase.allowStale} is true.\n *\n * When using time-expiring entries with `ttl`, by default stale\n * items will be removed from the cache when the key is accessed\n * with `cache.get()`.\n *\n * Setting this option will cause stale items to remain in the cache, until\n * they are explicitly deleted with `cache.delete(key)`, or retrieved with\n * `noDeleteOnStaleGet` set to `false`.\n *\n * This may be overridden by passing an options object to `cache.get()`.\n *\n * Only relevant if a ttl is used.\n */\n noDeleteOnStaleGet?: boolean\n\n /**\n * Set to true to allow returning stale data when a\n * {@link OptionsBase.fetchMethod} throws an error or returns a rejected\n * promise.\n *\n * This differs from using {@link OptionsBase.allowStale} in that stale\n * data will ONLY be returned in the case that the {@link LRUCache#fetch}\n * fails, not any other times.\n *\n * If a `fetchMethod` fails, and there is no stale value available, the\n * `fetch()` will resolve to `undefined`. Ie, all `fetchMethod` errors are\n * suppressed.\n *\n * Implies `noDeleteOnFetchRejection`.\n *\n * This may be set in calls to `fetch()`, or defaulted on the constructor,\n * or overridden by modifying the options object in the `fetchMethod`.\n */\n allowStaleOnFetchRejection?: boolean\n\n /**\n * Set to true to return a stale value from the cache when the\n * `AbortSignal` passed to the {@link OptionsBase.fetchMethod} dispatches\n * an `'abort'` event, whether user-triggered, or due to internal cache\n * behavior.\n *\n * Unless {@link OptionsBase.ignoreFetchAbort} is also set, the underlying\n * {@link OptionsBase.fetchMethod} will still be considered canceled, and\n * any value it returns will be ignored and not cached.\n *\n * Caveat: since fetches are aborted when a new value is explicitly\n * set in the cache, this can lead to fetch returning a stale value,\n * since that was the fallback value _at the moment the `fetch()` was\n * initiated_, even though the new updated value is now present in\n * the cache.\n *\n * For example:\n *\n * ```ts\n * const cache = new LRUCache({\n * ttl: 100,\n * fetchMethod: async (url, oldValue, { signal }) => {\n * const res = await fetch(url, { signal })\n * return await res.json()\n * }\n * })\n * cache.set('https://example.com/', { some: 'data' })\n * // 100ms go by...\n * const result = cache.fetch('https://example.com/')\n * cache.set('https://example.com/', { other: 'thing' })\n * console.log(await result) // { some: 'data' }\n * console.log(cache.get('https://example.com/')) // { other: 'thing' }\n * ```\n */\n allowStaleOnFetchAbort?: boolean\n\n /**\n * Set to true to ignore the `abort` event emitted by the `AbortSignal`\n * object passed to {@link OptionsBase.fetchMethod}, and still cache the\n * resulting resolution value, as long as it is not `undefined`.\n *\n * When used on its own, this means aborted {@link LRUCache#fetch} calls\n * are not immediately resolved or rejected when they are aborted, and\n * instead take the full time to await.\n *\n * When used with {@link OptionsBase.allowStaleOnFetchAbort}, aborted\n * {@link LRUCache#fetch} calls will resolve immediately to their stale\n * cached value or `undefined`, and will continue to process and eventually\n * update the cache when they resolve, as long as the resulting value is\n * not `undefined`, thus supporting a \"return stale on timeout while\n * refreshing\" mechanism by passing `AbortSignal.timeout(n)` as the signal.\n *\n * For example:\n *\n * ```ts\n * const c = new LRUCache({\n * ttl: 100,\n * ignoreFetchAbort: true,\n * allowStaleOnFetchAbort: true,\n * fetchMethod: async (key, oldValue, { signal }) => {\n * // note: do NOT pass the signal to fetch()!\n * // let's say this fetch can take a long time.\n * const res = await fetch(`https://slow-backend-server/${key}`)\n * return await res.json()\n * },\n * })\n *\n * // this will return the stale value after 100ms, while still\n * // updating in the background for next time.\n * const val = await c.fetch('key', { signal: AbortSignal.timeout(100) })\n * ```\n *\n * **Note**: regardless of this setting, an `abort` event _is still\n * emitted on the `AbortSignal` object_, so may result in invalid results\n * when passed to other underlying APIs that use AbortSignals.\n *\n * This may be overridden in the {@link OptionsBase.fetchMethod} or the\n * call to {@link LRUCache#fetch}.\n */\n ignoreFetchAbort?: boolean\n }\n\n export interface OptionsMaxLimit\n extends OptionsBase {\n max: Count\n }\n export interface OptionsTTLLimit\n extends OptionsBase {\n ttl: Milliseconds\n ttlAutopurge: boolean\n }\n export interface OptionsSizeLimit\n extends OptionsBase {\n maxSize: Size\n }\n\n /**\n * The valid safe options for the {@link LRUCache} constructor\n */\n export type Options =\n | OptionsMaxLimit\n | OptionsSizeLimit\n | OptionsTTLLimit\n\n /**\n * Entry objects used by {@link LRUCache#load} and {@link LRUCache#dump},\n * and returned by {@link LRUCache#info}.\n */\n export interface Entry {\n value: V\n ttl?: Milliseconds\n size?: Size\n start?: Milliseconds\n }\n}\n\n/**\n * Default export, the thing you're using this module to get.\n *\n * The `K` and `V` types define the key and value types, respectively. The\n * optional `FC` type defines the type of the `context` object passed to\n * `cache.fetch()` and `cache.memo()`.\n *\n * Keys and values **must not** be `null` or `undefined`.\n *\n * All properties from the options object (with the exception of `max`,\n * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are\n * added as normal public members. (The listed options are read-only getters.)\n *\n * Changing any of these will alter the defaults for subsequent method calls.\n */\nexport class LRUCache\n implements Map\n{\n // options that cannot be changed without disaster\n readonly #max: LRUCache.Count\n readonly #maxSize: LRUCache.Size\n readonly #dispose?: LRUCache.Disposer\n readonly #disposeAfter?: LRUCache.Disposer\n readonly #fetchMethod?: LRUCache.Fetcher\n readonly #memoMethod?: LRUCache.Memoizer\n\n /**\n * {@link LRUCache.OptionsBase.ttl}\n */\n ttl: LRUCache.Milliseconds\n\n /**\n * {@link LRUCache.OptionsBase.ttlResolution}\n */\n ttlResolution: LRUCache.Milliseconds\n /**\n * {@link LRUCache.OptionsBase.ttlAutopurge}\n */\n ttlAutopurge: boolean\n /**\n * {@link LRUCache.OptionsBase.updateAgeOnGet}\n */\n updateAgeOnGet: boolean\n /**\n * {@link LRUCache.OptionsBase.updateAgeOnHas}\n */\n updateAgeOnHas: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStale}\n */\n allowStale: boolean\n\n /**\n * {@link LRUCache.OptionsBase.noDisposeOnSet}\n */\n noDisposeOnSet: boolean\n /**\n * {@link LRUCache.OptionsBase.noUpdateTTL}\n */\n noUpdateTTL: boolean\n /**\n * {@link LRUCache.OptionsBase.maxEntrySize}\n */\n maxEntrySize: LRUCache.Size\n /**\n * {@link LRUCache.OptionsBase.sizeCalculation}\n */\n sizeCalculation?: LRUCache.SizeCalculator\n /**\n * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}\n */\n noDeleteOnFetchRejection: boolean\n /**\n * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}\n */\n noDeleteOnStaleGet: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}\n */\n allowStaleOnFetchAbort: boolean\n /**\n * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}\n */\n allowStaleOnFetchRejection: boolean\n /**\n * {@link LRUCache.OptionsBase.ignoreFetchAbort}\n */\n ignoreFetchAbort: boolean\n\n // computed properties\n #size: LRUCache.Count\n #calculatedSize: LRUCache.Size\n #keyMap: Map\n #keyList: (K | undefined)[]\n #valList: (V | BackgroundFetch | undefined)[]\n #next: NumberArray\n #prev: NumberArray\n #head: Index\n #tail: Index\n #free: StackLike\n #disposed?: DisposeTask[]\n #sizes?: ZeroArray\n #starts?: ZeroArray\n #ttls?: ZeroArray\n\n #hasDispose: boolean\n #hasFetchMethod: boolean\n #hasDisposeAfter: boolean\n\n /**\n * Do not call this method unless you need to inspect the\n * inner workings of the cache. If anything returned by this\n * object is modified in any way, strange breakage may occur.\n *\n * These fields are private for a reason!\n *\n * @internal\n */\n static unsafeExposeInternals<\n K extends {},\n V extends {},\n FC extends unknown = unknown\n >(c: LRUCache) {\n return {\n // properties\n starts: c.#starts,\n ttls: c.#ttls,\n sizes: c.#sizes,\n keyMap: c.#keyMap as Map,\n keyList: c.#keyList,\n valList: c.#valList,\n next: c.#next,\n prev: c.#prev,\n get head() {\n return c.#head\n },\n get tail() {\n return c.#tail\n },\n free: c.#free,\n // methods\n isBackgroundFetch: (p: any) => c.#isBackgroundFetch(p),\n backgroundFetch: (\n k: K,\n index: number | undefined,\n options: LRUCache.FetchOptions,\n context: any\n ): BackgroundFetch =>\n c.#backgroundFetch(\n k,\n index as Index | undefined,\n options,\n context\n ),\n moveToTail: (index: number): void =>\n c.#moveToTail(index as Index),\n indexes: (options?: { allowStale: boolean }) =>\n c.#indexes(options),\n rindexes: (options?: { allowStale: boolean }) =>\n c.#rindexes(options),\n isStale: (index: number | undefined) =>\n c.#isStale(index as Index),\n }\n }\n\n // Protected read-only members\n\n /**\n * {@link LRUCache.OptionsBase.max} (read-only)\n */\n get max(): LRUCache.Count {\n return this.#max\n }\n /**\n * {@link LRUCache.OptionsBase.maxSize} (read-only)\n */\n get maxSize(): LRUCache.Count {\n return this.#maxSize\n }\n /**\n * The total computed size of items in the cache (read-only)\n */\n get calculatedSize(): LRUCache.Size {\n return this.#calculatedSize\n }\n /**\n * The number of items stored in the cache (read-only)\n */\n get size(): LRUCache.Count {\n return this.#size\n }\n /**\n * {@link LRUCache.OptionsBase.fetchMethod} (read-only)\n */\n get fetchMethod(): LRUCache.Fetcher | undefined {\n return this.#fetchMethod\n }\n get memoMethod(): LRUCache.Memoizer | undefined {\n return this.#memoMethod\n }\n /**\n * {@link LRUCache.OptionsBase.dispose} (read-only)\n */\n get dispose() {\n return this.#dispose\n }\n /**\n * {@link LRUCache.OptionsBase.disposeAfter} (read-only)\n */\n get disposeAfter() {\n return this.#disposeAfter\n }\n\n constructor(\n options: LRUCache.Options | LRUCache\n ) {\n const {\n max = 0,\n ttl,\n ttlResolution = 1,\n ttlAutopurge,\n updateAgeOnGet,\n updateAgeOnHas,\n allowStale,\n dispose,\n disposeAfter,\n noDisposeOnSet,\n noUpdateTTL,\n maxSize = 0,\n maxEntrySize = 0,\n sizeCalculation,\n fetchMethod,\n memoMethod,\n noDeleteOnFetchRejection,\n noDeleteOnStaleGet,\n allowStaleOnFetchRejection,\n allowStaleOnFetchAbort,\n ignoreFetchAbort,\n } = options\n\n if (max !== 0 && !isPosInt(max)) {\n throw new TypeError('max option must be a nonnegative integer')\n }\n\n const UintArray = max ? getUintArray(max) : Array\n if (!UintArray) {\n throw new Error('invalid max value: ' + max)\n }\n\n this.#max = max\n this.#maxSize = maxSize\n this.maxEntrySize = maxEntrySize || this.#maxSize\n this.sizeCalculation = sizeCalculation\n if (this.sizeCalculation) {\n if (!this.#maxSize && !this.maxEntrySize) {\n throw new TypeError(\n 'cannot set sizeCalculation without setting maxSize or maxEntrySize'\n )\n }\n if (typeof this.sizeCalculation !== 'function') {\n throw new TypeError('sizeCalculation set to non-function')\n }\n }\n\n if (\n memoMethod !== undefined &&\n typeof memoMethod !== 'function'\n ) {\n throw new TypeError('memoMethod must be a function if defined')\n }\n this.#memoMethod = memoMethod\n\n if (\n fetchMethod !== undefined &&\n typeof fetchMethod !== 'function'\n ) {\n throw new TypeError(\n 'fetchMethod must be a function if specified'\n )\n }\n this.#fetchMethod = fetchMethod\n this.#hasFetchMethod = !!fetchMethod\n\n this.#keyMap = new Map()\n this.#keyList = new Array(max).fill(undefined)\n this.#valList = new Array(max).fill(undefined)\n this.#next = new UintArray(max)\n this.#prev = new UintArray(max)\n this.#head = 0 as Index\n this.#tail = 0 as Index\n this.#free = Stack.create(max)\n this.#size = 0\n this.#calculatedSize = 0\n\n if (typeof dispose === 'function') {\n this.#dispose = dispose\n }\n if (typeof disposeAfter === 'function') {\n this.#disposeAfter = disposeAfter\n this.#disposed = []\n } else {\n this.#disposeAfter = undefined\n this.#disposed = undefined\n }\n this.#hasDispose = !!this.#dispose\n this.#hasDisposeAfter = !!this.#disposeAfter\n\n this.noDisposeOnSet = !!noDisposeOnSet\n this.noUpdateTTL = !!noUpdateTTL\n this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection\n this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection\n this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort\n this.ignoreFetchAbort = !!ignoreFetchAbort\n\n // NB: maxEntrySize is set to maxSize if it's set\n if (this.maxEntrySize !== 0) {\n if (this.#maxSize !== 0) {\n if (!isPosInt(this.#maxSize)) {\n throw new TypeError(\n 'maxSize must be a positive integer if specified'\n )\n }\n }\n if (!isPosInt(this.maxEntrySize)) {\n throw new TypeError(\n 'maxEntrySize must be a positive integer if specified'\n )\n }\n this.#initializeSizeTracking()\n }\n\n this.allowStale = !!allowStale\n this.noDeleteOnStaleGet = !!noDeleteOnStaleGet\n this.updateAgeOnGet = !!updateAgeOnGet\n this.updateAgeOnHas = !!updateAgeOnHas\n this.ttlResolution =\n isPosInt(ttlResolution) || ttlResolution === 0\n ? ttlResolution\n : 1\n this.ttlAutopurge = !!ttlAutopurge\n this.ttl = ttl || 0\n if (this.ttl) {\n if (!isPosInt(this.ttl)) {\n throw new TypeError(\n 'ttl must be a positive integer if specified'\n )\n }\n this.#initializeTTLTracking()\n }\n\n // do not allow completely unbounded caches\n if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {\n throw new TypeError(\n 'At least one of max, maxSize, or ttl is required'\n )\n }\n if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {\n const code = 'LRU_CACHE_UNBOUNDED'\n if (shouldWarn(code)) {\n warned.add(code)\n const msg =\n 'TTL caching without ttlAutopurge, max, or maxSize can ' +\n 'result in unbounded memory consumption.'\n emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache)\n }\n }\n }\n\n /**\n * Return the number of ms left in the item's TTL. If item is not in cache,\n * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.\n */\n getRemainingTTL(key: K) {\n return this.#keyMap.has(key) ? Infinity : 0\n }\n\n #initializeTTLTracking() {\n const ttls = new ZeroArray(this.#max)\n const starts = new ZeroArray(this.#max)\n this.#ttls = ttls\n this.#starts = starts\n\n this.#setItemTTL = (index, ttl, start = perf.now()) => {\n starts[index] = ttl !== 0 ? start : 0\n ttls[index] = ttl\n if (ttl !== 0 && this.ttlAutopurge) {\n const t = setTimeout(() => {\n if (this.#isStale(index)) {\n this.#delete(this.#keyList[index] as K, 'expire')\n }\n }, ttl + 1)\n // unref() not supported on all platforms\n /* c8 ignore start */\n if (t.unref) {\n t.unref()\n }\n /* c8 ignore stop */\n }\n }\n\n this.#updateItemAge = index => {\n starts[index] = ttls[index] !== 0 ? perf.now() : 0\n }\n\n this.#statusTTL = (status, index) => {\n if (ttls[index]) {\n const ttl = ttls[index]\n const start = starts[index]\n /* c8 ignore next */\n if (!ttl || !start) return\n status.ttl = ttl\n status.start = start\n status.now = cachedNow || getNow()\n const age = status.now - start\n status.remainingTTL = ttl - age\n }\n }\n\n // debounce calls to perf.now() to 1s so we're not hitting\n // that costly call repeatedly.\n let cachedNow = 0\n const getNow = () => {\n const n = perf.now()\n if (this.ttlResolution > 0) {\n cachedNow = n\n const t = setTimeout(\n () => (cachedNow = 0),\n this.ttlResolution\n )\n // not available on all platforms\n /* c8 ignore start */\n if (t.unref) {\n t.unref()\n }\n /* c8 ignore stop */\n }\n return n\n }\n\n this.getRemainingTTL = key => {\n const index = this.#keyMap.get(key)\n if (index === undefined) {\n return 0\n }\n const ttl = ttls[index]\n const start = starts[index]\n if (!ttl || !start) {\n return Infinity\n }\n const age = (cachedNow || getNow()) - start\n return ttl - age\n }\n\n this.#isStale = index => {\n const s = starts[index]\n const t = ttls[index]\n return !!t && !!s && (cachedNow || getNow()) - s > t\n }\n }\n\n // conditionally set private methods related to TTL\n #updateItemAge: (index: Index) => void = () => {}\n #statusTTL: (status: LRUCache.Status, index: Index) => void =\n () => {}\n #setItemTTL: (\n index: Index,\n ttl: LRUCache.Milliseconds,\n start?: LRUCache.Milliseconds\n // ignore because we never call this if we're not already in TTL mode\n /* c8 ignore start */\n ) => void = () => {}\n /* c8 ignore stop */\n\n #isStale: (index: Index) => boolean = () => false\n\n #initializeSizeTracking() {\n const sizes = new ZeroArray(this.#max)\n this.#calculatedSize = 0\n this.#sizes = sizes\n this.#removeItemSize = index => {\n this.#calculatedSize -= sizes[index] as number\n sizes[index] = 0\n }\n this.#requireSize = (k, v, size, sizeCalculation) => {\n // provisionally accept background fetches.\n // actual value size will be checked when they return.\n if (this.#isBackgroundFetch(v)) {\n return 0\n }\n if (!isPosInt(size)) {\n if (sizeCalculation) {\n if (typeof sizeCalculation !== 'function') {\n throw new TypeError('sizeCalculation must be a function')\n }\n size = sizeCalculation(v, k)\n if (!isPosInt(size)) {\n throw new TypeError(\n 'sizeCalculation return invalid (expect positive integer)'\n )\n }\n } else {\n throw new TypeError(\n 'invalid size value (must be positive integer). ' +\n 'When maxSize or maxEntrySize is used, sizeCalculation ' +\n 'or size must be set.'\n )\n }\n }\n return size\n }\n this.#addItemSize = (\n index: Index,\n size: LRUCache.Size,\n status?: LRUCache.Status\n ) => {\n sizes[index] = size\n if (this.#maxSize) {\n const maxSize = this.#maxSize - (sizes[index] as number)\n while (this.#calculatedSize > maxSize) {\n this.#evict(true)\n }\n }\n this.#calculatedSize += sizes[index] as number\n if (status) {\n status.entrySize = size\n status.totalCalculatedSize = this.#calculatedSize\n }\n }\n }\n\n #removeItemSize: (index: Index) => void = _i => {}\n #addItemSize: (\n index: Index,\n size: LRUCache.Size,\n status?: LRUCache.Status\n ) => void = (_i, _s, _st) => {}\n #requireSize: (\n k: K,\n v: V | BackgroundFetch,\n size?: LRUCache.Size,\n sizeCalculation?: LRUCache.SizeCalculator\n ) => LRUCache.Size = (\n _k: K,\n _v: V | BackgroundFetch,\n size?: LRUCache.Size,\n sizeCalculation?: LRUCache.SizeCalculator\n ) => {\n if (size || sizeCalculation) {\n throw new TypeError(\n 'cannot set size without setting maxSize or maxEntrySize on cache'\n )\n }\n return 0\n };\n\n *#indexes({ allowStale = this.allowStale } = {}) {\n if (this.#size) {\n for (let i = this.#tail; true; ) {\n if (!this.#isValidIndex(i)) {\n break\n }\n if (allowStale || !this.#isStale(i)) {\n yield i\n }\n if (i === this.#head) {\n break\n } else {\n i = this.#prev[i] as Index\n }\n }\n }\n }\n\n *#rindexes({ allowStale = this.allowStale } = {}) {\n if (this.#size) {\n for (let i = this.#head; true; ) {\n if (!this.#isValidIndex(i)) {\n break\n }\n if (allowStale || !this.#isStale(i)) {\n yield i\n }\n if (i === this.#tail) {\n break\n } else {\n i = this.#next[i] as Index\n }\n }\n }\n }\n\n #isValidIndex(index: Index) {\n return (\n index !== undefined &&\n this.#keyMap.get(this.#keyList[index] as K) === index\n )\n }\n\n /**\n * Return a generator yielding `[key, value]` pairs,\n * in order from most recently used to least recently used.\n */\n *entries() {\n for (const i of this.#indexes()) {\n if (\n this.#valList[i] !== undefined &&\n this.#keyList[i] !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield [this.#keyList[i], this.#valList[i]] as [K, V]\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.entries}\n *\n * Return a generator yielding `[key, value]` pairs,\n * in order from least recently used to most recently used.\n */\n *rentries() {\n for (const i of this.#rindexes()) {\n if (\n this.#valList[i] !== undefined &&\n this.#keyList[i] !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield [this.#keyList[i], this.#valList[i]]\n }\n }\n }\n\n /**\n * Return a generator yielding the keys in the cache,\n * in order from most recently used to least recently used.\n */\n *keys() {\n for (const i of this.#indexes()) {\n const k = this.#keyList[i]\n if (\n k !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield k\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.keys}\n *\n * Return a generator yielding the keys in the cache,\n * in order from least recently used to most recently used.\n */\n *rkeys() {\n for (const i of this.#rindexes()) {\n const k = this.#keyList[i]\n if (\n k !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield k\n }\n }\n }\n\n /**\n * Return a generator yielding the values in the cache,\n * in order from most recently used to least recently used.\n */\n *values() {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n if (\n v !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield this.#valList[i] as V\n }\n }\n }\n\n /**\n * Inverse order version of {@link LRUCache.values}\n *\n * Return a generator yielding the values in the cache,\n * in order from least recently used to most recently used.\n */\n *rvalues() {\n for (const i of this.#rindexes()) {\n const v = this.#valList[i]\n if (\n v !== undefined &&\n !this.#isBackgroundFetch(this.#valList[i])\n ) {\n yield this.#valList[i]\n }\n }\n }\n\n /**\n * Iterating over the cache itself yields the same results as\n * {@link LRUCache.entries}\n */\n [Symbol.iterator]() {\n return this.entries()\n }\n\n /**\n * A String value that is used in the creation of the default string\n * description of an object. Called by the built-in method\n * `Object.prototype.toString`.\n */\n [Symbol.toStringTag] = 'LRUCache'\n\n /**\n * Find a value for which the supplied fn method returns a truthy value,\n * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.\n */\n find(\n fn: (v: V, k: K, self: LRUCache) => boolean,\n getOptions: LRUCache.GetOptions = {}\n ) {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n if (fn(value, this.#keyList[i] as K, this)) {\n return this.get(this.#keyList[i] as K, getOptions)\n }\n }\n }\n\n /**\n * Call the supplied function on each item in the cache, in order from most\n * recently used to least recently used.\n *\n * `fn` is called as `fn(value, key, cache)`.\n *\n * If `thisp` is provided, function will be called in the `this`-context of\n * the provided object, or the cache if no `thisp` object is provided.\n *\n * Does not update age or recenty of use, or iterate over stale values.\n */\n forEach(\n fn: (v: V, k: K, self: LRUCache) => any,\n thisp: any = this\n ) {\n for (const i of this.#indexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n fn.call(thisp, value, this.#keyList[i] as K, this)\n }\n }\n\n /**\n * The same as {@link LRUCache.forEach} but items are iterated over in\n * reverse order. (ie, less recently used items are iterated over first.)\n */\n rforEach(\n fn: (v: V, k: K, self: LRUCache) => any,\n thisp: any = this\n ) {\n for (const i of this.#rindexes()) {\n const v = this.#valList[i]\n const value = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) continue\n fn.call(thisp, value, this.#keyList[i] as K, this)\n }\n }\n\n /**\n * Delete any stale entries. Returns true if anything was removed,\n * false otherwise.\n */\n purgeStale() {\n let deleted = false\n for (const i of this.#rindexes({ allowStale: true })) {\n if (this.#isStale(i)) {\n this.#delete(this.#keyList[i] as K, 'expire')\n deleted = true\n }\n }\n return deleted\n }\n\n /**\n * Get the extended info about a given entry, to get its value, size, and\n * TTL info simultaneously. Returns `undefined` if the key is not present.\n *\n * Unlike {@link LRUCache#dump}, which is designed to be portable and survive\n * serialization, the `start` value is always the current timestamp, and the\n * `ttl` is a calculated remaining time to live (negative if expired).\n *\n * Always returns stale values, if their info is found in the cache, so be\n * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})\n * if relevant.\n */\n info(key: K): LRUCache.Entry | undefined {\n const i = this.#keyMap.get(key)\n if (i === undefined) return undefined\n const v = this.#valList[i]\n const value: V | undefined = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined) return undefined\n const entry: LRUCache.Entry = { value }\n if (this.#ttls && this.#starts) {\n const ttl = this.#ttls[i]\n const start = this.#starts[i]\n if (ttl && start) {\n const remain = ttl - (perf.now() - start)\n entry.ttl = remain\n entry.start = Date.now()\n }\n }\n if (this.#sizes) {\n entry.size = this.#sizes[i]\n }\n return entry\n }\n\n /**\n * Return an array of [key, {@link LRUCache.Entry}] tuples which can be\n * passed to {@link LRLUCache#load}.\n *\n * The `start` fields are calculated relative to a portable `Date.now()`\n * timestamp, even if `performance.now()` is available.\n *\n * Stale entries are always included in the `dump`, even if\n * {@link LRUCache.OptionsBase.allowStale} is false.\n *\n * Note: this returns an actual array, not a generator, so it can be more\n * easily passed around.\n */\n dump() {\n const arr: [K, LRUCache.Entry][] = []\n for (const i of this.#indexes({ allowStale: true })) {\n const key = this.#keyList[i]\n const v = this.#valList[i]\n const value: V | undefined = this.#isBackgroundFetch(v)\n ? v.__staleWhileFetching\n : v\n if (value === undefined || key === undefined) continue\n const entry: LRUCache.Entry = { value }\n if (this.#ttls && this.#starts) {\n entry.ttl = this.#ttls[i]\n // always dump the start relative to a portable timestamp\n // it's ok for this to be a bit slow, it's a rare operation.\n const age = perf.now() - (this.#starts[i] as number)\n entry.start = Math.floor(Date.now() - age)\n }\n if (this.#sizes) {\n entry.size = this.#sizes[i]\n }\n arr.unshift([key, entry])\n }\n return arr\n }\n\n /**\n * Reset the cache and load in the items in entries in the order listed.\n *\n * The shape of the resulting cache may be different if the same options are\n * not used in both caches.\n *\n * The `start` fields are assumed to be calculated relative to a portable\n * `Date.now()` timestamp, even if `performance.now()` is available.\n */\n load(arr: [K, LRUCache.Entry][]) {\n this.clear()\n for (const [key, entry] of arr) {\n if (entry.start) {\n // entry.start is a portable timestamp, but we may be using\n // node's performance.now(), so calculate the offset, so that\n // we get the intended remaining TTL, no matter how long it's\n // been on ice.\n //\n // it's ok for this to be a bit slow, it's a rare operation.\n const age = Date.now() - entry.start\n entry.start = perf.now() - age\n }\n this.set(key, entry.value, entry)\n }\n }\n\n /**\n * Add a value to the cache.\n *\n * Note: if `undefined` is specified as a value, this is an alias for\n * {@link LRUCache#delete}\n *\n * Fields on the {@link LRUCache.SetOptions} options param will override\n * their corresponding values in the constructor options for the scope\n * of this single `set()` operation.\n *\n * If `start` is provided, then that will set the effective start\n * time for the TTL calculation. Note that this must be a previous\n * value of `performance.now()` if supported, or a previous value of\n * `Date.now()` if not.\n *\n * Options object may also include `size`, which will prevent\n * calling the `sizeCalculation` function and just use the specified\n * number if it is a positive integer, and `noDisposeOnSet` which\n * will prevent calling a `dispose` function in the case of\n * overwrites.\n *\n * If the `size` (or return value of `sizeCalculation`) for a given\n * entry is greater than `maxEntrySize`, then the item will not be\n * added to the cache.\n *\n * Will update the recency of the entry.\n *\n * If the value is `undefined`, then this is an alias for\n * `cache.delete(key)`. `undefined` is never stored in the cache.\n */\n set(\n k: K,\n v: V | BackgroundFetch | undefined,\n setOptions: LRUCache.SetOptions = {}\n ) {\n if (v === undefined) {\n this.delete(k)\n return this\n }\n const {\n ttl = this.ttl,\n start,\n noDisposeOnSet = this.noDisposeOnSet,\n sizeCalculation = this.sizeCalculation,\n status,\n } = setOptions\n let { noUpdateTTL = this.noUpdateTTL } = setOptions\n\n const size = this.#requireSize(\n k,\n v,\n setOptions.size || 0,\n sizeCalculation\n )\n // if the item doesn't fit, don't do anything\n // NB: maxEntrySize set to maxSize by default\n if (this.maxEntrySize && size > this.maxEntrySize) {\n if (status) {\n status.set = 'miss'\n status.maxEntrySizeExceeded = true\n }\n // have to delete, in case something is there already.\n this.#delete(k, 'set')\n return this\n }\n let index = this.#size === 0 ? undefined : this.#keyMap.get(k)\n if (index === undefined) {\n // addition\n index = (\n this.#size === 0\n ? this.#tail\n : this.#free.length !== 0\n ? this.#free.pop()\n : this.#size === this.#max\n ? this.#evict(false)\n : this.#size\n ) as Index\n this.#keyList[index] = k\n this.#valList[index] = v\n this.#keyMap.set(k, index)\n this.#next[this.#tail] = index\n this.#prev[index] = this.#tail\n this.#tail = index\n this.#size++\n this.#addItemSize(index, size, status)\n if (status) status.set = 'add'\n noUpdateTTL = false\n } else {\n // update\n this.#moveToTail(index)\n const oldVal = this.#valList[index] as V | BackgroundFetch\n if (v !== oldVal) {\n if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {\n oldVal.__abortController.abort(new Error('replaced'))\n const { __staleWhileFetching: s } = oldVal\n if (s !== undefined && !noDisposeOnSet) {\n if (this.#hasDispose) {\n this.#dispose?.(s as V, k, 'set')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([s as V, k, 'set'])\n }\n }\n } else if (!noDisposeOnSet) {\n if (this.#hasDispose) {\n this.#dispose?.(oldVal as V, k, 'set')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([oldVal as V, k, 'set'])\n }\n }\n this.#removeItemSize(index)\n this.#addItemSize(index, size, status)\n this.#valList[index] = v\n if (status) {\n status.set = 'replace'\n const oldValue =\n oldVal && this.#isBackgroundFetch(oldVal)\n ? oldVal.__staleWhileFetching\n : oldVal\n if (oldValue !== undefined) status.oldValue = oldValue\n }\n } else if (status) {\n status.set = 'update'\n }\n }\n if (ttl !== 0 && !this.#ttls) {\n this.#initializeTTLTracking()\n }\n if (this.#ttls) {\n if (!noUpdateTTL) {\n this.#setItemTTL(index, ttl, start)\n }\n if (status) this.#statusTTL(status, index)\n }\n if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n return this\n }\n\n /**\n * Evict the least recently used item, returning its value or\n * `undefined` if cache is empty.\n */\n pop(): V | undefined {\n try {\n while (this.#size) {\n const val = this.#valList[this.#head]\n this.#evict(true)\n if (this.#isBackgroundFetch(val)) {\n if (val.__staleWhileFetching) {\n return val.__staleWhileFetching\n }\n } else if (val !== undefined) {\n return val\n }\n }\n } finally {\n if (this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n }\n }\n\n #evict(free: boolean) {\n const head = this.#head\n const k = this.#keyList[head] as K\n const v = this.#valList[head] as V\n if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('evicted'))\n } else if (this.#hasDispose || this.#hasDisposeAfter) {\n if (this.#hasDispose) {\n this.#dispose?.(v, k, 'evict')\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v, k, 'evict'])\n }\n }\n this.#removeItemSize(head)\n // if we aren't about to use the index, then null these out\n if (free) {\n this.#keyList[head] = undefined\n this.#valList[head] = undefined\n this.#free.push(head)\n }\n if (this.#size === 1) {\n this.#head = this.#tail = 0 as Index\n this.#free.length = 0\n } else {\n this.#head = this.#next[head] as Index\n }\n this.#keyMap.delete(k)\n this.#size--\n return head\n }\n\n /**\n * Check if a key is in the cache, without updating the recency of use.\n * Will return false if the item is stale, even though it is technically\n * in the cache.\n *\n * Check if a key is in the cache, without updating the recency of\n * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set\n * to `true` in either the options or the constructor.\n *\n * Will return `false` if the item is stale, even though it is technically in\n * the cache. The difference can be determined (if it matters) by using a\n * `status` argument, and inspecting the `has` field.\n *\n * Will not update item age unless\n * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.\n */\n has(k: K, hasOptions: LRUCache.HasOptions = {}) {\n const { updateAgeOnHas = this.updateAgeOnHas, status } =\n hasOptions\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n const v = this.#valList[index]\n if (\n this.#isBackgroundFetch(v) &&\n v.__staleWhileFetching === undefined\n ) {\n return false\n }\n if (!this.#isStale(index)) {\n if (updateAgeOnHas) {\n this.#updateItemAge(index)\n }\n if (status) {\n status.has = 'hit'\n this.#statusTTL(status, index)\n }\n return true\n } else if (status) {\n status.has = 'stale'\n this.#statusTTL(status, index)\n }\n } else if (status) {\n status.has = 'miss'\n }\n return false\n }\n\n /**\n * Like {@link LRUCache#get} but doesn't update recency or delete stale\n * items.\n *\n * Returns `undefined` if the item is stale, unless\n * {@link LRUCache.OptionsBase.allowStale} is set.\n */\n peek(k: K, peekOptions: LRUCache.PeekOptions = {}) {\n const { allowStale = this.allowStale } = peekOptions\n const index = this.#keyMap.get(k)\n if (\n index === undefined ||\n (!allowStale && this.#isStale(index))\n ) {\n return\n }\n const v = this.#valList[index]\n // either stale and allowed, or forcing a refresh of non-stale value\n return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v\n }\n\n #backgroundFetch(\n k: K,\n index: Index | undefined,\n options: LRUCache.FetchOptions,\n context: any\n ): BackgroundFetch {\n const v = index === undefined ? undefined : this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n return v\n }\n\n const ac = new AC()\n const { signal } = options\n // when/if our AC signals, then stop listening to theirs.\n signal?.addEventListener('abort', () => ac.abort(signal.reason), {\n signal: ac.signal,\n })\n\n const fetchOpts = {\n signal: ac.signal,\n options,\n context,\n }\n\n const cb = (\n v: V | undefined,\n updateCache = false\n ): V | undefined => {\n const { aborted } = ac.signal\n const ignoreAbort = options.ignoreFetchAbort && v !== undefined\n if (options.status) {\n if (aborted && !updateCache) {\n options.status.fetchAborted = true\n options.status.fetchError = ac.signal.reason\n if (ignoreAbort) options.status.fetchAbortIgnored = true\n } else {\n options.status.fetchResolved = true\n }\n }\n if (aborted && !ignoreAbort && !updateCache) {\n return fetchFail(ac.signal.reason)\n }\n // either we didn't abort, and are still here, or we did, and ignored\n const bf = p as BackgroundFetch\n if (this.#valList[index as Index] === p) {\n if (v === undefined) {\n if (bf.__staleWhileFetching) {\n this.#valList[index as Index] = bf.__staleWhileFetching\n } else {\n this.#delete(k, 'fetch')\n }\n } else {\n if (options.status) options.status.fetchUpdated = true\n this.set(k, v, fetchOpts.options)\n }\n }\n return v\n }\n\n const eb = (er: any) => {\n if (options.status) {\n options.status.fetchRejected = true\n options.status.fetchError = er\n }\n return fetchFail(er)\n }\n\n const fetchFail = (er: any): V | undefined => {\n const { aborted } = ac.signal\n const allowStaleAborted =\n aborted && options.allowStaleOnFetchAbort\n const allowStale =\n allowStaleAborted || options.allowStaleOnFetchRejection\n const noDelete = allowStale || options.noDeleteOnFetchRejection\n const bf = p as BackgroundFetch\n if (this.#valList[index as Index] === p) {\n // if we allow stale on fetch rejections, then we need to ensure that\n // the stale value is not removed from the cache when the fetch fails.\n const del = !noDelete || bf.__staleWhileFetching === undefined\n if (del) {\n this.#delete(k, 'fetch')\n } else if (!allowStaleAborted) {\n // still replace the *promise* with the stale value,\n // since we are done with the promise at this point.\n // leave it untouched if we're still waiting for an\n // aborted background fetch that hasn't yet returned.\n this.#valList[index as Index] = bf.__staleWhileFetching\n }\n }\n if (allowStale) {\n if (options.status && bf.__staleWhileFetching !== undefined) {\n options.status.returnedStale = true\n }\n return bf.__staleWhileFetching\n } else if (bf.__returned === bf) {\n throw er\n }\n }\n\n const pcall = (\n res: (v: V | undefined) => void,\n rej: (e: any) => void\n ) => {\n const fmp = this.#fetchMethod?.(k, v, fetchOpts)\n if (fmp && fmp instanceof Promise) {\n fmp.then(v => res(v === undefined ? undefined : v), rej)\n }\n // ignored, we go until we finish, regardless.\n // defer check until we are actually aborting,\n // so fetchMethod can override.\n ac.signal.addEventListener('abort', () => {\n if (\n !options.ignoreFetchAbort ||\n options.allowStaleOnFetchAbort\n ) {\n res(undefined)\n // when it eventually resolves, update the cache.\n if (options.allowStaleOnFetchAbort) {\n res = v => cb(v, true)\n }\n }\n })\n }\n\n if (options.status) options.status.fetchDispatched = true\n const p = new Promise(pcall).then(cb, eb)\n const bf: BackgroundFetch = Object.assign(p, {\n __abortController: ac,\n __staleWhileFetching: v,\n __returned: undefined,\n })\n\n if (index === undefined) {\n // internal, don't expose status.\n this.set(k, bf, { ...fetchOpts.options, status: undefined })\n index = this.#keyMap.get(k)\n } else {\n this.#valList[index] = bf\n }\n return bf\n }\n\n #isBackgroundFetch(p: any): p is BackgroundFetch {\n if (!this.#hasFetchMethod) return false\n const b = p as BackgroundFetch\n return (\n !!b &&\n b instanceof Promise &&\n b.hasOwnProperty('__staleWhileFetching') &&\n b.__abortController instanceof AC\n )\n }\n\n /**\n * Make an asynchronous cached fetch using the\n * {@link LRUCache.OptionsBase.fetchMethod} function.\n *\n * If the value is in the cache and not stale, then the returned\n * Promise resolves to the value.\n *\n * If not in the cache, or beyond its TTL staleness, then\n * `fetchMethod(key, staleValue, { options, signal, context })` is\n * called, and the value returned will be added to the cache once\n * resolved.\n *\n * If called with `allowStale`, and an asynchronous fetch is\n * currently in progress to reload a stale value, then the former\n * stale value will be returned.\n *\n * If called with `forceRefresh`, then the cached item will be\n * re-fetched, even if it is not stale. However, if `allowStale` is also\n * set, then the old value will still be returned. This is useful\n * in cases where you want to force a reload of a cached value. If\n * a background fetch is already in progress, then `forceRefresh`\n * has no effect.\n *\n * If multiple fetches for the same key are issued, then they will all be\n * coalesced into a single call to fetchMethod.\n *\n * Note that this means that handling options such as\n * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort},\n * {@link LRUCache.FetchOptions.signal},\n * and {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} will be\n * determined by the FIRST fetch() call for a given key.\n *\n * This is a known (fixable) shortcoming which will be addresed on when\n * someone complains about it, as the fix would involve added complexity and\n * may not be worth the costs for this edge case.\n *\n * If {@link LRUCache.OptionsBase.fetchMethod} is not specified, then this is\n * effectively an alias for `Promise.resolve(cache.get(key))`.\n *\n * When the fetch method resolves to a value, if the fetch has not\n * been aborted due to deletion, eviction, or being overwritten,\n * then it is added to the cache using the options provided.\n *\n * If the key is evicted or deleted before the `fetchMethod`\n * resolves, then the AbortSignal passed to the `fetchMethod` will\n * receive an `abort` event, and the promise returned by `fetch()`\n * will reject with the reason for the abort.\n *\n * If a `signal` is passed to the `fetch()` call, then aborting the\n * signal will abort the fetch and cause the `fetch()` promise to\n * reject with the reason provided.\n *\n * **Setting `context`**\n *\n * If an `FC` type is set to a type other than `unknown`, `void`, or\n * `undefined` in the {@link LRUCache} constructor, then all\n * calls to `cache.fetch()` _must_ provide a `context` option. If\n * set to `undefined` or `void`, then calls to fetch _must not_\n * provide a `context` option.\n *\n * The `context` param allows you to provide arbitrary data that\n * might be relevant in the course of fetching the data. It is only\n * relevant for the course of a single `fetch()` operation, and\n * discarded afterwards.\n *\n * **Note: `fetch()` calls are inflight-unique**\n *\n * If you call `fetch()` multiple times with the same key value,\n * then every call after the first will resolve on the same\n * promise1,\n * _even if they have different settings that would otherwise change\n * the behavior of the fetch_, such as `noDeleteOnFetchRejection`\n * or `ignoreFetchAbort`.\n *\n * In most cases, this is not a problem (in fact, only fetching\n * something once is what you probably want, if you're caching in\n * the first place). If you are changing the fetch() options\n * dramatically between runs, there's a good chance that you might\n * be trying to fit divergent semantics into a single object, and\n * would be better off with multiple cache instances.\n *\n * **1**: Ie, they're not the \"same Promise\", but they resolve at\n * the same time, because they're both waiting on the same\n * underlying fetchMethod response.\n */\n\n fetch(\n k: K,\n fetchOptions: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n ): Promise\n\n // this overload not allowed if context is required\n fetch(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n fetchOptions?: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : never\n ): Promise\n\n async fetch(\n k: K,\n fetchOptions: LRUCache.FetchOptions = {}\n ): Promise {\n const {\n // get options\n allowStale = this.allowStale,\n updateAgeOnGet = this.updateAgeOnGet,\n noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n // set options\n ttl = this.ttl,\n noDisposeOnSet = this.noDisposeOnSet,\n size = 0,\n sizeCalculation = this.sizeCalculation,\n noUpdateTTL = this.noUpdateTTL,\n // fetch exclusive options\n noDeleteOnFetchRejection = this.noDeleteOnFetchRejection,\n allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,\n ignoreFetchAbort = this.ignoreFetchAbort,\n allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,\n context,\n forceRefresh = false,\n status,\n signal,\n } = fetchOptions\n\n if (!this.#hasFetchMethod) {\n if (status) status.fetch = 'get'\n return this.get(k, {\n allowStale,\n updateAgeOnGet,\n noDeleteOnStaleGet,\n status,\n })\n }\n\n const options = {\n allowStale,\n updateAgeOnGet,\n noDeleteOnStaleGet,\n ttl,\n noDisposeOnSet,\n size,\n sizeCalculation,\n noUpdateTTL,\n noDeleteOnFetchRejection,\n allowStaleOnFetchRejection,\n allowStaleOnFetchAbort,\n ignoreFetchAbort,\n status,\n signal,\n }\n\n let index = this.#keyMap.get(k)\n if (index === undefined) {\n if (status) status.fetch = 'miss'\n const p = this.#backgroundFetch(k, index, options, context)\n return (p.__returned = p)\n } else {\n // in cache, maybe already fetching\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n const stale =\n allowStale && v.__staleWhileFetching !== undefined\n if (status) {\n status.fetch = 'inflight'\n if (stale) status.returnedStale = true\n }\n return stale ? v.__staleWhileFetching : (v.__returned = v)\n }\n\n // if we force a refresh, that means do NOT serve the cached value,\n // unless we are already in the process of refreshing the cache.\n const isStale = this.#isStale(index)\n if (!forceRefresh && !isStale) {\n if (status) status.fetch = 'hit'\n this.#moveToTail(index)\n if (updateAgeOnGet) {\n this.#updateItemAge(index)\n }\n if (status) this.#statusTTL(status, index)\n return v\n }\n\n // ok, it is stale or a forced refresh, and not already fetching.\n // refresh the cache.\n const p = this.#backgroundFetch(k, index, options, context)\n const hasStale = p.__staleWhileFetching !== undefined\n const staleVal = hasStale && allowStale\n if (status) {\n status.fetch = isStale ? 'stale' : 'refresh'\n if (staleVal && isStale) status.returnedStale = true\n }\n return staleVal ? p.__staleWhileFetching : (p.__returned = p)\n }\n }\n\n /**\n * In some cases, `cache.fetch()` may resolve to `undefined`, either because\n * a {@link LRUCache.OptionsBase#fetchMethod} was not provided (turning\n * `cache.fetch(k)` into just an async wrapper around `cache.get(k)`) or\n * because `ignoreFetchAbort` was specified (either to the constructor or\n * in the {@link LRUCache.FetchOptions}). Also, the\n * {@link OptionsBase.fetchMethod} may return `undefined` or `void`, making\n * the test even more complicated.\n *\n * Because inferring the cases where `undefined` might be returned are so\n * cumbersome, but testing for `undefined` can also be annoying, this method\n * can be used, which will reject if `this.fetch()` resolves to undefined.\n */\n forceFetch(\n k: K,\n fetchOptions: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n ): Promise\n // this overload not allowed if context is required\n forceFetch(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n fetchOptions?: unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : never\n ): Promise\n async forceFetch(\n k: K,\n fetchOptions: LRUCache.FetchOptions = {}\n ): Promise {\n const v = await this.fetch(\n k,\n fetchOptions as unknown extends FC\n ? LRUCache.FetchOptions\n : FC extends undefined | void\n ? LRUCache.FetchOptionsNoContext\n : LRUCache.FetchOptionsWithContext\n )\n if (v === undefined) throw new Error('fetch() returned undefined')\n return v\n }\n\n /**\n * If the key is found in the cache, then this is equivalent to\n * {@link LRUCache#get}. If not, in the cache, then calculate the value using\n * the {@link LRUCache.OptionsBase.memoMethod}, and add it to the cache.\n *\n * If an `FC` type is set to a type other than `unknown`, `void`, or\n * `undefined` in the LRUCache constructor, then all calls to `cache.memo()`\n * _must_ provide a `context` option. If set to `undefined` or `void`, then\n * calls to memo _must not_ provide a `context` option.\n *\n * The `context` param allows you to provide arbitrary data that might be\n * relevant in the course of fetching the data. It is only relevant for the\n * course of a single `memo()` operation, and discarded afterwards.\n */\n memo(\n k: K,\n memoOptions: unknown extends FC\n ? LRUCache.MemoOptions\n : FC extends undefined | void\n ? LRUCache.MemoOptionsNoContext\n : LRUCache.MemoOptionsWithContext\n ): V\n // this overload not allowed if context is required\n memo(\n k: unknown extends FC\n ? K\n : FC extends undefined | void\n ? K\n : never,\n memoOptions?: unknown extends FC\n ? LRUCache.MemoOptions\n : FC extends undefined | void\n ? LRUCache.MemoOptionsNoContext\n : never\n ): V\n memo(k: K, memoOptions: LRUCache.MemoOptions = {}) {\n const memoMethod = this.#memoMethod\n if (!memoMethod) {\n throw new Error('no memoMethod provided to constructor')\n }\n const { context, forceRefresh, ...options } = memoOptions\n const v = this.get(k, options)\n if (!forceRefresh && v !== undefined) return v\n const vv = memoMethod(k, v, {\n options,\n context,\n } as LRUCache.MemoizerOptions)\n this.set(k, vv, options)\n return vv\n }\n\n /**\n * Return a value from the cache. Will update the recency of the cache\n * entry found.\n *\n * If the key is not found, get() will return `undefined`.\n */\n get(k: K, getOptions: LRUCache.GetOptions = {}) {\n const {\n allowStale = this.allowStale,\n updateAgeOnGet = this.updateAgeOnGet,\n noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n status,\n } = getOptions\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n const value = this.#valList[index]\n const fetching = this.#isBackgroundFetch(value)\n if (status) this.#statusTTL(status, index)\n if (this.#isStale(index)) {\n if (status) status.get = 'stale'\n // delete only if not an in-flight background fetch\n if (!fetching) {\n if (!noDeleteOnStaleGet) {\n this.#delete(k, 'expire')\n }\n if (status && allowStale) status.returnedStale = true\n return allowStale ? value : undefined\n } else {\n if (\n status &&\n allowStale &&\n value.__staleWhileFetching !== undefined\n ) {\n status.returnedStale = true\n }\n return allowStale ? value.__staleWhileFetching : undefined\n }\n } else {\n if (status) status.get = 'hit'\n // if we're currently fetching it, we don't actually have it yet\n // it's not stale, which means this isn't a staleWhileRefetching.\n // If it's not stale, and fetching, AND has a __staleWhileFetching\n // value, then that means the user fetched with {forceRefresh:true},\n // so it's safe to return that value.\n if (fetching) {\n return value.__staleWhileFetching\n }\n this.#moveToTail(index)\n if (updateAgeOnGet) {\n this.#updateItemAge(index)\n }\n return value\n }\n } else if (status) {\n status.get = 'miss'\n }\n }\n\n #connect(p: Index, n: Index) {\n this.#prev[n] = p\n this.#next[p] = n\n }\n\n #moveToTail(index: Index): void {\n // if tail already, nothing to do\n // if head, move head to next[index]\n // else\n // move next[prev[index]] to next[index] (head has no prev)\n // move prev[next[index]] to prev[index]\n // prev[index] = tail\n // next[tail] = index\n // tail = index\n if (index !== this.#tail) {\n if (index === this.#head) {\n this.#head = this.#next[index] as Index\n } else {\n this.#connect(\n this.#prev[index] as Index,\n this.#next[index] as Index\n )\n }\n this.#connect(this.#tail, index)\n this.#tail = index\n }\n }\n\n /**\n * Deletes a key out of the cache.\n *\n * Returns true if the key was deleted, false otherwise.\n */\n delete(k: K) {\n return this.#delete(k, 'delete')\n }\n\n #delete(k: K, reason: LRUCache.DisposeReason) {\n let deleted = false\n if (this.#size !== 0) {\n const index = this.#keyMap.get(k)\n if (index !== undefined) {\n deleted = true\n if (this.#size === 1) {\n this.#clear(reason)\n } else {\n this.#removeItemSize(index)\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('deleted'))\n } else if (this.#hasDispose || this.#hasDisposeAfter) {\n if (this.#hasDispose) {\n this.#dispose?.(v as V, k, reason)\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v as V, k, reason])\n }\n }\n this.#keyMap.delete(k)\n this.#keyList[index] = undefined\n this.#valList[index] = undefined\n if (index === this.#tail) {\n this.#tail = this.#prev[index] as Index\n } else if (index === this.#head) {\n this.#head = this.#next[index] as Index\n } else {\n const pi = this.#prev[index] as number\n this.#next[pi] = this.#next[index] as number\n const ni = this.#next[index] as number\n this.#prev[ni] = this.#prev[index] as number\n }\n this.#size--\n this.#free.push(index)\n }\n }\n }\n if (this.#hasDisposeAfter && this.#disposed?.length) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n return deleted\n }\n\n /**\n * Clear the cache entirely, throwing away all values.\n */\n clear() {\n return this.#clear('delete')\n }\n #clear(reason: LRUCache.DisposeReason) {\n for (const index of this.#rindexes({ allowStale: true })) {\n const v = this.#valList[index]\n if (this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('deleted'))\n } else {\n const k = this.#keyList[index]\n if (this.#hasDispose) {\n this.#dispose?.(v as V, k as K, reason)\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v as V, k as K, reason])\n }\n }\n }\n\n this.#keyMap.clear()\n this.#valList.fill(undefined)\n this.#keyList.fill(undefined)\n if (this.#ttls && this.#starts) {\n this.#ttls.fill(0)\n this.#starts.fill(0)\n }\n if (this.#sizes) {\n this.#sizes.fill(0)\n }\n this.#head = 0 as Index\n this.#tail = 0 as Index\n this.#free.length = 0\n this.#calculatedSize = 0\n this.#size = 0\n if (this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed\n let task: DisposeTask | undefined\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task)\n }\n }\n }\n}\n"], + "mappings": "mVAMA,IAAMA,EACJ,OAAO,aAAgB,UACvB,aACA,OAAO,YAAY,KAAQ,WACvB,YACA,KAEAC,EAAS,IAAI,IAMbC,EACJ,OAAO,SAAY,UAAc,QAAU,QAAU,CAAA,EAIjDC,EAAc,CAClBC,EACAC,EACAC,EACAC,IACE,CACF,OAAOL,EAAQ,aAAgB,WAC3BA,EAAQ,YAAYE,EAAKC,EAAMC,EAAMC,CAAE,EACvC,QAAQ,MAAM,IAAID,MAASD,MAASD,GAAK,CAC/C,EAEII,EAAK,WAAW,gBAChBC,EAAK,WAAW,YAGpB,GAAI,OAAOD,EAAO,IAAa,CAE7BC,EAAK,KAAiB,CACpB,QACA,SAAqC,CAAA,EACrC,OACA,QAAmB,GACnB,iBAAiBC,EAAWH,EAAwB,CAClD,KAAK,SAAS,KAAKA,CAAE,CACvB,GAGFC,EAAK,KAAqB,CACxB,aAAA,CACEG,EAAc,CAChB,CACA,OAAS,IAAIF,EACb,MAAMG,EAAW,CACf,GAAI,MAAK,OAAO,QAEhB,MAAK,OAAO,OAASA,EAErB,KAAK,OAAO,QAAU,GAEtB,QAAWL,KAAM,KAAK,OAAO,SAC3BA,EAAGK,CAAM,EAEX,KAAK,OAAO,UAAUA,CAAM,EAC9B,GAEF,IAAIC,EACFX,EAAQ,KAAK,8BAAgC,IACzCS,EAAiB,IAAK,CACrBE,IACLA,EAAyB,GACzBV,EACE,maAOA,sBACA,UACAQ,CAAc,EAElB,EAIF,IAAMG,EAAcR,GAAiB,CAACL,EAAO,IAAIK,CAAI,EAE/CS,EAAO,OAAO,MAAM,EAIpBC,EAAYC,GAChBA,GAAKA,IAAM,KAAK,MAAMA,CAAC,GAAKA,EAAI,GAAK,SAASA,CAAC,EAc3CC,EAAgBC,GACnBH,EAASG,CAAG,EAETA,GAAO,KAAK,IAAI,EAAG,CAAC,EACpB,WACAA,GAAO,KAAK,IAAI,EAAG,EAAE,EACrB,YACAA,GAAO,KAAK,IAAI,EAAG,EAAE,EACrB,YACAA,GAAO,OAAO,iBACdC,EACA,KATA,KAYAA,EAAN,cAAwB,KAAa,CACnC,YAAYC,EAAY,CACtB,MAAMA,CAAI,EACV,KAAK,KAAK,CAAC,CACb,GAjIFC,EAuIMC,EAAN,KAAW,CACT,KACA,OAGA,OAAO,OAAOJ,EAAW,CACvB,IAAMK,EAAUN,EAAaC,CAAG,EAChC,GAAI,CAACK,EAAS,MAAO,CAAA,EACrBC,EAAAF,EAAMD,EAAgB,IACtB,IAAMI,EAAI,IAAIH,EAAMJ,EAAKK,CAAO,EAChC,OAAAC,EAAAF,EAAMD,EAAgB,IACfI,CACT,CACA,YACEP,EACAK,EAAyC,CAGzC,GAAI,CAACG,EAAAJ,EAAMD,GACT,MAAM,IAAI,UAAU,yCAAyC,EAG/D,KAAK,KAAO,IAAIE,EAAQL,CAAG,EAC3B,KAAK,OAAS,CAChB,CACA,KAAKF,EAAQ,CACX,KAAK,KAAK,KAAK,QAAQ,EAAIA,CAC7B,CACA,KAAG,CACD,OAAO,KAAK,KAAK,EAAE,KAAK,MAAM,CAChC,GA9BIW,EAANL,EAISD,EAAA,YAAPO,EAJID,EAIGN,EAAyB,IAi9B5B,IAAOQ,EAAP,KAAe,CAIVC,GACAC,GACAC,GACAC,GACAC,GACAC,GAKT,IAKA,cAIA,aAIA,eAIA,eAIA,WAKA,eAIA,YAIA,aAIA,gBAIA,yBAIA,mBAIA,uBAIA,2BAIA,iBAGAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GAEAC,GACAC,GACAC,GAWA,OAAO,sBAILC,EAAqB,CACrB,MAAO,CAEL,OAAQA,EAAEL,GACV,KAAMK,EAAEJ,GACR,MAAOI,EAAEN,GACT,OAAQM,EAAEf,GACV,QAASe,EAAEd,GACX,QAASc,EAAEb,GACX,KAAMa,EAAEZ,GACR,KAAMY,EAAEX,GACR,IAAI,MAAI,CACN,OAAOW,EAAEV,EACX,EACA,IAAI,MAAI,CACN,OAAOU,EAAET,EACX,EACA,KAAMS,EAAER,GAER,kBAAoBS,GAAWD,EAAEE,GAAmBD,CAAC,EACrD,gBAAiB,CACfE,EACAC,EACAC,EACAC,IAEAN,EAAEO,GACAJ,EACAC,EACAC,EACAC,CAAO,EAEX,WAAaF,GACXJ,EAAEQ,GAAYJ,CAAc,EAC9B,QAAUC,GACRL,EAAES,GAASJ,CAAO,EACpB,SAAWA,GACTL,EAAEU,GAAUL,CAAO,EACrB,QAAUD,GACRJ,EAAEW,GAASP,CAAc,EAE/B,CAOA,IAAI,KAAG,CACL,OAAO,KAAK3B,EACd,CAIA,IAAI,SAAO,CACT,OAAO,KAAKC,EACd,CAIA,IAAI,gBAAc,CAChB,OAAO,KAAKM,EACd,CAIA,IAAI,MAAI,CACN,OAAO,KAAKD,EACd,CAIA,IAAI,aAAW,CACb,OAAO,KAAKF,EACd,CACA,IAAI,YAAU,CACZ,OAAO,KAAKC,EACd,CAIA,IAAI,SAAO,CACT,OAAO,KAAKH,EACd,CAIA,IAAI,cAAY,CACd,OAAO,KAAKC,EACd,CAEA,YACEyB,EAAwD,CAExD,GAAM,CACJ,IAAAxC,EAAM,EACN,IAAA+C,EACA,cAAAC,EAAgB,EAChB,aAAAC,EACA,eAAAC,EACA,eAAAC,EACA,WAAAC,EACA,QAAAC,EACA,aAAAC,EACA,eAAAC,EACA,YAAAC,EACA,QAAAC,EAAU,EACV,aAAAC,EAAe,EACf,gBAAAC,EACA,YAAAC,EACA,WAAAC,EACA,yBAAAC,EACA,mBAAAC,EACA,2BAAAC,EACA,uBAAAC,EACA,iBAAAC,CAAgB,EACd1B,EAEJ,GAAIxC,IAAQ,GAAK,CAACH,EAASG,CAAG,EAC5B,MAAM,IAAI,UAAU,0CAA0C,EAGhE,IAAMmE,EAAYnE,EAAMD,EAAaC,CAAG,EAAI,MAC5C,GAAI,CAACmE,EACH,MAAM,IAAI,MAAM,sBAAwBnE,CAAG,EAO7C,GAJA,KAAKY,GAAOZ,EACZ,KAAKa,GAAW4C,EAChB,KAAK,aAAeC,GAAgB,KAAK7C,GACzC,KAAK,gBAAkB8C,EACnB,KAAK,gBAAiB,CACxB,GAAI,CAAC,KAAK9C,IAAY,CAAC,KAAK,aAC1B,MAAM,IAAI,UACR,oEAAoE,EAGxE,GAAI,OAAO,KAAK,iBAAoB,WAClC,MAAM,IAAI,UAAU,qCAAqC,EAI7D,GACEgD,IAAe,QACf,OAAOA,GAAe,WAEtB,MAAM,IAAI,UAAU,0CAA0C,EAIhE,GAFA,KAAK5C,GAAc4C,EAGjBD,IAAgB,QAChB,OAAOA,GAAgB,WAEvB,MAAM,IAAI,UACR,6CAA6C,EAsCjD,GAnCA,KAAK5C,GAAe4C,EACpB,KAAK3B,GAAkB,CAAC,CAAC2B,EAEzB,KAAKxC,GAAU,IAAI,IACnB,KAAKC,GAAW,IAAI,MAAMrB,CAAG,EAAE,KAAK,MAAS,EAC7C,KAAKsB,GAAW,IAAI,MAAMtB,CAAG,EAAE,KAAK,MAAS,EAC7C,KAAKuB,GAAQ,IAAI4C,EAAUnE,CAAG,EAC9B,KAAKwB,GAAQ,IAAI2C,EAAUnE,CAAG,EAC9B,KAAKyB,GAAQ,EACb,KAAKC,GAAQ,EACb,KAAKC,GAAQlB,EAAM,OAAOT,CAAG,EAC7B,KAAKkB,GAAQ,EACb,KAAKC,GAAkB,EAEnB,OAAOkC,GAAY,aACrB,KAAKvC,GAAWuC,GAEd,OAAOC,GAAiB,YAC1B,KAAKvC,GAAgBuC,EACrB,KAAK1B,GAAY,CAAA,IAEjB,KAAKb,GAAgB,OACrB,KAAKa,GAAY,QAEnB,KAAKI,GAAc,CAAC,CAAC,KAAKlB,GAC1B,KAAKoB,GAAmB,CAAC,CAAC,KAAKnB,GAE/B,KAAK,eAAiB,CAAC,CAACwC,EACxB,KAAK,YAAc,CAAC,CAACC,EACrB,KAAK,yBAA2B,CAAC,CAACM,EAClC,KAAK,2BAA6B,CAAC,CAACE,EACpC,KAAK,uBAAyB,CAAC,CAACC,EAChC,KAAK,iBAAmB,CAAC,CAACC,EAGtB,KAAK,eAAiB,EAAG,CAC3B,GAAI,KAAKrD,KAAa,GAChB,CAAChB,EAAS,KAAKgB,EAAQ,EACzB,MAAM,IAAI,UACR,iDAAiD,EAIvD,GAAI,CAAChB,EAAS,KAAK,YAAY,EAC7B,MAAM,IAAI,UACR,sDAAsD,EAG1D,KAAKuE,GAAuB,EAa9B,GAVA,KAAK,WAAa,CAAC,CAAChB,EACpB,KAAK,mBAAqB,CAAC,CAACW,EAC5B,KAAK,eAAiB,CAAC,CAACb,EACxB,KAAK,eAAiB,CAAC,CAACC,EACxB,KAAK,cACHtD,EAASmD,CAAa,GAAKA,IAAkB,EACzCA,EACA,EACN,KAAK,aAAe,CAAC,CAACC,EACtB,KAAK,IAAMF,GAAO,EACd,KAAK,IAAK,CACZ,GAAI,CAAClD,EAAS,KAAK,GAAG,EACpB,MAAM,IAAI,UACR,6CAA6C,EAGjD,KAAKwE,GAAsB,EAI7B,GAAI,KAAKzD,KAAS,GAAK,KAAK,MAAQ,GAAK,KAAKC,KAAa,EACzD,MAAM,IAAI,UACR,kDAAkD,EAGtD,GAAI,CAAC,KAAK,cAAgB,CAAC,KAAKD,IAAQ,CAAC,KAAKC,GAAU,CACtD,IAAM1B,EAAO,sBACTQ,EAAWR,CAAI,IACjBL,EAAO,IAAIK,CAAI,EAIfH,EAFE,gGAEe,wBAAyBG,EAAMwB,CAAQ,GAG9D,CAMA,gBAAgB2D,EAAM,CACpB,OAAO,KAAKlD,GAAQ,IAAIkD,CAAG,EAAI,IAAW,CAC5C,CAEAD,IAAsB,CACpB,IAAME,EAAO,IAAItE,EAAU,KAAKW,EAAI,EAC9B4D,EAAS,IAAIvE,EAAU,KAAKW,EAAI,EACtC,KAAKmB,GAAQwC,EACb,KAAKzC,GAAU0C,EAEf,KAAKC,GAAc,CAAClC,EAAOQ,EAAK2B,EAAQ7F,EAAK,IAAG,IAAM,CAGpD,GAFA2F,EAAOjC,CAAK,EAAIQ,IAAQ,EAAI2B,EAAQ,EACpCH,EAAKhC,CAAK,EAAIQ,EACVA,IAAQ,GAAK,KAAK,aAAc,CAClC,IAAM4B,EAAI,WAAW,IAAK,CACpB,KAAK7B,GAASP,CAAK,GACrB,KAAKqC,GAAQ,KAAKvD,GAASkB,CAAK,EAAQ,QAAQ,CAEpD,EAAGQ,EAAM,CAAC,EAGN4B,EAAE,OACJA,EAAE,MAAK,EAIb,EAEA,KAAKE,GAAiBtC,GAAQ,CAC5BiC,EAAOjC,CAAK,EAAIgC,EAAKhC,CAAK,IAAM,EAAI1D,EAAK,IAAG,EAAK,CACnD,EAEA,KAAKiG,GAAa,CAACC,EAAQxC,IAAS,CAClC,GAAIgC,EAAKhC,CAAK,EAAG,CACf,IAAMQ,EAAMwB,EAAKhC,CAAK,EAChBmC,EAAQF,EAAOjC,CAAK,EAE1B,GAAI,CAACQ,GAAO,CAAC2B,EAAO,OACpBK,EAAO,IAAMhC,EACbgC,EAAO,MAAQL,EACfK,EAAO,IAAMC,GAAaC,EAAM,EAChC,IAAMC,EAAMH,EAAO,IAAML,EACzBK,EAAO,aAAehC,EAAMmC,EAEhC,EAIA,IAAIF,EAAY,EACVC,EAAS,IAAK,CAClB,IAAM,EAAIpG,EAAK,IAAG,EAClB,GAAI,KAAK,cAAgB,EAAG,CAC1BmG,EAAY,EACZ,IAAML,EAAI,WACR,IAAOK,EAAY,EACnB,KAAK,aAAa,EAIhBL,EAAE,OACJA,EAAE,MAAK,EAIX,OAAO,CACT,EAEA,KAAK,gBAAkBL,GAAM,CAC3B,IAAM/B,EAAQ,KAAKnB,GAAQ,IAAIkD,CAAG,EAClC,GAAI/B,IAAU,OACZ,MAAO,GAET,IAAMQ,EAAMwB,EAAKhC,CAAK,EAChBmC,EAAQF,EAAOjC,CAAK,EAC1B,GAAI,CAACQ,GAAO,CAAC2B,EACX,MAAO,KAET,IAAMQ,GAAOF,GAAaC,EAAM,GAAMP,EACtC,OAAO3B,EAAMmC,CACf,EAEA,KAAKpC,GAAWP,GAAQ,CACtB,IAAMhC,EAAIiE,EAAOjC,CAAK,EAChBoC,EAAIJ,EAAKhC,CAAK,EACpB,MAAO,CAAC,CAACoC,GAAK,CAAC,CAACpE,IAAMyE,GAAaC,EAAM,GAAM1E,EAAIoE,CACrD,CACF,CAGAE,GAAyC,IAAK,CAAE,EAChDC,GACE,IAAK,CAAE,EACTL,GAMY,IAAK,CAAE,EAGnB3B,GAAsC,IAAM,GAE5CsB,IAAuB,CACrB,IAAMe,EAAQ,IAAIlF,EAAU,KAAKW,EAAI,EACrC,KAAKO,GAAkB,EACvB,KAAKU,GAASsD,EACd,KAAKC,GAAkB7C,GAAQ,CAC7B,KAAKpB,IAAmBgE,EAAM5C,CAAK,EACnC4C,EAAM5C,CAAK,EAAI,CACjB,EACA,KAAK8C,GAAe,CAAC/C,EAAGgD,EAAGpF,EAAMyD,IAAmB,CAGlD,GAAI,KAAKtB,GAAmBiD,CAAC,EAC3B,MAAO,GAET,GAAI,CAACzF,EAASK,CAAI,EAChB,GAAIyD,EAAiB,CACnB,GAAI,OAAOA,GAAoB,WAC7B,MAAM,IAAI,UAAU,oCAAoC,EAG1D,GADAzD,EAAOyD,EAAgB2B,EAAGhD,CAAC,EACvB,CAACzC,EAASK,CAAI,EAChB,MAAM,IAAI,UACR,0DAA0D,MAI9D,OAAM,IAAI,UACR,2HAEwB,EAI9B,OAAOA,CACT,EACA,KAAKqF,GAAe,CAClBhD,EACArC,EACA6E,IACE,CAEF,GADAI,EAAM5C,CAAK,EAAIrC,EACX,KAAKW,GAAU,CACjB,IAAM4C,EAAU,KAAK5C,GAAYsE,EAAM5C,CAAK,EAC5C,KAAO,KAAKpB,GAAkBsC,GAC5B,KAAK+B,GAAO,EAAI,EAGpB,KAAKrE,IAAmBgE,EAAM5C,CAAK,EAC/BwC,IACFA,EAAO,UAAY7E,EACnB6E,EAAO,oBAAsB,KAAK5D,GAEtC,CACF,CAEAiE,GAA0CK,GAAK,CAAE,EACjDF,GAIY,CAACE,EAAIC,EAAIC,IAAO,CAAE,EAC9BN,GAKqB,CACnBO,EACAC,EACA3F,EACAyD,IACE,CACF,GAAIzD,GAAQyD,EACV,MAAM,IAAI,UACR,kEAAkE,EAGtE,MAAO,EACT,EAEA,CAACf,GAAS,CAAE,WAAAQ,EAAa,KAAK,UAAU,EAAK,CAAA,EAAE,CAC7C,GAAI,KAAKlC,GACP,QAAS4E,EAAI,KAAKpE,GACZ,GAAC,KAAKqE,GAAcD,CAAC,KAGrB1C,GAAc,CAAC,KAAKN,GAASgD,CAAC,KAChC,MAAMA,GAEJA,IAAM,KAAKrE,MAGbqE,EAAI,KAAKtE,GAAMsE,CAAC,CAIxB,CAEA,CAACjD,GAAU,CAAE,WAAAO,EAAa,KAAK,UAAU,EAAK,CAAA,EAAE,CAC9C,GAAI,KAAKlC,GACP,QAAS4E,EAAI,KAAKrE,GACZ,GAAC,KAAKsE,GAAcD,CAAC,KAGrB1C,GAAc,CAAC,KAAKN,GAASgD,CAAC,KAChC,MAAMA,GAEJA,IAAM,KAAKpE,MAGboE,EAAI,KAAKvE,GAAMuE,CAAC,CAIxB,CAEAC,GAAcxD,EAAY,CACxB,OACEA,IAAU,QACV,KAAKnB,GAAQ,IAAI,KAAKC,GAASkB,CAAK,CAAM,IAAMA,CAEpD,CAMA,CAAC,SAAO,CACN,QAAWuD,KAAK,KAAKlD,GAAQ,EAEzB,KAAKtB,GAASwE,CAAC,IAAM,QACrB,KAAKzE,GAASyE,CAAC,IAAM,QACrB,CAAC,KAAKzD,GAAmB,KAAKf,GAASwE,CAAC,CAAC,IAEzC,KAAM,CAAC,KAAKzE,GAASyE,CAAC,EAAG,KAAKxE,GAASwE,CAAC,CAAC,EAG/C,CAQA,CAAC,UAAQ,CACP,QAAWA,KAAK,KAAKjD,GAAS,EAE1B,KAAKvB,GAASwE,CAAC,IAAM,QACrB,KAAKzE,GAASyE,CAAC,IAAM,QACrB,CAAC,KAAKzD,GAAmB,KAAKf,GAASwE,CAAC,CAAC,IAEzC,KAAM,CAAC,KAAKzE,GAASyE,CAAC,EAAG,KAAKxE,GAASwE,CAAC,CAAC,EAG/C,CAMA,CAAC,MAAI,CACH,QAAWA,KAAK,KAAKlD,GAAQ,EAAI,CAC/B,IAAMN,EAAI,KAAKjB,GAASyE,CAAC,EAEvBxD,IAAM,QACN,CAAC,KAAKD,GAAmB,KAAKf,GAASwE,CAAC,CAAC,IAEzC,MAAMxD,GAGZ,CAQA,CAAC,OAAK,CACJ,QAAWwD,KAAK,KAAKjD,GAAS,EAAI,CAChC,IAAMP,EAAI,KAAKjB,GAASyE,CAAC,EAEvBxD,IAAM,QACN,CAAC,KAAKD,GAAmB,KAAKf,GAASwE,CAAC,CAAC,IAEzC,MAAMxD,GAGZ,CAMA,CAAC,QAAM,CACL,QAAWwD,KAAK,KAAKlD,GAAQ,EACjB,KAAKtB,GAASwE,CAAC,IAEjB,QACN,CAAC,KAAKzD,GAAmB,KAAKf,GAASwE,CAAC,CAAC,IAEzC,MAAM,KAAKxE,GAASwE,CAAC,EAG3B,CAQA,CAAC,SAAO,CACN,QAAWA,KAAK,KAAKjD,GAAS,EAClB,KAAKvB,GAASwE,CAAC,IAEjB,QACN,CAAC,KAAKzD,GAAmB,KAAKf,GAASwE,CAAC,CAAC,IAEzC,MAAM,KAAKxE,GAASwE,CAAC,EAG3B,CAMA,CAAC,OAAO,QAAQ,GAAC,CACf,OAAO,KAAK,QAAO,CACrB,CAOA,CAAC,OAAO,WAAW,EAAI,WAMvB,KACE1G,EACA4G,EAA4C,CAAA,EAAE,CAE9C,QAAW,KAAK,KAAKpD,GAAQ,EAAI,CAC/B,IAAM0C,EAAI,KAAKhE,GAAS,CAAC,EACnB2E,EAAQ,KAAK5D,GAAmBiD,CAAC,EACnCA,EAAE,qBACFA,EACJ,GAAIW,IAAU,QACV7G,EAAG6G,EAAO,KAAK5E,GAAS,CAAC,EAAQ,IAAI,EACvC,OAAO,KAAK,IAAI,KAAKA,GAAS,CAAC,EAAQ2E,CAAU,EAGvD,CAaA,QACE5G,EACA8G,EAAa,KAAI,CAEjB,QAAW,KAAK,KAAKtD,GAAQ,EAAI,CAC/B,IAAM0C,EAAI,KAAKhE,GAAS,CAAC,EACnB2E,EAAQ,KAAK5D,GAAmBiD,CAAC,EACnCA,EAAE,qBACFA,EACAW,IAAU,QACd7G,EAAG,KAAK8G,EAAOD,EAAO,KAAK5E,GAAS,CAAC,EAAQ,IAAI,EAErD,CAMA,SACEjC,EACA8G,EAAa,KAAI,CAEjB,QAAW,KAAK,KAAKrD,GAAS,EAAI,CAChC,IAAMyC,EAAI,KAAKhE,GAAS,CAAC,EACnB2E,EAAQ,KAAK5D,GAAmBiD,CAAC,EACnCA,EAAE,qBACFA,EACAW,IAAU,QACd7G,EAAG,KAAK8G,EAAOD,EAAO,KAAK5E,GAAS,CAAC,EAAQ,IAAI,EAErD,CAMA,YAAU,CACR,IAAI8E,EAAU,GACd,QAAWL,KAAK,KAAKjD,GAAU,CAAE,WAAY,EAAI,CAAE,EAC7C,KAAKC,GAASgD,CAAC,IACjB,KAAKlB,GAAQ,KAAKvD,GAASyE,CAAC,EAAQ,QAAQ,EAC5CK,EAAU,IAGd,OAAOA,CACT,CAcA,KAAK7B,EAAM,CACT,IAAMwB,EAAI,KAAK1E,GAAQ,IAAIkD,CAAG,EAC9B,GAAIwB,IAAM,OAAW,OACrB,IAAMR,EAAI,KAAKhE,GAASwE,CAAC,EACnBG,EAAuB,KAAK5D,GAAmBiD,CAAC,EAClDA,EAAE,qBACFA,EACJ,GAAIW,IAAU,OAAW,OACzB,IAAMG,EAA2B,CAAE,MAAAH,CAAK,EACxC,GAAI,KAAKlE,IAAS,KAAKD,GAAS,CAC9B,IAAMiB,EAAM,KAAKhB,GAAM+D,CAAC,EAClBpB,EAAQ,KAAK5C,GAAQgE,CAAC,EAC5B,GAAI/C,GAAO2B,EAAO,CAChB,IAAM2B,EAAStD,GAAOlE,EAAK,IAAG,EAAK6F,GACnC0B,EAAM,IAAMC,EACZD,EAAM,MAAQ,KAAK,IAAG,GAG1B,OAAI,KAAKvE,KACPuE,EAAM,KAAO,KAAKvE,GAAOiE,CAAC,GAErBM,CACT,CAeA,MAAI,CACF,IAAME,EAAgC,CAAA,EACtC,QAAWR,KAAK,KAAKlD,GAAS,CAAE,WAAY,EAAI,CAAE,EAAG,CACnD,IAAM0B,EAAM,KAAKjD,GAASyE,CAAC,EACrBR,EAAI,KAAKhE,GAASwE,CAAC,EACnBG,EAAuB,KAAK5D,GAAmBiD,CAAC,EAClDA,EAAE,qBACFA,EACJ,GAAIW,IAAU,QAAa3B,IAAQ,OAAW,SAC9C,IAAM8B,EAA2B,CAAE,MAAAH,CAAK,EACxC,GAAI,KAAKlE,IAAS,KAAKD,GAAS,CAC9BsE,EAAM,IAAM,KAAKrE,GAAM+D,CAAC,EAGxB,IAAMZ,EAAMrG,EAAK,IAAG,EAAM,KAAKiD,GAAQgE,CAAC,EACxCM,EAAM,MAAQ,KAAK,MAAM,KAAK,IAAG,EAAKlB,CAAG,EAEvC,KAAKrD,KACPuE,EAAM,KAAO,KAAKvE,GAAOiE,CAAC,GAE5BQ,EAAI,QAAQ,CAAChC,EAAK8B,CAAK,CAAC,EAE1B,OAAOE,CACT,CAWA,KAAKA,EAA6B,CAChC,KAAK,MAAK,EACV,OAAW,CAAChC,EAAK8B,CAAK,IAAKE,EAAK,CAC9B,GAAIF,EAAM,MAAO,CAOf,IAAMlB,EAAM,KAAK,IAAG,EAAKkB,EAAM,MAC/BA,EAAM,MAAQvH,EAAK,IAAG,EAAKqG,EAE7B,KAAK,IAAIZ,EAAK8B,EAAM,MAAOA,CAAK,EAEpC,CAgCA,IACE9D,EACAgD,EACAiB,EAA4C,CAAA,EAAE,CAE9C,GAAIjB,IAAM,OACR,YAAK,OAAOhD,CAAC,EACN,KAET,GAAM,CACJ,IAAAS,EAAM,KAAK,IACX,MAAA2B,EACA,eAAAnB,EAAiB,KAAK,eACtB,gBAAAI,EAAkB,KAAK,gBACvB,OAAAoB,CAAM,EACJwB,EACA,CAAE,YAAA/C,EAAc,KAAK,WAAW,EAAK+C,EAEnCrG,EAAO,KAAKmF,GAChB/C,EACAgD,EACAiB,EAAW,MAAQ,EACnB5C,CAAe,EAIjB,GAAI,KAAK,cAAgBzD,EAAO,KAAK,aACnC,OAAI6E,IACFA,EAAO,IAAM,OACbA,EAAO,qBAAuB,IAGhC,KAAKH,GAAQtC,EAAG,KAAK,EACd,KAET,IAAIC,EAAQ,KAAKrB,KAAU,EAAI,OAAY,KAAKE,GAAQ,IAAIkB,CAAC,EAC7D,GAAIC,IAAU,OAEZA,EACE,KAAKrB,KAAU,EACX,KAAKQ,GACL,KAAKC,GAAM,SAAW,EACtB,KAAKA,GAAM,IAAG,EACd,KAAKT,KAAU,KAAKN,GACpB,KAAK4E,GAAO,EAAK,EACjB,KAAKtE,GAEX,KAAKG,GAASkB,CAAK,EAAID,EACvB,KAAKhB,GAASiB,CAAK,EAAI+C,EACvB,KAAKlE,GAAQ,IAAIkB,EAAGC,CAAK,EACzB,KAAKhB,GAAM,KAAKG,EAAK,EAAIa,EACzB,KAAKf,GAAMe,CAAK,EAAI,KAAKb,GACzB,KAAKA,GAAQa,EACb,KAAKrB,KACL,KAAKqE,GAAahD,EAAOrC,EAAM6E,CAAM,EACjCA,IAAQA,EAAO,IAAM,OACzBvB,EAAc,OACT,CAEL,KAAKb,GAAYJ,CAAK,EACtB,IAAMiE,EAAS,KAAKlF,GAASiB,CAAK,EAClC,GAAI+C,IAAMkB,EAAQ,CAChB,GAAI,KAAKvE,IAAmB,KAAKI,GAAmBmE,CAAM,EAAG,CAC3DA,EAAO,kBAAkB,MAAM,IAAI,MAAM,UAAU,CAAC,EACpD,GAAM,CAAE,qBAAsBjG,CAAC,EAAKiG,EAChCjG,IAAM,QAAa,CAACgD,IAClB,KAAKvB,IACP,KAAKlB,KAAWP,EAAQ+B,EAAG,KAAK,EAE9B,KAAKJ,IACP,KAAKN,IAAW,KAAK,CAACrB,EAAQ+B,EAAG,KAAK,CAAC,QAGjCiB,IACN,KAAKvB,IACP,KAAKlB,KAAW0F,EAAalE,EAAG,KAAK,EAEnC,KAAKJ,IACP,KAAKN,IAAW,KAAK,CAAC4E,EAAalE,EAAG,KAAK,CAAC,GAMhD,GAHA,KAAK8C,GAAgB7C,CAAK,EAC1B,KAAKgD,GAAahD,EAAOrC,EAAM6E,CAAM,EACrC,KAAKzD,GAASiB,CAAK,EAAI+C,EACnBP,EAAQ,CACVA,EAAO,IAAM,UACb,IAAM0B,EACJD,GAAU,KAAKnE,GAAmBmE,CAAM,EACpCA,EAAO,qBACPA,EACFC,IAAa,SAAW1B,EAAO,SAAW0B,SAEvC1B,IACTA,EAAO,IAAM,UAYjB,GATIhC,IAAQ,GAAK,CAAC,KAAKhB,IACrB,KAAKsC,GAAsB,EAEzB,KAAKtC,KACFyB,GACH,KAAKiB,GAAYlC,EAAOQ,EAAK2B,CAAK,EAEhCK,GAAQ,KAAKD,GAAWC,EAAQxC,CAAK,GAEvC,CAACgB,GAAkB,KAAKrB,IAAoB,KAAKN,GAAW,CAC9D,IAAM8E,EAAK,KAAK9E,GACZ+E,EACJ,KAAQA,EAAOD,GAAI,MAAK,GACtB,KAAK3F,KAAgB,GAAG4F,CAAI,EAGhC,OAAO,IACT,CAMA,KAAG,CACD,GAAI,CACF,KAAO,KAAKzF,IAAO,CACjB,IAAM0F,EAAM,KAAKtF,GAAS,KAAKG,EAAK,EAEpC,GADA,KAAK+D,GAAO,EAAI,EACZ,KAAKnD,GAAmBuE,CAAG,GAC7B,GAAIA,EAAI,qBACN,OAAOA,EAAI,6BAEJA,IAAQ,OACjB,OAAOA,WAIX,GAAI,KAAK1E,IAAoB,KAAKN,GAAW,CAC3C,IAAM8E,EAAK,KAAK9E,GACZ+E,EACJ,KAAQA,EAAOD,GAAI,MAAK,GACtB,KAAK3F,KAAgB,GAAG4F,CAAI,GAIpC,CAEAnB,GAAOqB,EAAa,CAClB,IAAMC,EAAO,KAAKrF,GACZa,EAAI,KAAKjB,GAASyF,CAAI,EACtBxB,EAAI,KAAKhE,GAASwF,CAAI,EAC5B,OAAI,KAAK7E,IAAmB,KAAKI,GAAmBiD,CAAC,EACnDA,EAAE,kBAAkB,MAAM,IAAI,MAAM,SAAS,CAAC,GACrC,KAAKtD,IAAe,KAAKE,MAC9B,KAAKF,IACP,KAAKlB,KAAWwE,EAAGhD,EAAG,OAAO,EAE3B,KAAKJ,IACP,KAAKN,IAAW,KAAK,CAAC0D,EAAGhD,EAAG,OAAO,CAAC,GAGxC,KAAK8C,GAAgB0B,CAAI,EAErBD,IACF,KAAKxF,GAASyF,CAAI,EAAI,OACtB,KAAKxF,GAASwF,CAAI,EAAI,OACtB,KAAKnF,GAAM,KAAKmF,CAAI,GAElB,KAAK5F,KAAU,GACjB,KAAKO,GAAQ,KAAKC,GAAQ,EAC1B,KAAKC,GAAM,OAAS,GAEpB,KAAKF,GAAQ,KAAKF,GAAMuF,CAAI,EAE9B,KAAK1F,GAAQ,OAAOkB,CAAC,EACrB,KAAKpB,KACE4F,CACT,CAkBA,IAAIxE,EAAMyE,EAA4C,CAAA,EAAE,CACtD,GAAM,CAAE,eAAA5D,EAAiB,KAAK,eAAgB,OAAA4B,CAAM,EAClDgC,EACIxE,EAAQ,KAAKnB,GAAQ,IAAIkB,CAAC,EAChC,GAAIC,IAAU,OAAW,CACvB,IAAM+C,EAAI,KAAKhE,GAASiB,CAAK,EAC7B,GACE,KAAKF,GAAmBiD,CAAC,GACzBA,EAAE,uBAAyB,OAE3B,MAAO,GAET,GAAK,KAAKxC,GAASP,CAAK,EASbwC,IACTA,EAAO,IAAM,QACb,KAAKD,GAAWC,EAAQxC,CAAK,OAV7B,QAAIY,GACF,KAAK0B,GAAetC,CAAK,EAEvBwC,IACFA,EAAO,IAAM,MACb,KAAKD,GAAWC,EAAQxC,CAAK,GAExB,QAKAwC,IACTA,EAAO,IAAM,QAEf,MAAO,EACT,CASA,KAAKzC,EAAM0E,EAA8C,CAAA,EAAE,CACzD,GAAM,CAAE,WAAA5D,EAAa,KAAK,UAAU,EAAK4D,EACnCzE,EAAQ,KAAKnB,GAAQ,IAAIkB,CAAC,EAChC,GACEC,IAAU,QACT,CAACa,GAAc,KAAKN,GAASP,CAAK,EAEnC,OAEF,IAAM+C,EAAI,KAAKhE,GAASiB,CAAK,EAE7B,OAAO,KAAKF,GAAmBiD,CAAC,EAAIA,EAAE,qBAAuBA,CAC/D,CAEA5C,GACEJ,EACAC,EACAC,EACAC,EAAY,CAEZ,IAAM6C,EAAI/C,IAAU,OAAY,OAAY,KAAKjB,GAASiB,CAAK,EAC/D,GAAI,KAAKF,GAAmBiD,CAAC,EAC3B,OAAOA,EAGT,IAAM2B,EAAK,IAAI5H,EACT,CAAE,OAAA6H,CAAM,EAAK1E,EAEnB0E,GAAQ,iBAAiB,QAAS,IAAMD,EAAG,MAAMC,EAAO,MAAM,EAAG,CAC/D,OAAQD,EAAG,OACZ,EAED,IAAME,EAAY,CAChB,OAAQF,EAAG,OACX,QAAAzE,EACA,QAAAC,GAGI2E,EAAK,CACT9B,EACA+B,EAAc,KACG,CACjB,GAAM,CAAE,QAAAC,CAAO,EAAKL,EAAG,OACjBM,EAAc/E,EAAQ,kBAAoB8C,IAAM,OAUtD,GATI9C,EAAQ,SACN8E,GAAW,CAACD,GACd7E,EAAQ,OAAO,aAAe,GAC9BA,EAAQ,OAAO,WAAayE,EAAG,OAAO,OAClCM,IAAa/E,EAAQ,OAAO,kBAAoB,KAEpDA,EAAQ,OAAO,cAAgB,IAG/B8E,GAAW,CAACC,GAAe,CAACF,EAC9B,OAAOG,EAAUP,EAAG,OAAO,MAAM,EAGnC,IAAMQ,EAAKrF,EACX,OAAI,KAAKd,GAASiB,CAAc,IAAMH,IAChCkD,IAAM,OACJmC,EAAG,qBACL,KAAKnG,GAASiB,CAAc,EAAIkF,EAAG,qBAEnC,KAAK7C,GAAQtC,EAAG,OAAO,GAGrBE,EAAQ,SAAQA,EAAQ,OAAO,aAAe,IAClD,KAAK,IAAIF,EAAGgD,EAAG6B,EAAU,OAAO,IAG7B7B,CACT,EAEMoC,EAAMC,IACNnF,EAAQ,SACVA,EAAQ,OAAO,cAAgB,GAC/BA,EAAQ,OAAO,WAAamF,GAEvBH,EAAUG,CAAE,GAGfH,EAAaG,GAA0B,CAC3C,GAAM,CAAE,QAAAL,CAAO,EAAKL,EAAG,OACjBW,EACJN,GAAW9E,EAAQ,uBACfY,EACJwE,GAAqBpF,EAAQ,2BACzBqF,EAAWzE,GAAcZ,EAAQ,yBACjCiF,EAAKrF,EAeX,GAdI,KAAKd,GAASiB,CAAc,IAAMH,IAGxB,CAACyF,GAAYJ,EAAG,uBAAyB,OAEnD,KAAK7C,GAAQtC,EAAG,OAAO,EACbsF,IAKV,KAAKtG,GAASiB,CAAc,EAAIkF,EAAG,uBAGnCrE,EACF,OAAIZ,EAAQ,QAAUiF,EAAG,uBAAyB,SAChDjF,EAAQ,OAAO,cAAgB,IAE1BiF,EAAG,qBACL,GAAIA,EAAG,aAAeA,EAC3B,MAAME,CAEV,EAEMG,EAAQ,CACZC,EACAC,IACE,CACF,IAAMC,EAAM,KAAKjH,KAAesB,EAAGgD,EAAG6B,CAAS,EAC3Cc,GAAOA,aAAe,SACxBA,EAAI,KAAK3C,GAAKyC,EAAIzC,IAAM,OAAY,OAAYA,CAAC,EAAG0C,CAAG,EAKzDf,EAAG,OAAO,iBAAiB,QAAS,IAAK,EAErC,CAACzE,EAAQ,kBACTA,EAAQ,0BAERuF,EAAI,MAAS,EAETvF,EAAQ,yBACVuF,EAAMzC,GAAK8B,EAAG9B,EAAG,EAAI,GAG3B,CAAC,CACH,EAEI9C,EAAQ,SAAQA,EAAQ,OAAO,gBAAkB,IACrD,IAAMJ,EAAI,IAAI,QAAQ0F,CAAK,EAAE,KAAKV,EAAIM,CAAE,EAClCD,EAAyB,OAAO,OAAOrF,EAAG,CAC9C,kBAAmB6E,EACnB,qBAAsB3B,EACtB,WAAY,OACb,EAED,OAAI/C,IAAU,QAEZ,KAAK,IAAID,EAAGmF,EAAI,CAAE,GAAGN,EAAU,QAAS,OAAQ,MAAS,CAAE,EAC3D5E,EAAQ,KAAKnB,GAAQ,IAAIkB,CAAC,GAE1B,KAAKhB,GAASiB,CAAK,EAAIkF,EAElBA,CACT,CAEApF,GAAmBD,EAAM,CACvB,GAAI,CAAC,KAAKH,GAAiB,MAAO,GAClC,IAAMiG,EAAI9F,EACV,MACE,CAAC,CAAC8F,GACFA,aAAa,SACbA,EAAE,eAAe,sBAAsB,GACvCA,EAAE,6BAA6B7I,CAEnC,CA+GA,MAAM,MACJiD,EACA6F,EAAgD,CAAA,EAAE,CAElD,GAAM,CAEJ,WAAA/E,EAAa,KAAK,WAClB,eAAAF,EAAiB,KAAK,eACtB,mBAAAa,EAAqB,KAAK,mBAE1B,IAAAhB,EAAM,KAAK,IACX,eAAAQ,EAAiB,KAAK,eACtB,KAAArD,EAAO,EACP,gBAAAyD,EAAkB,KAAK,gBACvB,YAAAH,EAAc,KAAK,YAEnB,yBAAAM,EAA2B,KAAK,yBAChC,2BAAAE,EAA6B,KAAK,2BAClC,iBAAAE,EAAmB,KAAK,iBACxB,uBAAAD,EAAyB,KAAK,uBAC9B,QAAAxB,EACA,aAAA2F,EAAe,GACf,OAAArD,EACA,OAAAmC,CAAM,EACJiB,EAEJ,GAAI,CAAC,KAAKlG,GACR,OAAI8C,IAAQA,EAAO,MAAQ,OACpB,KAAK,IAAIzC,EAAG,CACjB,WAAAc,EACA,eAAAF,EACA,mBAAAa,EACA,OAAAgB,EACD,EAGH,IAAMvC,EAAU,CACd,WAAAY,EACA,eAAAF,EACA,mBAAAa,EACA,IAAAhB,EACA,eAAAQ,EACA,KAAArD,EACA,gBAAAyD,EACA,YAAAH,EACA,yBAAAM,EACA,2BAAAE,EACA,uBAAAC,EACA,iBAAAC,EACA,OAAAa,EACA,OAAAmC,GAGE3E,EAAQ,KAAKnB,GAAQ,IAAIkB,CAAC,EAC9B,GAAIC,IAAU,OAAW,CACnBwC,IAAQA,EAAO,MAAQ,QAC3B,IAAM3C,EAAI,KAAKM,GAAiBJ,EAAGC,EAAOC,EAASC,CAAO,EAC1D,OAAQL,EAAE,WAAaA,MAClB,CAEL,IAAMkD,EAAI,KAAKhE,GAASiB,CAAK,EAC7B,GAAI,KAAKF,GAAmBiD,CAAC,EAAG,CAC9B,IAAM+C,EACJjF,GAAckC,EAAE,uBAAyB,OAC3C,OAAIP,IACFA,EAAO,MAAQ,WACXsD,IAAOtD,EAAO,cAAgB,KAE7BsD,EAAQ/C,EAAE,qBAAwBA,EAAE,WAAaA,EAK1D,IAAMgD,EAAU,KAAKxF,GAASP,CAAK,EACnC,GAAI,CAAC6F,GAAgB,CAACE,EACpB,OAAIvD,IAAQA,EAAO,MAAQ,OAC3B,KAAKpC,GAAYJ,CAAK,EAClBW,GACF,KAAK2B,GAAetC,CAAK,EAEvBwC,GAAQ,KAAKD,GAAWC,EAAQxC,CAAK,EAClC+C,EAKT,IAAMlD,EAAI,KAAKM,GAAiBJ,EAAGC,EAAOC,EAASC,CAAO,EAEpD8F,EADWnG,EAAE,uBAAyB,QACfgB,EAC7B,OAAI2B,IACFA,EAAO,MAAQuD,EAAU,QAAU,UAC/BC,GAAYD,IAASvD,EAAO,cAAgB,KAE3CwD,EAAWnG,EAAE,qBAAwBA,EAAE,WAAaA,EAE/D,CAoCA,MAAM,WACJE,EACA6F,EAAgD,CAAA,EAAE,CAElD,IAAM7C,EAAI,MAAM,KAAK,MACnBhD,EACA6F,CAI8C,EAEhD,GAAI7C,IAAM,OAAW,MAAM,IAAI,MAAM,4BAA4B,EACjE,OAAOA,CACT,CAqCA,KAAKhD,EAAMkG,EAA8C,CAAA,EAAE,CACzD,IAAM3E,EAAa,KAAK5C,GACxB,GAAI,CAAC4C,EACH,MAAM,IAAI,MAAM,uCAAuC,EAEzD,GAAM,CAAE,QAAApB,EAAS,aAAA2F,EAAc,GAAG5F,CAAO,EAAKgG,EACxClD,EAAI,KAAK,IAAIhD,EAAGE,CAAO,EAC7B,GAAI,CAAC4F,GAAgB9C,IAAM,OAAW,OAAOA,EAC7C,IAAMmD,EAAK5E,EAAWvB,EAAGgD,EAAG,CAC1B,QAAA9C,EACA,QAAAC,EACqC,EACvC,YAAK,IAAIH,EAAGmG,EAAIjG,CAAO,EAChBiG,CACT,CAQA,IAAInG,EAAM0D,EAA4C,CAAA,EAAE,CACtD,GAAM,CACJ,WAAA5C,EAAa,KAAK,WAClB,eAAAF,EAAiB,KAAK,eACtB,mBAAAa,EAAqB,KAAK,mBAC1B,OAAAgB,CAAM,EACJiB,EACEzD,EAAQ,KAAKnB,GAAQ,IAAIkB,CAAC,EAChC,GAAIC,IAAU,OAAW,CACvB,IAAM0D,EAAQ,KAAK3E,GAASiB,CAAK,EAC3BmG,EAAW,KAAKrG,GAAmB4D,CAAK,EAE9C,OADIlB,GAAQ,KAAKD,GAAWC,EAAQxC,CAAK,EACrC,KAAKO,GAASP,CAAK,GACjBwC,IAAQA,EAAO,IAAM,SAEpB2D,GAQD3D,GACA3B,GACA6C,EAAM,uBAAyB,SAE/BlB,EAAO,cAAgB,IAElB3B,EAAa6C,EAAM,qBAAuB,SAb5ClC,GACH,KAAKa,GAAQtC,EAAG,QAAQ,EAEtByC,GAAU3B,IAAY2B,EAAO,cAAgB,IAC1C3B,EAAa6C,EAAQ,UAY1BlB,IAAQA,EAAO,IAAM,OAMrB2D,EACKzC,EAAM,sBAEf,KAAKtD,GAAYJ,CAAK,EAClBW,GACF,KAAK2B,GAAetC,CAAK,EAEpB0D,SAEAlB,IACTA,EAAO,IAAM,OAEjB,CAEA4D,GAASvG,EAAUtC,EAAQ,CACzB,KAAK0B,GAAM1B,CAAC,EAAIsC,EAChB,KAAKb,GAAMa,CAAC,EAAItC,CAClB,CAEA6C,GAAYJ,EAAY,CASlBA,IAAU,KAAKb,KACba,IAAU,KAAKd,GACjB,KAAKA,GAAQ,KAAKF,GAAMgB,CAAK,EAE7B,KAAKoG,GACH,KAAKnH,GAAMe,CAAK,EAChB,KAAKhB,GAAMgB,CAAK,CAAU,EAG9B,KAAKoG,GAAS,KAAKjH,GAAOa,CAAK,EAC/B,KAAKb,GAAQa,EAEjB,CAOA,OAAOD,EAAI,CACT,OAAO,KAAKsC,GAAQtC,EAAG,QAAQ,CACjC,CAEAsC,GAAQtC,EAAM7C,EAA8B,CAC1C,IAAI0G,EAAU,GACd,GAAI,KAAKjF,KAAU,EAAG,CACpB,IAAMqB,EAAQ,KAAKnB,GAAQ,IAAIkB,CAAC,EAChC,GAAIC,IAAU,OAEZ,GADA4D,EAAU,GACN,KAAKjF,KAAU,EACjB,KAAK0H,GAAOnJ,CAAM,MACb,CACL,KAAK2F,GAAgB7C,CAAK,EAC1B,IAAM+C,EAAI,KAAKhE,GAASiB,CAAK,EAc7B,GAbI,KAAKF,GAAmBiD,CAAC,EAC3BA,EAAE,kBAAkB,MAAM,IAAI,MAAM,SAAS,CAAC,GACrC,KAAKtD,IAAe,KAAKE,MAC9B,KAAKF,IACP,KAAKlB,KAAWwE,EAAQhD,EAAG7C,CAAM,EAE/B,KAAKyC,IACP,KAAKN,IAAW,KAAK,CAAC0D,EAAQhD,EAAG7C,CAAM,CAAC,GAG5C,KAAK2B,GAAQ,OAAOkB,CAAC,EACrB,KAAKjB,GAASkB,CAAK,EAAI,OACvB,KAAKjB,GAASiB,CAAK,EAAI,OACnBA,IAAU,KAAKb,GACjB,KAAKA,GAAQ,KAAKF,GAAMe,CAAK,UACpBA,IAAU,KAAKd,GACxB,KAAKA,GAAQ,KAAKF,GAAMgB,CAAK,MACxB,CACL,IAAMsG,EAAK,KAAKrH,GAAMe,CAAK,EAC3B,KAAKhB,GAAMsH,CAAE,EAAI,KAAKtH,GAAMgB,CAAK,EACjC,IAAMuG,EAAK,KAAKvH,GAAMgB,CAAK,EAC3B,KAAKf,GAAMsH,CAAE,EAAI,KAAKtH,GAAMe,CAAK,EAEnC,KAAKrB,KACL,KAAKS,GAAM,KAAKY,CAAK,GAI3B,GAAI,KAAKL,IAAoB,KAAKN,IAAW,OAAQ,CACnD,IAAM8E,EAAK,KAAK9E,GACZ+E,EACJ,KAAQA,EAAOD,GAAI,MAAK,GACtB,KAAK3F,KAAgB,GAAG4F,CAAI,EAGhC,OAAOR,CACT,CAKA,OAAK,CACH,OAAO,KAAKyC,GAAO,QAAQ,CAC7B,CACAA,GAAOnJ,EAA8B,CACnC,QAAW8C,KAAS,KAAKM,GAAU,CAAE,WAAY,EAAI,CAAE,EAAG,CACxD,IAAMyC,EAAI,KAAKhE,GAASiB,CAAK,EAC7B,GAAI,KAAKF,GAAmBiD,CAAC,EAC3BA,EAAE,kBAAkB,MAAM,IAAI,MAAM,SAAS,CAAC,MACzC,CACL,IAAMhD,EAAI,KAAKjB,GAASkB,CAAK,EACzB,KAAKP,IACP,KAAKlB,KAAWwE,EAAQhD,EAAQ7C,CAAM,EAEpC,KAAKyC,IACP,KAAKN,IAAW,KAAK,CAAC0D,EAAQhD,EAAQ7C,CAAM,CAAC,GAoBnD,GAfA,KAAK2B,GAAQ,MAAK,EAClB,KAAKE,GAAS,KAAK,MAAS,EAC5B,KAAKD,GAAS,KAAK,MAAS,EACxB,KAAKU,IAAS,KAAKD,KACrB,KAAKC,GAAM,KAAK,CAAC,EACjB,KAAKD,GAAQ,KAAK,CAAC,GAEjB,KAAKD,IACP,KAAKA,GAAO,KAAK,CAAC,EAEpB,KAAKJ,GAAQ,EACb,KAAKC,GAAQ,EACb,KAAKC,GAAM,OAAS,EACpB,KAAKR,GAAkB,EACvB,KAAKD,GAAQ,EACT,KAAKgB,IAAoB,KAAKN,GAAW,CAC3C,IAAM8E,EAAK,KAAK9E,GACZ+E,EACJ,KAAQA,EAAOD,GAAI,MAAK,GACtB,KAAK3F,KAAgB,GAAG4F,CAAI,EAGlC", + "names": ["perf", "warned", "PROCESS", "emitWarning", "msg", "type", "code", "fn", "AC", "AS", "_", "warnACPolyfill", "reason", "printACPolyfillWarning", "shouldWarn", "TYPE", "isPosInt", "n", "getUintArray", "max", "ZeroArray", "size", "_constructing", "_Stack", "HeapCls", "__privateSet", "s", "__privateGet", "Stack", "__privateAdd", "LRUCache", "#max", "#maxSize", "#dispose", "#disposeAfter", "#fetchMethod", "#memoMethod", "#size", "#calculatedSize", "#keyMap", "#keyList", "#valList", "#next", "#prev", "#head", "#tail", "#free", "#disposed", "#sizes", "#starts", "#ttls", "#hasDispose", "#hasFetchMethod", "#hasDisposeAfter", "c", "p", "#isBackgroundFetch", "k", "index", "options", "context", "#backgroundFetch", "#moveToTail", "#indexes", "#rindexes", "#isStale", "ttl", "ttlResolution", "ttlAutopurge", "updateAgeOnGet", "updateAgeOnHas", "allowStale", "dispose", "disposeAfter", "noDisposeOnSet", "noUpdateTTL", "maxSize", "maxEntrySize", "sizeCalculation", "fetchMethod", "memoMethod", "noDeleteOnFetchRejection", "noDeleteOnStaleGet", "allowStaleOnFetchRejection", "allowStaleOnFetchAbort", "ignoreFetchAbort", "UintArray", "#initializeSizeTracking", "#initializeTTLTracking", "key", "ttls", "starts", "#setItemTTL", "start", "t", "#delete", "#updateItemAge", "#statusTTL", "status", "cachedNow", "getNow", "age", "sizes", "#removeItemSize", "#requireSize", "v", "#addItemSize", "#evict", "_i", "_s", "_st", "_k", "_v", "i", "#isValidIndex", "getOptions", "value", "thisp", "deleted", "entry", "remain", "arr", "setOptions", "oldVal", "oldValue", "dt", "task", "val", "free", "head", "hasOptions", "peekOptions", "ac", "signal", "fetchOpts", "cb", "updateCache", "aborted", "ignoreAbort", "fetchFail", "bf", "eb", "er", "allowStaleAborted", "noDelete", "pcall", "res", "rej", "fmp", "b", "fetchOptions", "forceRefresh", "stale", "isStale", "staleVal", "memoOptions", "vv", "fetching", "#connect", "#clear", "pi", "ni"] +} diff --git a/.github/octokit/node_modules/lru-cache/dist/esm/package.json b/.github/octokit/node_modules/lru-cache/dist/esm/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/.github/octokit/node_modules/lru-cache/dist/esm/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/.github/octokit/node_modules/lru-cache/package.json b/.github/octokit/node_modules/lru-cache/package.json new file mode 100644 index 000000000..f3cd4c0cc --- /dev/null +++ b/.github/octokit/node_modules/lru-cache/package.json @@ -0,0 +1,116 @@ +{ + "name": "lru-cache", + "publishConfig": { + "tag": "legacy-v10" + }, + "description": "A cache object that deletes the least-recently-used items.", + "version": "10.4.3", + "author": "Isaac Z. Schlueter ", + "keywords": [ + "mru", + "lru", + "cache" + ], + "sideEffects": false, + "scripts": { + "build": "npm run prepare", + "prepare": "tshy && bash fixup.sh", + "pretest": "npm run prepare", + "presnap": "npm run prepare", + "test": "tap", + "snap": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "format": "prettier --write .", + "typedoc": "typedoc --tsconfig ./.tshy/esm.json ./src/*.ts", + "benchmark-results-typedoc": "bash scripts/benchmark-results-typedoc.sh", + "prebenchmark": "npm run prepare", + "benchmark": "make -C benchmark", + "preprofile": "npm run prepare", + "profile": "make -C benchmark profile" + }, + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts", + "tshy": { + "exports": { + ".": "./src/index.ts", + "./min": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.min.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.min.js" + } + } + } + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-lru-cache.git" + }, + "devDependencies": { + "@types/node": "^20.2.5", + "@types/tap": "^15.0.6", + "benchmark": "^2.1.4", + "esbuild": "^0.17.11", + "eslint-config-prettier": "^8.5.0", + "marked": "^4.2.12", + "mkdirp": "^2.1.5", + "prettier": "^2.6.2", + "tap": "^20.0.3", + "tshy": "^2.0.0", + "tslib": "^2.4.0", + "typedoc": "^0.25.3", + "typescript": "^5.2.2" + }, + "license": "ISC", + "files": [ + "dist" + ], + "prettier": { + "semi": false, + "printWidth": 70, + "tabWidth": 2, + "useTabs": false, + "singleQuote": true, + "jsxSingleQuote": false, + "bracketSameLine": true, + "arrowParens": "avoid", + "endOfLine": "lf" + }, + "tap": { + "node-arg": [ + "--expose-gc" + ], + "plugin": [ + "@tapjs/clock" + ] + }, + "exports": { + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + }, + "./min": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.min.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.min.js" + } + } + }, + "type": "module", + "module": "./dist/esm/index.js" +} diff --git a/.github/octokit/node_modules/universal-github-app-jwt/.github/workflows/release.yml b/.github/octokit/node_modules/universal-github-app-jwt/.github/workflows/release.yml new file mode 100644 index 000000000..a427d9e2f --- /dev/null +++ b/.github/octokit/node_modules/universal-github-app-jwt/.github/workflows/release.yml @@ -0,0 +1,22 @@ +"on": + push: + branches: + - "*.x" + - main + - beta +name: Release +jobs: + build: + name: release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - run: npm ci + - run: npm run build + - run: npx semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/octokit/node_modules/universal-github-app-jwt/.github/workflows/test.yml b/.github/octokit/node_modules/universal-github-app-jwt/.github/workflows/test.yml new file mode 100644 index 000000000..b94762971 --- /dev/null +++ b/.github/octokit/node_modules/universal-github-app-jwt/.github/workflows/test.yml @@ -0,0 +1,33 @@ +name: Test +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize] + +jobs: + node: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18 + cache: npm + - run: npm ci + - run: npm test + deno: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18 + cache: npm + - uses: denoland/setup-deno@v1 + with: + deno-version: v1.x + - run: npm ci + - run: npm run build:default + - run: npm run test:deno diff --git a/.github/octokit/node_modules/universal-github-app-jwt/CODE_OF_CONDUCT.md b/.github/octokit/node_modules/universal-github-app-jwt/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..56ceb53e2 --- /dev/null +++ b/.github/octokit/node_modules/universal-github-app-jwt/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +- The use of sexualized language or imagery and unwelcome sexual attention or advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at coc@martynus.net. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/.github/octokit/node_modules/universal-github-app-jwt/LICENSE b/.github/octokit/node_modules/universal-github-app-jwt/LICENSE new file mode 100644 index 000000000..74cea1331 --- /dev/null +++ b/.github/octokit/node_modules/universal-github-app-jwt/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2019 Gregor Martynus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.github/octokit/node_modules/universal-github-app-jwt/README.md b/.github/octokit/node_modules/universal-github-app-jwt/README.md new file mode 100644 index 000000000..ff562cfd2 --- /dev/null +++ b/.github/octokit/node_modules/universal-github-app-jwt/README.md @@ -0,0 +1,237 @@ +# universal-github-app-jwt + +> Calculate GitHub App bearer tokens for Node, Deno, and modern browsers + +[![@latest](https://img.shields.io/npm/v/universal-github-app-jwt)](https://www.npmjs.com/universal-github-app-jwt) +[![Build Status](https://github.com/gr2m/universal-github-app-jwt/workflows/Test/badge.svg)](https://github.com/gr2m/universal-github-app-jwt/actions?query=workflow%3ATest+branch%3Amaster) + +## Usage + + + + + + + +
+Browsers + +Load universal-github-app-jwt directly from esm.sh + +```html + +``` + +
+Node + + +Install with npm install universal-github-app-jwt + +```js +import githubAppJwt from "universal-github-app-jwt"; +``` + +
+Deno + + +Load universal-github-app-jwt directly from esm.sh, including types. + +```js +import githubAppJwt from "https://esm.sh/universal-github-app-jwt"; +``` + +
+ +```js +const { token, appId, expiration } = await githubAppJwt({ + id: APP_ID, + privateKey: PRIVATE_KEY, +}); +``` + +The retrieved `token` can now be used in Authorization request header, e.g. with [`@octokit/request`](https://github.com/octokit/request.js/#readme): + +```js +request("GET /app", { + headers: { + authorization: `bearer ${token}`, + }, +}); +``` + +For a complete implementation of GitHub App authentication strategies, see [`@octokit/auth-app.js`](https://github.com/octokit/auth-app.js/#readme). + +## `githubAppJwt(options)` + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ options.id + + number | string + + Required. The GitHub App's ID or Client ID. For github.com and GHES 3.14+, it is recommended to use the Client ID. +
+ options.privateKey + + string + + Required. Content of the *.pem file you downloaded from the app’s about page. You can generate a new private key if needed. Make sure to preserve the line breaks. If your private key contains escaped newlines (`\\n`), they will be automatically replaced with actual newlines. +
+ options.now + + number + + An optional override for the current time in seconds since the UNIX epoch. Defaults to Math.floor(Date.now() / 1000)). This value can be overridden to account for a time skew between the local machine and the authentication server. +
+ +`githubAppJwt(options)` resolves with an object with the following keys + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ token + + string + + The JSON Web Token (JWT) to authenticate as the app. +
+ appId + + number + + The GitHub App database ID or Client ID passed in options.id. +
+ expiration + + number + + Timestamp as UNIX epoch, e.g. 1530922170. A Date object can be created using new Date(authentication.expiration). +
+ + + + + +## About Private Key formats + +When downloading a `private-key.pem` file from GitHub, the format is in `PKCS#1` format. Unfortunately, the WebCrypto API only supports `PKCS#8`. + +If you use 1Password to store a private key as an SSH key, it will be transformed to the `OpenSSH` format, which is also not supported by WebCrypto. + +You can identify the format based on the the first line + +| First Line | Format | +| ------------------------------------- | ------- | +| `-----BEGIN RSA PRIVATE KEY-----` | PKCS#1 | +| `-----BEGIN PRIVATE KEY-----` | PKCS#8 | +| `-----BEGIN OPENSSH PRIVATE KEY-----` | OpenSSH | + +### Converting `PKCS#1` to `PKCS#8` + +- #### Using an Online Private Key Converter + +Convert quickly using the Web interface at https://private-key-converter.vercel.app + +- #### Using Node.js + +If you use Node.js, you can convert the format before passing it to `universal-github-app-jwt`: + +```js +import crypto from "node:crypto"; +import githubAppJwt from "universal-github-app-jwt"; + +const privateKeyPkcs8 = crypto + .createPrivateKey(process.env.PRIVATE_KEY) + .export({ + type: "pkcs8", + format: "pem", + }); + +const { token, appId, expiration } = await githubAppJwt({ + id: process.env.APP_ID, + privateKey: privateKeyPkcs8, +}); +``` + +- #### Using OpenSSL + +Convert the format using `openssl` before passing it to your app. + +``` +openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in private-key.pem -out private-key-pkcs8.key +``` + +### Converting `OpenSSH` to `PKCS#8` + +``` +cp private-key.pem private-key-pkcs8.key && ssh-keygen -m PKCS8 -N "" -f private-key-pkcs8.key +``` + +I'm looking for help to create a minimal `OpenSSH` to `PKCS` convert library that I can recommend people to use before passing the private key to `githubAppJwt`. Please create an issue if you'd like to help. + +## License + +[MIT](LICENSE) diff --git a/.github/octokit/node_modules/universal-github-app-jwt/index.d.ts b/.github/octokit/node_modules/universal-github-app-jwt/index.d.ts new file mode 100644 index 000000000..6f67a056c --- /dev/null +++ b/.github/octokit/node_modules/universal-github-app-jwt/index.d.ts @@ -0,0 +1,13 @@ +export type Options = { + id: IdType; + privateKey: string; + now?: number; +}; + +export type Result = { + appId: IdType extends string ? string : number; + expiration: number; + token: string; +}; + +export default function githubAppJwt(options: Options): Promise>; diff --git a/.github/octokit/node_modules/universal-github-app-jwt/index.js b/.github/octokit/node_modules/universal-github-app-jwt/index.js new file mode 100644 index 000000000..c0dcc0777 --- /dev/null +++ b/.github/octokit/node_modules/universal-github-app-jwt/index.js @@ -0,0 +1,42 @@ +// @ts-check + +// @ts-ignore - #get-token is defined in "imports" in package.json +import { getToken } from "./lib/get-token.js"; + +/** + * @param {import(".").Options} options + * @returns {Promise} + */ +export default async function githubAppJwt({ + id, + privateKey, + now = Math.floor(Date.now() / 1000), +}) { + // Private keys are often times configured as environment variables, in which case line breaks are escaped using `\\n`. + // Replace these here for convenience. + const privateKeyWithNewlines = privateKey.replace(/\\n/g, '\n'); + + // When creating a JSON Web Token, it sets the "issued at time" (iat) to 30s + // in the past as we have seen people running situations where the GitHub API + // claimed the iat would be in future. It turned out the clocks on the + // different machine were not in sync. + const nowWithSafetyMargin = now - 30; + const expiration = nowWithSafetyMargin + 60 * 10; // JWT expiration time (10 minute maximum) + + const payload = { + iat: nowWithSafetyMargin, // Issued at time + exp: expiration, + iss: id, + }; + + const token = await getToken({ + privateKey: privateKeyWithNewlines, + payload, + }); + + return { + appId: id, + expiration, + token, + }; +} diff --git a/.github/octokit/node_modules/universal-github-app-jwt/index.test-d.ts b/.github/octokit/node_modules/universal-github-app-jwt/index.test-d.ts new file mode 100644 index 000000000..f500ad51b --- /dev/null +++ b/.github/octokit/node_modules/universal-github-app-jwt/index.test-d.ts @@ -0,0 +1,25 @@ +import { expectType } from "tsd"; +import githubAppJwt from "."; + +export async function test() { + const result = await githubAppJwt({ + id: 123, + privateKey: "", + }); + + expectType(result.appId); + expectType(result.expiration); + expectType(result.token); +} + +// Test case to verify `id` can be set to a string +export async function testWithStringId() { + const resultWithStringId = await githubAppJwt({ + id: "client_id_string", + privateKey: "", + }); + + expectType(resultWithStringId.appId); + expectType(resultWithStringId.expiration); + expectType(resultWithStringId.token); +} diff --git a/.github/octokit/node_modules/universal-github-app-jwt/internals.d.ts b/.github/octokit/node_modules/universal-github-app-jwt/internals.d.ts new file mode 100644 index 000000000..a7c930177 --- /dev/null +++ b/.github/octokit/node_modules/universal-github-app-jwt/internals.d.ts @@ -0,0 +1,16 @@ +export type Payload = { + iat: number; + exp: number; + iss: number | string; +}; + +export type Header = { alg: "RS256"; typ: "JWT" }; + +export type GetTokenOptions = { + privateKey: string; + payload: Payload; +}; + +export interface GetToken { + (options: GetTokenOptions): Promise; +} diff --git a/.github/octokit/node_modules/universal-github-app-jwt/jsconfig.json b/.github/octokit/node_modules/universal-github-app-jwt/jsconfig.json new file mode 100644 index 000000000..9647394af --- /dev/null +++ b/.github/octokit/node_modules/universal-github-app-jwt/jsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + "strictNullChecks": true + } +} diff --git a/.github/octokit/node_modules/universal-github-app-jwt/lib/crypto-native.js b/.github/octokit/node_modules/universal-github-app-jwt/lib/crypto-native.js new file mode 100644 index 000000000..002788905 --- /dev/null +++ b/.github/octokit/node_modules/universal-github-app-jwt/lib/crypto-native.js @@ -0,0 +1,8 @@ +const { subtle } = globalThis.crypto; + +// no-op, unfortunately there is no way to transform from PKCS8 or OpenSSH to PKCS1 with WebCrypto +function convertPrivateKey(privateKey) { + return privateKey; +} + +export { subtle, convertPrivateKey }; diff --git a/.github/octokit/node_modules/universal-github-app-jwt/lib/crypto-node.js b/.github/octokit/node_modules/universal-github-app-jwt/lib/crypto-node.js new file mode 100644 index 000000000..1e11f2e2b --- /dev/null +++ b/.github/octokit/node_modules/universal-github-app-jwt/lib/crypto-node.js @@ -0,0 +1,15 @@ +// this can be removed once we only support Node 20+ +export * from "node:crypto"; +import { createPrivateKey } from "node:crypto"; + +import { isPkcs1 } from "./utils.js"; + +// no-op, unfortunately there is no way to transform from PKCS8 or OpenSSH to PKCS1 with WebCrypto +export function convertPrivateKey(privateKey) { + if (!isPkcs1(privateKey)) return privateKey; + + return createPrivateKey(privateKey).export({ + type: "pkcs8", + format: "pem", + }); +} diff --git a/.github/octokit/node_modules/universal-github-app-jwt/lib/get-token.js b/.github/octokit/node_modules/universal-github-app-jwt/lib/get-token.js new file mode 100644 index 000000000..a0d04e4ec --- /dev/null +++ b/.github/octokit/node_modules/universal-github-app-jwt/lib/get-token.js @@ -0,0 +1,66 @@ +// we don't @ts-check here because it chokes crypto which is a global API in modern JS runtime environments + +import { + isPkcs1, + isOpenSsh, + getEncodedMessage, + getDERfromPEM, + string2ArrayBuffer, + base64encode, +} from "./utils.js"; + +import { subtle, convertPrivateKey } from "#crypto"; + +/** + * @param {import('../internals').GetTokenOptions} options + * @returns {Promise} + */ +export async function getToken({ privateKey, payload }) { + const convertedPrivateKey = convertPrivateKey(privateKey); + + // WebCrypto only supports PKCS#8, unfortunately + /* c8 ignore start */ + if (isPkcs1(convertedPrivateKey)) { + throw new Error( + "[universal-github-app-jwt] Private Key is in PKCS#1 format, but only PKCS#8 is supported. See https://github.com/gr2m/universal-github-app-jwt#private-key-formats" + ); + } + /* c8 ignore stop */ + + // WebCrypto does not support OpenSSH, unfortunately + if (isOpenSsh(convertedPrivateKey)) { + throw new Error( + "[universal-github-app-jwt] Private Key is in OpenSSH format, but only PKCS#8 is supported. See https://github.com/gr2m/universal-github-app-jwt#private-key-formats" + ); + } + + const algorithm = { + name: "RSASSA-PKCS1-v1_5", + hash: { name: "SHA-256" }, + }; + + /** @type {import('../internals').Header} */ + const header = { alg: "RS256", typ: "JWT" }; + + const privateKeyDER = getDERfromPEM(convertedPrivateKey); + const importedKey = await subtle.importKey( + "pkcs8", + privateKeyDER, + algorithm, + false, + ["sign"] + ); + + const encodedMessage = getEncodedMessage(header, payload); + const encodedMessageArrBuf = string2ArrayBuffer(encodedMessage); + + const signatureArrBuf = await subtle.sign( + algorithm.name, + importedKey, + encodedMessageArrBuf + ); + + const encodedSignature = base64encode(signatureArrBuf); + + return `${encodedMessage}.${encodedSignature}`; +} diff --git a/.github/octokit/node_modules/universal-github-app-jwt/lib/utils.js b/.github/octokit/node_modules/universal-github-app-jwt/lib/utils.js new file mode 100644 index 000000000..d2749be6a --- /dev/null +++ b/.github/octokit/node_modules/universal-github-app-jwt/lib/utils.js @@ -0,0 +1,85 @@ +// we don't @ts-check here because it chokes on atob and btoa which are available in all modern JS runtime environments + +/** + * @param {string} privateKey + * @returns {boolean} + */ +export function isPkcs1(privateKey) { + return privateKey.includes("-----BEGIN RSA PRIVATE KEY-----"); +} + +/** + * @param {string} privateKey + * @returns {boolean} + */ +export function isOpenSsh(privateKey) { + return privateKey.includes("-----BEGIN OPENSSH PRIVATE KEY-----"); +} + +/** + * @param {string} str + * @returns {ArrayBuffer} + */ +export function string2ArrayBuffer(str) { + const buf = new ArrayBuffer(str.length); + const bufView = new Uint8Array(buf); + for (let i = 0, strLen = str.length; i < strLen; i++) { + bufView[i] = str.charCodeAt(i); + } + return buf; +} + +/** + * @param {string} pem + * @returns {ArrayBuffer} + */ +export function getDERfromPEM(pem) { + const pemB64 = pem + .trim() + .split("\n") + .slice(1, -1) // Remove the --- BEGIN / END PRIVATE KEY --- + .join(""); + + const decoded = atob(pemB64); + return string2ArrayBuffer(decoded); +} + +/** + * @param {import('../internals').Header} header + * @param {import('../internals').Payload} payload + * @returns {string} + */ +export function getEncodedMessage(header, payload) { + return `${base64encodeJSON(header)}.${base64encodeJSON(payload)}`; +} + +/** + * @param {ArrayBuffer} buffer + * @returns {string} + */ +export function base64encode(buffer) { + var binary = ""; + var bytes = new Uint8Array(buffer); + var len = bytes.byteLength; + for (var i = 0; i < len; i++) { + binary += String.fromCharCode(bytes[i]); + } + + return fromBase64(btoa(binary)); +} + +/** + * @param {string} base64 + * @returns {string} + */ +function fromBase64(base64) { + return base64.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); +} + +/** + * @param {Record} obj + * @returns {string} + */ +function base64encodeJSON(obj) { + return fromBase64(btoa(JSON.stringify(obj))); +} diff --git a/.github/octokit/node_modules/universal-github-app-jwt/package.json b/.github/octokit/node_modules/universal-github-app-jwt/package.json new file mode 100644 index 000000000..5dc0e1022 --- /dev/null +++ b/.github/octokit/node_modules/universal-github-app-jwt/package.json @@ -0,0 +1,62 @@ +{ + "name": "universal-github-app-jwt", + "type": "module", + "version": "2.2.0", + "exports": "./index.js", + "imports": { + "#crypto": { + "node": "./lib/crypto-node.js", + "default": "./lib/crypto-native.js" + } + }, + "description": "Calculate GitHub App bearer tokens for Node & modern browsers", + "repository": "github:gr2m/universal-github-app-jwt", + "keywords": [ + "github", + "authentication", + "app", + "jwt", + "webcrypto" + ], + "author": "Gregor Martynus (https://github.com/gr2m)", + "scripts": { + "test": "npm run test:code && npm run test:tsc && npm run test:tsd && npm run lint", + "test:code": "c8 --100 ava test/node.test.js", + "test:deno": "deno test test/deno.test.js", + "test:tsc": "tsc --allowJs --noEmit --esModuleInterop --skipLibCheck --lib es2020 index.js", + "test:tsd": "tsd", + "lint": "prettier --check '{src,test}/**/*' README.md package.json", + "lint:fix": "prettier --write '{src,test}/**/*' README.md package.json", + "coverage": "c8 report --reporter html", + "postcoverage": "open-cli coverage/index.html", + "build": "npm run build:default && npm run build:node", + "build:default": "esbuild index.js --bundle --outfile=dist/default.js --platform=browser --target=es2020 --format=esm", + "build:node": "esbuild index.js --bundle --outfile=dist/node.js --platform=node --target=es2020 --format=esm" + }, + "license": "MIT", + "devDependencies": { + "ava": "^6.0.0", + "c8": "^9.0.0", + "esbuild": "^0.20.0", + "mockdate": "^3.0.5", + "open-cli": "^8.0.0", + "prettier": "^3.0.0", + "tsd": "^0.31.0", + "typescript": "^5.0.0" + }, + "release": { + "branches": [ + "+([0-9]).x", + "main", + { + "name": "beta", + "prerelease": true + } + ] + }, + "renovate": { + "extends": [ + "github>gr2m/.github" + ] + } +} diff --git a/.github/octokit/node_modules/universal-github-app-jwt/test/deno.test.js b/.github/octokit/node_modules/universal-github-app-jwt/test/deno.test.js new file mode 100644 index 000000000..698106dba --- /dev/null +++ b/.github/octokit/node_modules/universal-github-app-jwt/test/deno.test.js @@ -0,0 +1,49 @@ +import githubAppJwt from "../dist/default.js"; + +const APP_ID = 1; +const PRIVATE_KEY = `-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDVzv73Pk9p3s56 +N5yxDRu7dqjM3e2KE+aWOee51v0bccQJ2ceVa7b9rWAH0lblMFD4BWm6b06THsp+ +qR8Eov2ZweBIvTJYx2Mx806o22tCoqU3iQSnpEP77uwZvNt9n1qvCuUP8dIMBYZ0 +YYlNI4Ezqkd6HIuZILcMmhH8JO7S9MZNZdCs7rhny3JdA+1U9v9hetxSFsGnyLvZ +v1eTLR8Po+QR5s7LQinnxdUCfZQ82U05I9LJ75CO2K6zQx3g2J7j5fyTBUjZCOTd +1KbSzD/vbQomR1UOatrJ6WO0oHHoC01CxJeDNBt4yaKoUWTCsbX7PHoTsfuOohD0 +Hpu9YpcbAgMBAAECggEAPyQEE8vo8+ECpQErWvX+DJx8ORQJBE/gNtke37jnwmUU +ebxAvpWy0rOSunyZgNGF99jRYmdgkv3y2vji2iGwNuoUbCbDaYhoeOXbgu5ZfLI/ +jGkAYOmX0hy6yNcHEtAunabgApdtanNvQ4tSWt9zVmig9yTa7PvGUwhk60uU4+Mv +PYO56NV7bglzDAfOtBYo58DXVH/17nQNWx6GdIf/DjpDvrfLgjQTcEihQyyiUQrO +HbJ0ADLOSBpsZAFS5qZmi01+8mgNd4KLUsPzI0JbJOViklkkMNeigFTkQCwK+E3W +xJGhpdauUxIMHuv8T5pDIq5rgo42q+agm4LbW9Ip4QKBgQDvJbrAGRWg2GBeeTxd +Jm/db5DTG11WmJ0l40YFadzOVmu6aa3jHDfGzrNX6sZQPLn3IOQrAEqMwxrjYyeL +tP0XHz4QpS6FUrc9VDJqOjJCoXBPUY5Ek3Nz95hDpVg4JILw7JmawEzan7QPgUXb +9pvBI8ybLQ2DIUsJQVVzc4QKmQKBgQDk4CYjfC3mz5yWDXypLsEpHYO44VavM1Vw +dheGPHy85JZXTfc7LfK91QECG70DUtSqnDIxr66ciDGa+ZQxAR3IdAxyAGxWzXR1 +H+DbEaMwtzCPqSf7GvclUhmdtFPnRi4+F/6ezVJx2E/q6mj0jT+xGwi433oZvrkk +nH3iBDiT0wKBgE7lXqADZoxC9kAUtSJyDNO7+8Z5r6hi/u1B9pbQnwT/o9jDBpf3 +djtDdA1cKgLMlfl+w2egV/fqYhOEYcaIdjrLltk89YUMjeFQxrUe7/fldLzmRg4/ +qwYmN/iRMvKKsRw0olRYfsJdj7TRzC9OQ4JLgjPrgBqzwCKUiFFnWbd5AoGBAJRb +Wz1rNBHGB5kYWvMLdHfjQsvnfRoJ61r/oVYJBU4n2e/zgMtiiFNWq9WjB00NNv70 +SnD8kPG0MntjRhTRxW13E84dyhwmB1QYetdlwmNEi3zDyD+zhfoyEpqwFib2zejA +AvMK4mMbNQpwMeI7YMq7XFcBvRLNFxPNQKft1oKzAoGBAM5g9nYkaaGJuoqOMsWb +SrOlxDpE+88rX/uDQ0ieaM8x5s/Qrp5I/HT3/j0npZMP74RqM3sWGS1RJjG6R1Zo +KhwBAlMM1g/Qrzwbiu0LYhjLkkWf1JbPmiHH//S77N39H9BFTMs7Dg3vb8e75Qbo +w23mINkUK1qlFoq3o69IHDLz +-----END PRIVATE KEY-----`; +// see https://runkit.com/gr2m/reproducable-jwt +const BEARER = + "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOi0zMCwiZXhwIjo1NzAsImlzcyI6MX0.q3foRa78U3WegM5PrWLEh5N0bH1SD62OqW66ZYzArp95JBNiCbo8KAlGtiRENCIfBZT9ibDUWy82cI4g3F09mdTq3bD1xLavIfmTksIQCz5EymTWR5v6gL14LSmQdWY9lSqkgUG0XCFljWUglEP39H4yeHbFgdjvAYg3ifDS12z9oQz2ACdSpvxPiTuCC804HkPVw8Qoy0OSXvCkFU70l7VXCVUxnuhHnk8-oCGcKUspmeP6UdDnXk-Aus-eGwDfJbU2WritxxaXw6B4a3flTPojkYLSkPBr6Pi0H2-mBsW_Nvs0aLPVLKobQd4gqTkosX3967DoAG8luUMhrnxe8Q"; + +// url_test.ts +import { assertEquals } from "https://deno.land/std@0.168.0/testing/asserts.ts"; + +Deno.test("url test", async () => { + const result = await githubAppJwt({ + id: APP_ID, + privateKey: PRIVATE_KEY, + now: 0, + }); + + assertEquals(result.appId, 1); + assertEquals(result.expiration, 570); + assertEquals(result.token, BEARER); +}); diff --git a/.github/octokit/node_modules/universal-github-app-jwt/test/node.test.js b/.github/octokit/node_modules/universal-github-app-jwt/test/node.test.js new file mode 100644 index 000000000..f47a01fb5 --- /dev/null +++ b/.github/octokit/node_modules/universal-github-app-jwt/test/node.test.js @@ -0,0 +1,192 @@ +import test from "ava"; +import MockDate from "mockdate"; + +import githubAppJwt from "../index.js"; + +const APP_ID = 1; + +// private key in pkcs1 format, as it's provided by GitHub +const PRIVATE_KEY_PKCS1 = `-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEA1c7+9z5Pad7OejecsQ0bu3aozN3tihPmljnnudb9G3HECdnH +lWu2/a1gB9JW5TBQ+AVpum9Okx7KfqkfBKL9mcHgSL0yWMdjMfNOqNtrQqKlN4kE +p6RD++7sGbzbfZ9arwrlD/HSDAWGdGGJTSOBM6pHehyLmSC3DJoR/CTu0vTGTWXQ +rO64Z8tyXQPtVPb/YXrcUhbBp8i72b9Xky0fD6PkEebOy0Ip58XVAn2UPNlNOSPS +ye+Qjtius0Md4Nie4+X8kwVI2Qjk3dSm0sw/720KJkdVDmrayeljtKBx6AtNQsSX +gzQbeMmiqFFkwrG1+zx6E7H7jqIQ9B6bvWKXGwIDAQABAoIBAD8kBBPL6PPhAqUB +K1r1/gycfDkUCQRP4DbZHt+458JlFHm8QL6VstKzkrp8mYDRhffY0WJnYJL98tr4 +4tohsDbqFGwmw2mIaHjl24LuWXyyP4xpAGDpl9IcusjXBxLQLp2m4AKXbWpzb0OL +Ulrfc1ZooPck2uz7xlMIZOtLlOPjLz2DuejVe24JcwwHzrQWKOfA11R/9e50DVse +hnSH/w46Q763y4I0E3BIoUMsolEKzh2ydAAyzkgabGQBUuamZotNfvJoDXeCi1LD +8yNCWyTlYpJZJDDXooBU5EAsCvhN1sSRoaXWrlMSDB7r/E+aQyKua4KONqvmoJuC +21vSKeECgYEA7yW6wBkVoNhgXnk8XSZv3W+Q0xtdVpidJeNGBWnczlZrummt4xw3 +xs6zV+rGUDy59yDkKwBKjMMa42Mni7T9Fx8+EKUuhVK3PVQyajoyQqFwT1GORJNz +c/eYQ6VYOCSC8OyZmsBM2p+0D4FF2/abwSPMmy0NgyFLCUFVc3OECpkCgYEA5OAm +I3wt5s+clg18qS7BKR2DuOFWrzNVcHYXhjx8vOSWV033Oy3yvdUBAhu9A1LUqpwy +Ma+unIgxmvmUMQEdyHQMcgBsVs10dR/g2xGjMLcwj6kn+xr3JVIZnbRT50YuPhf+ +ns1ScdhP6upo9I0/sRsIuN96Gb65JJx94gQ4k9MCgYBO5V6gA2aMQvZAFLUicgzT +u/vGea+oYv7tQfaW0J8E/6PYwwaX93Y7Q3QNXCoCzJX5fsNnoFf36mIThGHGiHY6 +y5bZPPWFDI3hUMa1Hu/35XS85kYOP6sGJjf4kTLyirEcNKJUWH7CXY+00cwvTkOC +S4Iz64Aas8AilIhRZ1m3eQKBgQCUW1s9azQRxgeZGFrzC3R340LL530aCeta/6FW +CQVOJ9nv84DLYohTVqvVowdNDTb+9Epw/JDxtDJ7Y0YU0cVtdxPOHcocJgdUGHrX +ZcJjRIt8w8g/s4X6MhKasBYm9s3owALzCuJjGzUKcDHiO2DKu1xXAb0SzRcTzUCn +7daCswKBgQDOYPZ2JGmhibqKjjLFm0qzpcQ6RPvPK1/7g0NInmjPMebP0K6eSPx0 +9/49J6WTD++EajN7FhktUSYxukdWaCocAQJTDNYP0K88G4rtC2IYy5JFn9SWz5oh +x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w== +-----END RSA PRIVATE KEY-----`; + +// pkcs8 version of the key above, which is pkcs1 +// see https://stackoverflow.com/questions/51033786/how-can-i-import-an-rsa-private-key-in-pem-format-for-use-with-webcrypto/51035703#51035703 +const PRIVATE_KEY_PKCS8 = `-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDVzv73Pk9p3s56 +N5yxDRu7dqjM3e2KE+aWOee51v0bccQJ2ceVa7b9rWAH0lblMFD4BWm6b06THsp+ +qR8Eov2ZweBIvTJYx2Mx806o22tCoqU3iQSnpEP77uwZvNt9n1qvCuUP8dIMBYZ0 +YYlNI4Ezqkd6HIuZILcMmhH8JO7S9MZNZdCs7rhny3JdA+1U9v9hetxSFsGnyLvZ +v1eTLR8Po+QR5s7LQinnxdUCfZQ82U05I9LJ75CO2K6zQx3g2J7j5fyTBUjZCOTd +1KbSzD/vbQomR1UOatrJ6WO0oHHoC01CxJeDNBt4yaKoUWTCsbX7PHoTsfuOohD0 +Hpu9YpcbAgMBAAECggEAPyQEE8vo8+ECpQErWvX+DJx8ORQJBE/gNtke37jnwmUU +ebxAvpWy0rOSunyZgNGF99jRYmdgkv3y2vji2iGwNuoUbCbDaYhoeOXbgu5ZfLI/ +jGkAYOmX0hy6yNcHEtAunabgApdtanNvQ4tSWt9zVmig9yTa7PvGUwhk60uU4+Mv +PYO56NV7bglzDAfOtBYo58DXVH/17nQNWx6GdIf/DjpDvrfLgjQTcEihQyyiUQrO +HbJ0ADLOSBpsZAFS5qZmi01+8mgNd4KLUsPzI0JbJOViklkkMNeigFTkQCwK+E3W +xJGhpdauUxIMHuv8T5pDIq5rgo42q+agm4LbW9Ip4QKBgQDvJbrAGRWg2GBeeTxd +Jm/db5DTG11WmJ0l40YFadzOVmu6aa3jHDfGzrNX6sZQPLn3IOQrAEqMwxrjYyeL +tP0XHz4QpS6FUrc9VDJqOjJCoXBPUY5Ek3Nz95hDpVg4JILw7JmawEzan7QPgUXb +9pvBI8ybLQ2DIUsJQVVzc4QKmQKBgQDk4CYjfC3mz5yWDXypLsEpHYO44VavM1Vw +dheGPHy85JZXTfc7LfK91QECG70DUtSqnDIxr66ciDGa+ZQxAR3IdAxyAGxWzXR1 +H+DbEaMwtzCPqSf7GvclUhmdtFPnRi4+F/6ezVJx2E/q6mj0jT+xGwi433oZvrkk +nH3iBDiT0wKBgE7lXqADZoxC9kAUtSJyDNO7+8Z5r6hi/u1B9pbQnwT/o9jDBpf3 +djtDdA1cKgLMlfl+w2egV/fqYhOEYcaIdjrLltk89YUMjeFQxrUe7/fldLzmRg4/ +qwYmN/iRMvKKsRw0olRYfsJdj7TRzC9OQ4JLgjPrgBqzwCKUiFFnWbd5AoGBAJRb +Wz1rNBHGB5kYWvMLdHfjQsvnfRoJ61r/oVYJBU4n2e/zgMtiiFNWq9WjB00NNv70 +SnD8kPG0MntjRhTRxW13E84dyhwmB1QYetdlwmNEi3zDyD+zhfoyEpqwFib2zejA +AvMK4mMbNQpwMeI7YMq7XFcBvRLNFxPNQKft1oKzAoGBAM5g9nYkaaGJuoqOMsWb +SrOlxDpE+88rX/uDQ0ieaM8x5s/Qrp5I/HT3/j0npZMP74RqM3sWGS1RJjG6R1Zo +KhwBAlMM1g/Qrzwbiu0LYhjLkkWf1JbPmiHH//S77N39H9BFTMs7Dg3vb8e75Qbo +w23mINkUK1qlFoq3o69IHDLz +-----END PRIVATE KEY-----`; + +// openssh version of the key above +// see https://github.com/gr2m/universal-github-app-jwt/issues/72 +const PRIVATEY_KEY_OPENSSH = `-----BEGIN OPENSSH PRIVATE KEY----- +b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABFwAAAAdzc2gtcn +NhAAAAAwEAAQAAAQEA1c7+9z5Pad7OejecsQ0bu3aozN3tihPmljnnudb9G3HECdnHlWu2 +/a1gB9JW5TBQ+AVpum9Okx7KfqkfBKL9mcHgSL0yWMdjMfNOqNtrQqKlN4kEp6RD++7sGb +zbfZ9arwrlD/HSDAWGdGGJTSOBM6pHehyLmSC3DJoR/CTu0vTGTWXQrO64Z8tyXQPtVPb/ +YXrcUhbBp8i72b9Xky0fD6PkEebOy0Ip58XVAn2UPNlNOSPSye+Qjtius0Md4Nie4+X8kw +VI2Qjk3dSm0sw/720KJkdVDmrayeljtKBx6AtNQsSXgzQbeMmiqFFkwrG1+zx6E7H7jqIQ +9B6bvWKXGwAAA7hJqTyJSak8iQAAAAdzc2gtcnNhAAABAQDVzv73Pk9p3s56N5yxDRu7dq +jM3e2KE+aWOee51v0bccQJ2ceVa7b9rWAH0lblMFD4BWm6b06THsp+qR8Eov2ZweBIvTJY +x2Mx806o22tCoqU3iQSnpEP77uwZvNt9n1qvCuUP8dIMBYZ0YYlNI4Ezqkd6HIuZILcMmh +H8JO7S9MZNZdCs7rhny3JdA+1U9v9hetxSFsGnyLvZv1eTLR8Po+QR5s7LQinnxdUCfZQ8 +2U05I9LJ75CO2K6zQx3g2J7j5fyTBUjZCOTd1KbSzD/vbQomR1UOatrJ6WO0oHHoC01CxJ +eDNBt4yaKoUWTCsbX7PHoTsfuOohD0Hpu9YpcbAAAAAwEAAQAAAQA/JAQTy+jz4QKlASta +9f4MnHw5FAkET+A22R7fuOfCZRR5vEC+lbLSs5K6fJmA0YX32NFiZ2CS/fLa+OLaIbA26h +RsJsNpiGh45duC7ll8sj+MaQBg6ZfSHLrI1wcS0C6dpuACl21qc29Di1Ja33NWaKD3JNrs ++8ZTCGTrS5Tj4y89g7no1XtuCXMMB860FijnwNdUf/XudA1bHoZ0h/8OOkO+t8uCNBNwSK +FDLKJRCs4dsnQAMs5IGmxkAVLmpmaLTX7yaA13gotSw/MjQlsk5WKSWSQw16KAVORALAr4 +TdbEkaGl1q5TEgwe6/xPmkMirmuCjjar5qCbgttb0inhAAAAgQDOYPZ2JGmhibqKjjLFm0 +qzpcQ6RPvPK1/7g0NInmjPMebP0K6eSPx09/49J6WTD++EajN7FhktUSYxukdWaCocAQJT +DNYP0K88G4rtC2IYy5JFn9SWz5ohx//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapR +aKt6OvSBwy8wAAAIEA7yW6wBkVoNhgXnk8XSZv3W+Q0xtdVpidJeNGBWnczlZrummt4xw3 +xs6zV+rGUDy59yDkKwBKjMMa42Mni7T9Fx8+EKUuhVK3PVQyajoyQqFwT1GORJNzc/eYQ6 +VYOCSC8OyZmsBM2p+0D4FF2/abwSPMmy0NgyFLCUFVc3OECpkAAACBAOTgJiN8LebPnJYN +fKkuwSkdg7jhVq8zVXB2F4Y8fLzklldN9zst8r3VAQIbvQNS1KqcMjGvrpyIMZr5lDEBHc +h0DHIAbFbNdHUf4NsRozC3MI+pJ/sa9yVSGZ20U+dGLj4X/p7NUnHYT+rqaPSNP7EbCLjf +ehm+uSScfeIEOJPTAAAAAAEC +-----END OPENSSH PRIVATE KEY-----`; + +// see https://runkit.com/gr2m/reproducable-jwt +const BEARER = + "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOi0zMCwiZXhwIjo1NzAsImlzcyI6MX0.q3foRa78U3WegM5PrWLEh5N0bH1SD62OqW66ZYzArp95JBNiCbo8KAlGtiRENCIfBZT9ibDUWy82cI4g3F09mdTq3bD1xLavIfmTksIQCz5EymTWR5v6gL14LSmQdWY9lSqkgUG0XCFljWUglEP39H4yeHbFgdjvAYg3ifDS12z9oQz2ACdSpvxPiTuCC804HkPVw8Qoy0OSXvCkFU70l7VXCVUxnuhHnk8-oCGcKUspmeP6UdDnXk-Aus-eGwDfJbU2WritxxaXw6B4a3flTPojkYLSkPBr6Pi0H2-mBsW_Nvs0aLPVLKobQd4gqTkosX3967DoAG8luUMhrnxe8Q"; + +test("README example for app auth with private key in PKCS#8 format", async (t) => { + MockDate.set(0); + + const result = await githubAppJwt({ + id: APP_ID, + privateKey: PRIVATE_KEY_PKCS8, + }); + + t.deepEqual(result, { + appId: APP_ID, + expiration: 570, + token: BEARER, + }); +}); + +test("README example for app auth with private key in PKCS#1 format", async (t) => { + MockDate.set(0); + + const result = await githubAppJwt({ + id: APP_ID, + privateKey: PRIVATE_KEY_PKCS1, + }); + + t.deepEqual(result, { + appId: APP_ID, + expiration: 570, + token: BEARER, + }); +}); + +test("Throws error if key is OpenSSH", async (t) => { + MockDate.set(0); + + try { + await githubAppJwt({ + id: APP_ID, + privateKey: PRIVATEY_KEY_OPENSSH, + }); + t.fail("should throw"); + } catch (error) { + t.is( + error.message, + "[universal-github-app-jwt] Private Key is in OpenSSH format, but only PKCS#8 is supported. See https://github.com/gr2m/universal-github-app-jwt#private-key-formats", + ); + } +}); + +test("Include the time difference in the expiration and issued_at field", async (t) => { + MockDate.set(0); + + const result = await githubAppJwt({ + id: APP_ID, + privateKey: PRIVATE_KEY_PKCS8, + now: 10, + }); + + t.is(result.appId, APP_ID); + t.is(result.expiration, 580); + + const resultPayload = JSON.parse(atob(result.token.split(".")[1])); + t.is(resultPayload.exp, 580); + t.is(resultPayload.iat, -20); +}); + +test("Replace escaped line breaks with actual linebreaks", async (t) => { + MockDate.set(0); + + const result = await githubAppJwt({ + id: APP_ID, + privateKey: PRIVATE_KEY_PKCS8.replace(/\n/g, "\\n"), + }); + + t.deepEqual(result, { + appId: APP_ID, + expiration: 570, + token: BEARER, + }); +}); + +// New test for id set to Client ID +test("id set to Client ID", async (t) => { + MockDate.set(0); + + const result = await githubAppJwt({ + id: "client_id_string", + privateKey: PRIVATE_KEY_PKCS8, + }); + + t.is(typeof result.token, "string"); + t.is(result.appId, "client_id_string"); +}); diff --git a/.github/octokit/node_modules/universal-user-agent/.github/workflows/release.yml b/.github/octokit/node_modules/universal-user-agent/.github/workflows/release.yml new file mode 100644 index 000000000..1f75564eb --- /dev/null +++ b/.github/octokit/node_modules/universal-user-agent/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: Release +"on": + push: + branches: + - master + - next + - beta + - "*.x" +jobs: + release: + name: release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: lts/* + - run: npm ci + - run: npx semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/octokit/node_modules/universal-user-agent/.github/workflows/test.yml b/.github/octokit/node_modules/universal-user-agent/.github/workflows/test.yml new file mode 100644 index 000000000..439cb0ef3 --- /dev/null +++ b/.github/octokit/node_modules/universal-user-agent/.github/workflows/test.yml @@ -0,0 +1,38 @@ +name: Test +on: + push: + branches: + - master + pull_request: + types: + - opened + - synchronize + +jobs: + test_matrix: + runs-on: ubuntu-latest + strategy: + matrix: + node_version: + - 12 + - 14 + - 16 + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node_version }} + uses: uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node_version }} + cache: npm + - run: npm ci + - run: npm run test:code + + test: + runs-on: ubuntu-latest + needs: test_matrix + steps: + - uses: actions/checkout@v2 + - run: npm ci + - run: npm run lint + - run: npm run test:types diff --git a/.github/octokit/node_modules/universal-user-agent/.github/workflows/update-prettier.yml b/.github/octokit/node_modules/universal-user-agent/.github/workflows/update-prettier.yml new file mode 100644 index 000000000..d740d657e --- /dev/null +++ b/.github/octokit/node_modules/universal-user-agent/.github/workflows/update-prettier.yml @@ -0,0 +1,25 @@ +name: Update Prettier +"on": + push: + branches: + - renovate/prettier-* +jobs: + update_prettier: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + version: 12 + cache: npm + node-version: 16 + - run: npm ci + - run: npm run lint:fix + - uses: gr2m/create-or-update-pull-request-action@v1.x + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + title: Prettier updated + body: An update to prettier required updates to your code. + branch: ${{ github.ref }} + commit-message: "style: prettier" diff --git a/.github/octokit/node_modules/universal-user-agent/CODE_OF_CONDUCT.md b/.github/octokit/node_modules/universal-user-agent/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..dad5ddc09 --- /dev/null +++ b/.github/octokit/node_modules/universal-user-agent/CODE_OF_CONDUCT.md @@ -0,0 +1,74 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +- The use of sexualized language or imagery and unwelcome sexual attention or + advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic + address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at opensource+coc@martynus.net. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [https://contributor-covenant.org/version/1/4][version] + +[homepage]: https://contributor-covenant.org +[version]: https://contributor-covenant.org/version/1/4/ diff --git a/.github/octokit/node_modules/universal-user-agent/LICENSE.md b/.github/octokit/node_modules/universal-user-agent/LICENSE.md new file mode 100644 index 000000000..e1d0d6551 --- /dev/null +++ b/.github/octokit/node_modules/universal-user-agent/LICENSE.md @@ -0,0 +1,7 @@ +# [ISC License](https://spdx.org/licenses/ISC) + +Copyright (c) 2018-2021, Gregor Martynus (https://github.com/gr2m) + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/.github/octokit/node_modules/universal-user-agent/README.md b/.github/octokit/node_modules/universal-user-agent/README.md new file mode 100644 index 000000000..f0f48cb14 --- /dev/null +++ b/.github/octokit/node_modules/universal-user-agent/README.md @@ -0,0 +1,19 @@ +# universal-user-agent + +> Get a user agent string across all JavaScript Runtime Environments + +[![@latest](https://img.shields.io/npm/v/universal-user-agent.svg)](https://www.npmjs.com/package/universal-user-agent) +[![Build Status](https://github.com/gr2m/universal-user-agent/workflows/Test/badge.svg)](https://github.com/gr2m/universal-user-agent/actions/workflows/test.yml?query=workflow%3ATest) + +```js +import { getUserAgent } from "universal-user-agent"; + +const userAgent = getUserAgent(); +// userAgent will look like this +// in browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0" +// in node: Node.js/v8.9.4 (macOS High Sierra; x64) +``` + +## License + +[ISC](LICENSE.md) diff --git a/.github/octokit/node_modules/universal-user-agent/index.d.ts b/.github/octokit/node_modules/universal-user-agent/index.d.ts new file mode 100644 index 000000000..6e60db812 --- /dev/null +++ b/.github/octokit/node_modules/universal-user-agent/index.d.ts @@ -0,0 +1,4 @@ +/** + * Returns a User Agent String based on the current environment (Browser, Node, Deno, etc). + */ +export function getUserAgent(): string; diff --git a/.github/octokit/node_modules/universal-user-agent/index.js b/.github/octokit/node_modules/universal-user-agent/index.js new file mode 100644 index 000000000..83bb81feb --- /dev/null +++ b/.github/octokit/node_modules/universal-user-agent/index.js @@ -0,0 +1,13 @@ +export function getUserAgent() { + if (typeof navigator === "object" && "userAgent" in navigator) { + return navigator.userAgent; + } + + if (typeof process === "object" && process.version !== undefined) { + return `Node.js/${process.version.substr(1)} (${process.platform}; ${ + process.arch + })`; + } + + return ""; +} diff --git a/.github/octokit/node_modules/universal-user-agent/index.test-d.ts b/.github/octokit/node_modules/universal-user-agent/index.test-d.ts new file mode 100644 index 000000000..00bbfc6de --- /dev/null +++ b/.github/octokit/node_modules/universal-user-agent/index.test-d.ts @@ -0,0 +1,5 @@ +import { expectType } from "tsd"; + +import { getUserAgent } from "./index.js"; + +expectType(getUserAgent()); diff --git a/.github/octokit/node_modules/universal-user-agent/package.json b/.github/octokit/node_modules/universal-user-agent/package.json new file mode 100644 index 000000000..0386f7528 --- /dev/null +++ b/.github/octokit/node_modules/universal-user-agent/package.json @@ -0,0 +1,23 @@ +{ + "name": "universal-user-agent", + "version": "7.0.2", + "type": "module", + "description": "Get a user agent string across all JavaScript Runtime Environments", + "exports": "./index.js", + "types": "index.d.ts", + "repository": "github:gr2m/universal-user-agent", + "keywords": [], + "author": "Gregor Martynus (https://github.com/gr2m)", + "license": "ISC", + "scripts": { + "lint": "prettier --check '*.{js,json,md}'", + "lint:fix": "prettier --write '*.{js,json,md}'", + "test": "npm run test:code && npm run test:types", + "test:code": "node test.js", + "test:types": "tsd" + }, + "devDependencies": { + "prettier": "^2.0.0", + "tsd": "^0.17.0" + } +} diff --git a/.github/octokit/node_modules/universal-user-agent/test.js b/.github/octokit/node_modules/universal-user-agent/test.js new file mode 100644 index 000000000..c24cdc77f --- /dev/null +++ b/.github/octokit/node_modules/universal-user-agent/test.js @@ -0,0 +1,8 @@ +import assert from "node:assert"; + +import { getUserAgent } from "./index.js"; + +assert(getUserAgent instanceof Function, "getUserAgent is a function"); +assert.equal(typeof getUserAgent(), "string", "getUserAgent returns a string"); + +console.log("ok"); diff --git a/.github/octokit/package-lock.json b/.github/octokit/package-lock.json new file mode 100644 index 000000000..e85c2eef2 --- /dev/null +++ b/.github/octokit/package-lock.json @@ -0,0 +1,262 @@ +{ + "name": "xero-octokit", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "xero-octokit", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@octokit/auth-app": "^7.1.1", + "@octokit/rest": "^21.0.2" + } + }, + "node_modules/@octokit/auth-app": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-7.1.1.tgz", + "integrity": "sha512-kRAd6yelV9OgvlEJE88H0VLlQdZcag9UlLr7dV0YYP37X8PPDvhgiTy66QVhDXdyoT0AleFN2w/qXkPdrSzINg==", + "dependencies": { + "@octokit/auth-oauth-app": "^8.1.0", + "@octokit/auth-oauth-user": "^5.1.0", + "@octokit/request": "^9.1.1", + "@octokit/request-error": "^6.1.1", + "@octokit/types": "^13.4.1", + "lru-cache": "^10.0.0", + "universal-github-app-jwt": "^2.2.0", + "universal-user-agent": "^7.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/auth-oauth-app": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-8.1.1.tgz", + "integrity": "sha512-5UtmxXAvU2wfcHIPPDWzVSAWXVJzG3NWsxb7zCFplCWEmMCArSZV0UQu5jw5goLQXbFyOr5onzEH37UJB3zQQg==", + "dependencies": { + "@octokit/auth-oauth-device": "^7.0.0", + "@octokit/auth-oauth-user": "^5.0.1", + "@octokit/request": "^9.0.0", + "@octokit/types": "^13.0.0", + "universal-user-agent": "^7.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/auth-oauth-device": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-device/-/auth-oauth-device-7.1.1.tgz", + "integrity": "sha512-HWl8lYueHonuyjrKKIup/1tiy0xcmQCdq5ikvMO1YwkNNkxb6DXfrPjrMYItNLyCP/o2H87WuijuE+SlBTT8eg==", + "dependencies": { + "@octokit/oauth-methods": "^5.0.0", + "@octokit/request": "^9.0.0", + "@octokit/types": "^13.0.0", + "universal-user-agent": "^7.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/auth-oauth-user": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-user/-/auth-oauth-user-5.1.1.tgz", + "integrity": "sha512-rRkMz0ErOppdvEfnemHJXgZ9vTPhBuC6yASeFaB7I2yLMd7QpjfrL1mnvRPlyKo+M6eeLxrKanXJ9Qte29SRsw==", + "dependencies": { + "@octokit/auth-oauth-device": "^7.0.1", + "@octokit/oauth-methods": "^5.0.0", + "@octokit/request": "^9.0.1", + "@octokit/types": "^13.0.0", + "universal-user-agent": "^7.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/auth-token": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.1.tgz", + "integrity": "sha512-rh3G3wDO8J9wSjfI436JUKzHIxq8NaiL0tVeB2aXmG6p/9859aUOAjA9pmSPNGGZxfwmaJ9ozOJImuNVJdpvbA==", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/core": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.2.tgz", + "integrity": "sha512-hEb7Ma4cGJGEUNOAVmyfdB/3WirWMg5hDuNFVejGEDFqupeOysLc2sG6HJxY2etBp5YQu5Wtxwi020jS9xlUwg==", + "dependencies": { + "@octokit/auth-token": "^5.0.0", + "@octokit/graphql": "^8.0.0", + "@octokit/request": "^9.0.0", + "@octokit/request-error": "^6.0.1", + "@octokit/types": "^13.0.0", + "before-after-hook": "^3.0.2", + "universal-user-agent": "^7.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/endpoint": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.1.tgz", + "integrity": "sha512-JYjh5rMOwXMJyUpj028cu0Gbp7qe/ihxfJMLc8VZBMMqSwLgOxDI1911gV4Enl1QSavAQNJcwmwBF9M0VvLh6Q==", + "dependencies": { + "@octokit/types": "^13.0.0", + "universal-user-agent": "^7.0.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/graphql": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.1.1.tgz", + "integrity": "sha512-ukiRmuHTi6ebQx/HFRCXKbDlOh/7xEV6QUXaE7MJEKGNAncGI/STSbOkl12qVXZrfZdpXctx5O9X1AIaebiDBg==", + "dependencies": { + "@octokit/request": "^9.0.0", + "@octokit/types": "^13.0.0", + "universal-user-agent": "^7.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/oauth-authorization-url": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@octokit/oauth-authorization-url/-/oauth-authorization-url-7.1.1.tgz", + "integrity": "sha512-ooXV8GBSabSWyhLUowlMIVd9l1s2nsOGQdlP2SQ4LnkEsGXzeCvbSbCPdZThXhEFzleGPwbapT0Sb+YhXRyjCA==", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/oauth-methods": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@octokit/oauth-methods/-/oauth-methods-5.1.2.tgz", + "integrity": "sha512-C5lglRD+sBlbrhCUTxgJAFjWgJlmTx5bQ7Ch0+2uqRjYv7Cfb5xpX4WuSC9UgQna3sqRGBL9EImX9PvTpMaQ7g==", + "dependencies": { + "@octokit/oauth-authorization-url": "^7.0.0", + "@octokit/request": "^9.1.0", + "@octokit/request-error": "^6.1.0", + "@octokit/types": "^13.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/openapi-types": { + "version": "22.2.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-22.2.0.tgz", + "integrity": "sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg==" + }, + "node_modules/@octokit/plugin-paginate-rest": { + "version": "11.3.5", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.5.tgz", + "integrity": "sha512-cgwIRtKrpwhLoBi0CUNuY83DPGRMaWVjqVI/bGKsLJ4PzyWZNaEmhHroI2xlrVXkk6nFv0IsZpOp+ZWSWUS2AQ==", + "dependencies": { + "@octokit/types": "^13.6.0" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "@octokit/core": ">=6" + } + }, + "node_modules/@octokit/plugin-request-log": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-5.3.1.tgz", + "integrity": "sha512-n/lNeCtq+9ofhC15xzmJCNKP2BWTv8Ih2TTy+jatNCCq/gQP/V7rK3fjIfuz0pDWDALO/o/4QY4hyOF6TQQFUw==", + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "@octokit/core": ">=6" + } + }, + "node_modules/@octokit/plugin-rest-endpoint-methods": { + "version": "13.2.6", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.2.6.tgz", + "integrity": "sha512-wMsdyHMjSfKjGINkdGKki06VEkgdEldIGstIEyGX0wbYHGByOwN/KiM+hAAlUwAtPkP3gvXtVQA9L3ITdV2tVw==", + "dependencies": { + "@octokit/types": "^13.6.1" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "@octokit/core": ">=6" + } + }, + "node_modules/@octokit/request": { + "version": "9.1.3", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.1.3.tgz", + "integrity": "sha512-V+TFhu5fdF3K58rs1pGUJIDH5RZLbZm5BI+MNF+6o/ssFNT4vWlCh/tVpF3NxGtP15HUxTTMUbsG5llAuU2CZA==", + "dependencies": { + "@octokit/endpoint": "^10.0.0", + "@octokit/request-error": "^6.0.1", + "@octokit/types": "^13.1.0", + "universal-user-agent": "^7.0.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/request-error": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.5.tgz", + "integrity": "sha512-IlBTfGX8Yn/oFPMwSfvugfncK2EwRLjzbrpifNaMY8o/HTEAFqCA1FZxjD9cWvSKBHgrIhc4CSBIzMxiLsbzFQ==", + "dependencies": { + "@octokit/types": "^13.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/rest": { + "version": "21.0.2", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-21.0.2.tgz", + "integrity": "sha512-+CiLisCoyWmYicH25y1cDfCrv41kRSvTq6pPWtRroRJzhsCZWZyCqGyI8foJT5LmScADSwRAnr/xo+eewL04wQ==", + "dependencies": { + "@octokit/core": "^6.1.2", + "@octokit/plugin-paginate-rest": "^11.0.0", + "@octokit/plugin-request-log": "^5.3.1", + "@octokit/plugin-rest-endpoint-methods": "^13.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/types": { + "version": "13.6.1", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.6.1.tgz", + "integrity": "sha512-PHZE9Z+kWXb23Ndik8MKPirBPziOc0D2/3KH1P+6jK5nGWe96kadZuE4jev2/Jq7FvIfTlT2Ltg8Fv2x1v0a5g==", + "dependencies": { + "@octokit/openapi-types": "^22.2.0" + } + }, + "node_modules/before-after-hook": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-3.0.2.tgz", + "integrity": "sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A==" + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + }, + "node_modules/universal-github-app-jwt": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/universal-github-app-jwt/-/universal-github-app-jwt-2.2.0.tgz", + "integrity": "sha512-G5o6f95b5BggDGuUfKDApKaCgNYy2x7OdHY0zSMF081O0EJobw+1130VONhrA7ezGSV2FNOGyM+KQpQZAr9bIQ==" + }, + "node_modules/universal-user-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz", + "integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==" + } + } +} diff --git a/.github/octokit/package.json b/.github/octokit/package.json new file mode 100644 index 000000000..66fb13cae --- /dev/null +++ b/.github/octokit/package.json @@ -0,0 +1,16 @@ +{ + "name": "xero-octokit", + "version": "1.0.0", + "description": "", + "main": "index.js", + "type": "module", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "@octokit/auth-app": "^7.1.1", + "@octokit/rest": "^21.0.2" + } + } \ No newline at end of file diff --git a/.github/workflows/update-yaml-version.yml b/.github/workflows/update-yaml-version.yml new file mode 100644 index 000000000..eb4b0ac1c --- /dev/null +++ b/.github/workflows/update-yaml-version.yml @@ -0,0 +1,188 @@ +name: Update YAML version and raise PR + +on: + release: + types: [published] + + pull_request: + paths: + - '**' + +jobs: + Update-yaml-version: + if: contains(github.head_ref, 'PETOSS-588-auto-PR-logic') + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + ref: 'PETOSS-588-auto-PR-logic' + + - name: whats inside github workspace + run: | + ls -la + working-directory: ${{ github.workspace }} + + - name: whats inside .github folder + run: | + ls -la + working-directory: ${{ github.workspace }}/.github + + - name: Install octokit dependencies + run: npm i + working-directory: ${{ github.workspace }}/.github/octokit + + - name: Get github app access token + id: get_access_token + env: + GITHUB_APP_ID: ${{ secrets.XERO_PUBLIC_BOT_APP_ID }} + GITHUB_APP_PRIVATE_KEY: ${{ secrets.XERO_PUBLIC_BOT_KEY }} + uses: actions/github-script@v7 + with: + result-encoding: string + script: | + const { getAccessToken } = await import('${{ github.workspace }}/.github/octokit/index.js') + const token = await getAccessToken() + return token + + - name: Fetch Latest release number + id: get_latest_release_number + run: | + latest_version=$(gh release view --json tagName --jq '.tagName') + echo "Latest release version is - $latest_version" + echo "releaseVersion=$latest_version" >> $GITHUB_OUTPUT + env: + GH_TOKEN: ${{steps.get_access_token.outputs.result}} + + + - name: Set up branch name + id: identify_branch_name + run: | + branch_name='OAS-version-update-${{steps.get_latest_release_number.outputs.releaseVersion}}' + echo "branchName=$branch_name" >> $GITHUB_OUTPUT + + - name: Checkout branch + run: | + if git ls-remote --heads origin ${{steps.identify_branch_name.outputs.branchName}} | grep -q "refs/heads/${{steps.identify_branch_name.outputs.branchName}}"; then + echo "checking out existing branch" + git fetch origin > /dev/null 2>&1 + git checkout ${{steps.identify_branch_name.outputs.branchName}} + else + echo "branch does not exists, creating new branch" + echo "branchName *****>> ${{steps.identify_branch_name.outputs.branchName}}" + git checkout -b ${{steps.identify_branch_name.outputs.branchName}} + fi + + - name: Update version of the yaml files + run: | + for file in xero_accounting.yaml xero_assets.yaml xero_bankfeeds.yaml xero_files.yaml xero-app-store.yaml xero-finance.yaml xero-identity.yaml xero-payroll-au.yaml xero-payroll-nz.yaml xero-payroll-uk.yaml xero-projects.yaml; do + yq eval --no-colors --prettyPrint ".info.version = \"10.1.0\"" -i "$file" + echo "updated version in $file" + done + + - name: Staging & commiting + id: detect-changes + run: | + CHANGES_DETECTED=$(git diff) + if [ -z "$CHANGES_DETECTED" ]; then + echo "no new changes, nothing to commit" + echo "changes_detected=false" >> $GITHUB_OUTPUT + else + echo "changes_detected=true" >> $GITHUB_OUTPUT + echo "running the git commands......" + + git branch + + echo "git status 1" + git status + + echo 'staging the changes' + git add --all + + echo 'git status' + git diff + + echo "git config setup" + git config --global user.name "Github Actions" + git config --global user.email "actions@github.com" + + echo 'commiting changes....' + git commit -m "chore: version update for all the yaml files" + fi + + - name: Pushing the Branch + run: | + if [ "${{steps.detect-changes.outputs.changes_detected}}" == "true" ]; then + echo "pushing the code to ${{steps.identify_branch_name.outputs.branchName}}" + git branch + git push origin ${{steps.identify_branch_name.outputs.branchName}} + else + echo "branch is already up to date" + fi + + - name: Create PR + run: | + if [ "${{steps.detect-changes.outputs.changes_detected}}" == "true" ]; then + echo "Creating PR in ${{steps.identify_branch_name.outputs.branchName}}" + gh pr create \ + --title "OAS version update - ${{steps.get_latest_release_number.outputs.releaseVersion}}" \ + --base test-auto-merge \ + --head ${{steps.identify_branch_name.outputs.branchName}} \ + --body "chore: version update for all the yaml files" + else + echo "PR is already up to date" + fi + env: + GH_TOKEN: ${{steps.get_access_token.outputs.result}} + + - name: Find PR number to merge + id: identify_PR_number + run: | + BRANCH_NAME=${{steps.identify_branch_name.outputs.branchName}} + PR_NUMBER=$(gh pr list --head "$BRANCH_NAME" --json number --jq '. [0].number') + echo "PR number: $PR_NUMBER" + echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_OUTPUT + env: + GH_TOKEN: ${{steps.get_access_token.outputs.result}} + + + # - name: Wait for PR status checks to pass + # run: | + # gh pr checks ${{steps.identify_PR_number.outputs.PR_NUMBER}} --watch + # env: + # GH_TOKEN: ${{steps.get_access_token.outputs.result}} + + + - name: Auto Merge PR & deletes branch + run: | + + if [ -z "${{steps.identify_PR_number.outputs.PR_NUMBER}}" ]; then + echo "No PR found for branch: ${{steps.identify_branch_name.outputs.branchName}}" + exit 1 + fi + + echo "Merging the PR: ${{steps.identify_PR_number.outputs.PR_NUMBER}}....." + + gh pr merge ${{steps.identify_PR_number.outputs.PR_NUMBER}} --merge --admin --delete-branch --repo ${{github.repository}} + + env: + GH_TOKEN: ${{steps.get_access_token.outputs.result}} + + - name: Verify PR is merged + run: | + + prNumber=${{steps.identify_PR_number.outputs.PR_NUMBER}} + + if gh pr view $prNumber --json merged --jq '.merged' | grep true; then + echo "PR: $prNumber has been merged & branch: ${{steps.identify_branch_name.outputs.branchName}} has been deleted" + else + echo "PR is not merged" + exit 1 + fi + env: + GH_TOKEN: ${{steps.get_access_token.outputs.result}} + diff --git a/xero-app-store.yaml b/xero-app-store.yaml index 8f5a7ecab..d78dd3332 100644 --- a/xero-app-store.yaml +++ b/xero-app-store.yaml @@ -1,233 +1,214 @@ openapi: 3.0.0 info: - version: "6.3.0" + version: 10.1.0 title: Xero AppStore API description: These endpoints are for Xero Partners to interact with the App Store Billing platform - termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" + termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/ contact: - name: "Xero Platform Team" - email: "api@xero.com" - url: "https://developer.xero.com" + name: Xero Platform Team + email: api@xero.com + url: https://developer.xero.com license: name: MIT - url: "https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE" + url: https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE servers: - description: Xero App Store API - url: "https://api.xero.com/appstore/2.0" + url: https://api.xero.com/appstore/2.0 paths: - "/subscriptions/{subscriptionId}": + /subscriptions/{subscriptionId}: get: tags: - AppStore operationId: getSubscription summary: Retrieves a subscription for a given subscriptionId parameters: - - $ref: "#/components/parameters/subscriptionId" + - $ref: '#/components/parameters/subscriptionId' responses: "200": description: Success - return response of unique Subscription object content: application/json: schema: - $ref: "#/components/schemas/Subscription" - example: { - "currentPeriodEnd": "2021-07-20T03:13:48", - "endDate": "2021-07-20T03:13:48", - "id": "01b5a6f4-8936-4bfa-b703-830702312b87", - "testMode": true, - "organisationId": "fdc5be44-9b3e-4ebb-a0e9-11b9737f9a28", - "plans": [ - { - "id": "f617dd59-462f-46a1-9519-1765fd38b160", - "name": "Small", - "status": "ACTIVE", - "subscriptionItems": [ - { - "endDate": "2021-07-20T03:13:48", - "id": "c7336bf6-8a47-4f13-9fc0-82420e6922c8", - "testMode": true, - "price": { - "amount": 50, - "currency": "AUD", - "id": "31acefbe-bdb7-4329-84d6-51e9afd95327" - }, - "product": { - "id": "56d66073-ff78-497b-a726-ca9d56fdafa3", - "name": "Small", - "type": "FIXED" - }, - "quantity": 1, - "startDate": "2021-07-20T03:13:48" - }, - { - "endDate": "2021-07-20T03:13:48", - "id": "1a25bc96-141a-4e42-a0fa-55ed51844da4", - "testMode": true, - "price": { - "amount": 0.20, - "currency": "AUD", - "id": "15c65048-1b48-4d9f-81c0-4e1cd3a4f49c" - }, - "product": { - "id": "e8d8ac02-01b3-47f7-8a22-99cfe9035cf7", - "name": "Texts", - "type": "METERED", - "usageUnit": "txt" - }, - } - ] - } - ], - "startDate": "2021-07-20T03:13:48", - "status": "ACTIVE" - } + $ref: '#/components/schemas/Subscription' + example: + currentPeriodEnd: 2021-07-20T03:13:48 + endDate: 2021-07-20T03:13:48 + id: 01b5a6f4-8936-4bfa-b703-830702312b87 + testMode: true + organisationId: fdc5be44-9b3e-4ebb-a0e9-11b9737f9a28 + plans: + - id: f617dd59-462f-46a1-9519-1765fd38b160 + name: Small + status: ACTIVE + subscriptionItems: + - endDate: 2021-07-20T03:13:48 + id: c7336bf6-8a47-4f13-9fc0-82420e6922c8 + testMode: true + price: + amount: 50 + currency: AUD + id: 31acefbe-bdb7-4329-84d6-51e9afd95327 + product: + id: 56d66073-ff78-497b-a726-ca9d56fdafa3 + name: Small + type: FIXED + quantity: 1 + startDate: 2021-07-20T03:13:48 + - endDate: 2021-07-20T03:13:48 + id: 1a25bc96-141a-4e42-a0fa-55ed51844da4 + testMode: true + price: + amount: 0.20 + currency: AUD + id: 15c65048-1b48-4d9f-81c0-4e1cd3a4f49c + product: + id: e8d8ac02-01b3-47f7-8a22-99cfe9035cf7 + name: Texts + type: METERED + usageUnit: txt + startDate: 2021-07-20T03:13:48 + status: ACTIVE "404": content: application/json: schema: - $ref: "#/components/schemas/ProblemDetails" - description: "When a failure occurs in the endpoint" + $ref: '#/components/schemas/ProblemDetails' + description: When a failure occurs in the endpoint security: - - OAuth2: [marketplace.billing] - "/subscriptions/{subscriptionId}/items/{subscriptionItemId}/usage-records": + - OAuth2: + - marketplace.billing + /subscriptions/{subscriptionId}/items/{subscriptionItemId}/usage-records: post: tags: - AppStore operationId: postUsageRecords - summary: "Send metered usage belonging to this subscription and subscription item" + summary: Send metered usage belonging to this subscription and subscription item parameters: - $ref: '#/components/parameters/idempotencyKey' - - $ref: "#/components/parameters/subscriptionId" - - $ref: "#/components/parameters/subscriptionItemId" + - $ref: '#/components/parameters/subscriptionId' + - $ref: '#/components/parameters/subscriptionItemId' responses: "200": description: Success - return response of the record submitted content: application/json: schema: - $ref: "#/components/schemas/UsageRecord" - example: { - "usageRecordId": "2a90f7d9-4c10-4a23-9c34-b47225167a48", - "subscriptionId": "391be708-878a-4741-acfb-c0bc9a165bdb", - "subscriptionItemId": "b22b150f-a0db-447d-9117-d922110add64", - "productId": "d2b133d9-95d8-4446-807a-ae7ebc7353f6", - "pricePerUnit": 0.10, - "quantity": 22, - "testMode": true, - "recordedAt": "2022-09-13T02:11:22" - } + $ref: '#/components/schemas/UsageRecord' + example: + usageRecordId: 2a90f7d9-4c10-4a23-9c34-b47225167a48 + subscriptionId: 391be708-878a-4741-acfb-c0bc9a165bdb + subscriptionItemId: b22b150f-a0db-447d-9117-d922110add64 + productId: d2b133d9-95d8-4446-807a-ae7ebc7353f6 + pricePerUnit: 0.10 + quantity: 22 + testMode: true + recordedAt: 2022-09-13T02:11:22 "404": content: application/json: schema: - $ref: "#/components/schemas/ProblemDetails" - description: "When a failure occurs in the endpoint" + $ref: '#/components/schemas/ProblemDetails' + description: When a failure occurs in the endpoint security: - - OAuth2: [marketplace.billing] + - OAuth2: + - marketplace.billing requestBody: content: application/json: schema: - $ref: "#/components/schemas/CreateUsageRecord" - example: { - "timestamp": "2022-01-21T13:01:00", - "quantity": 10 - } + $ref: '#/components/schemas/CreateUsageRecord' + example: + timestamp: 2022-01-21T13:01:00 + quantity: 10 description: Contains the quantity for the usage record to create required: true - "/subscriptions/{subscriptionId}/items/{subscriptionItemId}/usage-records/{usageRecordId}": + /subscriptions/{subscriptionId}/items/{subscriptionItemId}/usage-records/{usageRecordId}: put: tags: - AppStore operationId: putUsageRecords - summary: "Update and existing metered usage belonging to this subscription and subscription item" + summary: Update and existing metered usage belonging to this subscription and subscription item parameters: - $ref: '#/components/parameters/idempotencyKey' - - $ref: "#/components/parameters/subscriptionId" - - $ref: "#/components/parameters/subscriptionItemId" - - $ref: "#/components/parameters/usageRecordId" + - $ref: '#/components/parameters/subscriptionId' + - $ref: '#/components/parameters/subscriptionItemId' + - $ref: '#/components/parameters/usageRecordId' responses: "200": description: Success - return response of the modified record content: application/json: schema: - $ref: "#/components/schemas/UsageRecord" - example: { - "usageRecordId": "2a90f7d9-4c10-4a23-9c34-b47225167a48", - "subscriptionId": "391be708-878a-4741-acfb-c0bc9a165bdb", - "subscriptionItemId": "b22b150f-a0db-447d-9117-d922110add64", - "productId": "d2b133d9-95d8-4446-807a-ae7ebc7353f6", - "pricePerUnit": 0.10, - "quantity": 22, - "testMode": true, - "recordedAt": "2022-09-13T02:11:22" - } + $ref: '#/components/schemas/UsageRecord' + example: + usageRecordId: 2a90f7d9-4c10-4a23-9c34-b47225167a48 + subscriptionId: 391be708-878a-4741-acfb-c0bc9a165bdb + subscriptionItemId: b22b150f-a0db-447d-9117-d922110add64 + productId: d2b133d9-95d8-4446-807a-ae7ebc7353f6 + pricePerUnit: 0.10 + quantity: 22 + testMode: true + recordedAt: 2022-09-13T02:11:22 "404": content: application/json: schema: - $ref: "#/components/schemas/ProblemDetails" - description: "When a failure occurs in the endpoint" + $ref: '#/components/schemas/ProblemDetails' + description: When a failure occurs in the endpoint security: - - OAuth2: [marketplace.billing] + - OAuth2: + - marketplace.billing requestBody: content: application/json: schema: - $ref: "#/components/schemas/UpdateUsageRecord" - example: { - "quantity": 10 - } + $ref: '#/components/schemas/UpdateUsageRecord' + example: + quantity: 10 description: Contains the quantity for the usage record to update required: true - "/subscriptions/{subscriptionId}/usage-records": + /subscriptions/{subscriptionId}/usage-records: get: tags: - AppStore operationId: getUsageRecords - summary: "Gets all usage records related to the subscription" + summary: Gets all usage records related to the subscription parameters: - - $ref: "#/components/parameters/subscriptionId" + - $ref: '#/components/parameters/subscriptionId' responses: "200": description: Success - return a list of all usage record submitted against this subscription for this subscription period content: application/json: schema: - $ref: "#/components/schemas/UsageRecordsList" - example: { - "usageRecords": [ - { - "usageRecordId": "206100d3-e18b-4c59-9372-e98e4367a73f", - "subscriptionId": "7c7684cf-bbfa-4fa8-8f44-eba8d1acdc5d", - "subscriptionItemId": "264f6fa2-65e6-48f4-8a92-57cde5499742", - "productId": "b040838b-f85e-4e7c-8dba-5a8501e5d312", - "pricePerUnit": 2.0, - "quantity": 12, - "testMode": false, - "recordedAt": "2022-01-01T00:00:00" - }, - { - "usageRecordId": "47d61dc9-3c99-4587-8d55-0985f47df4a6", - "subscriptionId": "7c7684cf-bbfa-4fa8-8f44-eba8d1acdc5d", - "subscriptionItemId": "264f6fa2-65e6-48f4-8a92-57cde5499742", - "productId": "ec8033e8-5e3c-4795-bfb4-bfb85fa4557e", - "pricePerUnit": 5.0, - "quantity": 2, - "testMode": false, - "recordedAt": "2022-01-01T00:00:00" - } - ] - } + $ref: '#/components/schemas/UsageRecordsList' + example: + usageRecords: + - usageRecordId: 206100d3-e18b-4c59-9372-e98e4367a73f + subscriptionId: 7c7684cf-bbfa-4fa8-8f44-eba8d1acdc5d + subscriptionItemId: 264f6fa2-65e6-48f4-8a92-57cde5499742 + productId: b040838b-f85e-4e7c-8dba-5a8501e5d312 + pricePerUnit: 2.0 + quantity: 12 + testMode: false + recordedAt: 2022-01-01T00:00:00 + - usageRecordId: 47d61dc9-3c99-4587-8d55-0985f47df4a6 + subscriptionId: 7c7684cf-bbfa-4fa8-8f44-eba8d1acdc5d + subscriptionItemId: 264f6fa2-65e6-48f4-8a92-57cde5499742 + productId: ec8033e8-5e3c-4795-bfb4-bfb85fa4557e + pricePerUnit: 5.0 + quantity: 2 + testMode: false + recordedAt: 2022-01-01T00:00:00 "404": content: application/json: schema: - $ref: "#/components/schemas/ProblemDetails" - description: "When a failure occurs in the endpoint" + $ref: '#/components/schemas/ProblemDetails' + description: When a failure occurs in the endpoint security: - - OAuth2: [marketplace.billing] + - OAuth2: + - marketplace.billing components: securitySchemes: OAuth2: @@ -235,7 +216,7 @@ components: description: For more information flows: clientCredentials: - tokenUrl: "https://identity.xero.com/connect/token" + tokenUrl: https://identity.xero.com/connect/token scopes: marketplace.billing: Grant read-only access to fixed assets parameters: @@ -245,7 +226,7 @@ components: name: subscriptionId x-snake: subscription_id description: Unique identifier for Subscription object - example: "00000000-0000-0000-0000-000000000000" + example: 00000000-0000-0000-0000-000000000000 x-example-java: UUID.fromString("00000000-0000-0000-0000-000000000000") x-example-php: '"00000000-0000-0000-0000-000000000000"' x-example-csharp: Guid.Parse("00000000-0000-0000-0000-000000000000"); @@ -258,7 +239,7 @@ components: name: subscriptionItemId x-snake: subscription_item_id description: The unique identifier of the subscriptionItem - example: "00000000-0000-0000-0000-000000000000" + example: 00000000-0000-0000-0000-000000000000 x-example-java: UUID.fromString("00000000-0000-0000-0000-000000000000") x-example-php: '"00000000-0000-0000-0000-000000000000"' x-example-csharp: Guid.Parse("00000000-0000-0000-0000-000000000000"); @@ -271,7 +252,7 @@ components: name: usageRecordId x-snake: usage_record_id description: The unique identifier of the usage record - example: "00000000-0000-0000-0000-000000000000" + example: 00000000-0000-0000-0000-000000000000 x-example-java: UUID.fromString("00000000-0000-0000-0000-000000000000") x-example-php: '"00000000-0000-0000-0000-000000000000"' x-example-csharp: Guid.Parse("00000000-0000-0000-0000-000000000000"); @@ -283,7 +264,7 @@ components: name: Idempotency-Key x-snake: idempotency_key description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. - example: "KEY_VALUE" + example: KEY_VALUE schema: type: string schemas: @@ -313,7 +294,7 @@ components: description: List of plans for the subscription. type: array items: - $ref: "#/components/schemas/Plan" + $ref: '#/components/schemas/Plan' startDate: description: Date when the subscription was first created. format: date-time @@ -323,9 +304,9 @@ components: description: Status of the subscription. Available statuses are ACTIVE, CANCELED, and PAST_DUE. type: string enum: - - ACTIVE - - CANCELED - - PAST_DUE + - ACTIVE + - CANCELED + - PAST_DUE testMode: description: Boolean used to indicate if the subscription is in test mode type: boolean @@ -354,15 +335,15 @@ components: PENDING_ACTIVATION. type: string enum: - - ACTIVE - - CANCELED - - PENDING_ACTIVATION + - ACTIVE + - CANCELED + - PENDING_ACTIVATION subscriptionItems: description: | List of the subscription items belonging to the plan. It does not include cancelled subscription items. items: - $ref: "#/components/schemas/SubscriptionItem" + $ref: '#/components/schemas/SubscriptionItem' type: array required: - id @@ -417,10 +398,10 @@ components: type: string price: description: The price of the product subscribed to. - $ref: "#/components/schemas/Price" + $ref: '#/components/schemas/Price' product: description: The product subscribed to. - $ref: "#/components/schemas/Product" + $ref: '#/components/schemas/Product' quantity: description: The quantity of the item. For a fixed product, it is 1. For a per-seat product, it is a positive integer. For metered products, it is always null. type: integer @@ -437,9 +418,9 @@ components: PENDING_ACTIVATION. type: string enum: - - ACTIVE - - CANCELED - - PENDING_ACTIVATION + - ACTIVE + - CANCELED + - PENDING_ACTIVATION testMode: description: If the subscription is a test subscription type: boolean @@ -469,9 +450,9 @@ components: * METERED: Customers are charged per use of this product type: string enum: - - FIXED - - PER_SEAT - - METERED + - FIXED + - PER_SEAT + - METERED usageUnit: description: The unit of the usage product. e.g. "user", "minutes", "SMS", etc type: string @@ -534,8 +515,7 @@ components: description: Data transfer object for public create usage end point properties: quantity: - description: The initial quantity for the usage record. Must be a whole number - that is greater than or equal to 0 + description: The initial quantity for the usage record. Must be a whole number that is greater than or equal to 0 format: int32 type: integer timestamp: @@ -551,10 +531,9 @@ components: description: Data transfer object for public update usage end point properties: quantity: - description: The new quantity for the usage record. Must be a whole number that - is greater than or equal to 0 + description: The new quantity for the usage record. Must be a whole number that is greater than or equal to 0 format: int32 type: integer required: - quantity - type: object \ No newline at end of file + type: object diff --git a/xero-finance.yaml b/xero-finance.yaml index c84df4a1a..4e5394112 100644 --- a/xero-finance.yaml +++ b/xero-finance.yaml @@ -1,16 +1,16 @@ openapi: 3.0.0 info: - version: "6.3.0" + version: 10.1.0 title: Xero Finance API description: The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. - termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" + termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/ contact: - name: "Xero Platform Team" - email: "api@xero.com" - url: "https://developer.xero.com" + name: Xero Platform Team + email: api@xero.com + url: https://developer.xero.com license: - name: MIT - url: 'https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE' + name: MIT + url: https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE servers: - description: Xero API servers url: https://api.xero.com/finance.xro/1.0 @@ -20,73 +20,50 @@ paths: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [finance.cashvalidation.read] + - OAuth2: + - finance.cashvalidation.read tags: - Finance summary: Get cash validation operationId: getCashValidation description: Summarizes the total cash position for each account for an org - parameters: + parameters: - name: balanceDate x-snake: balance_date in: query - description: "date, yyyy-MM-dd \r\n\r\nIf no parameter is provided, the current - date will be used.\r\n\r\nThe ‘balance date’ will return transactions based - on the accounting date entered by the user. Transactions before the balanceDate - will be included.\r\nThe user has discretion as to which accounting period - the transaction relates to.\r\n\r\nThe ‘balance date’ will control the - latest maximum date of transactions included in the aggregate numbers. Balance - date does not affect the CurrentStatement object, as this will always return - the most recent statement before asAtSystemDate (if specified)" - schema: + description: "date, yyyy-MM-dd \r\n\r\nIf no parameter is provided, the current date will be used.\r\n\r\nThe ‘balance date’ will return transactions based on the accounting date entered by the user. Transactions before the balanceDate will be included.\r\nThe user has discretion as to which accounting period the transaction relates to.\r\n\r\nThe ‘balance date’ will control the latest maximum date of transactions included in the aggregate numbers. Balance date does not affect the CurrentStatement object, as this will always return the most recent statement before asAtSystemDate (if specified)" + schema: type: string example: "2021-09-15" - name: asAtSystemDate x-snake: as_at_system_date in: query - description: "date, yyyy-MM-dd \r\n\r\nIf no parameter is provided, the current - date will be used.\r\n\r\nThe ‘as at’ date will return transactions based - on the creation date. It reflects the date the transactions were entered - into Xero, not the accounting date.\r\nThe ‘as at’ date can not be overridden - by the user. This can be used to estimate a ‘historical frequency of reconciliation’.\r\n\r\nThe - ‘as at’ date will affect the current statement in the response, as any candidate - statements created after this date will be filtered out. Thus the current - statement returned will be the most recent statement prior to the specified - ‘as at’ date. Be aware that neither the begin date, nor the balance date, - will affect the current statement.\r\n\r\nNote; information is only presented - when system architecture allows, meaning historical cash validation information - will be an estimate. In addition, delete events are not aware of the ‘as - at’ functionality in this endpoint, meaning that transactions deleted at - the time the API is accessed will be considered to always have been deleted." - schema: + description: "date, yyyy-MM-dd \r\n\r\nIf no parameter is provided, the current date will be used.\r\n\r\nThe ‘as at’ date will return transactions based on the creation date. It reflects the date the transactions were entered into Xero, not the accounting date.\r\nThe ‘as at’ date can not be overridden by the user. This can be used to estimate a ‘historical frequency of reconciliation’.\r\n\r\nThe ‘as at’ date will affect the current statement in the response, as any candidate statements created after this date will be filtered out. Thus the current statement returned will be the most recent statement prior to the specified ‘as at’ date. Be aware that neither the begin date, nor the balance date, will affect the current statement.\r\n\r\nNote; information is only presented when system architecture allows, meaning historical cash validation information will be an estimate. In addition, delete events are not aware of the ‘as at’ functionality in this endpoint, meaning that transactions deleted at the time the API is accessed will be considered to always have been deleted." + schema: type: string example: "2021-09-15" - name: beginDate x-snake: begin_date in: query - description: "date, yyyy-MM-dd \r\n\r\nIf no parameter is provided, the aggregate - results will be drawn from the user’s total history.\r\n\r\nThe ‘begin date’ - will return transactions based on the accounting date entered by the user. - Transactions after the beginDate will be included.\r\nThe user has discretion - as to which accounting period the transaction relates to." - schema: + description: "date, yyyy-MM-dd \r\n\r\nIf no parameter is provided, the aggregate results will be drawn from the user’s total history.\r\n\r\nThe ‘begin date’ will return transactions based on the accounting date entered by the user. Transactions after the beginDate will be included.\r\nThe user has discretion as to which accounting period the transaction relates to." + schema: type: string example: "2021-09-15" responses: - '200': + "200": description: Success content: application/json: schema: type: array items: - $ref: "#/components/schemas/CashValidationResponse" - example: + $ref: '#/components/schemas/CashValidationResponse' + example: - accountId: 73151de8-3676-4887-a021-edec960dd537 statementBalance: value: 100 type: DEBIT - statementBalanceDate: '2021-03-01' + statementBalanceDate: "2021-03-01" bankStatement: statementLines: unreconciledAmountPos: 4577 @@ -94,8 +71,8 @@ paths: unreconciledLines: 8 avgDaysUnreconciledPos: 112.265531 avgDaysUnreconciledNeg: 149.298992 - earliestUnreconciledTransaction: '2019-03-01' - latestUnreconciledTransaction: '2021-03-01' + earliestUnreconciledTransaction: "2019-03-01" + latestUnreconciledTransaction: "2021-03-01" deletedAmount: 50 totalAmount: 189 dataSource: @@ -114,19 +91,19 @@ paths: otherPos: 0 otherNeg: 0 other: 100 - earliestReconciledTransaction: '2019-03-01' - latestReconciledTransaction: '2020-03-01' + earliestReconciledTransaction: "2019-03-01" + latestReconciledTransaction: "2020-03-01" reconciledAmountPos: 0 reconciledAmountNeg: -288 reconciledLines: 3 totalAmountPos: 2245 totalAmountNeg: -1995 currentStatement: - startDate: '2021-03-01' - endDate: '2021-03-01' + startDate: "2021-03-01" + endDate: "2021-03-01" startBalance: 0 endBalance: 0 - importedDateTimeUtc: '2021-03-09T05:22:14.3Z' + importedDateTimeUtc: "2021-03-09T05:22:14.3Z" importSourceType: Manual cashAccount: unreconciledAmountPos: 1440 @@ -134,413 +111,407 @@ paths: startingBalance: 0 accountBalance: 0 balanceCurrency: NZD - '400': + "400": description: BadRequest content: application/json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' example: type: invalid-request title: InvalidRequest status: 400 detail: 'Invalid BalanceDate: ''2020-01''' - "/AccountingActivities/AccountUsage": + /AccountingActivities/AccountUsage: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [finance.accountingactivity.read] + - OAuth2: + - finance.accountingactivity.read tags: - - Finance + - Finance summary: Get account usage operationId: getAccountingActivityAccountUsage - description: 'A summary of how each account is being transacted on exposing the level of detail and amounts attributable to manual adjustments.' + description: A summary of how each account is being transacted on exposing the level of detail and amounts attributable to manual adjustments. parameters: - - name: startMonth - x-snake: start_month - in: query - description: "date, yyyy-MM \r\n \r\nIf no parameter is provided, - the month 12 months prior to the end month will be used.\r\n \r\nAccount - usage for up to 12 months from this date will be returned." - schema: - type: string - example: "2020-09" - - name: endMonth - x-snake: end_month - in: query - description: "date, yyyy-MM \r\n \r\nIf no parameter is provided, - the current month will be used.\r\n \r\nAccount usage for up - to 12 months prior to this date will be returned." - schema: - type: string - example: "2021-09" + - name: startMonth + x-snake: start_month + in: query + description: "date, yyyy-MM \r\n \r\nIf no parameter is provided, the month 12 months prior to the end month will be used.\r\n \r\nAccount usage for up to 12 months from this date will be returned." + schema: + type: string + example: 2020-09 + - name: endMonth + x-snake: end_month + in: query + description: "date, yyyy-MM \r\n \r\nIf no parameter is provided, the current month will be used.\r\n \r\nAccount usage for up to 12 months prior to this date will be returned." + schema: + type: string + example: 2021-09 responses: - '200': + "200": description: Success content: application/json: schema: - $ref: "#/components/schemas/AccountUsageResponse" + $ref: '#/components/schemas/AccountUsageResponse' example: organisationId: 73151de8-3676-4887-a021-edec960dd537 startMonth: 2010-03 endMonth: 2010-03 accountUsage: - - month: 2010-03 - accountId: 12345678-876b-4eff-901d-e8f4d517453e - currencyCode: CURR/NZD - totalReceived: 0 - countReceived: 0 - totalPaid: 0 - countPaid: 0 - totalManualJournal: 0 - countManualJournal: 0 - accountName: ACME Drawings - reportingCode: ABC - reportingCodeName: ABC funds - - month: 2010-03 - accountId: 12345678-9d21-43bc-b20e-d96a370cf31e - currencyCode: CURR/NZD - totalReceived: 0 - countReceived: 0 - totalPaid: 0 - countPaid: 0 - totalManualJournal: 0 - countManualJournal: 0 - accountName: Electricity & Heating - reportingCode: ELC - reportingCodeName: Expense - '400': + - month: 2010-03 + accountId: 12345678-876b-4eff-901d-e8f4d517453e + currencyCode: CURR/NZD + totalReceived: 0 + countReceived: 0 + totalPaid: 0 + countPaid: 0 + totalManualJournal: 0 + countManualJournal: 0 + accountName: ACME Drawings + reportingCode: ABC + reportingCodeName: ABC funds + - month: 2010-03 + accountId: 12345678-9d21-43bc-b20e-d96a370cf31e + currencyCode: CURR/NZD + totalReceived: 0 + countReceived: 0 + totalPaid: 0 + countPaid: 0 + totalManualJournal: 0 + countManualJournal: 0 + accountName: Electricity & Heating + reportingCode: ELC + reportingCodeName: Expense + "400": description: BadRequest content: application/json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' example: type: invalid-request title: InvalidRequest status: 400 - detail: Organisation 73151de8-3676-4887-a021-edec960dd537 does not - exist - "/AccountingActivities/LockHistory": + detail: Organisation 73151de8-3676-4887-a021-edec960dd537 does not exist + /AccountingActivities/LockHistory: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [finance.accountingactivity.read] + - OAuth2: + - finance.accountingactivity.read tags: - - Finance + - Finance operationId: getAccountingActivityLockHistory - description: 'Provides a history of locking of accounting books. Locking may be an indicator of good accounting practices that could reduce the risk of changes to accounting records in prior periods.' + description: Provides a history of locking of accounting books. Locking may be an indicator of good accounting practices that could reduce the risk of changes to accounting records in prior periods. summary: Get lock history parameters: - - name: endDate - x-snake: end_date - in: query - description: "date, yyyy-MM-dd \r\n \r\nIf no parameter is provided, - the current date will be used.\r\n \r\nAny changes to hard or soft lock dates that were made within the period up to 12 months before this date will be returned.\r\n \r\nPlease be aware that there may be a delay of up to 3 days before a change is visible from this API." - schema: - type: string - example: "2021-09-15" + - name: endDate + x-snake: end_date + in: query + description: "date, yyyy-MM-dd \r\n \r\nIf no parameter is provided, the current date will be used.\r\n \r\nAny changes to hard or soft lock dates that were made within the period up to 12 months before this date will be returned.\r\n \r\nPlease be aware that there may be a delay of up to 3 days before a change is visible from this API." + schema: + type: string + example: "2021-09-15" responses: - '200': + "200": description: Success content: application/json: schema: - $ref: "#/components/schemas/LockHistoryResponse" + $ref: '#/components/schemas/LockHistoryResponse' example: organisationId: 73151de8-3676-4887-a021-edec960dd537 - endDate: '2019-06-20' + endDate: "2019-06-20" lockDates: - - hardLockDate: '2019-01-20' - softLockDate: '2019-01-20' - updatedDateUtc: '2019-01-20T10:50:03Z' - - hardLockDate: '2019-01-21' - softLockDate: '2019-01-21' - updatedDateUtc: '2019-01-21T10:59:33Z' - - hardLockDate: '2019-01-22' - softLockDate: '2019-01-22' - updatedDateUtc: '2019-01-22T10:24:12Z' - '400': + - hardLockDate: "2019-01-20" + softLockDate: "2019-01-20" + updatedDateUtc: "2019-01-20T10:50:03Z" + - hardLockDate: "2019-01-21" + softLockDate: "2019-01-21" + updatedDateUtc: "2019-01-21T10:59:33Z" + - hardLockDate: "2019-01-22" + softLockDate: "2019-01-22" + updatedDateUtc: "2019-01-22T10:24:12Z" + "400": description: BadRequest content: application/json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' example: type: invalid-request title: InvalidRequest status: 400 - detail: Organisation 73151de8-3676-4887-a021-edec960dd537 does not - exist - "/AccountingActivities/ReportHistory": + detail: Organisation 73151de8-3676-4887-a021-edec960dd537 does not exist + /AccountingActivities/ReportHistory: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [finance.accountingactivity.read] + - OAuth2: + - finance.accountingactivity.read tags: - - Finance + - Finance operationId: getAccountingActivityReportHistory - description: 'For a specified organisation, provides a summary of all the reports published within a given period, which may be an indicator for good business management and oversight.' + description: For a specified organisation, provides a summary of all the reports published within a given period, which may be an indicator for good business management and oversight. summary: Get report history parameters: - - name: endDate - x-snake: end_date - in: query - description: "date, yyyy-MM-dd \r\n \r\nIf no parameter is provided, - the current date will be used.\r\n \r\nAny reports that were published within the period up to 12 months before this date will be returned.\r\n \r\nPlease be aware that there may be a delay of up to 3 days before a published report is visible from this API." - schema: - type: string - example: "2021-09-15" + - name: endDate + x-snake: end_date + in: query + description: "date, yyyy-MM-dd \r\n \r\nIf no parameter is provided, the current date will be used.\r\n \r\nAny reports that were published within the period up to 12 months before this date will be returned.\r\n \r\nPlease be aware that there may be a delay of up to 3 days before a published report is visible from this API." + schema: + type: string + example: "2021-09-15" responses: - '200': + "200": description: Success content: application/json: schema: - $ref: "#/components/schemas/ReportHistoryResponse" + $ref: '#/components/schemas/ReportHistoryResponse' example: organisationId: 73151de8-3676-4887-a021-edec960dd537 - endDate: '2019-10-20' + endDate: "2019-10-20" reports: - - reportName: VATReturn - reportDateText: April 2019 to June 2019 - publishedDateUtc: '2019-09-23T00:30:17.407+00:00' - '400': + - reportName: VATReturn + reportDateText: April 2019 to June 2019 + publishedDateUtc: "2019-09-23T00:30:17.407+00:00" + "400": description: BadRequest content: application/json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' example: type: invalid-request title: InvalidRequest status: 400 - detail: Organisation 73151de8-3676-4887-a021-edec960dd537 does not - exist - "/AccountingActivities/UserActivities": + detail: Organisation 73151de8-3676-4887-a021-edec960dd537 does not exist + /AccountingActivities/UserActivities: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [finance.accountingactivity.read] + - OAuth2: + - finance.accountingactivity.read tags: - - Finance + - Finance operationId: getAccountingActivityUserActivities - description: 'For a specified organisation, provides a list of all the users registered, and a history of their accounting transactions. Also identifies the existence of an external accounting advisor and the level of interaction.' + description: For a specified organisation, provides a list of all the users registered, and a history of their accounting transactions. Also identifies the existence of an external accounting advisor and the level of interaction. summary: Get user activities parameters: - - name: dataMonth - x-snake: data_month - in: query - description: "date, yyyy-MM \r\n \r\nThe specified month must be complete (in the past); The current month cannot be specified since it is not complete.\r\n \r\nIf no parameter is provided, - the month immediately previous to the current month will be used.\r\n \r\nAny user activities occurring within the specified month will be returned.\r\n \r\nPlease be aware that there may be a delay of up to 3 days before a user activity is visible from this API." - schema: - type: string - example: "2021-09" + - name: dataMonth + x-snake: data_month + in: query + description: "date, yyyy-MM \r\n \r\nThe specified month must be complete (in the past); The current month cannot be specified since it is not complete.\r\n \r\nIf no parameter is provided, the month immediately previous to the current month will be used.\r\n \r\nAny user activities occurring within the specified month will be returned.\r\n \r\nPlease be aware that there may be a delay of up to 3 days before a user activity is visible from this API." + schema: + type: string + example: 2021-09 responses: - '200': + "200": description: Success content: application/json: schema: - $ref: "#/components/schemas/UserActivitiesResponse" + $ref: '#/components/schemas/UserActivitiesResponse' example: organisationId: 73151de8-3676-4887-a021-edec960dd537 dataMonth: 2020-01 users: - - userId: bf3108f9-7449-4b2d-a1d1-41342dc1c991 - userCreatedDateUtc: '2016-04-15T04:01:42.8Z' - lastLoginDateUtc: '2020-02-12T23:59:06.42Z' - isExternalPartner: true - hasAccountantRole: true - monthPeriod: 2020-01 - numberOfLogins: 0 - numberOfDocumentsCreated: 10 - netValueDocumentsCreated: -100.99 - absoluteValueDocumentsCreated: 100.99 - attachedPractices: - - xeroPartnerSince: 2017 - tier: Silver - location: New Zealand - organisationCount: 40 - staffCertified: true - historyRecords: - - changes: Approved - dateUTCString: '2008-12-19T01:37:59' - dateUTC: '2008-12-18T14:37:59.057+00:00' - user: John Doe - details: '' - - changes: Created - dateUTCString: '2008-12-19T01:37:58' - dateUTC: '2008-12-18T14:37:58.057+00:00' - user: John Doe - details: '' - - changes: Reconciled - dateUTCString: '2008-12-20T22:50:55' - dateUTC: '2008-12-20T11:50:55.09+00:00' - user: John Doe - details: Debit payment to ACME Banking Corporation on 10 October - 2008 for -10.00 - - changes: Created - dateUTCString: '2008-12-20T16:44:19' - dateUTC: '2008-12-20T05:44:19.467+00:00' - user: John Doe - details: '' - '400': + - userId: bf3108f9-7449-4b2d-a1d1-41342dc1c991 + userCreatedDateUtc: "2016-04-15T04:01:42.8Z" + lastLoginDateUtc: "2020-02-12T23:59:06.42Z" + isExternalPartner: true + hasAccountantRole: true + monthPeriod: 2020-01 + numberOfLogins: 0 + numberOfDocumentsCreated: 10 + netValueDocumentsCreated: -100.99 + absoluteValueDocumentsCreated: 100.99 + attachedPractices: + - xeroPartnerSince: 2017 + tier: Silver + location: New Zealand + organisationCount: 40 + staffCertified: true + historyRecords: + - changes: Approved + dateUTCString: 2008-12-19T01:37:59 + dateUTC: "2008-12-18T14:37:59.057+00:00" + user: John Doe + details: "" + - changes: Created + dateUTCString: 2008-12-19T01:37:58 + dateUTC: "2008-12-18T14:37:58.057+00:00" + user: John Doe + details: "" + - changes: Reconciled + dateUTCString: 2008-12-20T22:50:55 + dateUTC: "2008-12-20T11:50:55.09+00:00" + user: John Doe + details: Debit payment to ACME Banking Corporation on 10 October 2008 for -10.00 + - changes: Created + dateUTCString: 2008-12-20T16:44:19 + dateUTC: "2008-12-20T05:44:19.467+00:00" + user: John Doe + details: "" + "400": description: BadRequest content: application/json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' example: type: invalid-request title: InvalidRequest status: 400 - detail: Organisation 73151de8-3676-4887-a021-edec960dd537 does not - exist - "/FinancialStatements/BalanceSheet": + detail: Organisation 73151de8-3676-4887-a021-edec960dd537 does not exist + /FinancialStatements/BalanceSheet: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [finance.statements.read] + - OAuth2: + - finance.statements.read tags: - Finance operationId: getFinancialStatementBalanceSheet - summary: "Get Balance Sheet report" - description: "The balance sheet report is a standard financial report which describes the financial position of an organisation at a point in time." + summary: Get Balance Sheet report + description: The balance sheet report is a standard financial report which describes the financial position of an organisation at a point in time. parameters: - - name: "balanceDate" + - name: balanceDate x-snake: balance_date - in: "query" + in: query description: "Specifies the date for balance sheet report.\r\n\r\nFormat yyyy-MM-dd. If no parameter is provided, the current date will be used." schema: type: string example: "2020-06-30" responses: 200: - description: "Success" + description: Success content: application/json: schema: - $ref: "#/components/schemas/BalanceSheetResponse" + $ref: '#/components/schemas/BalanceSheetResponse' example: balanceDate: "2021-05-12" asset: accountTypes: - - accountType: "INVENTORY" + - accountType: INVENTORY accounts: - code: "630" - accountID: "abcdeabc-80bb-47f5-9418-d1fc2241b838" - name: "Inventory" - reportingCode: "ASS.CUR.INY" + accountID: abcdeabc-80bb-47f5-9418-d1fc2241b838 + name: Inventory + reportingCode: ASS.CUR.INY total: 3 total: 3 - - accountType: "CURRENT" + - accountType: CURRENT accounts: - code: "610" - accountID: "abcdeabc-b4d1-45a5-82f7-19deda692a31" - name: "Accounts Receivable" - reportingCode: "ASS.CUR.REC.TRA" + accountID: abcdeabc-b4d1-45a5-82f7-19deda692a31 + name: Accounts Receivable + reportingCode: ASS.CUR.REC.TRA total: 100 total: 100 - - accountType: "BANK" + - accountType: BANK accounts: - - accountID: "abcdeabc-3a6d-4c53-ba82-ea1c92d02ef4" - name: "Buz Acc" - reportingCode: "ASS" + - accountID: abcdeabc-3a6d-4c53-ba82-ea1c92d02ef4 + name: Buz Acc + reportingCode: ASS total: -42.3 total: -42.3 total: 60.7 liability: accountTypes: - - accountType: "CURRLIAB" + - accountType: CURRLIAB accounts: - code: "820" - accountID: "abcdeabc-40f7-49f1-ad89-1930c1366e5b" - name: "GST" - reportingCode: "LIA.CUR.TAX.GST" + accountID: abcdeabc-40f7-49f1-ad89-1930c1366e5b + name: GST + reportingCode: LIA.CUR.TAX.GST total: 1.59 - code: "860" - accountID: "abcdeabc-2877-4c00-be7d-475b1ded30d7" - name: "Rounding" - reportingCode: "LIA.CUR" + accountID: abcdeabc-2877-4c00-be7d-475b1ded30d7 + name: Rounding + reportingCode: LIA.CUR total: -0.1 - code: "800" - accountID: "abcdeabc-80ba-4b58-8d72-f8e9ca0f2f00" - name: "Accounts Payable" - reportingCode: "LIA.CUR.PAY.TRA" + accountID: abcdeabc-80ba-4b58-8d72-f8e9ca0f2f00 + name: Accounts Payable + reportingCode: LIA.CUR.PAY.TRA total: 44.4 total: 45.89 total: 45.89 equity: accountTypes: - - accountType: "EQUITY" + - accountType: EQUITY accounts: - - accountID: "00000000-0000-0000-0000-000000000000" - name: "Current Year Earnings" + - accountID: 00000000-0000-0000-0000-000000000000 + name: Current Year Earnings total: 14.81 total: 14.81 total: 14.81 400: - description: "Bad Request" + description: Bad Request content: application/json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' example: - type: "invalid-request" - title: "InvalidRequest" + type: invalid-request + title: InvalidRequest status: 400 - detail: "Organisation xxx does not exist" + detail: Organisation xxx does not exist 503: - description: "Server Error" + description: Server Error content: application/json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' example: - type: "service-unavailable" - title: "ServiceUnavailable" + type: service-unavailable + title: ServiceUnavailable status: 503 - detail: "Cannot process org xxx at this time. Apologies for inconvenience." - "/FinancialStatements/Cashflow": + detail: Cannot process org xxx at this time. Apologies for inconvenience. + /FinancialStatements/Cashflow: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [finance.statements.read] + - OAuth2: + - finance.statements.read tags: - Finance operationId: getFinancialStatementCashflow - summary: "Get Cash flow report" - description: "The statement of cash flows - direct method, provides the year to date changes in operating, financing and investing cash flow activities for an organisation. Cashflow statement is not available in US region at this stage." + summary: Get Cash flow report + description: The statement of cash flows - direct method, provides the year to date changes in operating, financing and investing cash flow activities for an organisation. Cashflow statement is not available in US region at this stage. parameters: - - name: "startDate" + - name: startDate x-snake: start_date - in: "query" + in: query description: "Date e.g. yyyy-MM-dd\r\n\r\nSpecifies the start date for cash flow report.\r\n\r\nIf no parameter is provided, the date of 12 months before the end date will be used." schema: type: string example: "2020-09-15" - - name: "endDate" + - name: endDate x-snake: end_date - in: "query" + in: query description: "Date e.g. yyyy-MM-dd\r\n\r\nSpecifies the end date for cash flow report.\r\n\r\nIf no parameter is provided, the current date will be used." schema: type: string example: "2021-09-15" responses: 200: - description: "Success" + description: Success content: application/json: schema: - $ref: "#/components/schemas/CashflowResponse" + $ref: '#/components/schemas/CashflowResponse' example: startDate: "2018-07-01" endDate: "2019-06-30" @@ -549,151 +520,152 @@ paths: closingCashBalance: -50000 netCashMovement: -55000 cashflowActivities: - - name: "Operating Activities" + - name: Operating Activities total: -41000 cashflowTypes: - - name: "Receipts from customers" + - name: Receipts from customers total: 34000 accounts: - - accountId: "abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2" - accountType: "REVENUE" - accountClass: "REVENUE" + - accountId: abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2 + accountType: REVENUE + accountClass: REVENUE code: "455" - name: "Cellar Door - Till Variance" - reportingCode: "EXP" + name: Cellar Door - Till Variance + reportingCode: EXP total: -1000 - - accountId: "abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2" - accountType: "CURRENT" - accountClass: "ASSET" + - accountId: abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2 + accountType: CURRENT + accountClass: ASSET code: "123" - name: "Loan - Darleen's" - reportingCode: "ASS" + name: Loan - Darleen's + reportingCode: ASS total: 35000 - - name: "Payments to suppliers and employees" + - name: Payments to suppliers and employees total: -75000 accounts: - - accountId: "abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2" - accountType: "CURRENT" - accountClass: "ASSET" + - accountId: abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2 + accountType: CURRENT + accountClass: ASSET code: "123" - name: "Loan - Darleen's" - reportingCode: "ASS" + name: Loan - Darleen's + reportingCode: ASS total: -75000 - - name: "Investing Activities" + - name: Investing Activities total: -35000 cashflowTypes: - - name: "Payment for property, plant and equipment" + - name: Payment for property, plant and equipment total: -36000 accounts: - - accountId: "abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2" - accountType: "FIXED" - accountClass: "ASSET" + - accountId: abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2 + accountType: FIXED + accountClass: ASSET code: "138" - name: "Motor Vehicles at Cost" - reportingCode: "ASS" + name: Motor Vehicles at Cost + reportingCode: ASS total: -1000 - - accountId: "abcdefab-5353-9d4b-7cad-51b2c2a2754a" - accountType: "FIXED" - accountClass: "ASSET" + - accountId: abcdefab-5353-9d4b-7cad-51b2c2a2754a + accountType: FIXED + accountClass: ASSET code: "140" - name: "Equipment at cost" - reportingCode: "ASS" + name: Equipment at cost + reportingCode: ASS total: -35000 - - name: "Proceeds from sale of property, plant and equipment" + - name: Proceeds from sale of property, plant and equipment total: 1000 accounts: - - accountId: "abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2" - accountType: "FIXED" - accountClass: "ASSET" + - accountId: abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2 + accountType: FIXED + accountClass: ASSET code: "138" - name: "Motor Vehicles at Cost" - reportingCode: "ASS" + name: Motor Vehicles at Cost + reportingCode: ASS total: 1000 - - accountId: "abcdefab-5353-9d4b-7cad-51b2c2a2754a" - accountType: "FIXED" - accountClass: "ASSET" + - accountId: abcdefab-5353-9d4b-7cad-51b2c2a2754a + accountType: FIXED + accountClass: ASSET code: "140" - name: "Equipment at cost" - reportingCode: "ASS" + name: Equipment at cost + reportingCode: ASS total: 0 - - name: "Financing Activities" + - name: Financing Activities total: -14000 cashflowTypes: - - name: "Proceeds from borrowings" + - name: Proceeds from borrowings total: 1000.5 accounts: - - accountId: "abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2" - accountType: "TERMLIAB" - accountClass: "LIABILITY" + - accountId: abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2 + accountType: TERMLIAB + accountClass: LIABILITY code: "244" - name: "Loan - Shellcoll Distribution 2019" - reportingCode: "LIA.CUR.LOA" + name: Loan - Shellcoll Distribution 2019 + reportingCode: LIA.CUR.LOA total: 1000.5 - - name: "Repayment of borrowings" + - name: Repayment of borrowings total: -15000.5 accounts: - - accountId: "abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2" - accountType: "TERMLIAB" - accountClass: "LIABILITY" + - accountId: abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2 + accountType: TERMLIAB + accountClass: LIABILITY code: "244" - name: "Loan - Shellcoll Distribution 2019" - reportingCode: "LIA.CUR.LOA" + name: Loan - Shellcoll Distribution 2019 + reportingCode: LIA.CUR.LOA total: -15000.5 400: - description: "Bad Request" + description: Bad Request content: application/json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' example: - type: "invalid-request" - title: "InvalidRequest" + type: invalid-request + title: InvalidRequest status: 400 - detail: "Organisation xxx does not exist" + detail: Organisation xxx does not exist 503: - description: "Server Error" + description: Server Error content: application/json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' example: - type: "service-unavailable" - title: "ServiceUnavailable" + type: service-unavailable + title: ServiceUnavailable status: 503 - detail: "Cannot process org xxx at this time. Apologies for inconvenience." - "/FinancialStatements/ProfitAndLoss": + detail: Cannot process org xxx at this time. Apologies for inconvenience. + /FinancialStatements/ProfitAndLoss: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [finance.statements.read] + - OAuth2: + - finance.statements.read tags: - Finance operationId: getFinancialStatementProfitAndLoss - summary: "Get Profit & Loss report" - description: "The profit and loss statement is a standard financial report providing detailed year to date income and expense detail for an organisation." + summary: Get Profit & Loss report + description: The profit and loss statement is a standard financial report providing detailed year to date income and expense detail for an organisation. parameters: - - name: "startDate" + - name: startDate x-snake: start_date - in: "query" + in: query description: "Date e.g. yyyy-MM-dd\r\n\r\nSpecifies the start date for profit and loss report\r\n\r\nIf no parameter is provided, the date of 12 months before the end date will be used." schema: type: string example: "2020-09-15" - - name: "endDate" + - name: endDate x-snake: end_date - in: "query" + in: query description: "Date e.g. yyyy-MM-dd\r\n\r\nSpecifies the end date for profit and loss report \r\n\r\nIf no parameter is provided, the current date will be used." schema: type: string example: "2021-09-15" responses: 200: - description: "Success" + description: Success content: application/json: schema: - $ref: "#/components/schemas/ProfitAndLossResponse" + $ref: '#/components/schemas/ProfitAndLossResponse' example: startDate: "2020-07-01" endDate: "2021-06-30" @@ -702,128 +674,127 @@ paths: total: 20922.46 accountTypes: - total: 20825.41 - title: "Trading Income" + title: Trading Income accounts: - - accountID: "abcdefab-2006-43c2-a5da-3c0e5f43b452" - accountType: "REVENUE" + - accountID: abcdefab-2006-43c2-a5da-3c0e5f43b452 + accountType: REVENUE code: "200" - name: "Sales" - reportingCode: "REV" + name: Sales + reportingCode: REV total: 20825.41 - total: 97.05 - title: "Other Income" + title: Other Income accounts: - - accountID: "abcdefab-4d63-4af8-937f-04087ae2e36e" - accountType: "OTHERINCOME" + - accountID: abcdefab-4d63-4af8-937f-04087ae2e36e + accountType: OTHERINCOME code: "270" - name: "Interest Income" - reportingCode: "REV.OTH" + name: Interest Income + reportingCode: REV.OTH total: 97.05 expense: total: 1282.06 accountTypes: - total: 1137.59 - title: "Direct Cost" + title: Direct Cost accounts: - - accountID: "abcdefab-d381-4bd6-ba47-7af927d25825" - accountType: "DIRECTCOSTS" + - accountID: abcdefab-d381-4bd6-ba47-7af927d25825 + accountType: DIRECTCOSTS code: "300" - name: "Purchases" - reportingCode: "EXP.DC" + name: Purchases + reportingCode: EXP.DC total: 1137.59 - total: 144.47 - title: "Operating Expenses" + title: Operating Expenses accounts: - - accountID: "abcdefab-f897-4168-b5d1-2279bf74bb82" - accountType: "EXPENSE" + - accountID: abcdefab-f897-4168-b5d1-2279bf74bb82 + accountType: EXPENSE code: "453" - name: "Office Expenses" - reportingCode: "EXP" + name: Office Expenses + reportingCode: EXP total: 144.47 400: - description: "Bad Request" + description: Bad Request content: application/json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' example: - type: "invalid-request" - title: "InvalidRequest" + type: invalid-request + title: InvalidRequest status: 400 - detail: "Organisation xxx does not exist" - "/FinancialStatements/TrialBalance": + detail: Organisation xxx does not exist + /FinancialStatements/TrialBalance: parameters: - $ref: '#/components/parameters/requiredHeader' get: - security: - - OAuth2: [finance.statements.read] + security: + - OAuth2: + - finance.statements.read tags: - Finance operationId: getFinancialStatementTrialBalance - summary: "Get Trial Balance report" - description: "The trial balance provides a detailed list of all accounts of an organisation at a point in time, with revenue and expense items being year to date." + summary: Get Trial Balance report + description: The trial balance provides a detailed list of all accounts of an organisation at a point in time, with revenue and expense items being year to date. parameters: - - name: "endDate" + - name: endDate x-snake: end_date - in: "query" + in: query description: "Date e.g. yyyy-MM-dd \r\n\r\nSpecifies the end date for trial balance report \r\n\r\nIf no parameter is provided, the current date will be used." schema: type: string example: "2021-09-15" responses: 200: - description: "Success" + description: Success content: application/json: schema: - $ref: "#/components/schemas/TrialBalanceResponse" + $ref: '#/components/schemas/TrialBalanceResponse' example: startDate: "2020-07-01" endDate: "2021-06-30" accounts: - - accountId: "abcdefab-3bbf-4f2a-9e4c-20ec7b8e6b41" - accountType: "ASSET" - accountCode: "ASS" - accountClass: "BANK" - status: "ACTIVE" - reportingCode: "ASS" - accountName: "Everyday transactions" + - accountId: abcdefab-3bbf-4f2a-9e4c-20ec7b8e6b41 + accountType: ASSET + accountCode: ASS + accountClass: BANK + status: ACTIVE + reportingCode: ASS + accountName: Everyday transactions balance: value: 100 - entryType: "DEBIT" + entryType: DEBIT signedBalance: -23 accountMovement: debits: 0 credits: 0 movement: value: 123 - entryType: "CREDIT" + entryType: CREDIT signedMovement: 0 400: - description: "Bad Request" + description: Bad Request content: application/json: schema: - $ref: "#/components/schemas/Problem" + $ref: '#/components/schemas/Problem' example: - type: "invalid-request" - title: "InvalidRequest" + type: invalid-request + title: InvalidRequest status: 400 - detail: "Organisation xxx does not exist" + detail: Organisation xxx does not exist /FinancialStatements/contacts/revenue: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [finance.statements.read] + - OAuth2: + - finance.statements.read tags: - Finance operationId: getFinancialStatementContactsRevenue summary: Get revenue by contacts report - description: >- - The revenue by contact report provides a year to date profit and loss - for customers and suppliers for a given organisation, including detailed - contact information. + description: The revenue by contact report provides a year to date profit and loss for customers and suppliers for a given organisation, including detailed contact information. parameters: - name: contactIds x-snake: contact_ids @@ -831,7 +802,9 @@ paths: description: "Specifies the customer contacts to be included in the report.\r\n\r\nIf no parameter is provided, all customer contacts will be included" schema: type: array - example: [00000000-0000-0000-0000-000000000000, 00000000-0000-0000-0000-000000000000] + example: + - 00000000-0000-0000-0000-000000000000 + - 00000000-0000-0000-0000-000000000000 items: type: string format: uuid @@ -858,15 +831,15 @@ paths: schema: type: string responses: - '200': + "200": description: Success content: application/json: schema: $ref: '#/components/schemas/IncomeByContactResponse' example: - startDate: '2019-10-17' - endDate: '2020-10-16' + startDate: "2019-10-17" + endDate: "2020-10-16" total: 1200 totalDetail: totalPaid: 400 @@ -892,7 +865,7 @@ paths: accountCodes: - "090" - "200" - - "09-BANK" + - 09-BANK - id: 20e94281-4751-fb7e-ee5e-96b43ae93c8a name: SecondContact total: -200 @@ -909,7 +882,7 @@ paths: - "900" manualJournals: total: -100 - '400': + "400": description: Bad Request content: application/json: @@ -925,15 +898,13 @@ paths: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [finance.statements.read] + - OAuth2: + - finance.statements.read tags: - Finance operationId: getFinancialStatementContactsExpense summary: Get expense by contacts report - description: >- - The expense by contact report provides a year to date profit and loss - for customers and suppliers for a given organisation, including detailed - contact information. + description: The expense by contact report provides a year to date profit and loss for customers and suppliers for a given organisation, including detailed contact information. parameters: - name: contactIds x-snake: contact_ids @@ -941,7 +912,9 @@ paths: description: "Specifies the customer contacts to be included in the report.\r\n\r\nIf no parameter is provided, all customer contacts will be included" schema: type: array - example: [00000000-0000-0000-0000-000000000000, 00000000-0000-0000-0000-000000000000] + example: + - 00000000-0000-0000-0000-000000000000 + - 00000000-0000-0000-0000-000000000000 items: type: string format: uuid @@ -968,15 +941,15 @@ paths: schema: type: string responses: - '200': + "200": description: Success content: application/json: schema: $ref: '#/components/schemas/IncomeByContactResponse' example: - startDate: '2019-10-17' - endDate: '2020-10-16' + startDate: "2019-10-17" + endDate: "2020-10-16" total: 1200 totalDetail: totalPaid: 400 @@ -1002,7 +975,7 @@ paths: accountCodes: - "090" - "200" - - "09-BANK" + - 09-BANK - id: 20e94281-4751-fb7e-ee5e-96b43ae93c8a name: SecondContact total: -200 @@ -1019,7 +992,7 @@ paths: - "900" manualJournals: total: -100 - '400': + "400": description: Bad Request content: application/json: @@ -1035,18 +1008,13 @@ paths: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [finance.bankstatementsplus.read] + - OAuth2: + - finance.bankstatementsplus.read tags: - Finance operationId: getBankStatementAccounting summary: Get Bank Statement Accounting - description: >- - For lenders that prefer using bank statement data as the source of - truth. We provide a data point that will allow access to customer - bank statements, plus for reconciled bank transactions the matching - accounting, invoice and billing data as well. As customers reconcile - bank statements to invoices and bills, this transaction detail will - provide valuable insight for lender's assessment measures. + description: 'For lenders that prefer using bank statement data as the source of truth. We provide a data point that will allow access to customer bank statements, plus for reconciled bank transactions the matching accounting, invoice and billing data as well. As customers reconcile bank statements to invoices and bills, this transaction detail will provide valuable insight for lender''s assessment measures. ' parameters: - name: BankAccountID x-snake: bank_account_id @@ -1063,8 +1031,8 @@ paths: required: true schema: type: string - example: '2020-07-01' - example: '2020-07-01' + example: "2020-07-01" + example: "2020-07-01" - name: ToDate x-snake: to_date in: query @@ -1072,8 +1040,8 @@ paths: required: true schema: type: string - example: '2021-06-30' - example: '2021-06-30' + example: "2021-06-30" + example: "2021-06-30" - name: SummaryOnly x-snake: summary_only in: query @@ -1083,29 +1051,139 @@ paths: schema: type: boolean responses: - '200': + "200": description: Success content: application/json: schema: $ref: '#/components/schemas/BankStatementAccountingResponse' - example: {"bankAccountId":"1234eee9-47f0-4179-bd46-9adb4f21cc7f","bankAccountName":"ANZ BANK","bankAccountCurrencyCode":"NZD","statements":[{"statementId":"7c29eee9-47f0-4179-bd46-9adb4f21cc7f","startDate":"2021-01-01","endDate":"2021-01-02","importedDateTimeUtc":"2021-01-02T12:00:00Z","importSource":"STMTIMPORTSRC/MANUAL", "startBalance":10.0,"endBalance":200.0, "indicativeStartBalance":10.0, "indicativeEndBalance":200.0, "statementLines":[{"statementLineId":"1234eee9-47f0-4179-bd46-9adb4f21cc7f","postedDate":"2021-01-01", "payee":"ACME Thneeds ABC1234567890 SYDNEY", "reference":"Eft","notes":"payment to bank","chequeNo":"123","amount":100.0,"transactionDate":"2021-01-01","type":"Debit","isReconciled":true,"isDuplicate":false,"isDeleted":false,"payments":[{"paymentId":"47ec8431-23c2-4ef9-90e5-b440fe55d086","batchPaymentId":"ecc83387-ffaa-4023-b111-b3fd9e3e4a8e","date":"2021-01-01","amount":80.0,"bankAmount":80.0,"currencyRate":1.0,"invoice":{"invoiceId":"c01dd6ac-8835-4bf2-af8b-841db9534d7f","contact":{"contactId":"1234eee9-47f0-4179-bd46-9adb4f21cc7f","contactName":"Bob"},"total":80.0,"lineItems":[{"accountId":"f7fe1049-d1cf-4d10-9df1-67a6e363015f","reportingCode":"REV.OTH","lineAmount":80.0,"accountType":"REVENUE"}]}},{"paymentId":"54e8eee0-91a7-4a4d-bb9b-957302a2760a","batchPaymentId":"ecc83387-ffaa-4023-b111-b3fd9e3e4a8e","date":"2021-01-01","amount":15.0,"bankAmount":15.0,"currencyRate":1.0,"creditNote":{"creditNoteId":"c346d6a5-f013-4207-bc70-f2dd80a5f37f","contact":{"contactId":"1234eee9-47f0-4179-bd46-9adb4f21cc7f","contactName":"Bob"},"total":15.0,"lineItems":[{"accountId":"f7fe1049-d1cf-4d10-9df1-67a6e363015f","reportingCode":"REV.OTH","lineAmount":15.0,"accountType":"REVENUE"}]}},{"paymentId":"f94dad64-658c-491f-b901-05d38e9e8702","date":"2021-01-01","amount":5.0,"bankAmount":5.0,"currencyRate":1.0,"prepayment":{"prepaymentId":"995f81ae-0afd-4c84-bbe1-90bc7dfa4372","contact":{"contactId":"1234eee9-47f0-4179-bd46-9adb4f21cc7f","contactName":"Bob"},"total":5.0,"lineItems":[{"accountId":"f7fe1049-d1cf-4d10-9df1-67a6e363015f","reportingCode":"REV.OTH","lineAmount":5.0,"accountType":"REVENUE"}]}},{"paymentId":"6ffbe999-04c8-42d2-bf16-13947c5f1036","date":"2021-01-01","amount":5.0,"bankAmount":5.0,"currencyRate":1.0,"overpayment":{"overpaymentId":"06575718-5100-4e02-8fbf-c2731a112836","contact":{"contactId":"1234eee9-47f0-4179-bd46-9adb4f21cc7f","contactName":"Bob"},"total":5.0,"lineItems":[{"accountId":"f7fe1049-d1cf-4d10-9df1-67a6e363015f","reportingCode":"REV.OTH","lineAmount":5.0,"accountType":"REVENUE"}]}}],"bankTransactions":[{"bankTransactionId":"55edf88c-6bf6-459a-bd9b-7f250df62eb2","batchPaymentId":"2dce9b39-0427-41af-9739-9510e3b68211","contact":{"contactId":"1234eee9-47f0-4179-bd46-9adb4f21cc7f","contactName":"Bob"},"date":"2021-01-01","amount":20.0,"lineItems":[{"accountId":"f7fe1049-d1cf-4d10-9df1-67a6e363015f","reportingCode":"REV.OTH","lineAmount":20.0,"accountType":"REVENUE"}]}]}]}]} - '400': + example: + bankAccountId: 1234eee9-47f0-4179-bd46-9adb4f21cc7f + bankAccountName: ANZ BANK + bankAccountCurrencyCode: NZD + statements: + - statementId: 7c29eee9-47f0-4179-bd46-9adb4f21cc7f + startDate: "2021-01-01" + endDate: "2021-01-02" + importedDateTimeUtc: "2021-01-02T12:00:00Z" + importSource: STMTIMPORTSRC/MANUAL + startBalance: 10.0 + endBalance: 200.0 + indicativeStartBalance: 10.0 + indicativeEndBalance: 200.0 + statementLines: + - statementLineId: 1234eee9-47f0-4179-bd46-9adb4f21cc7f + postedDate: "2021-01-01" + payee: ACME Thneeds ABC1234567890 SYDNEY + reference: Eft + notes: payment to bank + chequeNo: "123" + amount: 100.0 + transactionDate: "2021-01-01" + type: Debit + isReconciled: true + isDuplicate: false + isDeleted: false + payments: + - paymentId: 47ec8431-23c2-4ef9-90e5-b440fe55d086 + batchPaymentId: ecc83387-ffaa-4023-b111-b3fd9e3e4a8e + date: "2021-01-01" + amount: 80.0 + bankAmount: 80.0 + currencyRate: 1.0 + invoice: + invoiceId: c01dd6ac-8835-4bf2-af8b-841db9534d7f + contact: + contactId: 1234eee9-47f0-4179-bd46-9adb4f21cc7f + contactName: Bob + total: 80.0 + lineItems: + - accountId: f7fe1049-d1cf-4d10-9df1-67a6e363015f + reportingCode: REV.OTH + lineAmount: 80.0 + accountType: REVENUE + - paymentId: 54e8eee0-91a7-4a4d-bb9b-957302a2760a + batchPaymentId: ecc83387-ffaa-4023-b111-b3fd9e3e4a8e + date: "2021-01-01" + amount: 15.0 + bankAmount: 15.0 + currencyRate: 1.0 + creditNote: + creditNoteId: c346d6a5-f013-4207-bc70-f2dd80a5f37f + contact: + contactId: 1234eee9-47f0-4179-bd46-9adb4f21cc7f + contactName: Bob + total: 15.0 + lineItems: + - accountId: f7fe1049-d1cf-4d10-9df1-67a6e363015f + reportingCode: REV.OTH + lineAmount: 15.0 + accountType: REVENUE + - paymentId: f94dad64-658c-491f-b901-05d38e9e8702 + date: "2021-01-01" + amount: 5.0 + bankAmount: 5.0 + currencyRate: 1.0 + prepayment: + prepaymentId: 995f81ae-0afd-4c84-bbe1-90bc7dfa4372 + contact: + contactId: 1234eee9-47f0-4179-bd46-9adb4f21cc7f + contactName: Bob + total: 5.0 + lineItems: + - accountId: f7fe1049-d1cf-4d10-9df1-67a6e363015f + reportingCode: REV.OTH + lineAmount: 5.0 + accountType: REVENUE + - paymentId: 6ffbe999-04c8-42d2-bf16-13947c5f1036 + date: "2021-01-01" + amount: 5.0 + bankAmount: 5.0 + currencyRate: 1.0 + overpayment: + overpaymentId: 06575718-5100-4e02-8fbf-c2731a112836 + contact: + contactId: 1234eee9-47f0-4179-bd46-9adb4f21cc7f + contactName: Bob + total: 5.0 + lineItems: + - accountId: f7fe1049-d1cf-4d10-9df1-67a6e363015f + reportingCode: REV.OTH + lineAmount: 5.0 + accountType: REVENUE + bankTransactions: + - bankTransactionId: 55edf88c-6bf6-459a-bd9b-7f250df62eb2 + batchPaymentId: 2dce9b39-0427-41af-9739-9510e3b68211 + contact: + contactId: 1234eee9-47f0-4179-bd46-9adb4f21cc7f + contactName: Bob + date: "2021-01-01" + amount: 20.0 + lineItems: + - accountId: f7fe1049-d1cf-4d10-9df1-67a6e363015f + reportingCode: REV.OTH + lineAmount: 20.0 + accountType: REVENUE + "400": description: BadRequest content: application/json: schema: $ref: '#/components/schemas/Problem' - example: {"type":"invalid-request","title":"InvalidRequest","status":400,"detail":"AccountId was not supplied"} + example: + type: invalid-request + title: InvalidRequest + status: 400 + detail: AccountId was not supplied components: securitySchemes: OAuth2: type: oauth2 description: For more information - flows: + flows: authorizationCode: - authorizationUrl: 'https://login.xero.com/identity/connect/authorize' - tokenUrl: 'https://identity.xero.com/connect/token' + authorizationUrl: https://login.xero.com/identity/connect/authorize + tokenUrl: https://identity.xero.com/connect/token scopes: email: Grant read-only access to your email openid: Grant read-only access to your open id @@ -1115,7 +1193,7 @@ components: finance.cashvalidation.read: Grant read-only access to bank statement and reconcilation data finance.bankstatementsplus.read: Grant read-only access to bank statements accounting data parameters: - requiredHeader: + requiredHeader: in: header name: xero-tenant-id x-snake: xero_tenant_id @@ -1195,7 +1273,7 @@ components: accountUsage: type: array items: - $ref: "#/components/schemas/AccountUsage" + $ref: '#/components/schemas/AccountUsage' additionalProperties: false HistoryRecordResponse: type: object @@ -1247,7 +1325,7 @@ components: lockDates: type: array items: - $ref: "#/components/schemas/LockHistoryModel" + $ref: '#/components/schemas/LockHistoryModel' additionalProperties: false PracticeResponse: type: object @@ -1274,7 +1352,7 @@ components: type: object properties: type: - $ref: "#/components/schemas/ProblemType" + $ref: '#/components/schemas/ProblemType' title: type: string status: @@ -1285,17 +1363,17 @@ components: additionalProperties: false ProblemType: enum: - - NotSet - - bank-account-not-found - - internal-error - - invalid-application - - invalid-request - - organisation-not-found - - organisation-offline - - request-timeout - - service-unavailable - - unauthorized - - rate-limit-error + - NotSet + - bank-account-not-found + - internal-error + - invalid-application + - invalid-request + - organisation-not-found + - organisation-offline + - request-timeout + - service-unavailable + - unauthorized + - rate-limit-error type: string ReportHistoryModel: type: object @@ -1325,7 +1403,7 @@ components: reports: type: array items: - $ref: "#/components/schemas/ReportHistoryModel" + $ref: '#/components/schemas/ReportHistoryModel' additionalProperties: false UserActivitiesResponse: type: object @@ -1340,7 +1418,7 @@ components: users: type: array items: - $ref: "#/components/schemas/UserResponse" + $ref: '#/components/schemas/UserResponse' additionalProperties: false UserResponse: type: object @@ -1387,39 +1465,36 @@ components: attachedPractices: type: array items: - $ref: "#/components/schemas/PracticeResponse" + $ref: '#/components/schemas/PracticeResponse' historyRecords: type: array items: - $ref: "#/components/schemas/HistoryRecordResponse" + $ref: '#/components/schemas/HistoryRecordResponse' additionalProperties: false BankStatementResponse: type: object properties: statementLines: - $ref: "#/components/schemas/StatementLinesResponse" + $ref: '#/components/schemas/StatementLinesResponse' currentStatement: - $ref: "#/components/schemas/CurrentStatementResponse" + $ref: '#/components/schemas/CurrentStatementResponse' additionalProperties: false CashAccountResponse: type: object properties: unreconciledAmountPos: type: number - description: Total value of transactions in the journals which are not reconciled - to bank statement lines, and have a positive (debit) value. + description: Total value of transactions in the journals which are not reconciled to bank statement lines, and have a positive (debit) value. format: double x-is-money: true unreconciledAmountNeg: type: number - description: Total value of transactions in the journals which are not reconciled - to bank statement lines, and have a negative (credit) value. + description: Total value of transactions in the journals which are not reconciled to bank statement lines, and have a negative (credit) value. format: double x-is-money: true startingBalance: type: number - description: Starting (or historic) balance from the journals (manually - keyed in by users on account creation - unverified). + description: Starting (or historic) balance from the journals (manually keyed in by users on account creation - unverified). format: double x-is-money: true accountBalance: @@ -1439,57 +1514,44 @@ components: description: The Xero identifier for an account format: uuid statementBalance: - $ref: "#/components/schemas/StatementBalanceResponse" + $ref: '#/components/schemas/StatementBalanceResponse' statementBalanceDate: type: string - description: UTC Date when the last bank statement item was entered into - Xero. This date is represented in ISO 8601 format. + description: UTC Date when the last bank statement item was entered into Xero. This date is represented in ISO 8601 format. format: date bankStatement: - $ref: "#/components/schemas/BankStatementResponse" + $ref: '#/components/schemas/BankStatementResponse' cashAccount: - $ref: "#/components/schemas/CashAccountResponse" + $ref: '#/components/schemas/CashAccountResponse' additionalProperties: false CurrentStatementResponse: type: object properties: startDate: type: string - description: Looking at the most recent bank statement, this field indicates - the first date which transactions on this statement pertain to. This date - is represented in ISO 8601 format. + description: Looking at the most recent bank statement, this field indicates the first date which transactions on this statement pertain to. This date is represented in ISO 8601 format. format: date endDate: type: string - description: Looking at the most recent bank statement, this field indicates - the last date which transactions on this statement pertain to. This date - is represented in ISO 8601 format. + description: Looking at the most recent bank statement, this field indicates the last date which transactions on this statement pertain to. This date is represented in ISO 8601 format. format: date startBalance: type: number - description: Looking at the most recent bank statement, this field indicates - the balance before the transactions on the statement are applied (note, - this is not always populated by the bank in every single instance (~10%)). + description: Looking at the most recent bank statement, this field indicates the balance before the transactions on the statement are applied (note, this is not always populated by the bank in every single instance (~10%)). format: double x-is-money: true endBalance: type: number - description: Looking at the most recent bank statement, this field indicates - the balance after the transactions on the statement are applied (note, - this is not always populated by the bank in every single instance (~10%)). + description: Looking at the most recent bank statement, this field indicates the balance after the transactions on the statement are applied (note, this is not always populated by the bank in every single instance (~10%)). format: double x-is-money: true importedDateTimeUtc: type: string - description: Looking at the most recent bank statement, this field indicates - when the document was imported into Xero. This date is represented in - ISO 8601 format. + description: Looking at the most recent bank statement, this field indicates when the document was imported into Xero. This date is represented in ISO 8601 format. format: date-time importSourceType: type: string - description: Looking at the most recent bank statement, this field indicates - the source of the data (direct bank feed, indirect bank feed, file upload, - or manual keying). + description: Looking at the most recent bank statement, this field indicates the source of the data (direct bank feed, indirect bank feed, file upload, or manual keying). additionalProperties: false DataSourceResponse: type: object @@ -1578,120 +1640,90 @@ components: properties: value: type: number - description: Total closing balance of the account. This includes both reconciled - and unreconciled bank statement lines. The closing balance will always - be represented as a positive number, with it’s debit/credit status defined - in the statementBalanceDebitCredit field. + description: Total closing balance of the account. This includes both reconciled and unreconciled bank statement lines. The closing balance will always be represented as a positive number, with it’s debit/credit status defined in the statementBalanceDebitCredit field. format: double x-is-money: true type: type: string - description: The DEBIT or CREDIT status of the account. Cash accounts in - credit have a negative balance. + description: The DEBIT or CREDIT status of the account. Cash accounts in credit have a negative balance. additionalProperties: false StatementLinesResponse: type: object properties: unreconciledAmountPos: type: number - description: Sum of the amounts of all statement lines where both the reconciled - flag is set to FALSE, and the amount is positive. + description: Sum of the amounts of all statement lines where both the reconciled flag is set to FALSE, and the amount is positive. format: double x-is-money: true unreconciledAmountNeg: type: number - description: Sum of the amounts of all statement lines where both the reconciled - flag is set to FALSE, and the amount is negative. + description: Sum of the amounts of all statement lines where both the reconciled flag is set to FALSE, and the amount is negative. format: double x-is-money: true unreconciledLines: type: integer - description: Count of all statement lines where the reconciled flag is set - to FALSE. + description: Count of all statement lines where the reconciled flag is set to FALSE. format: int32 avgDaysUnreconciledPos: type: number - description: Sum-product of age of statement line in days multiplied by - transaction amount, divided by the sum of transaction amount - in for - those statement lines in which the reconciled flag is set to FALSE, and - the amount is positive. Provides an indication of the age of unreconciled - transactions. + description: Sum-product of age of statement line in days multiplied by transaction amount, divided by the sum of transaction amount - in for those statement lines in which the reconciled flag is set to FALSE, and the amount is positive. Provides an indication of the age of unreconciled transactions. format: double x-is-money: true avgDaysUnreconciledNeg: type: number - description: Sum-product of age of statement line in days multiplied by - transaction amount, divided by the sum of transaction amount - in for - those statement lines in which the reconciled flag is set to FALSE, and - the amount is negative. Provides an indication of the age of unreconciled - transactions. + description: Sum-product of age of statement line in days multiplied by transaction amount, divided by the sum of transaction amount - in for those statement lines in which the reconciled flag is set to FALSE, and the amount is negative. Provides an indication of the age of unreconciled transactions. format: double x-is-money: true earliestUnreconciledTransaction: type: string - description: UTC Date which is the earliest transaction date of a statement - line for which the reconciled flag is set to FALSE. This date is represented - in ISO 8601 format. + description: UTC Date which is the earliest transaction date of a statement line for which the reconciled flag is set to FALSE. This date is represented in ISO 8601 format. format: date latestUnreconciledTransaction: type: string - description: UTC Date which is the latest transaction date of a statement - line for which the reconciled flag is set to FALSE. This date is represented - in ISO 8601 format. + description: UTC Date which is the latest transaction date of a statement line for which the reconciled flag is set to FALSE. This date is represented in ISO 8601 format. format: date deletedAmount: type: number - description: Sum of the amounts of all deleted statement lines. Transactions - may be deleted due to duplication or otherwise. + description: Sum of the amounts of all deleted statement lines. Transactions may be deleted due to duplication or otherwise. format: double x-is-money: true totalAmount: type: number - description: Sum of the amounts of all statement lines. This is used as - a metric of comparison to the unreconciled figures above. + description: Sum of the amounts of all statement lines. This is used as a metric of comparison to the unreconciled figures above. format: double x-is-money: true dataSource: - $ref: "#/components/schemas/DataSourceResponse" + $ref: '#/components/schemas/DataSourceResponse' earliestReconciledTransaction: type: string - description: UTC Date which is the earliest transaction date of a statement - line for which the reconciled flag is set to TRUE. This date is represented - in ISO 8601 format. + description: UTC Date which is the earliest transaction date of a statement line for which the reconciled flag is set to TRUE. This date is represented in ISO 8601 format. format: date latestReconciledTransaction: type: string - description: UTC Date which is the latest transaction date of a statement - line for which the reconciled flag is set to TRUE. This date is represented - in ISO 8601 format. + description: UTC Date which is the latest transaction date of a statement line for which the reconciled flag is set to TRUE. This date is represented in ISO 8601 format. format: date reconciledAmountPos: type: number - description: Sum of the amounts of all statement lines where both the reconciled - flag is set to TRUE, and the amount is positive. + description: Sum of the amounts of all statement lines where both the reconciled flag is set to TRUE, and the amount is positive. format: double x-is-money: true reconciledAmountNeg: type: number - description: Sum of the amounts of all statement lines where both the reconciled - flag is set to TRUE, and the amount is negative. + description: Sum of the amounts of all statement lines where both the reconciled flag is set to TRUE, and the amount is negative. format: double x-is-money: true reconciledLines: type: integer - description: Count of all statement lines where the reconciled flag is set - to TRUE + description: Count of all statement lines where the reconciled flag is set to TRUE format: int32 totalAmountPos: type: number - description: Sum of the amounts of all statement lines where the amount - is positive + description: Sum of the amounts of all statement lines where the amount is positive format: double x-is-money: true totalAmountNeg: type: number - description: Sum of the amounts of all statement lines where the amount - is negative. + description: Sum of the amounts of all statement lines where the amount is negative. format: double x-is-money: true additionalProperties: false @@ -1700,20 +1732,20 @@ components: properties: code: type: string - description: "Accounting code" + description: Accounting code accountID: type: string - description: "ID of the account" + description: ID of the account format: uuid name: type: string - description: "Account name" + description: Account name reportingCode: type: string - description: "Reporting code" + description: Reporting code total: type: number - description: "Total movement on this account" + description: Total movement on this account format: double x-is-money: true additionalProperties: false @@ -1723,10 +1755,10 @@ components: accountTypes: type: array items: - $ref: "#/components/schemas/BalanceSheetAccountType" + $ref: '#/components/schemas/BalanceSheetAccountType' total: type: number - description: "Total value of all the accounts in this type" + description: Total value of all the accounts in this type format: double x-is-money: true additionalProperties: false @@ -1735,15 +1767,15 @@ components: properties: accountType: type: string - description: "The type of the account. See Account Types" + description: The type of the account. See Account Types accounts: type: array items: - $ref: "#/components/schemas/BalanceSheetAccountDetail" - description: "A list of all accounts of this type. Refer to the Account section below for each account element detail." + $ref: '#/components/schemas/BalanceSheetAccountDetail' + description: A list of all accounts of this type. Refer to the Account section below for each account element detail. total: type: number - description: "Total value of all the accounts in this type" + description: Total value of all the accounts in this type format: double x-is-money: true additionalProperties: false @@ -1753,30 +1785,30 @@ components: balanceDate: type: string format: date - description: "Balance date of the report" + description: Balance date of the report asset: - $ref: "#/components/schemas/BalanceSheetAccountGroup" + $ref: '#/components/schemas/BalanceSheetAccountGroup' liability: - $ref: "#/components/schemas/BalanceSheetAccountGroup" + $ref: '#/components/schemas/BalanceSheetAccountGroup' equity: - $ref: "#/components/schemas/BalanceSheetAccountGroup" + $ref: '#/components/schemas/BalanceSheetAccountGroup' additionalProperties: false CashBalance: type: object properties: openingCashBalance: type: number - description: "Opening balance of cash and cash equivalents" + description: Opening balance of cash and cash equivalents format: double x-is-money: true closingCashBalance: type: number - description: "Closing balance of cash and cash equivalents" + description: Closing balance of cash and cash equivalents format: double x-is-money: true netCashMovement: type: number - description: "Net movement of cash and cash equivalents for the period" + description: Net movement of cash and cash equivalents for the period format: double x-is-money: true readOnly: true @@ -1786,26 +1818,26 @@ components: properties: accountId: type: string - description: "ID of the account" + description: ID of the account format: uuid accountType: type: string - description: "The type of the account. See Account Types" + description: The type of the account. See Account Types accountClass: type: string - description: "The class of the account. See Account Class Types" + description: The class of the account. See Account Class Types code: type: string - description: "Account code" + description: Account code name: type: string - description: "Account name" + description: Account name reportingCode: type: string - description: "Reporting code used for cash flow classification" + description: Reporting code used for cash flow classification total: type: number - description: "Total amount for the account" + description: Total amount for the account format: double x-is-money: true additionalProperties: false @@ -1814,75 +1846,75 @@ components: properties: name: type: string - description: "Name of the cashflow activity type. It will be either Operating Activities, Investing Activities or Financing Activities" + description: Name of the cashflow activity type. It will be either Operating Activities, Investing Activities or Financing Activities total: type: number - description: "Total value of the activity type" + description: Total value of the activity type format: double x-is-money: true cashflowTypes: type: array items: - $ref: "#/components/schemas/CashflowType" + $ref: '#/components/schemas/CashflowType' additionalProperties: false CashflowResponse: type: object properties: startDate: type: string - description: "Start date of the report" - format: "date" + description: Start date of the report + format: date endDate: type: string - description: "End date of the report" - format: "date" + description: End date of the report + format: date cashBalance: - $ref: "#/components/schemas/CashBalance" + $ref: '#/components/schemas/CashBalance' cashflowActivities: type: array items: - $ref: "#/components/schemas/CashflowActivity" - description: "Break down of cash and cash equivalents for the period" + $ref: '#/components/schemas/CashflowActivity' + description: Break down of cash and cash equivalents for the period additionalProperties: false CashflowType: type: object properties: name: type: string - description: "Name of the activity" + description: Name of the activity total: type: number - description: "Total value of the activity" + description: Total value of the activity format: double x-is-money: true accounts: type: array items: - $ref: "#/components/schemas/CashflowAccount" - description: "List of the accounts in this activity" + $ref: '#/components/schemas/CashflowAccount' + description: List of the accounts in this activity additionalProperties: false PnlAccount: type: object properties: accountID: type: string - description: "ID of the account" + description: ID of the account format: uuid accountType: type: string - description: "The type of the account. See Account Types" + description: The type of the account. See Account Types code: type: string - description: "Account code" + description: Account code name: type: string - description: "Account name" + description: Account name reportingCode: type: string - description: "Reporting code (Shown if set)" + description: Reporting code (Shown if set) total: type: number - description: "Total movement on this account" + description: Total movement on this account format: double x-is-money: true additionalProperties: false @@ -1891,118 +1923,118 @@ components: properties: total: type: number - description: "Total revenue/expense value" + description: Total revenue/expense value format: double x-is-money: true accountTypes: type: array items: - $ref: "#/components/schemas/PnlAccountType" - description: "Contains trading income and other income for revenue section / operating expenses and direct cost for expense section if the data is available for each section. Refer to the account type element below" + $ref: '#/components/schemas/PnlAccountType' + description: Contains trading income and other income for revenue section / operating expenses and direct cost for expense section if the data is available for each section. Refer to the account type element below additionalProperties: false PnlAccountType: type: object properties: total: type: number - description: "Total movement on this account type" + description: Total movement on this account type format: double x-is-money: true title: type: string - description: "Name of this account type, it will be either Trading Income or Other Income for Revenue section / Direct Cost or Operating Expenses for Expense section" + description: Name of this account type, it will be either Trading Income or Other Income for Revenue section / Direct Cost or Operating Expenses for Expense section accounts: type: array items: - $ref: "#/components/schemas/PnlAccount" - description: "A list of the movement on each account detail during the query period. Refer to the account detail element below" + $ref: '#/components/schemas/PnlAccount' + description: A list of the movement on each account detail during the query period. Refer to the account detail element below additionalProperties: false ProfitAndLossResponse: type: object properties: startDate: type: string - description: "Start date of the report" - format: "date" + description: Start date of the report + format: date endDate: type: string - description: "End date of the report" - format: "date" + description: End date of the report + format: date netProfitLoss: type: number - description: "Net profit loss value" + description: Net profit loss value format: double x-is-money: true revenue: - $ref: "#/components/schemas/PnlAccountClass" + $ref: '#/components/schemas/PnlAccountClass' expense: - $ref: "#/components/schemas/PnlAccountClass" + $ref: '#/components/schemas/PnlAccountClass' additionalProperties: false TrialBalanceAccount: type: object properties: accountId: type: string - description: "ID of the account" + description: ID of the account format: uuid accountType: type: string - description: "The type of the account. See Account Types" + description: The type of the account. See Account Types accountCode: type: string - description: "Customer defined alpha numeric account code e.g 200 or SALES" + description: Customer defined alpha numeric account code e.g 200 or SALES accountClass: type: string - description: "The class of the account. See Account Class Types" + description: The class of the account. See Account Class Types status: type: string - description: "Accounts with a status of ACTIVE can be updated to ARCHIVED. See Account Status Codes" + description: Accounts with a status of ACTIVE can be updated to ARCHIVED. See Account Status Codes reportingCode: type: string - description: "Reporting code (Shown if set)" + description: Reporting code (Shown if set) accountName: type: string - description: "Name of the account" + description: Name of the account balance: - $ref: "#/components/schemas/TrialBalanceEntry" + $ref: '#/components/schemas/TrialBalanceEntry' signedBalance: type: number - description: "Value of balance. Expense and Asset accounts code debits as positive. Revenue, Liability, and Equity accounts code debits as negative" + description: Value of balance. Expense and Asset accounts code debits as positive. Revenue, Liability, and Equity accounts code debits as negative format: double x-is-money: true accountMovement: - $ref: "#/components/schemas/TrialBalanceMovement" + $ref: '#/components/schemas/TrialBalanceMovement' additionalProperties: false TrialBalanceEntry: type: object properties: value: type: number - description: "Net movement or net balance in the account" + description: Net movement or net balance in the account format: double x-is-money: true entryType: type: string - description: "Sign (Debit/Credit) of the movement of balance in the account" + description: Sign (Debit/Credit) of the movement of balance in the account additionalProperties: false TrialBalanceMovement: type: object properties: debits: type: number - description: "Debit amount" + description: Debit amount format: double x-is-money: true credits: type: number - description: "Credit amount" + description: Credit amount format: double x-is-money: true movement: - $ref: "#/components/schemas/TrialBalanceEntry" + $ref: '#/components/schemas/TrialBalanceEntry' signedMovement: type: number - description: "Value of movement. Expense and Asset accounts code debits as positive. Revenue, Liability, and Equity accounts code debits as negative" + description: Value of movement. Expense and Asset accounts code debits as positive. Revenue, Liability, and Equity accounts code debits as negative format: double x-is-money: true additionalProperties: false @@ -2012,16 +2044,16 @@ components: startDate: type: string format: date - description: "Start date of the report" + description: Start date of the report endDate: type: string format: date - description: "End date of the report" + description: End date of the report accounts: type: array items: - $ref: "#/components/schemas/TrialBalanceAccount" - description: "Refer to the accounts section below" + $ref: '#/components/schemas/TrialBalanceAccount' + description: Refer to the accounts section below additionalProperties: false IncomeByContactResponse: type: object @@ -2083,9 +2115,7 @@ components: properties: totalOutstandingAged: type: number - description: >- - Total outstanding invoice value within the period where the invoices - are more than 90 days old + description: Total outstanding invoice value within the period where the invoices are more than 90 days old format: double x-is-money: true totalVoided: @@ -2148,9 +2178,7 @@ components: properties: totalOutstandingAged: type: number - description: >- - Total outstanding invoice value for the contact within the period - where the invoices are more than 90 days old + description: Total outstanding invoice value for the contact within the period where the invoices are more than 90 days old format: double x-is-money: true totalVoided: @@ -2446,10 +2474,10 @@ components: format: double x-is-money: true endBalance: - type: number - description: Closing balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied. Where not supplied, the value will be 0. - format: double - x-is-money: true + type: number + description: Closing balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied. Where not supplied, the value will be 0. + format: double + x-is-money: true indicativeStartBalance: type: number description: | @@ -2458,8 +2486,7 @@ components: x-is-money: true indicativeEndBalance: type: number - description: | - Closing statement balance calculated in Xero (= bank account conversion balance plus sum of imported bank statement lines). Note: If indicative statement balance doesn't match imported statement balance for the same date, either the conversion (opening at inception) balance in Xero is wrong or there's an error in the bank statement lines in Xero. Ref: https://central.xero.com/s/article/Compare-the-statement-balance-in-Xero-to-your-actual-bank-balance?userregion=true + description: "Closing statement balance calculated in Xero (= bank account conversion balance plus sum of imported bank statement lines). Note: If indicative statement balance doesn't match imported statement balance for the same date, either the conversion (opening at inception) balance in Xero is wrong or there's an error in the bank statement lines in Xero. Ref: https://central.xero.com/s/article/Compare-the-statement-balance-in-Xero-to-your-actual-bank-balance?userregion=true \n" format: double x-is-money: true statementLines: @@ -2467,4 +2494,4 @@ components: items: $ref: '#/components/schemas/StatementLineResponse' description: List of statement lines - additionalProperties: false \ No newline at end of file + additionalProperties: false diff --git a/xero-identity.yaml b/xero-identity.yaml index 7a810976f..a8fb621a4 100644 --- a/xero-identity.yaml +++ b/xero-identity.yaml @@ -1,19 +1,19 @@ openapi: 3.0.0 info: - version: "6.3.0" + version: 10.1.0 title: Xero OAuth 2 Identity Service API description: These endpoints are related to managing authentication tokens and identity for Xero API - termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" + termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/ contact: - name: "Xero Platform Team" - email: "api@xero.com" - url: "https://developer.xero.com" + name: Xero Platform Team + email: api@xero.com + url: https://developer.xero.com license: - name: MIT - url: 'https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE' + name: MIT + url: https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE servers: - description: Xero Identity service API - url: 'https://api.xero.com' + url: https://api.xero.com paths: /Connections: get: @@ -29,31 +29,22 @@ paths: required: false name: authEventId description: Filter by authEventId - example: "00000000-0000-0000-0000-000000000000" + example: 00000000-0000-0000-0000-000000000000 schema: type: string format: uuid - x-basepath: 'https://api.xero.com' + x-basepath: https://api.xero.com responses: - '200': - description: Success - return response of type Connections array with 0 to n Connection + "200": + description: Success - return response of type Connections array with 0 to n Connection content: application/json: schema: type: array items: $ref: '#/components/schemas/Connection' - example: '[ - { - "id": "7cb59f93-2964-421d-bb5e-a0f7a4572a44", - "tenantId": "fe79f7dd-b6d4-4a92-ba7b-538af6289c58", - "tenantName": "Demo Company (NZ)", - "tenantType": "ORGANISATION", - "createdDateUtc": "2019-12-07T18:46:19.5165400", - "updatedDateUtc": "2019-12-07T18:46:19.5187840" - } - ]' - '/Connections/{id}': + example: '[ { "id": "7cb59f93-2964-421d-bb5e-a0f7a4572a44", "tenantId": "fe79f7dd-b6d4-4a92-ba7b-538af6289c58", "tenantName": "Demo Company (NZ)", "tenantType": "ORGANISATION", "createdDateUtc": "2019-12-07T18:46:19.5165400", "updatedDateUtc": "2019-12-07T18:46:19.5187840" } ]' + /Connections/{id}: delete: security: - OAuth2: [] @@ -62,7 +53,7 @@ paths: description: Override the base server url that include version operationId: deleteConnection summary: Deletes a connection for this user (i.e. disconnect a tenant) - x-basepath: 'https://api.xero.com' + x-basepath: https://api.xero.com parameters: - required: true in: path @@ -72,15 +63,15 @@ paths: type: string format: uuid responses: - '204': - description: Success - connection has been deleted no content returned - '404': + "204": + description: Success - connection has been deleted no content returned + "404": description: Resource not found components: schemas: Connection: externalDocs: - url: 'http://developer.xero.com' + url: http://developer.xero.com properties: id: description: Xero identifier @@ -105,16 +96,16 @@ components: type: string format: date-time x-is-datetime: true - x-php-format: '\DateTime' + x-php-format: \DateTime updatedDateUtc: description: The date when the user most recently connected this tenant to your app. May differ to the created date if the user has disconnected and subsequently reconnected this tenant to your app. type: string format: date-time x-is-datetime: true - x-php-format: '\DateTime' + x-php-format: \DateTime RefreshToken: externalDocs: - url: 'http://developer.xero.com' + url: http://developer.xero.com type: object properties: grant_type: @@ -131,7 +122,7 @@ components: type: string AccessToken: externalDocs: - url: 'http://developer.xero.com' + url: http://developer.xero.com type: object properties: id_token: @@ -151,17 +142,17 @@ components: description: token used to refresh an expired access token type: string securitySchemes: - BasicAuth: + BasicAuth: type: http scheme: basic OAuth2: type: oauth2 description: For more information - flows: + flows: authorizationCode: - authorizationUrl: 'https://login.xero.com/identity/connect/authorize' - tokenUrl: 'https://identity.xero.com/connect/token' + authorizationUrl: https://login.xero.com/identity/connect/authorize + tokenUrl: https://identity.xero.com/connect/token scopes: email: Grant read-only access to your email openid: Grant read-only access to your open id - profile: your profile information \ No newline at end of file + profile: your profile information diff --git a/xero-payroll-au.yaml b/xero-payroll-au.yaml index a6b8d867a..079bd50cc 100644 --- a/xero-payroll-au.yaml +++ b/xero-payroll-au.yaml @@ -1,16 +1,16 @@ openapi: 3.0.0 info: - version: "6.3.0" - title: 'Xero Payroll AU API' - description: 'This is the Xero Payroll API for orgs in Australia region.' - termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" + version: 10.1.0 + title: Xero Payroll AU API + description: This is the Xero Payroll API for orgs in Australia region. + termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/ contact: - name: "Xero Platform Team" - email: "api@xero.com" - url: "https://developer.xero.com" + name: Xero Platform Team + email: api@xero.com + url: https://developer.xero.com license: - name: MIT - url: 'https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE' + name: MIT + url: https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE servers: - description: Xero Payroll AU API url: https://api.xero.com/payroll.xro/1.0 @@ -23,7 +23,9 @@ paths: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollAu operationId: getEmployees @@ -55,52 +57,46 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Employees' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC": "/Date(1573621523465)/", - "Employees": [ - { - "EmployeeID": "b34e89ff-770d-4099-b7e5-f968767118bc", - "FirstName": "Jack", - "MiddleNames": "Johnson", - "LastName": "Sparrow", - "Status": "ACTIVE", - "Email": "jack.sparrow@xero.com", - "DateOfBirth": "/Date(572313600000+0000)/", - "Gender": "M", - "Phone": "4153332323", - "Mobile": "415-1234567", - "StartDate": "/Date(1547164800000+0000)/", - "OrdinaryEarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4", - "PayrollCalendarID": "22a05fc5-386d-4950-9842-3e7a6c812135", - "UpdatedDateUTC": "/Date(1572915814000+0000)/", - "IsSTP2Qualified": false - }, - { - "EmployeeID": "7aa04979-ded5-44d9-b09a-793749425844", - "FirstName": "John", - "LastName": "Smith", - "Status": "ACTIVE", - "Email": "john.smith@xero.com", - "DateOfBirth": "/Date(315619200000+0000)/", - "Gender": "M", - "StartDate": "/Date(1572566400000+0000)/", - "OrdinaryEarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4", - "PayrollCalendarID": "78bb86b9-e1ea-47ac-b75d-f087a81931de", - "UpdatedDateUTC": "/Date(1572916028000+0000)/", - "IsSTP2Qualified": false - } - ] - } - '400': + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573621523465)/ + Employees: + - EmployeeID: b34e89ff-770d-4099-b7e5-f968767118bc + FirstName: Jack + MiddleNames: Johnson + LastName: Sparrow + Status: ACTIVE + Email: jack.sparrow@xero.com + DateOfBirth: /Date(572313600000+0000)/ + Gender: M + Phone: "4153332323" + Mobile: 415-1234567 + StartDate: /Date(1547164800000+0000)/ + OrdinaryEarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4 + PayrollCalendarID: 22a05fc5-386d-4950-9842-3e7a6c812135 + UpdatedDateUTC: /Date(1572915814000+0000)/ + IsSTP2Qualified: false + - EmployeeID: 7aa04979-ded5-44d9-b09a-793749425844 + FirstName: John + LastName: Smith + Status: ACTIVE + Email: john.smith@xero.com + DateOfBirth: /Date(315619200000+0000)/ + Gender: M + StartDate: /Date(1572566400000+0000)/ + OrdinaryEarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4 + PayrollCalendarID: 78bb86b9-e1ea-47ac-b75d-f087a81931de + UpdatedDateUTC: /Date(1572916028000+0000)/ + IsSTP2Qualified: false + "400": description: validation error for a bad request content: application/json: @@ -108,7 +104,8 @@ paths: $ref: '#/components/schemas/APIException' post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollAu summary: Creates a payroll employee @@ -125,18 +122,18 @@ paths: object: employee java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2000, Month.OCTOBER, 28)" - java: "LocalDate.of(2000, Month.OCTOBER, 28)" - csharp: "new DateTime(2000, 10, 10)" - php: "new DateTime('2000-10-28')" - node: "'2000-10-28'" - python: "dateutil.parser.parse('2000-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2000, Month.OCTOBER, 28) + java: LocalDate.of(2000, Month.OCTOBER, 28) + csharp: new DateTime(2000, 10, 10) + php: new DateTime('2000-10-28') + node: '''2000-10-28''' + python: dateutil.parser.parse('2000-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - homeAddress: key: homeAddress keyPascal: HomeAddress keySnake: home_address - is_object: true + is_object: true - addressLine1: key: addressLine1 keyPascal: AddressLine1 @@ -166,18 +163,18 @@ paths: - employee: key: employee keyPascal: Employee - is_object: true + is_object: true - firstName: key: firstName keyPascal: FirstName - keySnake: first_name - default: "Adam" + keySnake: first_name + default: Adam object: employee - lastName: key: lastName keyPascal: LastName keySnake: last_name - default: "Adamson" + default: Adamson object: employee - dateOfBirth: is_variable: true @@ -198,49 +195,44 @@ paths: default: homeAddress python: home_address ruby: home_address - object: employee + object: employee responses: - '200': + "200": description: A successful request content: application/json: schema: $ref: '#/components/schemas/Employees' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC": "/Date(1573621524489)/", - "Employees": [ - { - "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", - "FirstName": "Albus", - "MiddleNames": "Percival", - "LastName": "Dumbledore", - "Status": "ACTIVE", - "Email": "albus39608@hogwarts.edu", - "DateOfBirth": "/Date(321523200000+0000)/", - "JobTitle": "Regional Manager", - "Gender": "M", - "HomeAddress": { - "AddressLine1": "101 Green St", - "City": "Island Bay", - "Region": "NSW", - "PostalCode": "6023", - "Country": "AUSTRALIA" - }, - "Phone": "444-2323", - "Mobile": "555-1212", - "StartDate": "/Date(321523200000+0000)/", - "Classification": "corporate", - "OrdinaryEarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4", - "UpdatedDateUTC": "/Date(1573621524458+0000)/", - "IsAuthorisedToApproveLeave": true, - "IsAuthorisedToApproveTimesheets": true - } - ] - } - '400': + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573621524489)/ + Employees: + - EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e + FirstName: Albus + MiddleNames: Percival + LastName: Dumbledore + Status: ACTIVE + Email: albus39608@hogwarts.edu + DateOfBirth: /Date(321523200000+0000)/ + JobTitle: Regional Manager + Gender: M + HomeAddress: + AddressLine1: 101 Green St + City: Island Bay + Region: NSW + PostalCode: "6023" + Country: AUSTRALIA + Phone: 444-2323 + Mobile: 555-1212 + StartDate: /Date(321523200000+0000)/ + Classification: corporate + OrdinaryEarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4 + UpdatedDateUTC: /Date(1573621524458+0000)/ + IsAuthorisedToApproveLeave: true + IsAuthorisedToApproveTimesheets: true + "400": description: invalid input, object invalid - TODO requestBody: required: true @@ -250,178 +242,127 @@ paths: type: array items: $ref: '#/components/schemas/Employee' - example: '[ - { - "FirstName": "Albus", - "LastName": "Dumbledore", - "DateOfBirth": "/Date(321523200000+0000)/", - "HomeAddress": { - "AddressLine1": "101 Green St", - "City": "Island Bay", - "Region": "NSW", - "PostalCode": "6023", - "Country": "AUSTRALIA" - }, - "StartDate": "/Date(321523200000+0000)/", - "MiddleNames": "Percival", - "Email": "albus39608@hogwarts.edu", - "Gender": "M", - "Phone": "444-2323", - "Mobile": "555-1212", - "IsAuthorisedToApproveLeave": true, - "IsAuthorisedToApproveTimesheets": true, - "JobTitle": "Regional Manager", - "Classification": "corporate", - "OrdinaryEarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4", - "Status": "ACTIVE" - } - ]' + example: '[ { "FirstName": "Albus", "LastName": "Dumbledore", "DateOfBirth": "/Date(321523200000+0000)/", "HomeAddress": { "AddressLine1": "101 Green St", "City": "Island Bay", "Region": "NSW", "PostalCode": "6023", "Country": "AUSTRALIA" }, "StartDate": "/Date(321523200000+0000)/", "MiddleNames": "Percival", "Email": "albus39608@hogwarts.edu", "Gender": "M", "Phone": "444-2323", "Mobile": "555-1212", "IsAuthorisedToApproveLeave": true, "IsAuthorisedToApproveTimesheets": true, "JobTitle": "Regional Manager", "Classification": "corporate", "OrdinaryEarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4", "Status": "ACTIVE" } ]' /Employees/{EmployeeID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollAu summary: Retrieves an employee's detail by unique employee id operationId: getEmployee - parameters: + parameters: - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: - application/json: + application/json: schema: $ref: '#/components/schemas/Employees' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC": "/Date(1573623316150)/", - "Employees": [ - { - "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", - "Title": "Mr.", - "FirstName": "Albus", - "MiddleNames": "Frank", - "LastName": "Dumbledore", - "Status": "ACTIVE", - "Email": "albus39608@hogwarts.edu", - "DateOfBirth": "/Date(321494400000+0000)/", - "JobTitle": "Regional Manager", - "Gender": "M", - "HomeAddress": { - "AddressLine1": "101 Green St", - "City": "Island Bay", - "Region": "NSW", - "PostalCode": "6023", - "Country": "AUSTRALIA" - }, - "Phone": "444-2323", - "Mobile": "555-1212", - "StartDate": "/Date(321494400000+0000)/", - "Classification": "corporate", - "OrdinaryEarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4", - "PayrollCalendarID": "78bb86b9-e1ea-47ac-b75d-f087a81931de", - "UpdatedDateUTC": "/Date(1573623306000+0000)/", - "EmployeeGroupName": "foo", - "IsAuthorisedToApproveLeave": true, - "IsAuthorisedToApproveTimesheets": true, - "TaxDeclaration": { - "AustralianResidentForTaxPurposes": true, - "TaxFreeThresholdClaimed": true, - "HasHELPDebt": false, - "HasSFSSDebt": false, - "EligibleToReceiveLeaveLoading": false, - "UpdatedDateUTC": "/Date(1573623306000+0000)/", - "HasStudentStartupLoan": false, - "ResidencyStatus": "AUSTRALIANRESIDENT" - }, - "BankAccounts": [], - "OpeningBalances": { - "OpeningBalanceDate": "/Date(1573603200000+0000)/", - "EarningsLines": [], - "DeductionLines": [], - "SuperLines": [], - "ReimbursementLines": [], - "LeaveLines": [ - { - "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", - "NumberOfUnits": 10 - } - ], - "PaidLeaveEarningsLines": [] - }, - "PayTemplate": { - "EarningsLines": [ - { - "EarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4", - "CalculationType": "USEEARNINGSRATE", - "NormalNumberOfUnits": 3 - } - ], - "DeductionLines": [ - { - "DeductionTypeID": "ed05ea82-e40a-4eb6-9c2e-4b3c03e7e938", - "CalculationType": "FIXEDAMOUNT", - "Amount": 4 - } - ], - "SuperLines": [ - { - "ContributionType": "SGC", - "CalculationType": "STATUTORY", - "MinimumMonthlyEarnings": 450, - "ExpenseAccountCode": "478", - "LiabilityAccountCode": "826" - } - ], - "ReimbursementLines": [ - { - "ReimbursementTypeID": "aa8cfa40-d872-4be0-8a94-bb7f00962f74", - "Description": "boo", - "Amount": 55 - } - ], - "LeaveLines": [ - { - "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", - "CalculationType": "FIXEDAMOUNTEACHPERIOD", - "AnnualNumberOfUnits": 4, - "EntitlementFinalPayPayoutType": "NOTPAIDOUT" - } - ] - }, - "SuperMemberships": [], - "LeaveBalances": [ - { - "LeaveName": "Carer Leave (unpaid)", - "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", - "NumberOfUnits": 10, - "TypeOfUnits": "Hours" - } - ] - } - ] - } + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573623316150)/ + Employees: + - EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e + Title: Mr. + FirstName: Albus + MiddleNames: Frank + LastName: Dumbledore + Status: ACTIVE + Email: albus39608@hogwarts.edu + DateOfBirth: /Date(321494400000+0000)/ + JobTitle: Regional Manager + Gender: M + HomeAddress: + AddressLine1: 101 Green St + City: Island Bay + Region: NSW + PostalCode: "6023" + Country: AUSTRALIA + Phone: 444-2323 + Mobile: 555-1212 + StartDate: /Date(321494400000+0000)/ + Classification: corporate + OrdinaryEarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4 + PayrollCalendarID: 78bb86b9-e1ea-47ac-b75d-f087a81931de + UpdatedDateUTC: /Date(1573623306000+0000)/ + EmployeeGroupName: foo + IsAuthorisedToApproveLeave: true + IsAuthorisedToApproveTimesheets: true + TaxDeclaration: + AustralianResidentForTaxPurposes: true + TaxFreeThresholdClaimed: true + HasHELPDebt: false + HasSFSSDebt: false + EligibleToReceiveLeaveLoading: false + UpdatedDateUTC: /Date(1573623306000+0000)/ + HasStudentStartupLoan: false + ResidencyStatus: AUSTRALIANRESIDENT + BankAccounts: [] + OpeningBalances: + OpeningBalanceDate: /Date(1573603200000+0000)/ + EarningsLines: [] + DeductionLines: [] + SuperLines: [] + ReimbursementLines: [] + LeaveLines: + - LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca + NumberOfUnits: 10 + PaidLeaveEarningsLines: [] + PayTemplate: + EarningsLines: + - EarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4 + CalculationType: USEEARNINGSRATE + NormalNumberOfUnits: 3 + DeductionLines: + - DeductionTypeID: ed05ea82-e40a-4eb6-9c2e-4b3c03e7e938 + CalculationType: FIXEDAMOUNT + Amount: 4 + SuperLines: + - ContributionType: SGC + CalculationType: STATUTORY + MinimumMonthlyEarnings: 450 + ExpenseAccountCode: "478" + LiabilityAccountCode: "826" + ReimbursementLines: + - ReimbursementTypeID: aa8cfa40-d872-4be0-8a94-bb7f00962f74 + Description: boo + Amount: 55 + LeaveLines: + - LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca + CalculationType: FIXEDAMOUNTEACHPERIOD + AnnualNumberOfUnits: 4 + EntitlementFinalPayPayoutType: NOTPAIDOUT + SuperMemberships: [] + LeaveBalances: + - LeaveName: Carer Leave (unpaid) + LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca + NumberOfUnits: 10 + TypeOfUnits: Hours post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollAu - summary: Updates an employee's detail + summary: Updates an employee's detail operationId: updateEmployee - description: Update properties on a single employee + description: Update properties on a single employee x-example: - dateOfBirthValue: key: dateOfBirth @@ -431,18 +372,18 @@ paths: object: employee java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2000, Month.OCTOBER, 28)" - java: "LocalDate.of(2000, Month.OCTOBER, 28)" - csharp: "new DateTime(2000, 10, 10)" - php: "new DateTime('2000-10-28')" - node: "'2000-10-28'" - python: "dateutil.parser.parse('2000-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2000, Month.OCTOBER, 28) + java: LocalDate.of(2000, Month.OCTOBER, 28) + csharp: new DateTime(2000, 10, 10) + php: new DateTime('2000-10-28') + node: '''2000-10-28''' + python: dateutil.parser.parse('2000-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - homeAddress: key: homeAddress keyPascal: HomeAddress keySnake: home_address - is_object: true + is_object: true - addressLine1: key: addressLine1 keyPascal: AddressLine1 @@ -472,18 +413,18 @@ paths: - employee: key: employee keyPascal: Employee - is_object: true + is_object: true - firstName: key: firstName keyPascal: FirstName - keySnake: first_name - default: "Adam" + keySnake: first_name + default: Adam object: employee - lastName: key: lastName keyPascal: LastName keySnake: last_name - default: "Adamson" + default: Adamson object: employee - dateOfBirth: is_variable: true @@ -512,51 +453,46 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: A successful request content: application/json: schema: $ref: '#/components/schemas/Employees' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "3f93110a-df13-49c7-b82f-a069813df188", - "DateTimeUTC": "/Date(1573621524786)/", - "Employees": [ - { - "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", - "FirstName": "Albus", - "MiddleNames": "Frank", - "LastName": "Dumbledore", - "Status": "ACTIVE", - "Email": "albus39608@hogwarts.edu", - "DateOfBirth": "/Date(321523200000+0000)/", - "JobTitle": "Regional Manager", - "Gender": "M", - "HomeAddress": { - "AddressLine1": "101 Green St", - "City": "Island Bay", - "Region": "NSW", - "PostalCode": "6023", - "Country": "AUSTRALIA" - }, - "Phone": "444-2323", - "Mobile": "555-1212", - "StartDate": "/Date(321523200000+0000)/", - "Classification": "corporate", - "OrdinaryEarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4", - "UpdatedDateUTC": "/Date(1573621524755+0000)/", - "IsAuthorisedToApproveLeave": true, - "IsAuthorisedToApproveTimesheets": true - } - ] - } + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: 3f93110a-df13-49c7-b82f-a069813df188 + DateTimeUTC: /Date(1573621524786)/ + Employees: + - EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e + FirstName: Albus + MiddleNames: Frank + LastName: Dumbledore + Status: ACTIVE + Email: albus39608@hogwarts.edu + DateOfBirth: /Date(321523200000+0000)/ + JobTitle: Regional Manager + Gender: M + HomeAddress: + AddressLine1: 101 Green St + City: Island Bay + Region: NSW + PostalCode: "6023" + Country: AUSTRALIA + Phone: 444-2323 + Mobile: 555-1212 + StartDate: /Date(321523200000+0000)/ + Classification: corporate + OrdinaryEarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4 + UpdatedDateUTC: /Date(1573621524755+0000)/ + IsAuthorisedToApproveLeave: true + IsAuthorisedToApproveTimesheets: true requestBody: required: true content: @@ -565,21 +501,19 @@ paths: type: array items: $ref: '#/components/schemas/Employee' - example: '[ - { - "MiddleNames": "Frank" - } - ]' + example: '[ { "MiddleNames": "Frank" } ]' /LeaveApplications: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollAu operationId: getLeaveApplications - summary: Retrieves leave applications + summary: Retrieves leave applications parameters: - in: header name: If-Modified-Since @@ -607,114 +541,89 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/LeaveApplications' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC": "/Date(1573679791199)/", - "LeaveApplications": [ - { - "LeaveApplicationID": "1d4cd583-0107-4386-936b-672eb3d1f624", - "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", - "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", - "LeavePeriods": [ - { - "PayPeriodStartDate": "/Date(1573171200000+0000)/", - "PayPeriodEndDate": "/Date(1573689600000+0000)/", - "LeavePeriodStatus": "SCHEDULED", - "NumberOfUnits": 0 - } - ], - "Title": "vacation", - "StartDate": "/Date(1573516800000+0000)/", - "EndDate": "/Date(1573516800000+0000)/", - "UpdatedDateUTC": "/Date(1573623008000+0000)/", - "PayOutType": "DEFAULT" - }, - { - "LeaveApplicationID": "3b934902-1e16-4c02-a3d3-68fa7d63e01d", - "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", - "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", - "LeavePeriods": [ - { - "PayPeriodStartDate": "/Date(1573171200000+0000)/", - "PayPeriodEndDate": "/Date(1573689600000+0000)/", - "LeavePeriodStatus": "SCHEDULED", - "NumberOfUnits": 8 - } - ], - "Title": "Cashed Out", - "StartDate": "/Date(1573516800000+0000)/", - "EndDate": "/Date(1573516800000+0000)/", - "UpdatedDateUTC": "/Date(1573623008000+0000)/", - "PayOutType": "CASHED_OUT" - }, - { - "LeaveApplicationID": "62b90465-66e9-4c3a-8151-de1e6335554d", - "EmployeeID": "b34e89ff-770d-4099-b7e5-f968767118bc", - "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", - "LeavePeriods": [ - { - "PayPeriodStartDate": "/Date(1571961600000+0000)/", - "PayPeriodEndDate": "/Date(1572480000000+0000)/", - "LeavePeriodStatus": "SCHEDULED", - "NumberOfUnits": 0 - }, - { - "PayPeriodStartDate": "/Date(1572566400000+0000)/", - "PayPeriodEndDate": "/Date(1573084800000+0000)/", - "LeavePeriodStatus": "SCHEDULED", - "NumberOfUnits": 0 - } - ], - "Title": "Yep Carer Leave", - "Description": "My updated Description", - "StartDate": "/Date(1572559200000+0000)/", - "EndDate": "/Date(1572645600000+0000)/", - "UpdatedDateUTC": "/Date(1573447344000+0000)/", - "PayOutType": "DEFAULT" - }, - { - "LeaveApplicationID": "e8bd9eeb-18c9-4475-9c81-b298f9aa26c0", - "EmployeeID": "b34e89ff-770d-4099-b7e5-f968767118bc", - "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", - "LeavePeriods": [ - { - "PayPeriodStartDate": "/Date(1571961600000+0000)/", - "PayPeriodEndDate": "/Date(1572480000000+0000)/", - "LeavePeriodStatus": "SCHEDULED", - "NumberOfUnits": 0 - }, - { - "PayPeriodStartDate": "/Date(1572566400000+0000)/", - "PayPeriodEndDate": "/Date(1573084800000+0000)/", - "LeavePeriodStatus": "SCHEDULED", - "NumberOfUnits": 0 - } - ], - "Title": "Hello World", - "StartDate": "/Date(1572559200000+0000)/", - "EndDate": "/Date(1572645600000+0000)/", - "UpdatedDateUTC": "/Date(1573447343000+0000)/", - "PayOutType": "DEFAULT" - } - ] - } - '400': + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573679791199)/ + LeaveApplications: + - LeaveApplicationID: 1d4cd583-0107-4386-936b-672eb3d1f624 + EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e + LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca + LeavePeriods: + - PayPeriodStartDate: /Date(1573171200000+0000)/ + PayPeriodEndDate: /Date(1573689600000+0000)/ + LeavePeriodStatus: SCHEDULED + NumberOfUnits: 0 + Title: vacation + StartDate: /Date(1573516800000+0000)/ + EndDate: /Date(1573516800000+0000)/ + UpdatedDateUTC: /Date(1573623008000+0000)/ + PayOutType: DEFAULT + - LeaveApplicationID: 3b934902-1e16-4c02-a3d3-68fa7d63e01d + EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e + LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca + LeavePeriods: + - PayPeriodStartDate: /Date(1573171200000+0000)/ + PayPeriodEndDate: /Date(1573689600000+0000)/ + LeavePeriodStatus: SCHEDULED + NumberOfUnits: 8 + Title: Cashed Out + StartDate: /Date(1573516800000+0000)/ + EndDate: /Date(1573516800000+0000)/ + UpdatedDateUTC: /Date(1573623008000+0000)/ + PayOutType: CASHED_OUT + - LeaveApplicationID: 62b90465-66e9-4c3a-8151-de1e6335554d + EmployeeID: b34e89ff-770d-4099-b7e5-f968767118bc + LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca + LeavePeriods: + - PayPeriodStartDate: /Date(1571961600000+0000)/ + PayPeriodEndDate: /Date(1572480000000+0000)/ + LeavePeriodStatus: SCHEDULED + NumberOfUnits: 0 + - PayPeriodStartDate: /Date(1572566400000+0000)/ + PayPeriodEndDate: /Date(1573084800000+0000)/ + LeavePeriodStatus: SCHEDULED + NumberOfUnits: 0 + Title: Yep Carer Leave + Description: My updated Description + StartDate: /Date(1572559200000+0000)/ + EndDate: /Date(1572645600000+0000)/ + UpdatedDateUTC: /Date(1573447344000+0000)/ + PayOutType: DEFAULT + - LeaveApplicationID: e8bd9eeb-18c9-4475-9c81-b298f9aa26c0 + EmployeeID: b34e89ff-770d-4099-b7e5-f968767118bc + LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca + LeavePeriods: + - PayPeriodStartDate: /Date(1571961600000+0000)/ + PayPeriodEndDate: /Date(1572480000000+0000)/ + LeavePeriodStatus: SCHEDULED + NumberOfUnits: 0 + - PayPeriodStartDate: /Date(1572566400000+0000)/ + PayPeriodEndDate: /Date(1573084800000+0000)/ + LeavePeriodStatus: SCHEDULED + NumberOfUnits: 0 + Title: Hello World + StartDate: /Date(1572559200000+0000)/ + EndDate: /Date(1572645600000+0000)/ + UpdatedDateUTC: /Date(1573447343000+0000)/ + PayOutType: DEFAULT + "400": description: validation error for a bad request content: application/json: schema: - $ref: '#/components/schemas/APIException' + $ref: '#/components/schemas/APIException' post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollAu summary: Creates a leave application @@ -730,13 +639,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - endDateValue: key: endDate keyPascal: EndDate @@ -744,26 +653,26 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 30)" - java: "LocalDate.of(2020, Month.OCTOBER, 30)" - csharp: "new DateTime(2020, 10, 12)" - php: "new DateTime('2020-10-30')" - node: "'2020-10-30'" - python: "dateutil.parser.parse('2020-10-30T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - leaveApplication: + default: LocalDate.of(2020, Month.OCTOBER, 30) + java: LocalDate.of(2020, Month.OCTOBER, 30) + csharp: new DateTime(2020, 10, 12) + php: new DateTime('2020-10-30') + node: '''2020-10-30''' + python: dateutil.parser.parse('2020-10-30T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - leaveApplication: key: leaveApplication keyPascal: LeaveApplication - is_object: true + is_object: true - employeeId: - is_uuid: true + is_uuid: true key: employeeId keyPascal: EmployeeId keySnake: employee_id object: leaveApplication default: 00000000-0000-0000-0000-000000000000 - leaveTypeId: - is_uuid: true + is_uuid: true key: leaveTypeId keyPascal: LeaveTypeId keySnake: leave_type_id @@ -786,7 +695,7 @@ paths: ruby: start_date object: leaveApplication - endDate: - is_last: true + is_last: true is_variable: true nonString: true key: endDate @@ -797,39 +706,32 @@ paths: ruby: end_date object: leaveApplication responses: - '200': + "200": description: A successful request content: application/json: schema: $ref: '#/components/schemas/LeaveApplications' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC": "/Date(1573679791917)/", - "LeaveApplications": [ - { - "LeaveApplicationID": "5f7097e4-51f2-46cc-921b-45bc73ea7831", - "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", - "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", - "LeavePeriods": [ - { - "PayPeriodStartDate": "/Date(1572566400000+0000)/", - "PayPeriodEndDate": "/Date(1573084800000+0000)/", - "LeavePeriodStatus": "SCHEDULED", - "NumberOfUnits": 7.6 - } - ], - "Title": "Hello World", - "StartDate": "/Date(1572559200000+0000)/", - "EndDate": "/Date(1572645600000+0000)/", - "UpdatedDateUTC": "/Date(1573679791897+0000)/", - "PayOutType": "DEFAULT" - } - ] - } - '400': + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573679791917)/ + LeaveApplications: + - LeaveApplicationID: 5f7097e4-51f2-46cc-921b-45bc73ea7831 + EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e + LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca + LeavePeriods: + - PayPeriodStartDate: /Date(1572566400000+0000)/ + PayPeriodEndDate: /Date(1573084800000+0000)/ + LeavePeriodStatus: SCHEDULED + NumberOfUnits: 7.6 + Title: Hello World + StartDate: /Date(1572559200000+0000)/ + EndDate: /Date(1572645600000+0000)/ + UpdatedDateUTC: /Date(1573679791897+0000)/ + PayOutType: DEFAULT + "400": description: invalid input, object invalid - TODO requestBody: required: true @@ -839,25 +741,19 @@ paths: type: array items: $ref: '#/components/schemas/LeaveApplication' - example: '[ - { - "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", - "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", - "Title": "Hello World", - "StartDate": "/Date(1572559200000+0000)/", - "EndDate": "/Date(1572645600000+0000)/" - } - ]' + example: '[ { "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", "Title": "Hello World", "StartDate": "/Date(1572559200000+0000)/", "EndDate": "/Date(1572645600000+0000)/" } ]' /LeaveApplications/v2: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollAu operationId: getLeaveApplicationsV2 - summary: Retrieves leave applications including leave requests + summary: Retrieves leave applications including leave requests parameters: - in: header name: If-Modified-Since @@ -885,185 +781,150 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/LeaveApplications' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC": "/Date(1573679791199)/", - "LeaveApplications": [ - { - "LeaveApplicationID": "1d4cd583-0107-4386-936b-672eb3d1f624", - "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", - "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", - "LeavePeriods": [ - { - "PayPeriodStartDate": "/Date(1573171200000+0000)/", - "PayPeriodEndDate": "/Date(1573689600000+0000)/", - "LeavePeriodStatus": "REQUESTED", - "NumberOfUnits": 4 - } - ], - "Title": "vacation", - "StartDate": "/Date(1573516800000+0000)/", - "EndDate": "/Date(1573516800000+0000)/", - "UpdatedDateUTC": "/Date(1573623008000+0000)/", - "PayOutType": "DEFAULT" - }, - { - "LeaveApplicationID": "3b934902-1e16-4c02-a3d3-68fa7d63e01d", - "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", - "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", - "LeavePeriods": [ - { - "PayPeriodStartDate": "/Date(1573171200000+0000)/", - "PayPeriodEndDate": "/Date(1573689600000+0000)/", - "LeavePeriodStatus": "SCHEDULED", - "NumberOfUnits": 8 - } - ], - "Title": "Cashed Out", - "StartDate": "/Date(1573516800000+0000)/", - "EndDate": "/Date(1573516800000+0000)/", - "UpdatedDateUTC": "/Date(1573623008000+0000)/", - "PayOutType": "CASHED_OUT" - }, - { - "LeaveApplicationID": "62b90465-66e9-4c3a-8151-de1e6335554d", - "EmployeeID": "b34e89ff-770d-4099-b7e5-f968767118bc", - "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", - "LeavePeriods": [ - { - "PayPeriodStartDate": "/Date(1571961600000+0000)/", - "PayPeriodEndDate": "/Date(1572480000000+0000)/", - "LeavePeriodStatus": "SCHEDULED", - "NumberOfUnits": 8 - }, - { - "PayPeriodStartDate": "/Date(1572566400000+0000)/", - "PayPeriodEndDate": "/Date(1573084800000+0000)/", - "LeavePeriodStatus": "SCHEDULED", - "NumberOfUnits": 8 - } - ], - "Title": "Yep Carer Leave", - "Description": "My updated Description", - "StartDate": "/Date(1572559200000+0000)/", - "EndDate": "/Date(1572645600000+0000)/", - "UpdatedDateUTC": "/Date(1573447344000+0000)/", - "PayOutType": "DEFAULT" - }, - { - "LeaveApplicationID": "e8bd9eeb-18c9-4475-9c81-b298f9aa26c0", - "EmployeeID": "b34e89ff-770d-4099-b7e5-f968767118bc", - "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", - "LeavePeriods": [ - { - "PayPeriodStartDate": "/Date(1571961600000+0000)/", - "PayPeriodEndDate": "/Date(1572480000000+0000)/", - "LeavePeriodStatus": "PROCESSED", - "NumberOfUnits": 8 - }, - { - "PayPeriodStartDate": "/Date(1572566400000+0000)/", - "PayPeriodEndDate": "/Date(1573084800000+0000)/", - "LeavePeriodStatus": "SCHEDULED", - "NumberOfUnits": 8 - } - ], - "Title": "Hello World", - "StartDate": "/Date(1572559200000+0000)/", - "EndDate": "/Date(1572645600000+0000)/", - "UpdatedDateUTC": "/Date(1573447343000+0000)/", - "PayOutType": "DEFAULT" - }, - { - "LeaveApplicationID": "3f93110a-df13-49c7-b82f-a069813df188", - "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", - "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", - "LeavePeriods": [ - { - "PayPeriodStartDate": "/Date(1573171200000+0000)/", - "PayPeriodEndDate": "/Date(1573689600000+0000)/", - "LeavePeriodStatus": "REJECTED", - "NumberOfUnits": 8 - } - ], - "Title": "vacation", - "StartDate": "/Date(1573516800000+0000)/", - "EndDate": "/Date(1573516800000+0000)/", - "UpdatedDateUTC": "/Date(1573623008000+0000)/", - "PayOutType": "DEFAULT" - } - ] - } - '400': + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573679791199)/ + LeaveApplications: + - LeaveApplicationID: 1d4cd583-0107-4386-936b-672eb3d1f624 + EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e + LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca + LeavePeriods: + - PayPeriodStartDate: /Date(1573171200000+0000)/ + PayPeriodEndDate: /Date(1573689600000+0000)/ + LeavePeriodStatus: REQUESTED + NumberOfUnits: 4 + Title: vacation + StartDate: /Date(1573516800000+0000)/ + EndDate: /Date(1573516800000+0000)/ + UpdatedDateUTC: /Date(1573623008000+0000)/ + PayOutType: DEFAULT + - LeaveApplicationID: 3b934902-1e16-4c02-a3d3-68fa7d63e01d + EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e + LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca + LeavePeriods: + - PayPeriodStartDate: /Date(1573171200000+0000)/ + PayPeriodEndDate: /Date(1573689600000+0000)/ + LeavePeriodStatus: SCHEDULED + NumberOfUnits: 8 + Title: Cashed Out + StartDate: /Date(1573516800000+0000)/ + EndDate: /Date(1573516800000+0000)/ + UpdatedDateUTC: /Date(1573623008000+0000)/ + PayOutType: CASHED_OUT + - LeaveApplicationID: 62b90465-66e9-4c3a-8151-de1e6335554d + EmployeeID: b34e89ff-770d-4099-b7e5-f968767118bc + LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca + LeavePeriods: + - PayPeriodStartDate: /Date(1571961600000+0000)/ + PayPeriodEndDate: /Date(1572480000000+0000)/ + LeavePeriodStatus: SCHEDULED + NumberOfUnits: 8 + - PayPeriodStartDate: /Date(1572566400000+0000)/ + PayPeriodEndDate: /Date(1573084800000+0000)/ + LeavePeriodStatus: SCHEDULED + NumberOfUnits: 8 + Title: Yep Carer Leave + Description: My updated Description + StartDate: /Date(1572559200000+0000)/ + EndDate: /Date(1572645600000+0000)/ + UpdatedDateUTC: /Date(1573447344000+0000)/ + PayOutType: DEFAULT + - LeaveApplicationID: e8bd9eeb-18c9-4475-9c81-b298f9aa26c0 + EmployeeID: b34e89ff-770d-4099-b7e5-f968767118bc + LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca + LeavePeriods: + - PayPeriodStartDate: /Date(1571961600000+0000)/ + PayPeriodEndDate: /Date(1572480000000+0000)/ + LeavePeriodStatus: PROCESSED + NumberOfUnits: 8 + - PayPeriodStartDate: /Date(1572566400000+0000)/ + PayPeriodEndDate: /Date(1573084800000+0000)/ + LeavePeriodStatus: SCHEDULED + NumberOfUnits: 8 + Title: Hello World + StartDate: /Date(1572559200000+0000)/ + EndDate: /Date(1572645600000+0000)/ + UpdatedDateUTC: /Date(1573447343000+0000)/ + PayOutType: DEFAULT + - LeaveApplicationID: 3f93110a-df13-49c7-b82f-a069813df188 + EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e + LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca + LeavePeriods: + - PayPeriodStartDate: /Date(1573171200000+0000)/ + PayPeriodEndDate: /Date(1573689600000+0000)/ + LeavePeriodStatus: REJECTED + NumberOfUnits: 8 + Title: vacation + StartDate: /Date(1573516800000+0000)/ + EndDate: /Date(1573516800000+0000)/ + UpdatedDateUTC: /Date(1573623008000+0000)/ + PayOutType: DEFAULT + "400": description: validation error for a bad request content: application/json: schema: - $ref: '#/components/schemas/APIException' + $ref: '#/components/schemas/APIException' /LeaveApplications/{LeaveApplicationID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollAu summary: Retrieves a leave application by a unique leave application id operationId: getLeaveApplication - parameters: + parameters: - name: LeaveApplicationID x-snake: leave_application_id in: path required: true description: Leave Application id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: - application/json: + application/json: schema: $ref: '#/components/schemas/LeaveApplications' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC": "/Date(1573679791457)/", - "LeaveApplications": [ - { - "LeaveApplicationID": "1d4cd583-0107-4386-936b-672eb3d1f624", - "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", - "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", - "LeavePeriods": [ - { - "PayPeriodStartDate": "/Date(1573171200000+0000)/", - "PayPeriodEndDate": "/Date(1573689600000+0000)/", - "LeavePeriodStatus": "SCHEDULED", - "NumberOfUnits": 7.6 - } - ], - "Title": "vacation", - "StartDate": "/Date(1573516800000+0000)/", - "EndDate": "/Date(1573516800000+0000)/", - "UpdatedDateUTC": "/Date(1573623008000+0000)/", - "PayOutType": "DEFAULT" - } - ] - } + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573679791457)/ + LeaveApplications: + - LeaveApplicationID: 1d4cd583-0107-4386-936b-672eb3d1f624 + EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e + LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca + LeavePeriods: + - PayPeriodStartDate: /Date(1573171200000+0000)/ + PayPeriodEndDate: /Date(1573689600000+0000)/ + LeavePeriodStatus: SCHEDULED + NumberOfUnits: 7.6 + Title: vacation + StartDate: /Date(1573516800000+0000)/ + EndDate: /Date(1573516800000+0000)/ + UpdatedDateUTC: /Date(1573623008000+0000)/ + PayOutType: DEFAULT post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollAu summary: Updates a specific leave application @@ -1076,13 +937,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - endDateValue: key: endDate keyPascal: EndDate @@ -1090,26 +951,26 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 30)" - java: "LocalDate.of(2020, Month.OCTOBER, 30)" - csharp: "new DateTime(2020, 10, 12)" - php: "new DateTime('2020-10-30')" - node: "'2020-10-30'" - python: "dateutil.parser.parse('2020-10-30T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - leaveApplication: + default: LocalDate.of(2020, Month.OCTOBER, 30) + java: LocalDate.of(2020, Month.OCTOBER, 30) + csharp: new DateTime(2020, 10, 12) + php: new DateTime('2020-10-30') + node: '''2020-10-30''' + python: dateutil.parser.parse('2020-10-30T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - leaveApplication: key: leaveApplication keyPascal: LeaveApplication - is_object: true + is_object: true - employeeId: - is_uuid: true + is_uuid: true key: employeeId keyPascal: EmployeeId keySnake: employee_id object: leaveApplication default: 00000000-0000-0000-0000-000000000000 - leaveTypeId: - is_uuid: true + is_uuid: true key: leaveTypeId keyPascal: LeaveTypeId keySnake: leave_type_id @@ -1132,7 +993,7 @@ paths: ruby: start_date object: leaveApplication - endDate: - is_last: true + is_last: true is_variable: true nonString: true key: endDate @@ -1149,45 +1010,38 @@ paths: in: path required: true description: Leave Application id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: A successful request content: application/json: schema: $ref: '#/components/schemas/LeaveApplications' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "3f93110a-df13-49c7-b82f-a069813df188", - "DateTimeUTC": "/Date(1573679792293)/", - "LeaveApplications": [ - { - "LeaveApplicationID": "1d4cd583-0107-4386-936b-672eb3d1f624", - "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", - "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", - "LeavePeriods": [ - { - "PayPeriodStartDate": "/Date(1572566400000+0000)/", - "PayPeriodEndDate": "/Date(1573084800000+0000)/", - "LeavePeriodStatus": "SCHEDULED", - "NumberOfUnits": 7.6 - } - ], - "Title": "vacation", - "Description": "My updated Description", - "StartDate": "/Date(1572559200000+0000)/", - "EndDate": "/Date(1572645600000+0000)/", - "UpdatedDateUTC": "/Date(1573679792293+0000)/", - "PayOutType": "DEFAULT" - } - ] - } - '400': + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: 3f93110a-df13-49c7-b82f-a069813df188 + DateTimeUTC: /Date(1573679792293)/ + LeaveApplications: + - LeaveApplicationID: 1d4cd583-0107-4386-936b-672eb3d1f624 + EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e + LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca + LeavePeriods: + - PayPeriodStartDate: /Date(1572566400000+0000)/ + PayPeriodEndDate: /Date(1573084800000+0000)/ + LeavePeriodStatus: SCHEDULED + NumberOfUnits: 7.6 + Title: vacation + Description: My updated Description + StartDate: /Date(1572559200000+0000)/ + EndDate: /Date(1572645600000+0000)/ + UpdatedDateUTC: /Date(1573679792293+0000)/ + PayOutType: DEFAULT + "400": description: invalid input, object invalid - TODO requestBody: required: true @@ -1197,32 +1051,14 @@ paths: type: array items: $ref: '#/components/schemas/LeaveApplication' - example: '[ - { - "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", - "LeaveApplicationID": "1d4cd583-0107-4386-936b-672eb3d1f624", - "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", - "LeavePeriods": [ - { - "PayPeriodStartDate": "/Date(1572566400000+0000)/", - "PayPeriodEndDate": "/Date(1573084800000+0000)/", - "LeavePeriodStatus": "SCHEDULED", - "NumberOfUnits": 7.6 - } - ], - "Title": "vacation", - "Description": "My updated Description", - "StartDate": "/Date(1572559200000+0000)/", - "EndDate": "/Date(1572645600000+0000)/", - "PayOutType": "DEFAULT" - } - ]' + example: '[ { "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", "LeaveApplicationID": "1d4cd583-0107-4386-936b-672eb3d1f624", "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", "LeavePeriods": [ { "PayPeriodStartDate": "/Date(1572566400000+0000)/", "PayPeriodEndDate": "/Date(1573084800000+0000)/", "LeavePeriodStatus": "SCHEDULED", "NumberOfUnits": 7.6 } ], "Title": "vacation", "Description": "My updated Description", "StartDate": "/Date(1572559200000+0000)/", "EndDate": "/Date(1572645600000+0000)/", "PayOutType": "DEFAULT" } ]' /LeaveApplications/{LeaveApplicationID}/approve: parameters: - $ref: '#/components/parameters/requiredHeader' post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollAu summary: Approve a requested leave application by a unique leave application id @@ -1239,50 +1075,44 @@ paths: format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: Application successfully approved content: - application/json: + application/json: schema: $ref: '#/components/schemas/LeaveApplications' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC": "/Date(1573679791457)/", - "LeaveApplications": [ - { - "LeaveApplicationID": "1d4cd583-0107-4386-936b-672eb3d1f624", - "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", - "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", - "LeavePeriods": [ - { - "PayPeriodStartDate": "/Date(1573171200000+0000)/", - "PayPeriodEndDate": "/Date(1573689600000+0000)/", - "LeavePeriodStatus": "SCHEDULED", - "NumberOfUnits": 7.6 - } - ], - "Title": "Requested Leave", - "StartDate": "/Date(1573516800000+0000)/", - "EndDate": "/Date(1573516800000+0000)/", - "UpdatedDateUTC": "/Date(1573623008000+0000)/", - "PayOutType": "DEFAULT" - } - ] - } - '400': + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573679791457)/ + LeaveApplications: + - LeaveApplicationID: 1d4cd583-0107-4386-936b-672eb3d1f624 + EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e + LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca + LeavePeriods: + - PayPeriodStartDate: /Date(1573171200000+0000)/ + PayPeriodEndDate: /Date(1573689600000+0000)/ + LeavePeriodStatus: SCHEDULED + NumberOfUnits: 7.6 + Title: Requested Leave + StartDate: /Date(1573516800000+0000)/ + EndDate: /Date(1573516800000+0000)/ + UpdatedDateUTC: /Date(1573623008000+0000)/ + PayOutType: DEFAULT + "400": description: validation error for a bad request content: application/json: schema: - $ref: '#/components/schemas/APIException' + $ref: '#/components/schemas/APIException' /LeaveApplications/{LeaveApplicationID}/reject: parameters: - $ref: '#/components/parameters/requiredHeader' post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollAu summary: Reject a leave application by a unique leave application id @@ -1299,50 +1129,45 @@ paths: format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: Application successfully rejected content: - application/json: + application/json: schema: $ref: '#/components/schemas/LeaveApplications' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC": "/Date(1573679791457)/", - "LeaveApplications": [ - { - "LeaveApplicationID": "1d4cd583-0107-4386-936b-672eb3d1f624", - "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", - "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", - "LeavePeriods": [ - { - "PayPeriodStartDate": "/Date(1573171200000+0000)/", - "PayPeriodEndDate": "/Date(1573689600000+0000)/", - "LeavePeriodStatus": "REJECTED", - "NumberOfUnits": 7.6 - } - ], - "Title": "Requested Leave", - "StartDate": "/Date(1573516800000+0000)/", - "EndDate": "/Date(1573516800000+0000)/", - "UpdatedDateUTC": "/Date(1573623008000+0000)/", - "PayOutType": "DEFAULT" - } - ] - } - '400': + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573679791457)/ + LeaveApplications: + - LeaveApplicationID: 1d4cd583-0107-4386-936b-672eb3d1f624 + EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e + LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca + LeavePeriods: + - PayPeriodStartDate: /Date(1573171200000+0000)/ + PayPeriodEndDate: /Date(1573689600000+0000)/ + LeavePeriodStatus: REJECTED + NumberOfUnits: 7.6 + Title: Requested Leave + StartDate: /Date(1573516800000+0000)/ + EndDate: /Date(1573516800000+0000)/ + UpdatedDateUTC: /Date(1573623008000+0000)/ + PayOutType: DEFAULT + "400": description: validation error for a bad request content: application/json: schema: - $ref: '#/components/schemas/APIException' + $ref: '#/components/schemas/APIException' /PayItems: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollAu operationId: getPayItems @@ -1374,163 +1199,136 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayItems' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC": "/Date(1573620869531)/", - "PayItems": { - "EarningsRates": [ - { - "EarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4", - "Name": "Ordinary Hours", - "EarningsType": "ORDINARYTIMEEARNINGS", - "RateType": "RATEPERUNIT", - "AccountCode": "477", - "TypeOfUnits": "Hours", - "RatePerUnit": 3, - "IsExemptFromTax": true, - "IsExemptFromSuper": true, - "IsReportableAsW1": true, - "AllowanceContributesToAnnualLeaveRate": false, - "AllowanceContributesToOvertimeRate": false, - "UpdatedDateUTC": "/Date(1573620821000+0000)/", - "CurrentRecord": true - }, - { - "EarningsRateID": "dc3ff92e-0e49-4967-aa4b-0bb21c0594ce", - "Name": "Overtime Hours (exempt from super)", - "EarningsType": "OVERTIMEEARNINGS", - "RateType": "RATEPERUNIT", - "AccountCode": "477", - "TypeOfUnits": "Hours", - "IsExemptFromTax": false, - "IsExemptFromSuper": true, - "IsReportableAsW1": false, - "AllowanceContributesToAnnualLeaveRate": false, - "AllowanceContributesToOvertimeRate": false, - "UpdatedDateUTC": "/Date(1547500330000+0000)/", - "CurrentRecord": true - }, - { - "EarningsRateID": "f59999ca-cd5c-4a54-a381-2d0c817f0c3e", - "Name": "Redundancy", - "EarningsType": "LUMPSUMD", - "RateType": "FIXEDAMOUNT", - "AccountCode": "477", - "IsExemptFromTax": true, - "IsExemptFromSuper": true, - "IsReportableAsW1": true, - "AllowanceContributesToAnnualLeaveRate": false, - "AllowanceContributesToOvertimeRate": false, - "UpdatedDateUTC": "/Date(1547500330000+0000)/", - "CurrentRecord": true - }, - { - "EarningsRateID": "c97dafac-9d99-406f-9f6c-abfaf81c527d", - "Name": "ETP Leave Earning", - "EarningsType": "EMPLOYMENTTERMINATIONPAYMENT", - "RateType": "RATEPERUNIT", - "AccountCode": "477", - "TypeOfUnits": "Hours", - "IsExemptFromTax": false, - "IsExemptFromSuper": true, - "IsReportableAsW1": true, - "AllowanceContributesToAnnualLeaveRate": false, - "AllowanceContributesToOvertimeRate": false, - "UpdatedDateUTC": "/Date(1573620791000+0000)/", - "EmploymentTerminationPaymentType": "O", - "CurrentRecord": true - } - ], - "DeductionTypes": [ - { - "DeductionTypeID": "727af5e8-b347-4ae7-85fc-9b82266d0aec", - "DeductionCategory": "UNIONFEES", - "Name": "Union Fees/Subscriptions", - "AccountCode": "850", - "ReducesTax": false, - "ReducesSuper": false, - "IsExemptFromW1": false, - "UpdatedDateUTC": "/Date(1547500330000+0000)/", - "CurrentRecord": true - }, - { - "DeductionTypeID": "04191cd3-7952-4a87-9911-9d8575280f6a", - "DeductionCategory": "NONE", - "Name": "Lease Payments", - "AccountCode": "850", - "ReducesTax": true, - "ReducesSuper": true, - "IsExemptFromW1": false, - "UpdatedDateUTC": "/Date(1547500330000+0000)/", - "CurrentRecord": true - } - ], - "ReimbursementTypes": [ - { - "ReimbursementTypeID": "98ba33b2-db5b-4204-bcac-5ddd98d63524", - "Name": "Travel Costs", - "AccountCode": "850", - "UpdatedDateUTC": "/Date(1547500330000+0000)/", - "CurrentRecord": true - }, - { - "ReimbursementTypeID": "aa8cfa40-d872-4be0-8a94-bb7f00962f74", - "Name": "Other Reimbursable Costs", - "AccountCode": "850", - "UpdatedDateUTC": "/Date(1547500330000+0000)/", - "CurrentRecord": true - } - ], - "LeaveTypes": [ - { - "LeaveTypeID": "fbcc9dab-6238-43d9-a3f4-d768423fdcfa", - "Name": "Annual Leave", - "TypeOfUnits": "Hours", - "NormalEntitlement": 152, - "LeaveLoadingRate": 1.0, - "IsPaidLeave": true, - "ShowOnPayslip": true, - "UpdatedDateUTC": "/Date(1573620853000+0000)/", - "CurrentRecord": true - }, - { - "LeaveTypeID": "74195ab2-1f2b-4136-8ddc-20387a0b1027", - "Name": "Long Service Leave", - "TypeOfUnits": "Hours", - "IsPaidLeave": true, - "ShowOnPayslip": false, - "UpdatedDateUTC": "/Date(1547500330000+0000)/", - "CurrentRecord": true - }, - { - "LeaveTypeID": "ff4d16da-ae8a-4f57-acb3-9ee593996bce", - "Name": "Parental Leave (unpaid)", - "TypeOfUnits": "Hours", - "IsPaidLeave": false, - "ShowOnPayslip": false, - "UpdatedDateUTC": "/Date(1547500330000+0000)/", - "CurrentRecord": true - } - ] - } - } - '400': - description: validation error for a bad request - content: + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573620869531)/ + PayItems: + EarningsRates: + - EarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4 + Name: Ordinary Hours + EarningsType: ORDINARYTIMEEARNINGS + RateType: RATEPERUNIT + AccountCode: "477" + TypeOfUnits: Hours + RatePerUnit: 3 + IsExemptFromTax: true + IsExemptFromSuper: true + IsReportableAsW1: true + AllowanceContributesToAnnualLeaveRate: false + AllowanceContributesToOvertimeRate: false + UpdatedDateUTC: /Date(1573620821000+0000)/ + CurrentRecord: true + - EarningsRateID: dc3ff92e-0e49-4967-aa4b-0bb21c0594ce + Name: Overtime Hours (exempt from super) + EarningsType: OVERTIMEEARNINGS + RateType: RATEPERUNIT + AccountCode: "477" + TypeOfUnits: Hours + IsExemptFromTax: false + IsExemptFromSuper: true + IsReportableAsW1: false + AllowanceContributesToAnnualLeaveRate: false + AllowanceContributesToOvertimeRate: false + UpdatedDateUTC: /Date(1547500330000+0000)/ + CurrentRecord: true + - EarningsRateID: f59999ca-cd5c-4a54-a381-2d0c817f0c3e + Name: Redundancy + EarningsType: LUMPSUMD + RateType: FIXEDAMOUNT + AccountCode: "477" + IsExemptFromTax: true + IsExemptFromSuper: true + IsReportableAsW1: true + AllowanceContributesToAnnualLeaveRate: false + AllowanceContributesToOvertimeRate: false + UpdatedDateUTC: /Date(1547500330000+0000)/ + CurrentRecord: true + - EarningsRateID: c97dafac-9d99-406f-9f6c-abfaf81c527d + Name: ETP Leave Earning + EarningsType: EMPLOYMENTTERMINATIONPAYMENT + RateType: RATEPERUNIT + AccountCode: "477" + TypeOfUnits: Hours + IsExemptFromTax: false + IsExemptFromSuper: true + IsReportableAsW1: true + AllowanceContributesToAnnualLeaveRate: false + AllowanceContributesToOvertimeRate: false + UpdatedDateUTC: /Date(1573620791000+0000)/ + EmploymentTerminationPaymentType: O + CurrentRecord: true + DeductionTypes: + - DeductionTypeID: 727af5e8-b347-4ae7-85fc-9b82266d0aec + DeductionCategory: UNIONFEES + Name: Union Fees/Subscriptions + AccountCode: "850" + ReducesTax: false + ReducesSuper: false + IsExemptFromW1: false + UpdatedDateUTC: /Date(1547500330000+0000)/ + CurrentRecord: true + - DeductionTypeID: 04191cd3-7952-4a87-9911-9d8575280f6a + DeductionCategory: NONE + Name: Lease Payments + AccountCode: "850" + ReducesTax: true + ReducesSuper: true + IsExemptFromW1: false + UpdatedDateUTC: /Date(1547500330000+0000)/ + CurrentRecord: true + ReimbursementTypes: + - ReimbursementTypeID: 98ba33b2-db5b-4204-bcac-5ddd98d63524 + Name: Travel Costs + AccountCode: "850" + UpdatedDateUTC: /Date(1547500330000+0000)/ + CurrentRecord: true + - ReimbursementTypeID: aa8cfa40-d872-4be0-8a94-bb7f00962f74 + Name: Other Reimbursable Costs + AccountCode: "850" + UpdatedDateUTC: /Date(1547500330000+0000)/ + CurrentRecord: true + LeaveTypes: + - LeaveTypeID: fbcc9dab-6238-43d9-a3f4-d768423fdcfa + Name: Annual Leave + TypeOfUnits: Hours + NormalEntitlement: 152 + LeaveLoadingRate: 1.0 + IsPaidLeave: true + ShowOnPayslip: true + UpdatedDateUTC: /Date(1573620853000+0000)/ + CurrentRecord: true + - LeaveTypeID: 74195ab2-1f2b-4136-8ddc-20387a0b1027 + Name: Long Service Leave + TypeOfUnits: Hours + IsPaidLeave: true + ShowOnPayslip: false + UpdatedDateUTC: /Date(1547500330000+0000)/ + CurrentRecord: true + - LeaveTypeID: ff4d16da-ae8a-4f57-acb3-9ee593996bce + Name: Parental Leave (unpaid) + TypeOfUnits: Hours + IsPaidLeave: false + ShowOnPayslip: false + UpdatedDateUTC: /Date(1547500330000+0000)/ + CurrentRecord: true + "400": + description: validation error for a bad request + content: application/json: - schema: - $ref: '#/components/schemas/APIException' + schema: + $ref: '#/components/schemas/APIException' post: security: - - OAuth2: [payroll.settings] + - OAuth2: + - payroll.settings tags: - PayrollAu summary: Creates a pay item @@ -1542,7 +1340,7 @@ paths: key: earningsRate keyPascal: EarningsRate keySnake: earnings_rate - is_object: true + is_object: true - earningsName: key: name keyPascal: Name @@ -1567,7 +1365,7 @@ paths: keySnake: is_exempt_from_tax object: earningsRate default: true - nonString: true + nonString: true - isExemptFromSuper: key: isExemptFromSuper keyPascal: IsExemptFromSuper @@ -1592,7 +1390,7 @@ paths: key: deductionType keyPascal: DeductionType keySnake: deduction_type - is_object: true + is_object: true - deductionTypeName: key: name keyPascal: Name @@ -1619,12 +1417,12 @@ paths: object: deductionType default: true nonString: true - is_last: true + is_last: true - leaveType: key: leaveType keyPascal: LeaveType keySnake: leave_type - is_object: true + is_object: true - leaveTypeName: key: name keyPascal: Name @@ -1650,13 +1448,13 @@ paths: keySnake: show_on_payslip object: leaveType default: true - is_last: true + is_last: true nonString: true - reimbursementType: key: reimbursementType keyPascal: ReimbursementType keySnake: reimbursement_type - is_object: true + is_object: true - reimbursementTypeName: key: name keyPascal: Name @@ -1668,17 +1466,17 @@ paths: keyPascal: AccountCode keySnake: account_code object: reimbursementType - is_last: true - default: 850 + is_last: true + default: 850 - earningsRates: - is_list: true + is_list: true key: earningsRates keyPascal: EarningsRates keySnake: earnings_rates csharp: EarningsRate java: EarningsRate - addEarningsRates: - is_list_add: true + is_list_add: true key: earningsRates keyPascal: EarningsRates keySnake: earnings_rates @@ -1686,7 +1484,7 @@ paths: python: earnings_rate ruby: earnings_rate csharp: EarningsRate - object: earningsRate + object: earningsRate - deductionTypes: is_list: true key: deductionTypes @@ -1695,7 +1493,7 @@ paths: csharp: DeductionType java: DeductionType - leaveTypes: - is_list: true + is_list: true key: leaveTypes keyPascal: LeaveTypes keySnake: leave_types @@ -1703,7 +1501,7 @@ paths: java: LeaveType - addLeaveTypes: is_last: true - is_list_add: true + is_list_add: true key: leaveTypes keyPascal: LeaveTypes keySnake: leave_types @@ -1711,17 +1509,17 @@ paths: python: leave_type ruby: leave_type csharp: LeaveType - object: leaveType + object: leaveType - reimbursementTypes: - is_list: true + is_list: true key: reimbursementTypes keyPascal: ReimbursementTypes keySnake: reimbursement_types csharp: ReimbursementType java: ReimbursementType - addReimbursementTypes: - is_last: true - is_list_add: true + is_last: true + is_list_add: true key: reimbursementTypes keyPascal: ReimbursementTypes keySnake: reimbursement_types @@ -1729,12 +1527,12 @@ paths: python: reimbursement_type ruby: reimbursement_type csharp: ReimbursementType - object: reimbursementType + object: reimbursementType - payItem: key: payItem keyPascal: PayItem keySnake: pay_item - is_object: true + is_object: true - setEarningsRates: is_variable: true nonString: true @@ -1743,7 +1541,7 @@ paths: default: earningsRates python: earnings_rates ruby: earnings_rates - object: payItem + object: payItem - setDeductionTypes: is_variable: true nonString: true @@ -1752,7 +1550,7 @@ paths: default: deductionTypes python: deduction_types ruby: deduction_types - object: payItem + object: payItem - setLeaveTypes: is_variable: true nonString: true @@ -1761,81 +1559,72 @@ paths: default: leaveTypes python: leave_types ruby: leave_types - object: payItem + object: payItem - setReimbursementTypes: is_variable: true nonString: true key: reimbursementTypes keyPascal: ReimbursementTypes default: reimbursementTypes - python: reimbursement_types + python: reimbursement_types ruby: reimbursement_types object: payItem is_last: true responses: - '200': - description: A successful request - currently returns empty array for JSON + "200": + description: A successful request - currently returns empty array for JSON content: application/json: schema: $ref: '#/components/schemas/PayItems' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC": "/Date(1593448963288)/", - "PayItems": { - "EarningsRates": [ - { - "EarningsRateID": "1fa4e226-b711-46ba-a8a7-4344c9c5fb87", - "Name": "MyRate", - "EarningsType": "ORDINARYTIMEEARNINGS", - "RateType": "MULTIPLE", - "AccountCode": "400", - "Multiplier": 1.5, - "IsExemptFromTax": true, - "IsExemptFromSuper": true, - "AccrueLeave": false, - "IsReportableAsW1": false, - "AllowanceContributesToAnnualLeaveRate": false, - "AllowanceContributesToOvertimeRate": false, - "UpdatedDateUTC": "/Date(1593448963210+0000)/", - "CurrentRecord": true - }, - { - "EarningsRateID": "c6905c26-0716-4746-9098-608545e04dd2", - "Name": "Redundancy", - "EarningsType": "LUMPSUMD", - "RateType": "FIXEDAMOUNT", - "AccountCode": "477", - "IsExemptFromTax": true, - "IsExemptFromSuper": true, - "IsReportableAsW1": true, - "AllowanceContributesToAnnualLeaveRate": false, - "AllowanceContributesToOvertimeRate": false, - "UpdatedDateUTC": "/Date(1476729649000+0000)/", - "CurrentRecord": true - }, - { - "EarningsRateID": "33820094-656e-4db3-b04b-8bd3e2db0a9b", - "Name": "ETP Leave Earning", - "EarningsType": "EMPLOYMENTTERMINATIONPAYMENT", - "RateType": "RATEPERUNIT", - "AccountCode": "477", - "TypeOfUnits": "Hours", - "IsExemptFromTax": false, - "IsExemptFromSuper": true, - "IsReportableAsW1": true, - "AllowanceContributesToAnnualLeaveRate": false, - "AllowanceContributesToOvertimeRate": false, - "UpdatedDateUTC": "/Date(1520900705000+0000)/", - "EmploymentTerminationPaymentType": "O", - "CurrentRecord": true - } - ] - } - } - '400': + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1593448963288)/ + PayItems: + EarningsRates: + - EarningsRateID: 1fa4e226-b711-46ba-a8a7-4344c9c5fb87 + Name: MyRate + EarningsType: ORDINARYTIMEEARNINGS + RateType: MULTIPLE + AccountCode: "400" + Multiplier: 1.5 + IsExemptFromTax: true + IsExemptFromSuper: true + AccrueLeave: false + IsReportableAsW1: false + AllowanceContributesToAnnualLeaveRate: false + AllowanceContributesToOvertimeRate: false + UpdatedDateUTC: /Date(1593448963210+0000)/ + CurrentRecord: true + - EarningsRateID: c6905c26-0716-4746-9098-608545e04dd2 + Name: Redundancy + EarningsType: LUMPSUMD + RateType: FIXEDAMOUNT + AccountCode: "477" + IsExemptFromTax: true + IsExemptFromSuper: true + IsReportableAsW1: true + AllowanceContributesToAnnualLeaveRate: false + AllowanceContributesToOvertimeRate: false + UpdatedDateUTC: /Date(1476729649000+0000)/ + CurrentRecord: true + - EarningsRateID: 33820094-656e-4db3-b04b-8bd3e2db0a9b + Name: ETP Leave Earning + EarningsType: EMPLOYMENTTERMINATIONPAYMENT + RateType: RATEPERUNIT + AccountCode: "477" + TypeOfUnits: Hours + IsExemptFromTax: false + IsExemptFromSuper: true + IsReportableAsW1: true + AllowanceContributesToAnnualLeaveRate: false + AllowanceContributesToOvertimeRate: false + UpdatedDateUTC: /Date(1520900705000+0000)/ + EmploymentTerminationPaymentType: O + CurrentRecord: true + "400": description: invalid input, object invalid - TODO requestBody: required: true @@ -1843,33 +1632,31 @@ paths: application/json: schema: $ref: '#/components/schemas/PayItem' - example: { - "EarningsRates": [ - { - "Name": "MyRate", - "AccountCode": "400", - "TypeOfUnits": "4.00", - "IsExemptFromTax": true, - "IsExemptFromSuper": true, - "IsReportableAsW1": false, - "AllowanceContributesToAnnualLeaveRate": false, - "AllowanceContributesToOvertimeRate": false, - "EarningsType": "ORDINARYTIMEEARNINGS", - "EarningsRateID": "1fa4e226-b711-46ba-a8a7-4344c9c5fb87", - "RateType": "MULTIPLE", - "RatePerUnit": "10.0", - "Multiplier": 1.5, - "Amount": 5, - "EmploymentTerminationPaymentType": "O" - } - ] - } + example: + EarningsRates: + - Name: MyRate + AccountCode: "400" + TypeOfUnits: "4.00" + IsExemptFromTax: true + IsExemptFromSuper: true + IsReportableAsW1: false + AllowanceContributesToAnnualLeaveRate: false + AllowanceContributesToOvertimeRate: false + EarningsType: ORDINARYTIMEEARNINGS + EarningsRateID: 1fa4e226-b711-46ba-a8a7-4344c9c5fb87 + RateType: MULTIPLE + RatePerUnit: "10.0" + Multiplier: 1.5 + Amount: 5 + EmploymentTerminationPaymentType: O /PayrollCalendars: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollAu operationId: getPayrollCalendars @@ -1901,47 +1688,42 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayrollCalendars' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC":"/Date(1573611063408)/", - "PayrollCalendars":[ - { - "PayrollCalendarID":"78bb86b9-e1ea-47ac-b75d-f087a81931de", - "Name":"Sid Weekly", - "CalendarType":"WEEKLY", - "StartDate":"/Date(1573171200000+0000)/", - "PaymentDate":"/Date(1573776000000+0000)/", - "UpdatedDateUTC":"/Date(1573077687000+0000)/", - "ReferenceDate":"/Date(1573171200000+0000)/" - }, - { - "PayrollCalendarID":"22a05fc5-386d-4950-9842-3e7a6c812135", - "Name":"Weekly", - "CalendarType":"WEEKLY", - "StartDate":"/Date(1546560000000+0000)/", - "PaymentDate":"/Date(1547164800000+0000)/", - "UpdatedDateUTC":"/Date(1572916157000+0000)/", - "ReferenceDate":"/Date(1573171200000+0000)/" - } - ] - } - '400': - description: validation error for a bad request - content: - application/json: - schema: + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573611063408)/ + PayrollCalendars: + - PayrollCalendarID: 78bb86b9-e1ea-47ac-b75d-f087a81931de + Name: Sid Weekly + CalendarType: WEEKLY + StartDate: /Date(1573171200000+0000)/ + PaymentDate: /Date(1573776000000+0000)/ + UpdatedDateUTC: /Date(1573077687000+0000)/ + ReferenceDate: /Date(1573171200000+0000)/ + - PayrollCalendarID: 22a05fc5-386d-4950-9842-3e7a6c812135 + Name: Weekly + CalendarType: WEEKLY + StartDate: /Date(1546560000000+0000)/ + PaymentDate: /Date(1547164800000+0000)/ + UpdatedDateUTC: /Date(1572916157000+0000)/ + ReferenceDate: /Date(1573171200000+0000)/ + "400": + description: validation error for a bad request + content: + application/json: + schema: $ref: '#/components/schemas/APIException' post: security: - - OAuth2: [payroll.settings] + - OAuth2: + - payroll.settings tags: - PayrollAu summary: Creates a Payroll Calendar @@ -1957,13 +1739,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2000-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2000-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - paymentDateValue: key: paymentDate keyPascal: PaymentDate @@ -1971,15 +1753,15 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 30)" - java: "LocalDate.of(2020, Month.OCTOBER, 30)" - csharp: "new DateTime(2020, 10, 30)" - php: "new DateTime('2020-10-30')" - node: "'2000-10-30'" - python: "dateutil.parser.parse('2000-10-30T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 30) + java: LocalDate.of(2020, Month.OCTOBER, 30) + csharp: new DateTime(2020, 10, 30) + php: new DateTime('2020-10-30') + node: '''2000-10-30''' + python: dateutil.parser.parse('2000-10-30T00:00:00Z') + ruby: '''YYYY-MM-DD''' - payrollCalendar: - is_object: true + is_object: true key: payrollCalendar keyPascal: PayrollCalendar keySnake: payroll_calendar @@ -1990,7 +1772,7 @@ paths: default: Weekly object: payrollCalendar - calendarType: - nonString: true + nonString: true key: calendarType keyPascal: CalendarType keySnake: calendar_type @@ -2013,7 +1795,7 @@ paths: ruby: start_date object: payrollCalendar - setPaymentDate: - is_last: true + is_last: true is_variable: true nonString: true key: paymentDate @@ -2022,17 +1804,17 @@ paths: default: paymentDate python: payment_date ruby: payment_date - object: payrollCalendar + object: payrollCalendar - payrollCalendars: - is_list: true + is_list: true key: payrollCalendars keyPascal: PayrollCalendars keySnake: payroll_calendars csharp: PayrollCalendar java: PayrollCalendar - addPayrollCalendars: - is_last: true - is_list_add: true + is_last: true + is_list_add: true key: payrollCalendars keyPascal: PayrollCalendars keySnake: payroll_calendars @@ -2040,31 +1822,27 @@ paths: python: payroll_calendar ruby: payroll_calendar csharp: PayrollCalendar - object: payrollCalendar + object: payrollCalendar responses: - '200': + "200": description: A successful request content: application/json: schema: $ref: '#/components/schemas/PayrollCalendars' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC":"/Date(1584125518649)/", - "PayrollCalendars":[ - { - "PayrollCalendarID":"57accbfe-f729-4be3-b3cb-8c3445c61d3a", - "Name":"MyCal37127", - "CalendarType":"WEEKLY", - "StartDate":"/Date(1572998400000+0000)/", - "PaymentDate":"/Date(1573516800000+0000)/", - "UpdatedDateUTC":"/Date(1584125518633+0000)/" - } - ] - } - '400': + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1584125518649)/ + PayrollCalendars: + - PayrollCalendarID: 57accbfe-f729-4be3-b3cb-8c3445c61d3a + Name: MyCal37127 + CalendarType: WEEKLY + StartDate: /Date(1572998400000+0000)/ + PaymentDate: /Date(1573516800000+0000)/ + UpdatedDateUTC: /Date(1584125518633+0000)/ + "400": description: invalid input, object invalid - TODO requestBody: required: true @@ -2074,21 +1852,15 @@ paths: type: array items: $ref: '#/components/schemas/PayrollCalendar' - example: '[ - { - "PayrollCalendarID":"78bb86b9-e1ea-47ac-b75d-f087a81931de", - "PayRunPeriodStartDate":"/Date(1572566400000+0000)/", - "PayRunPeriodEndDate":"/Date(1573084800000+0000)/", - "PayRunStatus":"DRAFT", - "PaymentDate":"/Date(1573171200000+0000)/" - } - ]' + example: '[ { "PayrollCalendarID":"78bb86b9-e1ea-47ac-b75d-f087a81931de", "PayRunPeriodStartDate":"/Date(1572566400000+0000)/", "PayRunPeriodEndDate":"/Date(1573084800000+0000)/", "PayRunStatus":"DRAFT", "PaymentDate":"/Date(1573171200000+0000)/" } ]' /PayrollCalendars/{PayrollCalendarID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollAu operationId: getPayrollCalendar @@ -2099,46 +1871,44 @@ paths: in: path required: true description: Payroll Calendar id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayrollCalendars' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC":"/Date(1573611453008)/", - "PayrollCalendars":[ - { - "PayrollCalendarID":"78bb86b9-e1ea-47ac-b75d-f087a81931de", - "Name":"Sid Weekly", - "CalendarType":"WEEKLY", - "StartDate":"/Date(1573171200000+0000)/", - "PaymentDate":"/Date(1573776000000+0000)/", - "UpdatedDateUTC":"/Date(1573077687000+0000)/", - "ReferenceDate":"/Date(1573171200000+0000)/" - } - ] - } - '400': - description: validation error for a bad request + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573611453008)/ + PayrollCalendars: + - PayrollCalendarID: 78bb86b9-e1ea-47ac-b75d-f087a81931de + Name: Sid Weekly + CalendarType: WEEKLY + StartDate: /Date(1573171200000+0000)/ + PaymentDate: /Date(1573776000000+0000)/ + UpdatedDateUTC: /Date(1573077687000+0000)/ + ReferenceDate: /Date(1573171200000+0000)/ + "400": + description: validation error for a bad request content: - application/json: - schema: + application/json: + schema: $ref: '#/components/schemas/APIException' /PayRuns: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.payruns, payroll.payruns.read] + - OAuth2: + - payroll.payruns + - payroll.payruns.read tags: - PayrollAu operationId: getPayRuns @@ -2170,44 +1940,41 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayRuns' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC":"/Date(1573611063074)/", - "PayRuns":[ - { - "PayRunID":"5de420bb-4ad2-405c-beb1-2610bcc2144e", - "PayrollCalendarID":"78bb86b9-e1ea-47ac-b75d-f087a81931de", - "PayRunPeriodStartDate":"/Date(1572566400000+0000)/", - "PayRunPeriodEndDate":"/Date(1573084800000+0000)/", - "PaymentDate":"/Date(1573171200000+0000)/", - "Wages":200.00, - "Deductions":33.00, - "Tax":78.00, - "Super":0.00, - "Reimbursement":22.00, - "NetPay":89.00, - "PayRunStatus":"POSTED", - "UpdatedDateUTC":"/Date(1573610970000+0000)/" - } - ] - } - '400': - description: validation error for a bad request - content: - application/json: - schema: + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573611063074)/ + PayRuns: + - PayRunID: 5de420bb-4ad2-405c-beb1-2610bcc2144e + PayrollCalendarID: 78bb86b9-e1ea-47ac-b75d-f087a81931de + PayRunPeriodStartDate: /Date(1572566400000+0000)/ + PayRunPeriodEndDate: /Date(1573084800000+0000)/ + PaymentDate: /Date(1573171200000+0000)/ + Wages: 200.00 + Deductions: 33.00 + Tax: 78.00 + Super: 0.00 + Reimbursement: 22.00 + NetPay: 89.00 + PayRunStatus: POSTED + UpdatedDateUTC: /Date(1573610970000+0000)/ + "400": + description: validation error for a bad request + content: + application/json: + schema: $ref: '#/components/schemas/APIException' post: security: - - OAuth2: [payroll.payruns] + - OAuth2: + - payroll.payruns tags: - PayrollAu summary: Creates a pay run @@ -2215,45 +1982,41 @@ paths: - $ref: '#/components/parameters/idempotencyKey' operationId: createPayRun x-hasPayrollAuProblem: true - x-example: + x-example: - payrun: key: payRun keyPascal: PayRun keySnake: pay_run - is_object: true + is_object: true - payrollCalendarID: - is_uuid: true + is_uuid: true default: 00000000-0000-0000-0000-000000000000 key: payrollCalendarID keyPascal: PayrollCalendarID keySnake: payroll_calendar_id object: payRun - is_last: true + is_last: true responses: - '200': + "200": description: A successful request content: application/json: schema: $ref: '#/components/schemas/PayRuns' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC": "/Date(1573685818311)/", - "PayRuns": [ - { - "PayRunID": "d1348fab-f47a-4697-beea-922ee262407a", - "PayrollCalendarID": "78bb86b9-e1ea-47ac-b75d-f087a81931de", - "PayRunPeriodStartDate": "/Date(1572566400000+0000)/", - "PayRunPeriodEndDate": "/Date(1573084800000+0000)/", - "PaymentDate": "/Date(1573171200000+0000)/", - "PayRunStatus": "DRAFT", - "UpdatedDateUTC": "/Date(1573685818311+0000)/" - } - ] - } - '400': + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573685818311)/ + PayRuns: + - PayRunID: d1348fab-f47a-4697-beea-922ee262407a + PayrollCalendarID: 78bb86b9-e1ea-47ac-b75d-f087a81931de + PayRunPeriodStartDate: /Date(1572566400000+0000)/ + PayRunPeriodEndDate: /Date(1573084800000+0000)/ + PaymentDate: /Date(1573171200000+0000)/ + PayRunStatus: DRAFT + UpdatedDateUTC: /Date(1573685818311+0000)/ + "400": description: invalid input, object invalid - TODO requestBody: required: true @@ -2263,116 +2026,102 @@ paths: type: array items: $ref: '#/components/schemas/PayRun' - example: '[ - { - "PayrollCalendarID": "78bb86b9-e1ea-47ac-b75d-f087a81931de", - "PayRunPeriodStartDate": "/Date(1572566400000+0000)/", - "PayRunPeriodEndDate": "/Date(1573084800000+0000)/", - "PayRunStatus": "DRAFT", - "PaymentDate": "/Date(1573171200000+0000)/" - } - ]' + example: '[ { "PayrollCalendarID": "78bb86b9-e1ea-47ac-b75d-f087a81931de", "PayRunPeriodStartDate": "/Date(1572566400000+0000)/", "PayRunPeriodEndDate": "/Date(1573084800000+0000)/", "PayRunStatus": "DRAFT", "PaymentDate": "/Date(1573171200000+0000)/" } ]' /PayRuns/{PayRunID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.payruns, payroll.payruns.read] + - OAuth2: + - payroll.payruns + - payroll.payruns.read tags: - PayrollAu summary: Retrieves a pay run by using a unique pay run id operationId: getPayRun - parameters: + parameters: - name: PayRunID x-snake: pay_run_id in: path required: true description: PayRun id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: - application/json: + application/json: schema: $ref: '#/components/schemas/PayRuns' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC": "/Date(1573692531699)/", - "PayRuns": [ - { - "PayRunID": "21d6317b-5319-4b3d-8d78-48904db6b665", - "PayrollCalendarID": "78bb86b9-e1ea-47ac-b75d-f087a81931de", - "PayRunPeriodStartDate": "/Date(1572566400000+0000)/", - "PayRunPeriodEndDate": "/Date(1573084800000+0000)/", - "PaymentDate": "/Date(1573171200000+0000)/", - "Wages": 205.4, - "Deductions": 37, - "Tax": 0, - "Super": 0, - "Reimbursement": 77, - "NetPay": 168.4, - "PayRunStatus": "POSTED", - "UpdatedDateUTC": "/Date(1573692155000+0000)/", - "Payslips": [ - { - "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", - "PayslipID": "c81e8bcc-56b0-4740-b46b-767753a6ee45", - "FirstName": "Albus", - "LastName": "Dumbledore", - "EmployeeGroup": "foo", - "Wages": 5.4, - "Deductions": 4, - "Tax": 0, - "Super": 0, - "Reimbursements": 55, - "NetPay": 1.4, - "UpdatedDateUTC": "/Date(1573692155000+0000)/" - }, - { - "EmployeeID": "7aa04979-ded5-44d9-b09a-793749425844", - "PayslipID": "76b9cb4e-d024-47cf-b09a-4c9cea2870f1", - "FirstName": "John", - "LastName": "Smith", - "Wages": 200, - "Deductions": 33, - "Tax": 0, - "Super": 0, - "Reimbursements": 22, - "NetPay": 167, - "UpdatedDateUTC": "/Date(1573692155000+0000)/" - } - ] - } - ] - } + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573692531699)/ + PayRuns: + - PayRunID: 21d6317b-5319-4b3d-8d78-48904db6b665 + PayrollCalendarID: 78bb86b9-e1ea-47ac-b75d-f087a81931de + PayRunPeriodStartDate: /Date(1572566400000+0000)/ + PayRunPeriodEndDate: /Date(1573084800000+0000)/ + PaymentDate: /Date(1573171200000+0000)/ + Wages: 205.4 + Deductions: 37 + Tax: 0 + Super: 0 + Reimbursement: 77 + NetPay: 168.4 + PayRunStatus: POSTED + UpdatedDateUTC: /Date(1573692155000+0000)/ + Payslips: + - EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e + PayslipID: c81e8bcc-56b0-4740-b46b-767753a6ee45 + FirstName: Albus + LastName: Dumbledore + EmployeeGroup: foo + Wages: 5.4 + Deductions: 4 + Tax: 0 + Super: 0 + Reimbursements: 55 + NetPay: 1.4 + UpdatedDateUTC: /Date(1573692155000+0000)/ + - EmployeeID: 7aa04979-ded5-44d9-b09a-793749425844 + PayslipID: 76b9cb4e-d024-47cf-b09a-4c9cea2870f1 + FirstName: John + LastName: Smith + Wages: 200 + Deductions: 33 + Tax: 0 + Super: 0 + Reimbursements: 22 + NetPay: 167 + UpdatedDateUTC: /Date(1573692155000+0000)/ post: security: - - OAuth2: [payroll.payruns] + - OAuth2: + - payroll.payruns tags: - PayrollAu - summary: Updates a pay run + summary: Updates a pay run operationId: updatePayRun - description: Update properties on a single PayRun - x-example: + description: Update properties on a single PayRun + x-example: - payrun: key: payRun keyPascal: PayRun keySnake: pay_run - is_object: true + is_object: true - payrollCalendarID: - is_uuid: true + is_uuid: true default: 00000000-0000-0000-0000-000000000000 key: payrollCalendarID keyPascal: PayrollCalendarID keySnake: payroll_calendar_id object: payRun - is_last: true + is_last: true parameters: - $ref: '#/components/parameters/idempotencyKey' - name: PayRunID @@ -2380,34 +2129,30 @@ paths: in: path required: true description: PayRun id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: A successful request content: application/json: schema: $ref: '#/components/schemas/PayRuns' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC": "/Date(1573693093680)/", - "PayRuns": [ - { - "PayRunID": "f8fcda54-643f-4406-902a-d7b020d0a036", - "PayrollCalendarID": "78bb86b9-e1ea-47ac-b75d-f087a81931de", - "PayRunPeriodStartDate": "/Date(1572566400000+0000)/", - "PayRunPeriodEndDate": "/Date(1573084800000+0000)/", - "PaymentDate": "/Date(1573171200000+0000)/", - "PayRunStatus": "POSTED", - "UpdatedDateUTC": "/Date(1573693093000+0000)/" - } - ] - } + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573693093680)/ + PayRuns: + - PayRunID: f8fcda54-643f-4406-902a-d7b020d0a036 + PayrollCalendarID: 78bb86b9-e1ea-47ac-b75d-f087a81931de + PayRunPeriodStartDate: /Date(1572566400000+0000)/ + PayRunPeriodEndDate: /Date(1573084800000+0000)/ + PaymentDate: /Date(1573171200000+0000)/ + PayRunStatus: POSTED + UpdatedDateUTC: /Date(1573693093000+0000)/ requestBody: required: true content: @@ -2416,163 +2161,137 @@ paths: type: array items: $ref: '#/components/schemas/PayRun' - example: '[ - { - "PayRunStatus": "POSTED" - } - ]' + example: '[ { "PayRunStatus": "POSTED" } ]' /Payslip/{PayslipID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.payslip, payroll.payslip.read] + - OAuth2: + - payroll.payslip + - payroll.payslip.read tags: - PayrollAu summary: Retrieves for a payslip by a unique payslip id operationId: getPayslip - parameters: + parameters: - name: PayslipID x-snake: payslip_id in: path required: true description: Payslip id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: - application/json: + application/json: schema: $ref: '#/components/schemas/PayslipObject' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC": "/Date(1573692677622)/", - "Payslip": { - "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", - "PayslipID": "c81e8bcc-56b0-4740-b46b-767753a6ee45", - "FirstName": "Albus", - "LastName": "Dumbledore", - "Tax": 0, - "NetPay": 1.4, - "UpdatedDateUTC": "/Date(1573692155000+0000)/", - "EarningsLines": [ - { - "EarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4", - "RatePerUnit": 3, - "NumberOfUnits": 1.8 - } - ], - "LeaveEarningsLines": [ - { - "EarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4", - "RatePerUnit": 0, - "NumberOfUnits": 0.6, - "PayOutType": "DEFAULT" - }, - { - "EarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4", - "RatePerUnit": 3, - "NumberOfUnits": 0.6, - "PayOutType": "CASHED_OUT" - } - ], - "TimesheetEarningsLines": [], - "DeductionLines": [ - { - "Amount": 4, - "CalculationType": "FIXEDAMOUNT", - "DeductionTypeID": "ed05ea82-e40a-4eb6-9c2e-4b3c03e7e938" - } - ], - "LeaveAccrualLines": [ - { - "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", - "NumberOfUnits": 0.0769, - "AutoCalculate": true - } - ], - "ReimbursementLines": [ - { - "ReimbursementTypeID": "aa8cfa40-d872-4be0-8a94-bb7f00962f74", - "Description": "boo", - "ExpenseAccount": "850", - "Amount": 55 - } - ], - "SuperannuationLines": [ - { - "ContributionType": "SGC", - "CalculationType": "STATUTORY", - "MinimumMonthlyEarnings": 450, - "ExpenseAccountCode": "478", - "LiabilityAccountCode": "826", - "PaymentDateForThisPeriod": "/Date(1580169600000+0000)/", - "Amount": 0 - } - ], - "TaxLines": [ - { - "PayslipTaxLineID": "c129696e-36ef-4677-a54c-96095787ca20", - "TaxTypeName": "PAYG Tax", - "Description": "No tax file number (Australian resident)", - "Amount": 0, - "LiabilityAccount": "825" - } - ] - } - } + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573692677622)/ + Payslip: + EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e + PayslipID: c81e8bcc-56b0-4740-b46b-767753a6ee45 + FirstName: Albus + LastName: Dumbledore + Tax: 0 + NetPay: 1.4 + UpdatedDateUTC: /Date(1573692155000+0000)/ + EarningsLines: + - EarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4 + RatePerUnit: 3 + NumberOfUnits: 1.8 + LeaveEarningsLines: + - EarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4 + RatePerUnit: 0 + NumberOfUnits: 0.6 + PayOutType: DEFAULT + - EarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4 + RatePerUnit: 3 + NumberOfUnits: 0.6 + PayOutType: CASHED_OUT + TimesheetEarningsLines: [] + DeductionLines: + - Amount: 4 + CalculationType: FIXEDAMOUNT + DeductionTypeID: ed05ea82-e40a-4eb6-9c2e-4b3c03e7e938 + LeaveAccrualLines: + - LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca + NumberOfUnits: 0.0769 + AutoCalculate: true + ReimbursementLines: + - ReimbursementTypeID: aa8cfa40-d872-4be0-8a94-bb7f00962f74 + Description: boo + ExpenseAccount: "850" + Amount: 55 + SuperannuationLines: + - ContributionType: SGC + CalculationType: STATUTORY + MinimumMonthlyEarnings: 450 + ExpenseAccountCode: "478" + LiabilityAccountCode: "826" + PaymentDateForThisPeriod: /Date(1580169600000+0000)/ + Amount: 0 + TaxLines: + - PayslipTaxLineID: c129696e-36ef-4677-a54c-96095787ca20 + TaxTypeName: PAYG Tax + Description: No tax file number (Australian resident) + Amount: 0 + LiabilityAccount: "825" post: security: - - OAuth2: [payroll.payslip] + - OAuth2: + - payroll.payslip tags: - PayrollAu - summary: Updates a payslip + summary: Updates a payslip operationId: updatePayslip x-hasPayrollAuError: true x-example: - earningsLine: - is_object: true + is_object: true key: earningsLine keyPascal: EarningsLine keySnake: earnings_line - earningsRateID: - is_uuid: true + is_uuid: true key: earningsRateID keyPascal: EarningsRateID keySnake: earnings_rate_id default: 00000000-0000-0000-0000-000000000000 object: earningsLine - ratePerUnit: - nonString: true + nonString: true key: ratePerUnit keyPascal: RatePerUnit keySnake: rate_per_unit default: 20 object: earningsLine - numberOfUnits: - nonString: true + nonString: true key: numberOfUnits keyPascal: NumberOfUnits keySnake: number_of_units default: 1 object: earningsLine - is_last: true + is_last: true - earningsLines: - is_list: true + is_list: true key: earningsLines keyPascal: EarningsLines keySnake: earnings_lines csharp: EarningsLine java: EarningsLine - addEarningsRates: - is_last: true - is_list_add: true + is_last: true + is_list_add: true key: earningsLines keyPascal: EarningsLines keySnake: earnings_lines @@ -2587,15 +2306,15 @@ paths: keySnake: payslip_lines python: payslip_line ruby: payslip_line - is_object: true + is_object: true - setEarningsLines: key: earningsLines keyPascal: EarningsLines keySnake: earnings_lines object: payslipLine - is_last: true + is_last: true default: earningsLines - nonString: true + nonString: true - payslipLines: is_list: true key: payslipLines @@ -2605,8 +2324,8 @@ paths: java: PayslipLines python: payslipLines - addPayslipLines: - is_last: true - is_list_add: true + is_last: true + is_list_add: true key: payslipLines keyPayscal: PayslipLines keySnake: payslip_lines @@ -2615,7 +2334,7 @@ paths: ruby: payslip_line csharp: PayslipLine object: payslipLine - description: Update lines on a single payslips + description: Update lines on a single payslips parameters: - $ref: '#/components/parameters/idempotencyKey' - name: PayslipID @@ -2623,42 +2342,35 @@ paths: in: path required: true description: Payslip id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: A successful request - currently returns empty array for JSON content: application/json: schema: $ref: '#/components/schemas/Payslips' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC": "/Date(1589568253813)/", - "Payslips": [ - { - "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", - "PayslipID": "c81e8bcc-56b0-4740-b46b-767753a6ee45", - "FirstName": "Albus", - "LastName": "Dumbledore", - "LastEdited": "/Date(1589568253735+0000)/", - "Tax": 0, - "NetPay": 1.4, - "UpdatedDateUTC": "/Date(1589568253735+0000)/", - "DeductionLines": [ - { - "Amount": 4, - "CalculationType": "FIXEDAMOUNT", - "DeductionTypeID": "ed05ea82-e40a-4eb6-9c2e-4b3c03e7e938" - } - ] - } - ] - } + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1589568253813)/ + Payslips: + - EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e + PayslipID: c81e8bcc-56b0-4740-b46b-767753a6ee45 + FirstName: Albus + LastName: Dumbledore + LastEdited: /Date(1589568253735+0000)/ + Tax: 0 + NetPay: 1.4 + UpdatedDateUTC: /Date(1589568253735+0000)/ + DeductionLines: + - Amount: 4 + CalculationType: FIXEDAMOUNT + DeductionTypeID: ed05ea82-e40a-4eb6-9c2e-4b3c03e7e938 requestBody: required: true content: @@ -2667,99 +2379,80 @@ paths: type: array items: $ref: '#/components/schemas/PayslipLines' - example: { - "Payslip": { - "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", - "DeductionLines": [ - { - "DeductionTypeID": "727af5e8-b347-4ae7-85fc-9b82266d0aec", - "CalculationType": "FIXEDAMOUNT", - "NumberOfUnits": 10 - } - ] - } - } + example: + Payslip: + EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e + DeductionLines: + - DeductionTypeID: 727af5e8-b347-4ae7-85fc-9b82266d0aec + CalculationType: FIXEDAMOUNT + NumberOfUnits: 10 /Settings: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollAu operationId: getSettings summary: Retrieves payroll settings responses: - '200': + "200": description: payroll settings content: application/json: schema: $ref: '#/components/schemas/SettingsObject' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC":"/Date(1573585252781)/", - "Settings":{ - "Accounts":[ - { - "AccountID":"85bd2954-7ef5-4fbe-9e40-a1990d0fd63f", - "Type":"BANK", - "Code":"094", - "Name":"Bank of A" - }, - { - "AccountID":"7e65fa75-1c64-43d7-b0b4-c05f196e2190", - "Type":"WAGESPAYABLELIABILITY", - "Code":"804", - "Name":"Wages Payable - Payroll" - }, - { - "AccountID":"dbc164fa-0cdf-4848-92d3-0d1dc864c53f", - "Type":"PAYGLIABILITY", - "Code":"825", - "Name":"PAYG Withholdings Payable" - }, - { - "AccountID":"7dad84d4-bc7a-482e-99b1-d879e4856578", - "Type":"SUPERANNUATIONEXPENSE", - "Code":"478", - "Name":"Superannuation" - }, - { - "AccountID":"df3679fe-5ebc-42ce-a7ac-b4d36b520795", - "Type":"SUPERANNUATIONLIABILITY", - "Code":"826", - "Name":"Superannuation Payable" - }, - { - "AccountID":"7e130864-5864-4c60-94eb-3c53c95da138", - "Type":"WAGESEXPENSE", - "Code":"477", - "Name":"Wages and Salaries" - } - ], - "TrackingCategories":{ - "EmployeeGroups":{ - "TrackingCategoryID":"a28f419f-6ec3-4dcf-9be0-7959ea983630", - "TrackingCategoryName":"Foo70317" - }, - "TimesheetCategories":{ - "TrackingCategoryID":"89375aed-ed51-4624-9e5d-92db6bfa8974", - "TrackingCategoryName":"Foo32551" - } - }, - "DaysInPayrollYear":"364", - "EmployeesAreSTP2": false - } - } + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573585252781)/ + Settings: + Accounts: + - AccountID: 85bd2954-7ef5-4fbe-9e40-a1990d0fd63f + Type: BANK + Code: "094" + Name: Bank of A + - AccountID: 7e65fa75-1c64-43d7-b0b4-c05f196e2190 + Type: WAGESPAYABLELIABILITY + Code: "804" + Name: Wages Payable - Payroll + - AccountID: dbc164fa-0cdf-4848-92d3-0d1dc864c53f + Type: PAYGLIABILITY + Code: "825" + Name: PAYG Withholdings Payable + - AccountID: 7dad84d4-bc7a-482e-99b1-d879e4856578 + Type: SUPERANNUATIONEXPENSE + Code: "478" + Name: Superannuation + - AccountID: df3679fe-5ebc-42ce-a7ac-b4d36b520795 + Type: SUPERANNUATIONLIABILITY + Code: "826" + Name: Superannuation Payable + - AccountID: 7e130864-5864-4c60-94eb-3c53c95da138 + Type: WAGESEXPENSE + Code: "477" + Name: Wages and Salaries + TrackingCategories: + EmployeeGroups: + TrackingCategoryID: a28f419f-6ec3-4dcf-9be0-7959ea983630 + TrackingCategoryName: Foo70317 + TimesheetCategories: + TrackingCategoryID: 89375aed-ed51-4624-9e5d-92db6bfa8974 + TrackingCategoryName: Foo32551 + DaysInPayrollYear: "364" + EmployeesAreSTP2: false /Superfunds: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollAu operationId: getSuperfunds @@ -2791,43 +2484,38 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/SuperFunds' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC":"/Date(1573570941142)/", - "SuperFunds":[ - { - "SuperFundID":"fde8e070-bf59-4e56-b1d7-c75a09474b8d", - "Name":"Accumulate Plus (Commonwealth Bank Group Super)", - "Type":"REGULATED", - "USI":"OSF0001AU", - "UpdatedDateUTC":"/Date(1573510468000+0000)/" - }, - { - "SuperFundID":"69079de5-67ef-43bb-b5a5-3e7c2ccad7f0", - "Name":"AMG Super", - "Type":"REGULATED", - "USI":"PTC0133AU", - "UpdatedDateUTC":"/Date(1573490487000+0000)/" - } - ] - } - '400': - description: validation error for a bad request - content: - application/json: - schema: + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573570941142)/ + SuperFunds: + - SuperFundID: fde8e070-bf59-4e56-b1d7-c75a09474b8d + Name: Accumulate Plus (Commonwealth Bank Group Super) + Type: REGULATED + USI: OSF0001AU + UpdatedDateUTC: /Date(1573510468000+0000)/ + - SuperFundID: 69079de5-67ef-43bb-b5a5-3e7c2ccad7f0 + Name: AMG Super + Type: REGULATED + USI: PTC0133AU + UpdatedDateUTC: /Date(1573490487000+0000)/ + "400": + description: validation error for a bad request + content: + application/json: + schema: $ref: '#/components/schemas/APIException' post: security: - - OAuth2: [payroll.settings] + - OAuth2: + - payroll.settings tags: - PayrollAu summary: Creates a superfund @@ -2839,13 +2527,13 @@ paths: key: superFund keyPascal: SuperFund keySnake: super_fund - is_object: true + is_object: true - type: key: type keyPascal: Type keySnake: type object: superfund - nonString: true + nonString: true default: REGULATED php: XeroAPI\XeroPHP\Models\PayrollAu\SuperFundType::REGULATED node: SuperFundType.REGULATED @@ -2859,34 +2547,30 @@ paths: keySnake: USI default: 40022701955002 object: superfund - is_last: true + is_last: true x-hasPayrollAuProblem: true responses: - '200': + "200": description: A successful request content: application/json: schema: $ref: '#/components/schemas/SuperFunds' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC":"/Date(1573583393024)/", - "SuperFunds":[ - { - "SuperFundID":"e02e44eb-2dba-4d5e-84da-8a0c3a4a4fef", - "Name":"AMG Super", - "Type":"REGULATED", - "ABN":"30099320583", - "USI":"PTC0133AU", - "AccountNumber":"FB36350", - "AccountName":"Foo38428", - "UpdatedDateUTC":"/Date(1573583393009+0000)/" - } - ] - } - '400': + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573583393024)/ + SuperFunds: + - SuperFundID: e02e44eb-2dba-4d5e-84da-8a0c3a4a4fef + Name: AMG Super + Type: REGULATED + ABN: "30099320583" + USI: PTC0133AU + AccountNumber: FB36350 + AccountName: Foo38428 + UpdatedDateUTC: /Date(1573583393009+0000)/ + "400": description: invalid input, object invalid - TODO requestBody: required: true @@ -2896,83 +2580,73 @@ paths: type: array items: $ref: '#/components/schemas/SuperFund' - example: '[ - { - "usi":"PTC0133AU", - "Type":"REGULATED", - "Name":"Bar99359", - "AccountNumber":"FB36350", - "AccountName":"Foo38428", - "USI":"PTC0133AU" - } - ]' + example: '[ { "usi":"PTC0133AU", "Type":"REGULATED", "Name":"Bar99359", "AccountNumber":"FB36350", "AccountName":"Foo38428", "USI":"PTC0133AU" } ]' /Superfunds/{SuperFundID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollAu summary: Retrieves a superfund by using a unique superfund ID operationId: getSuperfund - parameters: + parameters: - name: SuperFundID x-snake: super_fund_id in: path required: true description: Superfund id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: - application/json: + application/json: schema: $ref: '#/components/schemas/SuperFunds' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC":"/Date(1573571518603)/", - "SuperFunds":[ - { - "SuperFundID":"540f4327-dda2-4b36-9c2f-2fe1c93a72b5", - "Name":"My Self Managed one", - "Type":"SMSF", - "ABN":"53004085616", - "EmployerNumber":"9876543", - "BSB":"324324", - "AccountNumber":"234234234", - "AccountName":"My Checking", - "UpdatedDateUTC":"/Date(1573571429000+0000)/", - "ElectronicServiceAddress":"FG48739" - } - ] - } + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573571518603)/ + SuperFunds: + - SuperFundID: 540f4327-dda2-4b36-9c2f-2fe1c93a72b5 + Name: My Self Managed one + Type: SMSF + ABN: "53004085616" + EmployerNumber: "9876543" + BSB: "324324" + AccountNumber: "234234234" + AccountName: My Checking + UpdatedDateUTC: /Date(1573571429000+0000)/ + ElectronicServiceAddress: FG48739 post: security: - - OAuth2: [payroll.settings] + - OAuth2: + - payroll.settings tags: - PayrollAu - summary: Updates a superfund + summary: Updates a superfund operationId: updateSuperfund - description: Update properties on a single Superfund + description: Update properties on a single Superfund x-example: - superfund: key: superFund keyPascal: SuperFund keySnake: super_fund - is_object: true + is_object: true - type: key: type keyPascal: Type keySnake: type object: superfund - nonString: true + nonString: true default: REGULATED php: XeroAPI\XeroPHP\Models\PayrollAu\SuperFundType::REGULATED node: SuperFundType.REGULATED @@ -2986,7 +2660,7 @@ paths: keySnake: USI default: 40022701955002 object: superfund - is_last: true + is_last: true parameters: - $ref: '#/components/parameters/idempotencyKey' - name: SuperFundID @@ -2994,54 +2668,46 @@ paths: in: path required: true description: Superfund id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: A successful request content: application/json: schema: $ref: '#/components/schemas/SuperFunds' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC":"/Date(1573570941547)/", - "SuperFunds":[ - { - "SuperFundID":"fde8e070-bf59-4e56-b1d7-c75a09474b8d", - "Name":"Accumulate Plus (Commonwealth Bank Group Super)", - "Type":"REGULATED", - "ABN":"24248426878", - "USI":"OSF0001AU", - "UpdatedDateUTC":"/Date(1573510468000+0000)/" - } - ] - } + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573570941547)/ + SuperFunds: + - SuperFundID: fde8e070-bf59-4e56-b1d7-c75a09474b8d + Name: Accumulate Plus (Commonwealth Bank Group Super) + Type: REGULATED + ABN: "24248426878" + USI: OSF0001AU + UpdatedDateUTC: /Date(1573510468000+0000)/ requestBody: required: true content: application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SuperFund' - example: ' - [ - { - "Type":"REGULATED", - "Name":"Nice23534" - } - ]' + schema: + type: array + items: + $ref: '#/components/schemas/SuperFund' + example: ' [ { "Type":"REGULATED", "Name":"Nice23534" } ]' /SuperfundProducts: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollAu operationId: getSuperfundProducts @@ -3060,37 +2726,35 @@ paths: type: string example: OSF0001AU responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/SuperFundProducts' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC":"/Date(1573570720295)/", - "SuperFundProducts":[ - { - "USI":"OSF0001AU", - "ABN":"24248426878", - "ProductName":"Accumulate Plus (Commonwealth Bank Group Super)" - } - ] - } - '400': - description: validation error for a bad request - content: - application/json: - schema: + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573570720295)/ + SuperFundProducts: + - USI: OSF0001AU + ABN: "24248426878" + ProductName: Accumulate Plus (Commonwealth Bank Group Super) + "400": + description: validation error for a bad request + content: + application/json: + schema: $ref: '#/components/schemas/APIException' /Timesheets: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.timesheets, payroll.timesheets.read] + - OAuth2: + - payroll.timesheets + - payroll.timesheets.read tags: - PayrollAu operationId: getTimesheets @@ -3122,77 +2786,64 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Timesheets' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC":"/Date(1573516183708)/", - "Timesheets":[ - { - "TimesheetID":"863bbd31-0447-4419-80d5-d733d5e723ba", - "EmployeeID":"b34e89ff-770d-4099-b7e5-f968767118bc", - "StartDate":"/Date(1547769600000)/", - "EndDate":"/Date(1548288000000)/", - "Status":"APPROVED", - "Hours":24.0000, - "TimesheetLines":[ - { - "EarningsRateID":"ab874dfb-ab09-4c91-954e-43acf6fc23b4", - "NumberOfUnits":[ - 4.00, - 4.00, - 4.00, - 4.00, - 4.00, - 4.00, - 0.00 - ], - "UpdatedDateUTC":"/Date(1572915827000+0000)/" - } - ], - "UpdatedDateUTC":"/Date(1572915827000+0000)/" - }, - { - "TimesheetID":"544eb3a7-0d63-495b-90ae-f6aa3c26c2c8", - "EmployeeID":"7aa04979-ded5-44d9-b09a-793749425844", - "StartDate":"/Date(1572566400000)/", - "EndDate":"/Date(1573084800000)/", - "Status":"APPROVED", - "Hours":10.0000, - "TimesheetLines":[ - { - "EarningsRateID":"ab874dfb-ab09-4c91-954e-43acf6fc23b4", - "NumberOfUnits":[ - 2.00, - 2.00, - 2.00, - 2.00, - 2.00, - 0.00, - 0.00 - ], - "UpdatedDateUTC":"/Date(1572916045000+0000)/" - } - ], - "UpdatedDateUTC":"/Date(1572916045000+0000)/" - } - ] - } - '400': - description: validation error for a bad request - content: - application/json: - schema: + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573516183708)/ + Timesheets: + - TimesheetID: 863bbd31-0447-4419-80d5-d733d5e723ba + EmployeeID: b34e89ff-770d-4099-b7e5-f968767118bc + StartDate: /Date(1547769600000)/ + EndDate: /Date(1548288000000)/ + Status: APPROVED + Hours: 24.0000 + TimesheetLines: + - EarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4 + NumberOfUnits: + - 4.00 + - 4.00 + - 4.00 + - 4.00 + - 4.00 + - 4.00 + - 0.00 + UpdatedDateUTC: /Date(1572915827000+0000)/ + UpdatedDateUTC: /Date(1572915827000+0000)/ + - TimesheetID: 544eb3a7-0d63-495b-90ae-f6aa3c26c2c8 + EmployeeID: 7aa04979-ded5-44d9-b09a-793749425844 + StartDate: /Date(1572566400000)/ + EndDate: /Date(1573084800000)/ + Status: APPROVED + Hours: 10.0000 + TimesheetLines: + - EarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4 + NumberOfUnits: + - 2.00 + - 2.00 + - 2.00 + - 2.00 + - 2.00 + - 0.00 + - 0.00 + UpdatedDateUTC: /Date(1572916045000+0000)/ + UpdatedDateUTC: /Date(1572916045000+0000)/ + "400": + description: validation error for a bad request + content: + application/json: + schema: $ref: '#/components/schemas/APIException' post: security: - - OAuth2: [payroll.timesheets] + - OAuth2: + - payroll.timesheets tags: - PayrollAu summary: Creates a timesheet @@ -3208,13 +2859,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 23)" - java: "LocalDate.of(2020, Month.OCTOBER, 23)" - csharp: "new DateTime(2020, 10, 23)" - php: "new DateTime('2020-10-23')" - node: "'2020-10-23'" - python: "dateutil.parser.parse('2020-10-23T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 23) + java: LocalDate.of(2020, Month.OCTOBER, 23) + csharp: new DateTime(2020, 10, 23) + php: new DateTime('2020-10-23') + node: '''2020-10-23''' + python: dateutil.parser.parse('2020-10-23T00:00:00Z') + ruby: '''YYYY-MM-DD''' - endDateValue: key: endDate keyPascal: EndDate @@ -3222,20 +2873,20 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 30)" - java: "LocalDate.of(2020, Month.OCTOBER, 30)" - csharp: "new DateTime(2020, 10, 30)" - php: "new DateTime('2020-10-30')" - node: "'2020-10-30'" - python: "dateutil.parser.parse('2020-10-30T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 30) + java: LocalDate.of(2020, Month.OCTOBER, 30) + csharp: new DateTime(2020, 10, 30) + php: new DateTime('2020-10-30') + node: '''2020-10-30''' + python: dateutil.parser.parse('2020-10-30T00:00:00Z') + ruby: '''YYYY-MM-DD''' - timesheet: key: timesheet keyPascal: Timesheet keySnake: timesheet - is_object: true + is_object: true - EmployeeID: - is_uuid: true + is_uuid: true default: 00000000-0000-0000-0000-000000000000 key: employeeID keyPascal: EmployeeID @@ -3276,46 +2927,38 @@ paths: csharp: TimesheetStatus.DRAFT object: timesheet responses: - '200': + "200": description: A successful request content: application/json: schema: $ref: '#/components/schemas/Timesheets' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC":"/Date(1573516185143)/", - "Timesheets":[ - { - "TimesheetID":"a7eb0a79-8511-4ee7-b473-3a25f28abcb9", - "EmployeeID":"b34e89ff-770d-4099-b7e5-f968767118bc", - "StartDate":"/Date(1573171200000+0000)/", - "EndDate":"/Date(1573689600000+0000)/", - "Status":"DRAFT", - "Hours":22.0, - "TimesheetLines":[ - { - "EarningsRateID":"ab874dfb-ab09-4c91-954e-43acf6fc23b4", - "TrackingItemID":"af5e9ce2-2349-4136-be99-3561b189f473", - "NumberOfUnits":[ - 2.0, - 10.0, - 0.0, - 0.0, - 5.0, - 0.0, - 5.0 - ], - "UpdatedDateUTC":"/Date(1573516185127+0000)/" - } - ], - "UpdatedDateUTC":"/Date(1573516185127+0000)/" - } - ] - } - '400': + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573516185143)/ + Timesheets: + - TimesheetID: a7eb0a79-8511-4ee7-b473-3a25f28abcb9 + EmployeeID: b34e89ff-770d-4099-b7e5-f968767118bc + StartDate: /Date(1573171200000+0000)/ + EndDate: /Date(1573689600000+0000)/ + Status: DRAFT + Hours: 22.0 + TimesheetLines: + - EarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4 + TrackingItemID: af5e9ce2-2349-4136-be99-3561b189f473 + NumberOfUnits: + - 2.0 + - 10.0 + - 0.0 + - 0.0 + - 5.0 + - 0.0 + - 5.0 + UpdatedDateUTC: /Date(1573516185127+0000)/ + UpdatedDateUTC: /Date(1573516185127+0000)/ + "400": description: invalid input, object invalid - TODO requestBody: required: true @@ -3325,94 +2968,69 @@ paths: type: array items: $ref: '#/components/schemas/Timesheet' - example: '[ - { - "EmployeeID":"b34e89ff-770d-4099-b7e5-f968767118bc", - "StartDate":"/Date(1573171200000+0000)/", - "EndDate":"/Date(1573689600000+0000)/", - "Status":"DRAFT", - "TimesheetLines":[ - { - "EarningsRateID":"ab874dfb-ab09-4c91-954e-43acf6fc23b4", - "TrackingItemID":"af5e9ce2-2349-4136-be99-3561b189f473", - "NumberOfUnits":[ - 2.0, - 10.0, - 0.0, - 0.0, - 5.0, - 0.0, - 5.0 - ] - } - ] - } - ]' + example: '[ { "EmployeeID":"b34e89ff-770d-4099-b7e5-f968767118bc", "StartDate":"/Date(1573171200000+0000)/", "EndDate":"/Date(1573689600000+0000)/", "Status":"DRAFT", "TimesheetLines":[ { "EarningsRateID":"ab874dfb-ab09-4c91-954e-43acf6fc23b4", "TrackingItemID":"af5e9ce2-2349-4136-be99-3561b189f473", "NumberOfUnits":[ 2.0, 10.0, 0.0, 0.0, 5.0, 0.0, 5.0 ] } ] } ]' /Timesheets/{TimesheetID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.timesheets, payroll.timesheets.read] + - OAuth2: + - payroll.timesheets + - payroll.timesheets.read tags: - PayrollAu summary: Retrieves a timesheet by using a unique timesheet id operationId: getTimesheet - parameters: + parameters: - name: TimesheetID x-snake: timesheet_id in: path required: true description: Timesheet id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: - application/json: + application/json: schema: $ref: '#/components/schemas/TimesheetObject' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC":"/Date(1573516184161)/", - "Timesheet":{ - "TimesheetID":"df954ca3-3a70-47e9-9a3e-80711e7c5f90", - "EmployeeID":"b34e89ff-770d-4099-b7e5-f968767118bc", - "StartDate":"/Date(1547164800000+0000)/", - "EndDate":"/Date(1547683200000+0000)/", - "Status":"APPROVED", - "Hours":15.0000, - "TimesheetLines":[ - { - "EarningsRateID":"ab874dfb-ab09-4c91-954e-43acf6fc23b4", - "NumberOfUnits":[ - 3.00, - 3.00, - 3.00, - 3.00, - 0.00, - 3.00, - 0.00 - ], - "UpdatedDateUTC":"/Date(1572915797000+0000)/" - } - ], - "UpdatedDateUTC":"/Date(1572915797000+0000)/" - } - } + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573516184161)/ + Timesheet: + TimesheetID: df954ca3-3a70-47e9-9a3e-80711e7c5f90 + EmployeeID: b34e89ff-770d-4099-b7e5-f968767118bc + StartDate: /Date(1547164800000+0000)/ + EndDate: /Date(1547683200000+0000)/ + Status: APPROVED + Hours: 15.0000 + TimesheetLines: + - EarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4 + NumberOfUnits: + - 3.00 + - 3.00 + - 3.00 + - 3.00 + - 0.00 + - 3.00 + - 0.00 + UpdatedDateUTC: /Date(1572915797000+0000)/ + UpdatedDateUTC: /Date(1572915797000+0000)/ post: security: - - OAuth2: [payroll.timesheets] + - OAuth2: + - payroll.timesheets tags: - PayrollAu - summary: Updates a timesheet + summary: Updates a timesheet operationId: updateTimesheet - description: Update properties on a single timesheet + description: Update properties on a single timesheet x-example: - startDateValue: key: startDate @@ -3421,13 +3039,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 23)" - java: "LocalDate.of(2020, Month.OCTOBER, 23)" - csharp: "new DateTime(2020, 10, 23)" - php: "new DateTime('2020-10-23')" - node: "'2020-10-23'" - python: "dateutil.parser.parse('2020-10-23T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 23) + java: LocalDate.of(2020, Month.OCTOBER, 23) + csharp: new DateTime(2020, 10, 23) + php: new DateTime('2020-10-23') + node: '''2020-10-23''' + python: dateutil.parser.parse('2020-10-23T00:00:00Z') + ruby: '''YYYY-MM-DD''' - endDateValue: key: endDate keyPascal: EndDate @@ -3435,20 +3053,20 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 30)" - java: "LocalDate.of(2020, Month.OCTOBER, 30)" - csharp: "new DateTime(2020, 10, 30)" - php: "new DateTime('2020-10-30')" - node: "'2020-10-30'" - python: "dateutil.parser.parse('2020-10-30T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 30) + java: LocalDate.of(2020, Month.OCTOBER, 30) + csharp: new DateTime(2020, 10, 30) + php: new DateTime('2020-10-30') + node: '''2020-10-30''' + python: dateutil.parser.parse('2020-10-30T00:00:00Z') + ruby: '''YYYY-MM-DD''' - timesheet: key: timesheet keyPascal: Timesheet keySnake: timesheet - is_object: true + is_object: true - EmployeeID: - is_uuid: true + is_uuid: true default: 00000000-0000-0000-0000-000000000000 key: employeeID keyPascal: EmployeeID @@ -3495,50 +3113,42 @@ paths: in: path required: true description: Timesheet id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: A successful request content: application/json: schema: $ref: '#/components/schemas/Timesheets' - example: { - "Id": "00000000-0000-0000-0000-000000000000", - "Status": "OK", - "ProviderName":"3f93110a-df13-49c7-b82f-a069813df188", - "DateTimeUTC":"/Date(1573516185258)/", - "Timesheets":[ - { - "TimesheetID":"a7eb0a79-8511-4ee7-b473-3a25f28abcb9", - "EmployeeID":"b34e89ff-770d-4099-b7e5-f968767118bc", - "StartDate":"/Date(1573171200000+0000)/", - "EndDate":"/Date(1573689600000+0000)/", - "Status":"APPROVED", - "Hours":22.0, - "TimesheetLines":[ - { - "EarningsRateID":"ab874dfb-ab09-4c91-954e-43acf6fc23b4", - "TrackingItemID":"af5e9ce2-2349-4136-be99-3561b189f473", - "NumberOfUnits":[ - 2.0, - 10.0, - 0.0, - 0.0, - 5.0, - 0.0, - 5.0 - ], - "UpdatedDateUTC":"/Date(1573516185227+0000)/" - } - ], - "UpdatedDateUTC":"/Date(1573516185227+0000)/" - } - ] - } + example: + Id: 00000000-0000-0000-0000-000000000000 + Status: OK + ProviderName: 3f93110a-df13-49c7-b82f-a069813df188 + DateTimeUTC: /Date(1573516185258)/ + Timesheets: + - TimesheetID: a7eb0a79-8511-4ee7-b473-3a25f28abcb9 + EmployeeID: b34e89ff-770d-4099-b7e5-f968767118bc + StartDate: /Date(1573171200000+0000)/ + EndDate: /Date(1573689600000+0000)/ + Status: APPROVED + Hours: 22.0 + TimesheetLines: + - EarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4 + TrackingItemID: af5e9ce2-2349-4136-be99-3561b189f473 + NumberOfUnits: + - 2.0 + - 10.0 + - 0.0 + - 0.0 + - 5.0 + - 0.0 + - 5.0 + UpdatedDateUTC: /Date(1573516185227+0000)/ + UpdatedDateUTC: /Date(1573516185227+0000)/ requestBody: required: true content: @@ -3547,47 +3157,22 @@ paths: type: array items: $ref: '#/components/schemas/Timesheet' - example: '[ - { - "EmployeeID":"b34e89ff-770d-4099-b7e5-f968767118bc", - "StartDate":"/Date(1573171200000+0000)/", - "EndDate":"/Date(1573689600000+0000)/", - "Status":"APPROVED", - "Hours":22.0, - "TimesheetID":"a7eb0a79-8511-4ee7-b473-3a25f28abcb9", - "TimesheetLines":[ - { - "EarningsRateID":"ab874dfb-ab09-4c91-954e-43acf6fc23b4", - "TrackingItemID":"af5e9ce2-2349-4136-be99-3561b189f473", - "NumberOfUnits":[ - 2.0, - 10.0, - 0.0, - 0.0, - 5.0, - 0.0, - 5.0 - ], - "UpdatedDateUTC":"/Date(1573516185127+0000)/" - } - ] - } - ]' + example: '[ { "EmployeeID":"b34e89ff-770d-4099-b7e5-f968767118bc", "StartDate":"/Date(1573171200000+0000)/", "EndDate":"/Date(1573689600000+0000)/", "Status":"APPROVED", "Hours":22.0, "TimesheetID":"a7eb0a79-8511-4ee7-b473-3a25f28abcb9", "TimesheetLines":[ { "EarningsRateID":"ab874dfb-ab09-4c91-954e-43acf6fc23b4", "TrackingItemID":"af5e9ce2-2349-4136-be99-3561b189f473", "NumberOfUnits":[ 2.0, 10.0, 0.0, 0.0, 5.0, 0.0, 5.0 ], "UpdatedDateUTC":"/Date(1573516185127+0000)/" } ] } ]' components: securitySchemes: OAuth2: type: oauth2 description: For more information visit https://developer.xero.com/documentation/oauth2/overview - flows: + flows: authorizationCode: - authorizationUrl: 'https://login.xero.com/identity/connect/authorize' - tokenUrl: 'https://identity.xero.com/connect/token' + authorizationUrl: https://login.xero.com/identity/connect/authorize + tokenUrl: https://identity.xero.com/connect/token scopes: email: Grant read-only access to your email openid: Grant read-only access to your open id profile: your profile information payroll.employees: Grant read-write access to payroll employees - payroll.employees.read: Grant read-only access to payroll employees + payroll.employees.read: Grant read-only access to payroll employees payroll.payruns: Grant read-write access to payroll payruns payroll.payruns.read: Grant read-only access to payroll payruns payroll.payslip: Grant read-write access to payroll payslips @@ -3597,20 +3182,20 @@ components: payroll.timesheets: Grant read-write access to payroll timesheets payroll.timesheets.read: Grant read-only access to payroll timesheets parameters: - requiredHeader: + requiredHeader: in: header name: Xero-Tenant-Id x-snake: xero_tenant_id description: Xero identifier for Tenant schema: type: string - required: true + required: true idempotencyKey: in: header name: Idempotency-Key x-snake: idempotency_key description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. - example: "KEY_VALUE" + example: KEY_VALUE schema: type: string schemas: @@ -3641,14 +3226,14 @@ components: description: Date of birth of the employee (YYYY-MM-DD) type: string x-is-msdate: true - example: '/Date(322560000000+0000)/' + example: /Date(322560000000+0000)/ HomeAddress: $ref: '#/components/schemas/HomeAddress' StartDate: description: Start date for an employee (YYYY-MM-DD) type: string x-is-msdate: true - example: '/Date(320284900000+0000)/' + example: /Date(320284900000+0000)/ Title: description: Title of the employee type: string @@ -3665,10 +3250,10 @@ components: description: The employee’s gender. See Employee Gender type: string enum: - - N - - M - - F - - I + - N + - M + - F + - I example: F Phone: description: Employee phone number @@ -3721,7 +3306,7 @@ components: description: Employee Termination Date (YYYY-MM-DD) type: string x-is-msdate: true - example: '/Date(1584662400000+0000)/' + example: /Date(1584662400000+0000)/ TerminationReason: description: | * `V` Voluntary cessation - An employee resignation, retirement, domestic or pressing necessity or abandonment of employment @@ -3733,13 +3318,13 @@ components: * `T` Transfer - The administrative arrangements performed to transfer employees across payroll systems, move them temporarily to another employer (machinery of government for public servants), transfer of business, move them to outsourcing arrangements or other such technical activities. type: string enum: - - V - - I - - D - - R - - F - - C - - T + - V + - I + - D + - R + - F + - C + - T example: F BankAccounts: type: array @@ -3749,11 +3334,11 @@ components: $ref: '#/components/schemas/PayTemplate' OpeningBalances: $ref: '#/components/schemas/OpeningBalances' - TaxDeclaration: + TaxDeclaration: $ref: '#/components/schemas/TaxDeclaration' - IncomeType: + IncomeType: $ref: '#/components/schemas/IncomeType' - EmploymentType: + EmploymentType: $ref: '#/components/schemas/EmploymentType' CountryOfResidence: $ref: '#/components/schemas/CountryOfResidence' @@ -3780,8 +3365,8 @@ components: type: string readOnly: true x-is-msdate-time: true - example: '/Date(1583967733054+0000)/' - ValidationErrors: + example: /Date(1583967733054+0000)/ + ValidationErrors: description: Displays array of validation error messages from the API type: array items: @@ -3820,12 +3405,12 @@ components: description: Start date of the leave (YYYY-MM-DD) type: string x-is-msdate: true - example: '/Date(322560000000+0000)/' + example: /Date(322560000000+0000)/ EndDate: description: End date of the leave (YYYY-MM-DD) type: string x-is-msdate: true - example: '/Date(322560000000+0000)/' + example: /Date(322560000000+0000)/ Description: description: The Description of the Leave type: string @@ -3841,8 +3426,8 @@ components: type: string readOnly: true x-is-msdate-time: true - example: '/Date(1583967733054+0000)/' - ValidationErrors: + example: /Date(1583967733054+0000)/ + ValidationErrors: description: Displays array of validation error messages from the API type: array items: @@ -3866,21 +3451,21 @@ components: description: The Pay Period End Date (YYYY-MM-DD) type: string x-is-msdate: true - example: '/Date(322560000000+0000)/' + example: /Date(322560000000+0000)/ PayPeriodStartDate: description: The Pay Period Start Date (YYYY-MM-DD) type: string x-is-msdate: true - example: '/Date(322560000000+0000)/' + example: /Date(322560000000+0000)/ LeavePeriodStatus: $ref: '#/components/schemas/LeavePeriodStatus' LeavePeriodStatus: type: string enum: - - SCHEDULED #The default status - - PROCESSED #A LeavePeriod is set to the "Processed" status when the Payrun associated with the LeavePeriod is "POSTED" - - REQUESTED - - REJECTED + - SCHEDULED #The default status + - PROCESSED #A LeavePeriod is set to the "Processed" status when the Payrun associated with the LeavePeriod is "POSTED" + - REQUESTED + - REJECTED PayItems: type: object x-objectArrayKey: pay_items @@ -3927,12 +3512,12 @@ components: description: The start date of the upcoming pay period. The end date will be calculated based upon this date, and the calendar type selected (YYYY-MM-DD) type: string x-is-msdate: true - example: '/Date(322560000000+0000)/' + example: /Date(322560000000+0000)/ PaymentDate: description: The date on which employees will be paid for the upcoming pay period (YYYY-MM-DD) type: string x-is-msdate: true - example: '/Date(322560000000+0000)/' + example: /Date(322560000000+0000)/ PayrollCalendarID: description: Xero identifier type: string @@ -3943,13 +3528,13 @@ components: type: string readOnly: true x-is-msdate-time: true - example: '/Date(1583967733054+0000)/' + example: /Date(1583967733054+0000)/ ReferenceDate: description: Reference Date (YYYY-MM-DD) type: string x-is-msdate: true - example: '/Date(322560000000+0000)/' - ValidationErrors: + example: /Date(322560000000+0000)/ + ValidationErrors: description: Displays array of validation error messages from the API type: array items: @@ -3983,16 +3568,16 @@ components: description: Period start date (YYYY-MM-DD) type: string x-is-msdate: true - example: '/Date(322560000000+0000)/' + example: /Date(322560000000+0000)/ EndDate: description: Period end date (YYYY-MM-DD) type: string x-is-msdate: true - example: '/Date(322560000000+0000)/' + example: /Date(322560000000+0000)/ Status: $ref: '#/components/schemas/TimesheetStatus' Hours: - description: Timesheet total hours + description: Timesheet total hours type: number format: double x-is-money: true @@ -4009,8 +3594,8 @@ components: type: string readOnly: true x-is-msdate-time: true - example: '/Date(1583967733054+0000)/' - ValidationErrors: + example: /Date(1583967733054+0000)/ + ValidationErrors: description: Displays array of validation error messages from the API type: array items: @@ -4033,7 +3618,7 @@ components: format: uuid example: ae777a87-5ef3-4fa0-a4f0-d10e1f13073a NumberOfUnits: - description: The number of units on a timesheet line + description: The number of units on a timesheet line type: array items: description: Number of units of a Timesheet line @@ -4045,7 +3630,7 @@ components: type: string readOnly: true x-is-msdate-time: true - example: '/Date(1583967733054+0000)/' + example: /Date(1583967733054+0000)/ PayRuns: type: object x-objectArrayKey: pay_runs @@ -4060,32 +3645,32 @@ components: - PayrollCalendarID properties: PayrollCalendarID: - description: Xero identifier for pay run + description: Xero identifier for pay run type: string format: uuid example: bfac31bd-ea62-4fc8-a5e7-7965d9504b15 PayRunID: - description: Xero identifier for pay run - type: string + description: Xero identifier for pay run + type: string format: uuid example: bba1d10f-63b1-4692-b5c5-a99f869523a4 PayRunPeriodStartDate: - description: Period Start Date for the PayRun (YYYY-MM-DD) + description: Period Start Date for the PayRun (YYYY-MM-DD) type: string x-is-msdate: true - example: '/Date(322560000000+0000)/' + example: /Date(322560000000+0000)/ PayRunPeriodEndDate: - description: Period End Date for the PayRun (YYYY-MM-DD) + description: Period End Date for the PayRun (YYYY-MM-DD) type: string x-is-msdate: true - example: '/Date(322560000000+0000)/' + example: /Date(322560000000+0000)/ PayRunStatus: $ref: '#/components/schemas/PayRunStatus' PaymentDate: - description: Payment Date for the PayRun (YYYY-MM-DD) + description: Payment Date for the PayRun (YYYY-MM-DD) type: string x-is-msdate: true - example: '/Date(322560000000+0000)/' + example: /Date(322560000000+0000)/ PayslipMessage: description: Payslip message for the PayRun type: string @@ -4095,7 +3680,7 @@ components: type: string readOnly: true x-is-msdate-time: true - example: '/Date(1583967733054+0000)/' + example: /Date(1583967733054+0000)/ Payslips: description: The payslips in the payrun type: array @@ -4137,7 +3722,7 @@ components: format: double x-is-money: true example: 862.5 - ValidationErrors: + ValidationErrors: description: Displays array of validation error messages from the API type: array items: @@ -4151,7 +3736,7 @@ components: format: uuid example: 4729f087-8eec-49c1-8294-4d11a5a0a37c PayslipID: - description: Xero identifier for the payslip + description: Xero identifier for the payslip type: string format: uuid example: f3c0874d-7cdd-459a-a95c-d90d51decc42 @@ -4208,7 +3793,7 @@ components: type: string readOnly: true x-is-msdate-time: true - example: '/Date(1583967733054+0000)/' + example: /Date(1583967733054+0000)/ PayslipLines: type: object properties: @@ -4266,7 +3851,7 @@ components: format: uuid example: 4729f087-8eec-49c1-8294-4d11a5a0a37c PayslipID: - description: Xero identifier for the payslip + description: Xero identifier for the payslip type: string format: uuid example: f3c0874d-7cdd-459a-a95c-d90d51decc42 @@ -4351,7 +3936,7 @@ components: type: string readOnly: true x-is-msdate-time: true - example: '/Date(1583967733054+0000)/' + example: /Date(1583967733054+0000)/ LeaveAccrualLine: type: object properties: @@ -4374,7 +3959,7 @@ components: type: object properties: SuperMembershipID: - description: Xero identifier for payroll super fund membership ID. + description: Xero identifier for payroll super fund membership ID. type: string format: uuid example: e0eb6747-7c17-4075-b804-989f8d4e5d39 @@ -4383,7 +3968,7 @@ components: CalculationType: $ref: '#/components/schemas/SuperannuationCalculationType' MinimumMonthlyEarnings: - description: Superannuation minimum monthly earnings. + description: Superannuation minimum monthly earnings. type: number format: double x-is-money: true @@ -4397,12 +3982,12 @@ components: type: string example: 650 PaymentDateForThisPeriod: - description: Superannuation payment date for the current period (YYYY-MM-DD) + description: Superannuation payment date for the current period (YYYY-MM-DD) type: string x-is-msdate: true - example: '/Date(322560000000+0000)/' + example: /Date(322560000000+0000)/ Percentage: - description: Superannuation percentage + description: Superannuation percentage type: number format: double x-is-money: true @@ -4417,7 +4002,7 @@ components: type: object properties: PayslipTaxLineID: - description: Xero identifier for payslip tax line ID. + description: Xero identifier for payslip tax line ID. type: string format: uuid example: e0eb6747-7c17-4075-b804-989f8d4e5d39 @@ -4471,19 +4056,19 @@ components: type: object properties: Accounts: - description: Payroll Account details for SuperExpense, SuperLiabilty, WagesExpense, PAYGLiability & WagesPayable. + description: Payroll Account details for SuperExpense, SuperLiabilty, WagesExpense, PAYGLiability & WagesPayable. type: array items: $ref: '#/components/schemas/Account' TrackingCategories: - description: Tracking categories for Employees and Timesheets + description: Tracking categories for Employees and Timesheets type: object properties: EmployeeGroups: description: The tracking category used for employees type: object properties: - TrackingCategoryID: + TrackingCategoryID: description: The identifier for the tracking category type: string format: uuid @@ -4495,7 +4080,7 @@ components: description: The tracking category used for timesheets type: object properties: - TrackingCategoryID: + TrackingCategoryID: description: The identifier for the tracking category type: string format: uuid @@ -4526,7 +4111,7 @@ components: - Type properties: SuperFundID: - description: Xero identifier for a super fund + description: Xero identifier for a super fund type: string format: uuid example: bfac31bd-ea62-4fc8-a5e7-7965d9504b15 @@ -4547,7 +4132,7 @@ components: AccountNumber: description: The account number for the self managed super fund. type: string - example: 234234234 + example: 234234234 AccountName: description: The account name for the self managed super fund. type: string @@ -4561,7 +4146,7 @@ components: type: string example: 324324 SPIN: - description: The SPIN of the Regulated SuperFund. This field has been deprecated. It will only be present for legacy superfunds. New superfunds will not have a SPIN value. The USI field should be used instead of SPIN. + description: The SPIN of the Regulated SuperFund. This field has been deprecated. It will only be present for legacy superfunds. New superfunds will not have a SPIN value. The USI field should be used instead of SPIN. type: string example: 4545445454 USI: @@ -4573,8 +4158,8 @@ components: type: string readOnly: true x-is-msdate-time: true - example: '/Date(1583967733054+0000)/' - ValidationErrors: + example: /Date(1583967733054+0000)/ + ValidationErrors: description: Displays array of validation error messages from the API type: array items: @@ -4595,7 +4180,7 @@ components: type: string example: 839182848805 USI: - description: The USI of the Regulated SuperFund + description: The USI of the Regulated SuperFund type: string example: 839182848805001 SPIN: @@ -4697,7 +4282,7 @@ components: type: string readOnly: true x-is-msdate-time: true - example: '/Date(1583967733054+0000)/' + example: /Date(1583967733054+0000)/ CurrentRecord: description: Is the current record type: boolean @@ -4740,7 +4325,7 @@ components: type: string readOnly: true x-is-msdate-time: true - example: '/Date(1583967733054+0000)/' + example: /Date(1583967733054+0000)/ DeductionCategory: type: string enum: @@ -4783,7 +4368,7 @@ components: type: string readOnly: true x-is-msdate-time: true - example: '/Date(1583967733054+0000)/' + example: /Date(1583967733054+0000)/ IsPaidLeave: description: Set this to indicate that an employee will be paid when taking this type of leave type: boolean @@ -4824,7 +4409,7 @@ components: type: string readOnly: true x-is-msdate-time: true - example: '/Date(1583967733054+0000)/' + example: /Date(1583967733054+0000)/ CurrentRecord: description: Is the current record type: boolean @@ -4872,7 +4457,7 @@ components: type: string example: 123123123 ABN: - description: 11-digit Australian Business Number e.g 21006819692 or an empty string ("") to unset a previously set value. Only applicable, and mandatory if income type is NONEMPLOYEE. + description: 11-digit Australian Business Number e.g 21006819692 or an empty string ("") to unset a previously set value. Only applicable, and mandatory if income type is NONEMPLOYEE. type: string example: 21006819692 AustralianResidentForTaxPurposes: @@ -4927,7 +4512,7 @@ components: type: boolean example: true HasLoanOrStudentDebt: - description: "If the employee has any of the following loans or debts: Higher Education Loan Program (HELP/HECS), VET Student Loan (VSL), Financial Supplement (FS), Student Start-up Loan (SSL), or Trade Support Loan (TSL)" + description: 'If the employee has any of the following loans or debts: Higher Education Loan Program (HELP/HECS), VET Student Loan (VSL), Financial Supplement (FS), Student Start-up Loan (SSL), or Trade Support Loan (TSL)' type: boolean example: true UpdatedDateUTC: @@ -4935,7 +4520,7 @@ components: type: string readOnly: true x-is-msdate-time: true - example: '/Date(1583967733054+0000)/' + example: /Date(1583967733054+0000)/ type: object BankAccount: type: object @@ -4992,7 +4577,7 @@ components: EarningsLine: type: object required: - - EarningsRateID + - EarningsRateID properties: EarningsRateID: description: Xero unique id for earnings rate @@ -5046,7 +4631,7 @@ components: DeductionLine: type: object required: - - DeductionTypeID + - DeductionTypeID properties: DeductionTypeID: description: Xero deduction type identifier @@ -5113,7 +4698,6 @@ components: example: 10.00 ReimbursementLines: type: object - x-objectArrayKey: reimbursement_lines description: The reimbursement type lines properties: @@ -5219,7 +4803,7 @@ components: x-is-money: true example: 60.00 ResetSTPCategorisation: - description: Reset the STP categorisations for the leave type. *Only applicable for Leave Types with Annual Leave Categories + description: Reset the STP categorisations for the leave type. *Only applicable for Leave Types with Annual Leave Categories type: boolean example: true OpeningBalances: @@ -5229,7 +4813,7 @@ components: description: Opening Balance Date. (YYYY-MM-DD) type: string x-is-msdate: true - example: '/Date(322560000000+0000)/' + example: /Date(322560000000+0000)/ Tax: description: Opening Balance tax type: string @@ -5261,21 +4845,21 @@ components: LeaveBalance: type: object properties: - LeaveName : + LeaveName: description: The name of the leave type type: string example: Annual Leave - LeaveTypeID : + LeaveTypeID: description: Identifier of the leave type (see PayItems) type: string example: 544d9292-4329-4512-bfff-a9f15236d776 - NumberOfUnits : + NumberOfUnits: description: The balance of the leave available type: number format: double x-is-money: true example: 81.2602 - TypeOfUnits : + TypeOfUnits: description: The type of units as specified by the LeaveType (see PayItems) type: string example: Hours @@ -5299,474 +4883,474 @@ components: RateType: type: string enum: - - FIXEDAMOUNT - - MULTIPLE #Multiple of Employee’s Ordinary Earnings Rate - an earnings rate which is derived from an employee’s ordinary earnings rate - - RATEPERUNIT #An earnings rate allowing entry of a rate per unit - EarningsType: + - FIXEDAMOUNT + - MULTIPLE #Multiple of Employee’s Ordinary Earnings Rate - an earnings rate which is derived from an employee’s ordinary earnings rate + - RATEPERUNIT #An earnings rate allowing entry of a rate per unit + EarningsType: type: string enum: - - FIXED - - ORDINARYTIMEEARNINGS - - OVERTIMEEARNINGS - - ALLOWANCE - - LUMPSUMD - - EMPLOYMENTTERMINATIONPAYMENT - - LUMPSUMA - - LUMPSUMB - - BONUSESANDCOMMISSIONS - - LUMPSUME - - LUMPSUMW - - DIRECTORSFEES - - PAIDPARENTALLEAVE - - WORKERSCOMPENSATION - EmploymentTerminationPaymentType: + - FIXED + - ORDINARYTIMEEARNINGS + - OVERTIMEEARNINGS + - ALLOWANCE + - LUMPSUMD + - EMPLOYMENTTERMINATIONPAYMENT + - LUMPSUMA + - LUMPSUMB + - BONUSESANDCOMMISSIONS + - LUMPSUME + - LUMPSUMW + - DIRECTORSFEES + - PAIDPARENTALLEAVE + - WORKERSCOMPENSATION + EmploymentTerminationPaymentType: type: string enum: - - O - - R - AllowanceType: + - O + - R + AllowanceType: type: string - enum: - - CAR - - TRANSPORT - - LAUNDRY - - MEALS - - TRAVEL - - OTHER - - TOOLS - - TASKS - - QUALIFICATIONS + enum: + - CAR + - TRANSPORT + - LAUNDRY + - MEALS + - TRAVEL + - OTHER + - TOOLS + - TASKS + - QUALIFICATIONS AllowanceCategory: type: string enum: - - NONDEDUCTIBLE - - UNIFORM - - PRIVATEVEHICLE - - HOMEOFFICE - - TRANSPORT - - GENERAL - - OTHER - CalendarType: + - NONDEDUCTIBLE + - UNIFORM + - PRIVATEVEHICLE + - HOMEOFFICE + - TRANSPORT + - GENERAL + - OTHER + CalendarType: type: string enum: - - WEEKLY - - FORTNIGHTLY - - FOURWEEKLY - - MONTHLY - - TWICEMONTHLY - - QUARTERLY - EarningsRateCalculationType: + - WEEKLY + - FORTNIGHTLY + - FOURWEEKLY + - MONTHLY + - TWICEMONTHLY + - QUARTERLY + EarningsRateCalculationType: type: string enum: - - USEEARNINGSRATE - - ENTEREARNINGSRATE - - ANNUALSALARY - DeductionTypeCalculationType: + - USEEARNINGSRATE + - ENTEREARNINGSRATE + - ANNUALSALARY + DeductionTypeCalculationType: type: string enum: - - FIXEDAMOUNT - - PRETAX - - POSTTAX - LeaveLineCalculationType: + - FIXEDAMOUNT + - PRETAX + - POSTTAX + LeaveLineCalculationType: description: Calculation type for leave line for Opening Balance on Employee type: string enum: - - NOCALCULATIONREQUIRED - - FIXEDAMOUNTEACHPERIOD - - ENTERRATEINPAYTEMPLATE - - BASEDONORDINARYEARNINGS - SuperannuationContributionType: + - NOCALCULATIONREQUIRED + - FIXEDAMOUNTEACHPERIOD + - ENTERRATEINPAYTEMPLATE + - BASEDONORDINARYEARNINGS + SuperannuationContributionType: type: string enum: - - SGC - - SALARYSACRIFICE - - EMPLOYERADDITIONAL - - EMPLOYEE - SuperannuationCalculationType: + - SGC + - SALARYSACRIFICE + - EMPLOYERADDITIONAL + - EMPLOYEE + SuperannuationCalculationType: type: string enum: - - FIXEDAMOUNT - - PERCENTAGEOFEARNINGS - - STATUTORY - PaymentFrequencyType: + - FIXEDAMOUNT + - PERCENTAGEOFEARNINGS + - STATUTORY + PaymentFrequencyType: type: string enum: - - WEEKLY - - MONTHLY - - FORTNIGHTLY - - QUARTERLY - - TWICEMONTHLY - - FOURWEEKLY - - YEARLY - LeaveTypeContributionType: + - WEEKLY + - MONTHLY + - FORTNIGHTLY + - QUARTERLY + - TWICEMONTHLY + - FOURWEEKLY + - YEARLY + LeaveTypeContributionType: type: string enum: - - SGC - - SALARYSACRIFICE - - EMPLOYERADDITIONAL - - EMPLOYEE - EntitlementFinalPayPayoutType: + - SGC + - SALARYSACRIFICE + - EMPLOYERADDITIONAL + - EMPLOYEE + EntitlementFinalPayPayoutType: type: string enum: - - NOTPAIDOUT - - PAIDOUT - PayRunStatus: + - NOTPAIDOUT + - PAIDOUT + PayRunStatus: type: string enum: - - DRAFT - - POSTED - ManualTaxType: + - DRAFT + - POSTED + ManualTaxType: type: string enum: - - PAYGMANUAL - - ETPOMANUAL - - ETPRMANUAL - - SCHEDULE5MANUAL - - SCHEDULE5STSLMANUAL - - SCHEDULE4MANUAL - SuperFundType: + - PAYGMANUAL + - ETPOMANUAL + - ETPRMANUAL + - SCHEDULE5MANUAL + - SCHEDULE5STSLMANUAL + - SCHEDULE4MANUAL + SuperFundType: type: string enum: - - REGULATED - - SMSF - EmploymentType: + - REGULATED + - SMSF + EmploymentType: type: string enum: - - EMPLOYEE - - CONTRACTOR + - EMPLOYEE + - CONTRACTOR CountryOfResidence: description: Country of residence as a valid ISO 3166-1 alpha-2 country code e.g. "AU", "NZ", "CA". Only applicable, and mandatory if income type is WORKINGHOLIDAYMAKER. type: string - example: "AU" + example: AU enum: - - AF - - AX - - AL - - DZ - - AS - - AD - - AO - - AI - - AQ - - AG - - AR - - AM - - AW - - AU - - AT - - AZ - - BS - - BH - - BD - - BB - - BY - - BE - - BZ - - BJ - - BM - - BT - - BO - - BA - - BW - - BV - - BR - - IO - - BN - - BG - - BF - - BI - - KH - - CM - - CA - - CV - - KY - - CF - - TD - - CL - - CN - - CX - - CC - - CO - - KM - - CG - - CD - - CK - - CR - - CI - - HR - - CU - - CY - - CZ - - DK - - DJ - - DM - - DO - - EC - - EG - - SV - - GQ - - ER - - EE - - ET - - FK - - FO - - FJ - - FI - - FR - - GF - - PF - - TF - - GA - - GM - - GE - - DE - - GH - - GI - - GR - - GL - - GD - - GP - - GU - - GT - - GG - - GN - - GW - - GY - - HT - - HM - - VA - - HN - - HK - - HU - - IS - - IN - - ID - - IR - - IQ - - IE - - IM - - IL - - IT - - JM - - JP - - JE - - JO - - KZ - - KE - - KI - - KP - - KR - - KW - - KG - - LA - - LV - - LB - - LS - - LR - - LY - - LI - - LT - - LU - - MO - - MK - - MG - - MW - - MY - - MV - - ML - - MT - - MH - - MQ - - MR - - MU - - YT - - MX - - FM - - MD - - MC - - MN - - ME - - MS - - MA - - MZ - - MM - - NA - - NR - - NP - - NL - - AN - - NC - - NZ - - NI - - NE - - NG - - NU - - NF - - MP - - "NO" - - OM - - PK - - PW - - PS - - PA - - PG - - PY - - PE - - PH - - PN - - PL - - PT - - PR - - QA - - RE - - RO - - RU - - RW - - BL - - SH - - KN - - LC - - MF - - PM - - VC - - WS - - SM - - ST - - SA - - SN - - RS - - SC - - SL - - SG - - SK - - SI - - SB - - SO - - ZA - - GS - - ES - - LK - - SD - - SR - - SJ - - SZ - - SE - - CH - - SY - - TW - - TJ - - TZ - - TH - - TL - - TG - - TK - - TO - - TT - - TN - - TR - - TM - - TC - - TV - - UG - - UA - - AE - - GB - - US - - UM - - UY - - UZ - - VU - - VE - - VN - - VG - - VI - - WF - - EH - - YE - - ZM - - ZW - - BQ - - CW - - SX - - SS - IncomeType: + - AF + - AX + - AL + - DZ + - AS + - AD + - AO + - AI + - AQ + - AG + - AR + - AM + - AW + - AU + - AT + - AZ + - BS + - BH + - BD + - BB + - BY + - BE + - BZ + - BJ + - BM + - BT + - BO + - BA + - BW + - BV + - BR + - IO + - BN + - BG + - BF + - BI + - KH + - CM + - CA + - CV + - KY + - CF + - TD + - CL + - CN + - CX + - CC + - CO + - KM + - CG + - CD + - CK + - CR + - CI + - HR + - CU + - CY + - CZ + - DK + - DJ + - DM + - DO + - EC + - EG + - SV + - GQ + - ER + - EE + - ET + - FK + - FO + - FJ + - FI + - FR + - GF + - PF + - TF + - GA + - GM + - GE + - DE + - GH + - GI + - GR + - GL + - GD + - GP + - GU + - GT + - GG + - GN + - GW + - GY + - HT + - HM + - VA + - HN + - HK + - HU + - IS + - IN + - ID + - IR + - IQ + - IE + - IM + - IL + - IT + - JM + - JP + - JE + - JO + - KZ + - KE + - KI + - KP + - KR + - KW + - KG + - LA + - LV + - LB + - LS + - LR + - LY + - LI + - LT + - LU + - MO + - MK + - MG + - MW + - MY + - MV + - ML + - MT + - MH + - MQ + - MR + - MU + - YT + - MX + - FM + - MD + - MC + - MN + - ME + - MS + - MA + - MZ + - MM + - NA + - NR + - NP + - NL + - AN + - NC + - NZ + - NI + - NE + - NG + - NU + - NF + - MP + - "NO" + - OM + - PK + - PW + - PS + - PA + - PG + - PY + - PE + - PH + - PN + - PL + - PT + - PR + - QA + - RE + - RO + - RU + - RW + - BL + - SH + - KN + - LC + - MF + - PM + - VC + - WS + - SM + - ST + - SA + - SN + - RS + - SC + - SL + - SG + - SK + - SI + - SB + - SO + - ZA + - GS + - ES + - LK + - SD + - SR + - SJ + - SZ + - SE + - CH + - SY + - TW + - TJ + - TZ + - TH + - TL + - TG + - TK + - TO + - TT + - TN + - TR + - TM + - TC + - TV + - UG + - UA + - AE + - GB + - US + - UM + - UY + - UZ + - VU + - VE + - VN + - VG + - VI + - WF + - EH + - YE + - ZM + - ZW + - BQ + - CW + - SX + - SS + IncomeType: type: string enum: - - SALARYANDWAGES - - WORKINGHOLIDAYMAKER - - NONEMPLOYEE - - CLOSELYHELDPAYEES - - LABOURHIRE - TaxScaleType: + - SALARYANDWAGES + - WORKINGHOLIDAYMAKER + - NONEMPLOYEE + - CLOSELYHELDPAYEES + - LABOURHIRE + TaxScaleType: type: string enum: - - REGULAR - - ACTORSARTISTSENTERTAINERS - - HORTICULTURISTORSHEARER - - SENIORORPENSIONER - - WORKINGHOLIDAYMAKER - - FOREIGN - WorkCondition: + - REGULAR + - ACTORSARTISTSENTERTAINERS + - HORTICULTURISTORSHEARER + - SENIORORPENSIONER + - WORKINGHOLIDAYMAKER + - FOREIGN + WorkCondition: type: string enum: - - PROMOTIONAL - - THREELESSPERFORMANCESPERWEEK - - NONE - SeniorMaritalStatus: + - PROMOTIONAL + - THREELESSPERFORMANCESPERWEEK + - NONE + SeniorMaritalStatus: type: string enum: - - MEMBEROFCOUPLE - - MEMBEROFILLNESSSEPARATEDCOUPLE - - SINGLE - EmploymentBasis: + - MEMBEROFCOUPLE + - MEMBEROFILLNESSSEPARATEDCOUPLE + - SINGLE + EmploymentBasis: type: string enum: - - FULLTIME - - PARTTIME - - CASUAL - - LABOURHIRE - - SUPERINCOMESTREAM # Usage is deprecated. - - NONEMPLOYEE - TFNExemptionType: + - FULLTIME + - PARTTIME + - CASUAL + - LABOURHIRE + - SUPERINCOMESTREAM # Usage is deprecated. + - NONEMPLOYEE + TFNExemptionType: type: string enum: - - NOTQUOTED - - PENDING - - PENSIONER - - UNDER18 - ResidencyStatus: + - NOTQUOTED + - PENDING + - PENSIONER + - UNDER18 + ResidencyStatus: type: string enum: - - AUSTRALIANRESIDENT - - FOREIGNRESIDENT - - WORKINGHOLIDAYMAKER # Usage is deprecated. - TimesheetStatus: + - AUSTRALIANRESIDENT + - FOREIGNRESIDENT + - WORKINGHOLIDAYMAKER # Usage is deprecated. + TimesheetStatus: type: string enum: - - DRAFT - - PROCESSED - - APPROVED - - REJECTED - - REQUESTED + - DRAFT + - PROCESSED + - APPROVED + - REJECTED + - REQUESTED EmployeeStatus: type: string description: Employee Status Types enum: - - ACTIVE #Employee with no Termination Date. - - TERMINATED #Employee with a Termination Date. + - ACTIVE #Employee with no Termination Date. + - TERMINATED #Employee with a Termination Date. State: type: string description: State abbreviation for employee home address example: VIC enum: - - ACT - - NSW - - NT - - QLD - - SA - - TAS - - VIC - - WA + - ACT + - NSW + - NT + - QLD + - SA + - TAS + - VIC + - WA SuperMembership: type: object required: @@ -5778,7 +5362,7 @@ components: type: string format: uuid example: 4333d5cd-53a5-4c31-98e5-a8b4e5676b0b - SuperFundID : + SuperFundID: description: Xero identifier for super fund type: string format: uuid @@ -5794,9 +5378,9 @@ components: - BANK - CURRENT - CURRLIAB - - DEPRECIATN + - DEPRECIATN - DIRECTCOSTS - - EQUITY + - EQUITY - EXPENSE - FIXED - INVENTORY @@ -5818,8 +5402,8 @@ components: description: The object returned for a bad request type: object properties: - ErrorNumber: - description: The error number + ErrorNumber: + description: The error number type: number format: integer example: 16 @@ -5827,15 +5411,15 @@ components: description: The type of error type: string example: QueryParseException - Message: + Message: description: The message describing the error type: string example: No property or field 'hi' exists in type 'Employee' (at index 0) ValidationError: externalDocs: - url: 'https://developer.xero.com/documentation/api/http-response-codes' + url: https://developer.xero.com/documentation/api/http-response-codes properties: Message: description: Validation error message type: string - type: object \ No newline at end of file + type: object diff --git a/xero-payroll-nz.yaml b/xero-payroll-nz.yaml index 6a25dc2ab..529ea14ac 100644 --- a/xero-payroll-nz.yaml +++ b/xero-payroll-nz.yaml @@ -1,13 +1,13 @@ openapi: 3.0.0 info: - version: "6.3.0" - title: 'Xero Payroll NZ' - description: 'This is the Xero Payroll API for orgs in the NZ region.' - termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" + version: 10.1.0 + title: Xero Payroll NZ + description: This is the Xero Payroll API for orgs in the NZ region. + termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/ contact: - name: "Xero Platform Team" - email: "api@xero.com" - url: "https://developer.xero.com" + name: Xero Platform Team + email: api@xero.com + url: https://developer.xero.com tags: - name: PayrollNz servers: @@ -17,9 +17,11 @@ paths: /Employees: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollNz operationId: getEmployees @@ -39,84 +41,76 @@ paths: type: integer example: 5 responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Employees' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-24T20:16:14.6198711", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 8 - }, - "problem": null, - "employees": [ - { - "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", - "firstName": "Casual", - "lastName": "Worker", - "dateOfBirth": "1990-12-01T00:00:00", - "gender": "M", - "email": null, - "phoneNumber": null, - "startDate": "2019-02-07T00:00:00", - "address": { - "addressLine1": "30 King ST", - "addressLine2": null, - "city": "Rangiora", - "suburb": null, - "countryName": "NEW ZEALAND", - "postCode": "7400" - }, - "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", - "updatedDateUTC": "2019-09-24T05:08:45", - "createdDateUTC": "2019-09-22T23:58:23", - "endDate": null, - "engagementType": "Casual", - "fixedTermEndDate": null - }, - { - "employeeID": "1c4f0c92-03ad-43f2-a690-ee51397ece6a", - "firstName": "GST", - "lastName": "Contractor", - "dateOfBirth": null, - "gender": null, - "email": null, - "phoneNumber": null, - "startDate": "2019-01-30T00:00:00", - "address": { - "addressLine1": null, - "addressLine2": null, - "city": null, - "suburb": null, - "countryName": null, - "postCode": null - }, - "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", - "updatedDateUTC": "2019-09-23T00:16:25", - "createdDateUTC": "2019-09-23T00:12:16", - "endDate": null, - "engagementType": null, - "fixedTermEndDate": null - } - ] - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-24T20:16:14.6198711 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 8 + problem: null + employees: + - employeeID: 68342973-c405-4b86-b5d3-d7b877c27995 + firstName: Casual + lastName: Worker + dateOfBirth: 1990-12-01T00:00:00 + gender: M + email: null + phoneNumber: null + startDate: 2019-02-07T00:00:00 + address: + addressLine1: 30 King ST + addressLine2: null + city: Rangiora + suburb: null + countryName: NEW ZEALAND + postCode: "7400" + payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030 + updatedDateUTC: 2019-09-24T05:08:45 + createdDateUTC: 2019-09-22T23:58:23 + endDate: null + engagementType: Casual + fixedTermEndDate: null + - employeeID: 1c4f0c92-03ad-43f2-a690-ee51397ece6a + firstName: GST + lastName: Contractor + dateOfBirth: null + gender: null + email: null + phoneNumber: null + startDate: 2019-01-30T00:00:00 + address: + addressLine1: null + addressLine2: null + city: null + suburb: null + countryName: null + postCode: null + payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030 + updatedDateUTC: 2019-09-23T00:16:25 + createdDateUTC: 2019-09-23T00:12:16 + endDate: null + engagementType: null + fixedTermEndDate: null + "400": description: validation error for a bad request content: application/json: schema: $ref: '#/components/schemas/Problem' - post: + post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollNz operationId: createEmployee @@ -130,18 +124,18 @@ paths: object: employee java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2000, Month.OCTOBER, 28)" - java: "LocalDate.of(2000, Month.OCTOBER, 28)" - csharp: "new DateTime(2000, 10, 10)" - php: "new DateTime('2000-10-28')" - node: "'2000-10-28'" - python: "dateutil.parser.parse('2000-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2000, Month.OCTOBER, 28) + java: LocalDate.of(2000, Month.OCTOBER, 28) + csharp: new DateTime(2000, 10, 10) + php: new DateTime('2000-10-28') + node: '''2000-10-28''' + python: dateutil.parser.parse('2000-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - Address: key: address keyPascal: Address keySnake: address - is_object: true + is_object: true - addressLine1: key: addressLine1 keyPascal: AddressLine1 @@ -170,18 +164,18 @@ paths: - employee: key: employee keyPascal: Employee - is_object: true + is_object: true - firstName: key: firstName keyPascal: FirstName - keySnake: first_name - default: "Adam" + keySnake: first_name + default: Adam object: employee - lastName: key: lastName keyPascal: LastName keySnake: last_name - default: "Adamson" + default: Adamson object: employee - dateOfBirth: is_variable: true @@ -202,50 +196,47 @@ paths: default: address python: address ruby: address - object: employee + object: employee summary: Creates an employees parameters: - $ref: '#/components/parameters/idempotencyKey' responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-24T20:27:22.5779577", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "employee": { - "employeeID": "658be485-3feb-402e-9e77-ac17623aad42", - "firstName": "Mike", - "lastName": "Johntzxzpxhmkgson", - "dateOfBirth": "2000-01-01T00:00:00", - "gender": "M", - "email": "83139@starkindustries.com", - "phoneNumber": null, - "startDate": null, - "address": { - "addressLine1": "101 Green St", - "addressLine2": null, - "city": "San Francisco", - "suburb": null, - "countryName": null, - "postCode": "4351" - }, - "payrollCalendarID": null, - "updatedDateUTC": "2020-08-24T20:27:22", - "createdDateUTC": "2020-08-24T20:27:22", - "endDate": null, - "engagementType": null, - "fixedTermEndDate": null - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-24T20:27:22.5779577 + httpStatusCode: OK + pagination: null + problem: null + employee: + employeeID: 658be485-3feb-402e-9e77-ac17623aad42 + firstName: Mike + lastName: Johntzxzpxhmkgson + dateOfBirth: 2000-01-01T00:00:00 + gender: M + email: 83139@starkindustries.com + phoneNumber: null + startDate: null + address: + addressLine1: 101 Green St + addressLine2: null + city: San Francisco + suburb: null + countryName: null + postCode: "4351" + payrollCalendarID: null + updatedDateUTC: 2020-08-24T20:27:22 + createdDateUTC: 2020-08-24T20:27:22 + endDate: null + engagementType: null + fixedTermEndDate: null + "400": description: validation error for a bad request content: application/json: @@ -257,26 +248,26 @@ paths: application/json: schema: $ref: '#/components/schemas/Employee' - example: { - "title": "Mr", - "firstName": "Mike", - "lastName": "Johntzxzpxhmkgson", - "dateOfBirth": "2000-01-01", - "address": { - "addressLine1": "101 Green St", - "city": "San Francisco", - "postCode": "4351", - "countryName": "United Kingdom" - }, - "email": "83139@starkindustries.com", - "gender": "M" - } + example: + title: Mr + firstName: Mike + lastName: Johntzxzpxhmkgson + dateOfBirth: "2000-01-01" + address: + addressLine1: 101 Green St + city: San Francisco + postCode: "4351" + countryName: United Kingdom + email: 83139@starkindustries.com + gender: M /Employees/{EmployeeID}: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollNz operationId: getEmployee @@ -288,52 +279,50 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-24T20:16:15.3542191", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "employee": { - "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", - "firstName": "Casual", - "lastName": "Worker", - "dateOfBirth": "1990-12-01T00:00:00", - "gender": "M", - "email": null, - "phoneNumber": null, - "startDate": "2019-02-07T00:00:00", - "address": { - "addressLine1": "30 King ST", - "addressLine2": null, - "city": "Rangiora", - "suburb": null, - "countryName": "NEW ZEALAND", - "postCode": "7400" - }, - "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", - "updatedDateUTC": "2019-09-24T05:08:45", - "createdDateUTC": "2019-09-22T23:58:23", - "endDate": null, - "engagementType": "FixedTerm", - "fixedTermEndDate": "2026-01-01T00:00:00" - } - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-24T20:16:15.3542191 + httpStatusCode: OK + pagination: null + problem: null + employee: + employeeID: 68342973-c405-4b86-b5d3-d7b877c27995 + firstName: Casual + lastName: Worker + dateOfBirth: 1990-12-01T00:00:00 + gender: M + email: null + phoneNumber: null + startDate: 2019-02-07T00:00:00 + address: + addressLine1: 30 King ST + addressLine2: null + city: Rangiora + suburb: null + countryName: NEW ZEALAND + postCode: "7400" + payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030 + updatedDateUTC: 2019-09-24T05:08:45 + createdDateUTC: 2019-09-22T23:58:23 + endDate: null + engagementType: FixedTerm + fixedTermEndDate: 2026-01-01T00:00:00 put: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollNz operationId: updateEmployee @@ -347,18 +336,18 @@ paths: object: employee java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2000, Month.OCTOBER, 28)" - java: "LocalDate.of(2000, Month.OCTOBER, 28)" - csharp: "new DateTime(2000, 10, 10)" - php: "new DateTime('2000-10-28')" - node: "'2000-10-28'" - python: "dateutil.parser.parse('2000-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2000, Month.OCTOBER, 28) + java: LocalDate.of(2000, Month.OCTOBER, 28) + csharp: new DateTime(2000, 10, 10) + php: new DateTime('2000-10-28') + node: '''2000-10-28''' + python: dateutil.parser.parse('2000-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - Address: key: address keyPascal: Address keySnake: address - is_object: true + is_object: true - addressLine1: key: addressLine1 keyPascal: AddressLine1 @@ -387,18 +376,18 @@ paths: - employee: key: employee keyPascal: Employee - is_object: true + is_object: true - firstName: key: firstName keyPascal: FirstName - keySnake: first_name - default: "Adam" + keySnake: first_name + default: Adam object: employee - lastName: key: lastName keyPascal: LastName keySnake: last_name - default: "Adamson" + default: Adamson object: employee - dateOfBirth: is_variable: true @@ -419,7 +408,7 @@ paths: default: address python: address ruby: address - object: employee + object: employee summary: Updates an existing employee parameters: - $ref: '#/components/parameters/idempotencyKey' @@ -428,50 +417,47 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: successful response content: application/json: schema: $ref: '#/components/schemas/EmployeeObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-24T20:29:43.3452832", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "employee": { - "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", - "firstName": "Tony", - "lastName": "Starkgtrzgquusrson", - "dateOfBirth": "1999-01-01T00:00:00", - "gender": "M", - "email": "58315@starkindustries.com", - "phoneNumber": null, - "startDate": "2019-02-07T00:00:00", - "address": { - "addressLine1": "101 Green St", - "addressLine2": null, - "city": "San Francisco", - "suburb": null, - "countryName": null, - "postCode": "4432" - }, - "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", - "updatedDateUTC": "2020-08-24T20:29:43", - "createdDateUTC": "2019-09-22T23:58:23", - "endDate": null, - "engagementType": null, - "fixedTermEndDate": null - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-24T20:29:43.3452832 + httpStatusCode: OK + pagination: null + problem: null + employee: + employeeID: 68342973-c405-4b86-b5d3-d7b877c27995 + firstName: Tony + lastName: Starkgtrzgquusrson + dateOfBirth: 1999-01-01T00:00:00 + gender: M + email: 58315@starkindustries.com + phoneNumber: null + startDate: 2019-02-07T00:00:00 + address: + addressLine1: 101 Green St + addressLine2: null + city: San Francisco + suburb: null + countryName: null + postCode: "4432" + payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030 + updatedDateUTC: 2020-08-24T20:29:43 + createdDateUTC: 2019-09-22T23:58:23 + endDate: null + engagementType: null + fixedTermEndDate: null + "400": description: validation error for a bad request content: application/json: @@ -483,26 +469,25 @@ paths: application/json: schema: $ref: '#/components/schemas/Employee' - example: { - "title": "Mr", - "firstName": "Tony", - "lastName": "Starkgtrzgquusrson", - "dateOfBirth": "1999-01-01", - "address": { - "addressLine1": "101 Green St", - "city": "San Francisco", - "postCode": "4432", - "countryName": "United Kingdom" - }, - "email": "58315@starkindustries.com", - "gender": "M" - } + example: + title: Mr + firstName: Tony + lastName: Starkgtrzgquusrson + dateOfBirth: "1999-01-01" + address: + addressLine1: 101 Green St + city: San Francisco + postCode: "4432" + countryName: United Kingdom + email: 58315@starkindustries.com + gender: M /Employees/{EmployeeID}/Employment: parameters: - $ref: '#/components/parameters/requiredHeader' - post: + post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollNz operationId: createEmployment @@ -515,13 +500,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - employment: key: employment keyPascal: Employment @@ -532,7 +517,7 @@ paths: keyPascal: PayrollCalendarID keySnake: payroll_calendar_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: employment - startDate: is_variable: true @@ -557,7 +542,7 @@ paths: keyPascal: FixedTermEndDate keySnake: fixed_term_end_date object: employment - is_last: true + is_last: true summary: Creates an employment detail for a specific employee parameters: - $ref: '#/components/parameters/idempotencyKey' @@ -566,32 +551,30 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmploymentObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-24T20:53:58.8624623", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "employment": { - "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", - "startDate": "2020-09-02T00:00:00", - "engagementType": "FixedTerm", - "fixedTermEndDate": "2026-01-01T00:00:00" - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-24T20:53:58.8624623 + httpStatusCode: OK + pagination: null + problem: null + employment: + payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030 + startDate: 2020-09-02T00:00:00 + engagementType: FixedTerm + fixedTermEndDate: 2026-01-01T00:00:00 + "400": description: validation error for a bad request content: application/json: @@ -603,69 +586,69 @@ paths: application/json: schema: $ref: '#/components/schemas/Employment' - example: { - "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", - "startDate": "2020-09-02", - "engagementType": "FixedTerm", - "fixedTermEndDate": "2026-01-01" - } + example: + payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030 + startDate: "2020-09-02" + engagementType: FixedTerm + fixedTermEndDate: "2026-01-01" /Employees/{EmployeeID}/Tax: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollNz operationId: getEmployeeTax x-hasPayrollUkProblem: true - summary: Retrieves tax records for a specific employee + summary: Retrieves tax records for a specific employee parameters: - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeTaxObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-24T20:57:27.5434491", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "employeeTax": { - "irdNumber": "111111111", - "taxCode": "M", - "esctRatePercentage": 17.5, - "isEligibleForKiwiSaver": true, - "hasSpecialStudentLoanRate": false, - "specialStudentLoanRatePercentage": null, - "specialTaxRatePercentage": null, - "kiwiSaverContributions": "MakeContributions", - "kiwiSaverOptOutDate": null, - "kiwiSaverContributionHolidayEndDate": null, - "kiwiSaverEmployeeContributionRatePercentage": 3, - "kiwiSaverEmployerContributionRatePercentage": 3, - "kiwiSaverEmployerSalarySacrificeContributionRatePercentage": 0, - "hasStudentLoanBalance": false, - "studentLoanBalance": null, - "studentLoanAsAt": null - } - } - post: + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-24T20:57:27.5434491 + httpStatusCode: OK + pagination: null + problem: null + employeeTax: + irdNumber: "111111111" + taxCode: M + esctRatePercentage: 17.5 + isEligibleForKiwiSaver: true + hasSpecialStudentLoanRate: false + specialStudentLoanRatePercentage: null + specialTaxRatePercentage: null + kiwiSaverContributions: MakeContributions + kiwiSaverOptOutDate: null + kiwiSaverContributionHolidayEndDate: null + kiwiSaverEmployeeContributionRatePercentage: 3 + kiwiSaverEmployerContributionRatePercentage: 3 + kiwiSaverEmployerSalarySacrificeContributionRatePercentage: 0 + hasStudentLoanBalance: false + studentLoanBalance: null + studentLoanAsAt: null + post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollNz operationId: updateEmployeeTax @@ -678,13 +661,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 30)" - java: "LocalDate.of(2020, Month.OCTOBER, 30)" - csharp: "new DateTime(2020, 10, 12)" - php: "new DateTime('2020-10-30')" - node: "'2020-10-30'" - python: "dateutil.parser.parse('2020-10-30T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 30) + java: LocalDate.of(2020, Month.OCTOBER, 30) + csharp: new DateTime(2020, 10, 12) + php: new DateTime('2020-10-30') + node: '''2020-10-30''' + python: dateutil.parser.parse('2020-10-30T00:00:00Z') + ruby: '''YYYY-MM-DD''' - employeeTax: key: employeeTax keyPascal: EmployeeTax @@ -700,37 +683,37 @@ paths: key: hasSpecialStudentLoanRate keyPascal: HasSpecialStudentLoanRate keySnake: has_special_student_loan_rate - nonString: true - default: true + nonString: true + default: true object: employeeTax - specialStudentLoanRatePercentage: key: specialStudentLoanRatePercentage keyPascal: SpecialStudentLoanRatePercentage keySnake: special_student_loan_rate_percentage - nonString: true + nonString: true default: 2 object: employeeTax - isEligibleForKiwiSaver: key: isEligibleForKiwiSaver keyPascal: IsEligibleForKiwiSaver keySnake: is_eligible_for_kiwi_saver - nonString: true - default: true + nonString: true + default: true object: employeeTax - esctRatePercentage: key: esctRatePercentage keyPascal: EsctRatePercentage keySnake: esct_rate_percentage default: 17.5 - nonString: true + nonString: true is_money: true object: employeeTax - kiwiSaverContributions: key: kiwiSaverContributions keyPascal: KiwiSaverContributions keySnake: kiwi_saver_contributions - nonString: true - default: "DeductionCategory.NzOther" + nonString: true + default: DeductionCategory.NzOther php: XeroAPI\XeroPHP\Models\PayrollNz\EmployeeTax\KiwiSaverContributionsEnum.MakeContributions node: EmployeeTax.KiwiSaverContributionsEnum.MakeContributions ruby: XeroRuby::PayrollNz::EmployeeTax::kiwi_saver_contributions_enum::MAKECONTRIBUTIONS @@ -744,20 +727,20 @@ paths: keySnake: kiwi_saver_employee_contribution_rate_percentage default: 4 is_money: true - nonString: true + nonString: true object: employeeTax - kiwiSaverEmployerSalarySacrificeContributionRatePercentage: key: kiwiSaverEmployerSalarySacrificeContributionRatePercentage keyPascal: KiwiSaverEmployerSalarySacrificeContributionRatePercentage keySnake: kiwi_saver_employer_salary_sacrifice_contribution_rate_percentage default: 2 - nonString: true + nonString: true object: employeeTax - taxCode: key: taxCode keyPascal: TaxCode keySnake: tax_code - nonString: true + nonString: true default: TaxCode.MSL php: XeroAPI\XeroPHP\Models\PayrollNz\TaxCode\MSL node: TaxCode.MSL @@ -770,15 +753,15 @@ paths: key: hasStudentLoanBalance keyPascal: HasStudentLoanBalance keySnake: has_student_loan_balance - nonString: true - default: true + nonString: true + default: true object: employeeTax - studentLoanBalance: key: studentLoanBalance keyPascal: StudentLoanBalance keySnake: student_loan_balance default: 30.0000 - nonString: true + nonString: true is_money: true object: employeeTax - studentLoanAsAt: @@ -792,7 +775,7 @@ paths: ruby: student_loan_as_at object: employeeTax is_last: true - summary: Updates the tax records for a specific employee + summary: Updates the tax records for a specific employee parameters: - $ref: '#/components/parameters/idempotencyKey' - name: EmployeeID @@ -800,73 +783,72 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeTaxObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-24T20:57:27.5434491", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "employeeTax": { - "irdNumber": "111111111", - "taxCode": "M", - "esctRatePercentage": 17.5, - "isEligibleForKiwiSaver": true, - "hasSpecialStudentLoanRate": false, - "specialStudentLoanRatePercentage": null, - "specialTaxRatePercentage": null, - "kiwiSaverContributions": "MakeContributions", - "kiwiSaverOptOutDate": null, - "kiwiSaverContributionHolidayEndDate": null, - "kiwiSaverEmployeeContributionRatePercentage": 3, - "kiwiSaverEmployerContributionRatePercentage": 3, - "kiwiSaverEmployerSalarySacrificeContributionRatePercentage": 0, - "hasStudentLoanBalance": false, - "studentLoanBalance": null, - "studentLoanAsAt": null - } - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-24T20:57:27.5434491 + httpStatusCode: OK + pagination: null + problem: null + employeeTax: + irdNumber: "111111111" + taxCode: M + esctRatePercentage: 17.5 + isEligibleForKiwiSaver: true + hasSpecialStudentLoanRate: false + specialStudentLoanRatePercentage: null + specialTaxRatePercentage: null + kiwiSaverContributions: MakeContributions + kiwiSaverOptOutDate: null + kiwiSaverContributionHolidayEndDate: null + kiwiSaverEmployeeContributionRatePercentage: 3 + kiwiSaverEmployerContributionRatePercentage: 3 + kiwiSaverEmployerSalarySacrificeContributionRatePercentage: 0 + hasStudentLoanBalance: false + studentLoanBalance: null + studentLoanAsAt: null requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EmployeeTax' - example: { - "irdNumber": "111111111", - "taxCode": "M", - "esctRatePercentage": 17.5, - "isEligibleForKiwiSaver": true, - "hasSpecialStudentLoanRate": false, - "specialStudentLoanRatePercentage": null, - "specialTaxRatePercentage": null, - "kiwiSaverContributions": "MakeContributions", - "kiwiSaverOptOutDate": null, - "kiwiSaverContributionHolidayEndDate": null, - "kiwiSaverEmployeeContributionRatePercentage": 3, - "kiwiSaverEmployerContributionRatePercentage": 3, - "kiwiSaverEmployerSalarySacrificeContributionRatePercentage": 0, - "hasStudentLoanBalance": false, - "studentLoanBalance": null, - "studentLoanAsAt": null - } + example: + irdNumber: "111111111" + taxCode: M + esctRatePercentage: 17.5 + isEligibleForKiwiSaver: true + hasSpecialStudentLoanRate: false + specialStudentLoanRatePercentage: null + specialTaxRatePercentage: null + kiwiSaverContributions: MakeContributions + kiwiSaverOptOutDate: null + kiwiSaverContributionHolidayEndDate: null + kiwiSaverEmployeeContributionRatePercentage: 3 + kiwiSaverEmployerContributionRatePercentage: 3 + kiwiSaverEmployerSalarySacrificeContributionRatePercentage: 0 + hasStudentLoanBalance: false + studentLoanBalance: null + studentLoanAsAt: null /Employees/{EmployeeID}/OpeningBalances: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollNz operationId: getEmployeeOpeningBalances @@ -878,41 +860,37 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeOpeningBalancesObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-28T20:00:07.7343966", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 8 - }, - "problem": null, - "openingBalances": [ - { - "periodEndDate": "2020-10-01T00:00:00", - "daysPaid": 3, - "unpaidWeeks": 2, - "grossEarnings": 40 - } - ] - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-28T20:00:07.7343966 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 8 + problem: null + openingBalances: + - periodEndDate: 2020-10-01T00:00:00 + daysPaid: 3 + unpaidWeeks: 2 + grossEarnings: 40 post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollNz operationId: createEmployeeOpeningBalances @@ -926,13 +904,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 30)" - java: "LocalDate.of(2020, Month.OCTOBER, 30)" - csharp: "new DateTime(2020, 10, 12)" - php: "new DateTime('2020-10-30')" - node: "'2020-10-30'" - python: "dateutil.parser.parse('2020-10-30T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 30) + java: LocalDate.of(2020, Month.OCTOBER, 30) + csharp: new DateTime(2020, 10, 12) + php: new DateTime('2020-10-30') + node: '''2020-10-30''' + python: dateutil.parser.parse('2020-10-30T00:00:00Z') + ruby: '''YYYY-MM-DD''' - employeeOpeningBalance: key: employeeOpeningBalance keyPascal: EmployeeOpeningBalance @@ -953,14 +931,14 @@ paths: keyPascal: DaysPaid keySnake: days_paid default: 5 - nonString: true + nonString: true object: employeeOpeningBalance - unpaidWeeks: key: unpaidWeeks keyPascal: UnpaidWeeks keySnake: unpaid_weeks default: 0 - nonString: true + nonString: true object: employeeOpeningBalance - grossEarnings: key: grossEarnings @@ -968,7 +946,7 @@ paths: keySnake: gross_earnings default: 1730.77 is_money: true - nonString: true + nonString: true object: employeeOpeningBalance is_last: true - employeeOpeningBalances: @@ -996,34 +974,30 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeOpeningBalancesObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-28T19:55:36.539949", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "openingBalances": [ - { - "periodEndDate": "2020-10-01T00:00:00", - "daysPaid": 3, - "unpaidWeeks": 2, - "grossEarnings": 40 - } - ] - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-28T19:55:36.539949 + httpStatusCode: OK + pagination: null + problem: null + openingBalances: + - periodEndDate: 2020-10-01T00:00:00 + daysPaid: 3 + unpaidWeeks: 2 + grossEarnings: 40 + "400": description: validation error for a bad request content: application/json: @@ -1039,9 +1013,11 @@ paths: /Employees/{EmployeeID}/Leave: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollNz operationId: getEmployeeLeaves @@ -1053,49 +1029,43 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaves' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-26T16:57:18.4657329", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "leave": [ - { - "leaveID": "e311d45f-122e-4fbf-b068-4e3f92dd2729", - "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", - "description": "Holiday Pay Payout", - "startDate": "2019-07-01T00:00:00", - "endDate": "2019-07-07T00:00:00", - "periods": [ - { - "periodStartDate": "2019-07-01T00:00:00", - "periodEndDate": "2019-07-07T00:00:00", - "numberOfUnits": 36, - "periodStatus": "Completed", - "typeOfUnits": "Hours", - "numberOfUnitsTaken": 1, - "typeOfUnitsTaken": "Weeks" - } - ], - "updatedDateUTC": "2019-09-24T05:08:44" - } - ] - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-26T16:57:18.4657329 + httpStatusCode: OK + pagination: null + problem: null + leave: + - leaveID: e311d45f-122e-4fbf-b068-4e3f92dd2729 + leaveTypeID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6 + description: Holiday Pay Payout + startDate: 2019-07-01T00:00:00 + endDate: 2019-07-07T00:00:00 + periods: + - periodStartDate: 2019-07-01T00:00:00 + periodEndDate: 2019-07-07T00:00:00 + numberOfUnits: 36 + periodStatus: Completed + typeOfUnits: Hours + numberOfUnitsTaken: 1 + typeOfUnitsTaken: Weeks + updatedDateUTC: 2019-09-24T05:08:44 post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollNz operationId: createEmployeeLeave @@ -1108,13 +1078,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - endDateValue: key: endDate keyPascal: EndDate @@ -1122,13 +1092,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 30)" - java: "LocalDate.of(2020, Month.OCTOBER, 30)" - csharp: "new DateTime(2020, 10, 12)" - php: "new DateTime('2020-10-30')" - node: "'2020-10-30'" - python: "dateutil.parser.parse('2020-10-30T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 30) + java: LocalDate.of(2020, Month.OCTOBER, 30) + csharp: new DateTime(2020, 10, 12) + php: new DateTime('2020-10-30') + node: '''2020-10-30''' + python: dateutil.parser.parse('2020-10-30T00:00:00Z') + ruby: '''YYYY-MM-DD''' - employeeLeave: key: employeeLeave keyPascal: EmployeeLeave @@ -1139,7 +1109,7 @@ paths: keyPascal: LeaveTypeID keySnake: leave_type_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: employeeLeave - startDate: is_variable: true @@ -1172,7 +1142,7 @@ paths: ruby: number_of_units object: employeeLeave - numberOfUnitsTaken: - is_last: true + is_last: true is_variable: true nonString: true key: numberOfUnitsTaken @@ -1190,45 +1160,40 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-26T20:29:55.4086404", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "leave": { - "leaveID": "82a04ba6-a5cc-4e7d-86d4-b9f381a494e8", - "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", - "description": "Creating a Description", - "startDate": "2020-04-24T00:00:00", - "endDate": "2020-04-26T00:00:00", - "periods": [ - { - "periodStartDate": "2020-04-20T00:00:00", - "periodEndDate": "2020-04-26T00:00:00", - "numberOfUnits": 0, - "periodStatus": "Approved", - "typeOfUnits": "Hours", - "numberOfUnitsTaken": 0.2, - "typeOfUnitsTaken": "Weeks" - } - ], - "updatedDateUTC": "2020-08-26T20:29:55.2151561" - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-26T20:29:55.4086404 + httpStatusCode: OK + pagination: null + problem: null + leave: + leaveID: 82a04ba6-a5cc-4e7d-86d4-b9f381a494e8 + leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4 + description: Creating a Description + startDate: 2020-04-24T00:00:00 + endDate: 2020-04-26T00:00:00 + periods: + - periodStartDate: 2020-04-20T00:00:00 + periodEndDate: 2020-04-26T00:00:00 + numberOfUnits: 0 + periodStatus: Approved + typeOfUnits: Hours + numberOfUnitsTaken: 0.2 + typeOfUnitsTaken: Weeks + updatedDateUTC: 2020-08-26T20:29:55.2151561 + "400": description: validation error for a bad request content: application/json: @@ -1240,18 +1205,18 @@ paths: application/json: schema: $ref: '#/components/schemas/EmployeeLeave' - example: { - "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", - "description": "Creating a Description", - "startDate": "2020-04-24", - "endDate": "2020-04-26" - } + example: + leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4 + description: Creating a Description + startDate: "2020-04-24" + endDate: "2020-04-26" /Employees/{EmployeeID}/Leave/{LeaveID}: parameters: - $ref: '#/components/parameters/requiredHeader' put: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollNz operationId: updateEmployeeLeave @@ -1264,13 +1229,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - endDateValue: key: endDate keyPascal: EndDate @@ -1278,13 +1243,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 30)" - java: "LocalDate.of(2020, Month.OCTOBER, 30)" - csharp: "new DateTime(2020, 10, 12)" - php: "new DateTime('2020-10-30')" - node: "'2020-10-30'" - python: "dateutil.parser.parse('2020-10-30T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 30) + java: LocalDate.of(2020, Month.OCTOBER, 30) + csharp: new DateTime(2020, 10, 12) + php: new DateTime('2020-10-30') + node: '''2020-10-30''' + python: dateutil.parser.parse('2020-10-30T00:00:00Z') + ruby: '''YYYY-MM-DD''' - employeeLeave: key: employeeLeave keyPascal: EmployeeLeave @@ -1295,7 +1260,7 @@ paths: keyPascal: LeaveTypeID keySnake: leave_type_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: employeeLeave - startDate: is_variable: true @@ -1308,7 +1273,7 @@ paths: ruby: start_date object: employeeLeave - endDate: - is_last: true + is_last: true is_variable: true nonString: true key: endDate @@ -1326,7 +1291,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -1335,42 +1300,37 @@ paths: in: path required: true description: Leave id for single object - schema: + schema: type: string format: uuid - example: c4be24e5-e840-4c92-9eaa-2d86cd596314 + example: c4be24e5-e840-4c92-9eaa-2d86cd596314 responses: - '200': + "200": description: successful response content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-26T20:29:55.8432792", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "leave": { - "leaveID": "82a04ba6-a5cc-4e7d-86d4-b9f381a494e8", - "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", - "description": "Creating a Description", - "startDate": "2020-04-24T00:00:00", - "endDate": "2020-04-26T00:00:00", - "periods": [ - { - "periodStartDate": "2020-04-20T00:00:00", - "periodEndDate": "2020-04-26T00:00:00", - "numberOfUnits": 1, - "periodStatus": "Approved" - } - ], - "updatedDateUTC": "2020-08-26T20:29:55.8854536" - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-26T20:29:55.8432792 + httpStatusCode: OK + pagination: null + problem: null + leave: + leaveID: 82a04ba6-a5cc-4e7d-86d4-b9f381a494e8 + leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4 + description: Creating a Description + startDate: 2020-04-24T00:00:00 + endDate: 2020-04-26T00:00:00 + periods: + - periodStartDate: 2020-04-20T00:00:00 + periodEndDate: 2020-04-26T00:00:00 + numberOfUnits: 1 + periodStatus: Approved + updatedDateUTC: 2020-08-26T20:29:55.8854536 + "400": description: validation error for a bad request content: application/json: @@ -1382,23 +1342,20 @@ paths: application/json: schema: $ref: '#/components/schemas/EmployeeLeave' - example: { - "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", - "description": "Creating a Description", - "startDate": "2020-04-24", - "endDate": "2020-04-26", - "periods": [ - { - "periodStartDate": "2020-04-20", - "periodEndDate": "2020-04-26", - "numberOfUnits": 1, - "periodStatus": "Approved" - } - ] - } + example: + leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4 + description: Creating a Description + startDate: "2020-04-24" + endDate: "2020-04-26" + periods: + - periodStartDate: "2020-04-20" + periodEndDate: "2020-04-26" + numberOfUnits: 1 + periodStatus: Approved delete: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollNz operationId: deleteEmployeeLeave @@ -1410,7 +1367,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -1419,31 +1376,32 @@ paths: in: path required: true description: Leave id for single object - schema: + schema: type: string format: uuid - example: c4be24e5-e840-4c92-9eaa-2d86cd596314 + example: c4be24e5-e840-4c92-9eaa-2d86cd596314 responses: - '200': + "200": description: successful response content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-26T22:11:10.809249", - "httpStatusCode": "OK", - "pagination": null, - "problem": null - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-26T22:11:10.809249 + httpStatusCode: OK + pagination: null + problem: null /Employees/{EmployeeID}/LeaveBalances: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollNz operationId: getEmployeeLeaveBalances @@ -1455,62 +1413,53 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveBalances' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-26T22:26:48.0448356", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 4 - }, - "problem": null, - "leaveBalances": [ - { - "name": "Holiday Pay", - "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", - "balance": 0, - "typeOfUnits": "Dollars" - }, - { - "name": "Annual Leave", - "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", - "balance": 0, - "typeOfUnits": "Hours" - }, - { - "name": "Sick Leave", - "leaveTypeID": "f2f994cf-1899-46f3-ad4f-5d92d78c3719", - "balance": 0, - "typeOfUnits": "Hours" - }, - { - "name": "Alternative Holidays", - "leaveTypeID": "34129765-11cb-4d8c-b568-84a2219beda3", - "balance": 0, - "typeOfUnits": "Hours" - } - ] - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-26T22:26:48.0448356 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 4 + problem: null + leaveBalances: + - name: Holiday Pay + leaveTypeID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6 + balance: 0 + typeOfUnits: Dollars + - name: Annual Leave + leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4 + balance: 0 + typeOfUnits: Hours + - name: Sick Leave + leaveTypeID: f2f994cf-1899-46f3-ad4f-5d92d78c3719 + balance: 0 + typeOfUnits: Hours + - name: Alternative Holidays + leaveTypeID: 34129765-11cb-4d8c-b568-84a2219beda3 + balance: 0 + typeOfUnits: Hours /Employees/{EmployeeID}/LeavePeriods: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollNz operationId: getEmployeeLeavePeriods @@ -1522,7 +1471,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -1542,41 +1491,35 @@ paths: format: date example: Johnson responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/LeavePeriods' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T13:35:49.4407417", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "periods": [ - { - "periodStartDate": "2020-02-24T00:00:00", - "periodEndDate": "2020-03-01T00:00:00", - "numberOfUnits": 24, - "periodStatus": "Estimated", - "typeOfUnits": "Hours", - "numberOfUnitsTaken": 0.6, - "typeOfUnitsTaken": "Weeks" - }, - { - "periodStartDate": "2020-03-02T00:00:00", - "periodEndDate": "2020-03-08T00:00:00", - "numberOfUnits": 40, - "periodStatus": "Estimated", - "typeOfUnits": "Hours", - "numberOfUnitsTaken": 1, - "typeOfUnitsTaken": "Weeks" - } - ] - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T13:35:49.4407417 + httpStatusCode: OK + pagination: null + problem: null + periods: + - periodStartDate: 2020-02-24T00:00:00 + periodEndDate: 2020-03-01T00:00:00 + numberOfUnits: 24 + periodStatus: Estimated + typeOfUnits: Hours + numberOfUnitsTaken: 0.6 + typeOfUnitsTaken: Weeks + - periodStartDate: 2020-03-02T00:00:00 + periodEndDate: 2020-03-08T00:00:00 + numberOfUnits: 40 + periodStatus: Estimated + typeOfUnits: Hours + numberOfUnitsTaken: 1 + typeOfUnitsTaken: Weeks + "400": description: validation error for a bad request content: application/json: @@ -1587,7 +1530,8 @@ paths: - $ref: '#/components/parameters/requiredHeader' post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollNz operationId: createEmployeeLeaveSetup @@ -1602,32 +1546,32 @@ paths: key: includeHolidayPay keyPascal: IncludeHolidayPay keySnake: include_holiday_pay - nonString: true - default: false + nonString: true + default: false object: employeeLeaveSetup - holidayPayOpeningBalance: key: holidayPayOpeningBalance keyPascal: HolidayPayOpeningBalance keySnake: holiday_pay_opening_balance - nonString: true + nonString: true default: 10.50 - is_money: true + is_money: true object: employeeLeaveSetup - annualLeaveOpeningBalance: key: annualLeaveOpeningBalance keyPascal: AnnualLeaveOpeningBalance keySnake: annual_leave_opening_balance - nonString: true + nonString: true default: 25.89 - is_money: true + is_money: true object: employeeLeaveSetup - sickLeaveHoursToAccrueAnnually: key: sickLeaveHoursToAccrueAnnually keyPascal: SickLeaveHoursToAccrueAnnually keySnake: sick_leave_hours_to_accrue_annually - nonString: true + nonString: true default: 100.0 - is_money: true + is_money: true object: employeeLeaveSetup - sickLeaveMaximumHoursToAccrue: key: sickLeaveMaximumHoursToAccrue @@ -1683,7 +1627,7 @@ paths: keyPascal: AnnualLeaveAnniversaryDate keySnake: annual_leave_anniversary_date object: employeeLeaveSetup - is_last: true + is_last: true summary: Creates a leave set-up for a specific employee. This is required before viewing, configuring and requesting leave for an employee parameters: - $ref: '#/components/parameters/idempotencyKey' @@ -1692,40 +1636,38 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveSetupObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-26T16:50:48.7245664", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "leaveSetup": { - "includeHolidayPay": null, - "holidayPayOpeningBalance": 10, - "annualLeaveOpeningBalance": 100, - "negativeAnnualLeaveBalancePaidAmount": null, - "sickLeaveHoursToAccrueAnnually": 20, - "sickLeaveToAccrueAnnually": 20, - "sickLeaveMaximumHoursToAccrue": null, - "sickLeaveMaximumToAccrue": null, - "sickLeaveOpeningBalance": 10, - "sickLeaveScheduleOfAccrual": "OnAnniversaryDate", - "sickLeaveAnniversaryDate": "2023-12-31", - "annualLeaveAnniversaryDate": "2023-12-31" - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-26T16:50:48.7245664 + httpStatusCode: OK + pagination: null + problem: null + leaveSetup: + includeHolidayPay: null + holidayPayOpeningBalance: 10 + annualLeaveOpeningBalance: 100 + negativeAnnualLeaveBalancePaidAmount: null + sickLeaveHoursToAccrueAnnually: 20 + sickLeaveToAccrueAnnually: 20 + sickLeaveMaximumHoursToAccrue: null + sickLeaveMaximumToAccrue: null + sickLeaveOpeningBalance: 10 + sickLeaveScheduleOfAccrual: OnAnniversaryDate + sickLeaveAnniversaryDate: "2023-12-31" + annualLeaveAnniversaryDate: "2023-12-31" + "400": description: validation error for a bad request content: application/json: @@ -1737,22 +1679,23 @@ paths: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveSetup' - example: { - "holidayPayOpeningBalance": 10, - "annualLeaveOpeningBalance": 100, - "sickLeaveHoursToAccrueAnnually": 20, - "sickLeaveToAccrueAnnually": 20, - "sickLeaveOpeningBalance": 10, - "sickLeaveScheduleOfAccrual": "OnAnniversaryDate", - "sickLeaveAnniversaryDate": "2023-12-31", - "annualLeaveAnniversaryDate": "2023-12-31" - } + example: + holidayPayOpeningBalance: 10 + annualLeaveOpeningBalance: 100 + sickLeaveHoursToAccrueAnnually: 20 + sickLeaveToAccrueAnnually: 20 + sickLeaveOpeningBalance: 10 + sickLeaveScheduleOfAccrual: OnAnniversaryDate + sickLeaveAnniversaryDate: "2023-12-31" + annualLeaveAnniversaryDate: "2023-12-31" /Employees/{EmployeeID}/LeaveTypes: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollNz operationId: getEmployeeLeaveTypes @@ -1764,44 +1707,40 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveTypes' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T14:25:16.004485", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "leaveTypes": [ - { - "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", - "scheduleOfAccrual": "PercentageOfGrossEarnings", - "hoursAccruedAnnually": 0, - "maximumToAccrue": 0, - "openingBalance": 0, - "rateAccruedHourly": null, - "percentageOfGrossEarnings": 8, - "includeHolidayPayEveryPay": true, - "showAnnualLeaveInAdvance": null, - "annualLeaveTotalAmountPaid": null, - "scheduleOfAccrualDate": null, - "unitsAccruedAnnually": 0, - "typeOfUnitsToAccrue": "Weeks", - "openingBalanceTypeOfUnits": "Weeks" - } - ] - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T14:25:16.004485 + httpStatusCode: OK + pagination: null + problem: null + leaveTypes: + - leaveTypeID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6 + scheduleOfAccrual: PercentageOfGrossEarnings + hoursAccruedAnnually: 0 + maximumToAccrue: 0 + openingBalance: 0 + rateAccruedHourly: null + percentageOfGrossEarnings: 8 + includeHolidayPayEveryPay: true + showAnnualLeaveInAdvance: null + annualLeaveTotalAmountPaid: null + scheduleOfAccrualDate: null + unitsAccruedAnnually: 0 + typeOfUnitsToAccrue: Weeks + openingBalanceTypeOfUnits: Weeks + "400": description: validation error for a bad request content: application/json: @@ -1809,7 +1748,8 @@ paths: $ref: '#/components/schemas/Problem' post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollNz operationId: createEmployeeLeaveType @@ -1826,14 +1766,14 @@ paths: keyPascal: LeaveTypeID keySnake: leave_type_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: employeeLeaveType - scheduleOfAccrual: key: scheduleOfAccrual keyPascal: ScheduleOfAccrual keySnake: schedule_of_accrual - nonString: true - default: "DeductionCategory.NzOther" + nonString: true + default: DeductionCategory.NzOther php: XeroAPI\XeroPHP\Models\PayrollNz\EmployeeLeaveType\ScheduleOfAccrualEnum.PercentageOfGrossEarnings node: EmployeeLeaveType.ScheduleOfAccrualEnum.PercentageOfGrossEarnings ruby: XeroRuby::PayrollNz::EmployeeLeaveType::schedule_of_accrual::PERCENTAGEOFGROSSEARNINGS @@ -1846,7 +1786,7 @@ paths: keyPascal: OpeningBalance keySnake: opening_balance is_money: true - nonString: true + nonString: true default: 5.25 object: employeeLeaveType - scheduleOfAccrualDate: @@ -1856,7 +1796,7 @@ paths: keyPascal: ScheduleOfAccrualDate keySnake: schedule_of_accrual_date object: employeeLeaveType - is_last: true + is_last: true parameters: - $ref: '#/components/parameters/idempotencyKey' - name: EmployeeID @@ -1864,42 +1804,40 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveTypeObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T14:31:54.3370081", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "leaveType": { - "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", - "scheduleOfAccrual": "AnnuallyAfter6Months", - "hoursAccruedAnnually": 10, - "maximumToAccrue": 80, - "openingBalance": 100, - "rateAccruedHourly": null, - "percentageOfGrossEarnings": 0, - "includeHolidayPayEveryPay": null, - "showAnnualLeaveInAdvance": null, - "annualLeaveTotalAmountPaid": null, - "scheduleOfAccrualDate": null, - "unitsAccruedAnnually": 0, - "typeOfUnitsToAccrue": "Hours", - "openingBalanceTypeOfUnits": "Hours" - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T14:31:54.3370081 + httpStatusCode: OK + pagination: null + problem: null + leaveType: + leaveTypeID: 35da97ae-05b9-427f-9a98-69157ba42cec + scheduleOfAccrual: AnnuallyAfter6Months + hoursAccruedAnnually: 10 + maximumToAccrue: 80 + openingBalance: 100 + rateAccruedHourly: null + percentageOfGrossEarnings: 0 + includeHolidayPayEveryPay: null + showAnnualLeaveInAdvance: null + annualLeaveTotalAmountPaid: null + scheduleOfAccrualDate: null + unitsAccruedAnnually: 0 + typeOfUnitsToAccrue: Hours + openingBalanceTypeOfUnits: Hours + "400": description: validation error for a bad request content: application/json: @@ -1911,23 +1849,24 @@ paths: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveType' - example: { - "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", - "scheduleOfAccrual": "AnnuallyAfter6Months", - "hoursAccruedAnnually": 10, - "unitsAccruedAnnually": 10, - "typeOfUnitsToAccrue": "Hours", - "openingBalanceTypeOfUnits": "Hours", - "maximumToAccrue": 80, - "openingBalance": 100, - "rateAccruedHourly": 3.5 - } + example: + leaveTypeID: 35da97ae-05b9-427f-9a98-69157ba42cec + scheduleOfAccrual: AnnuallyAfter6Months + hoursAccruedAnnually: 10 + unitsAccruedAnnually: 10 + typeOfUnitsToAccrue: Hours + openingBalanceTypeOfUnits: Hours + maximumToAccrue: 80 + openingBalance: 100 + rateAccruedHourly: 3.5 /Employees/{EmployeeID}/PaymentMethods: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollNz operationId: getEmployeePaymentMethod @@ -1939,40 +1878,35 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PaymentMethodObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-26T23:34:53.6856317", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "paymentMethod": { - "bankAccounts": [ - { - "accountName": "Casual Worker", - "accountNumber": "0607050201419000", - "sortCode": null, - "particulars": null, - "code": null, - "dollarAmount": null, - "reference": "", - "calculationType": "Balance" - } - ] - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-26T23:34:53.6856317 + httpStatusCode: OK + pagination: null + problem: null + paymentMethod: + bankAccounts: + - accountName: Casual Worker + accountNumber: "0607050201419000" + sortCode: null + particulars: null + code: null + dollarAmount: null + reference: "" + calculationType: Balance + "400": description: validation error for a bad request content: application/json: @@ -1980,7 +1914,8 @@ paths: $ref: '#/components/schemas/Problem' post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollNz operationId: createEmployeePaymentMethod @@ -2001,7 +1936,7 @@ paths: key: accountNumber keyPascal: AccountNumber keySnake: account_number - nonString: true + nonString: true default: 123456 object: bankAccount - sortCode: @@ -2009,7 +1944,7 @@ paths: keyPascal: SortCode keySnake: sort_code default: 123411 - is_last: true + is_last: true object: bankAccount - bankAccounts: is_list: true @@ -2051,40 +1986,35 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PaymentMethodObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-26T23:34:53.6856317", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "paymentMethod": { - "bankAccounts": [ - { - "accountName": "Casual Worker", - "accountNumber": "0607050201419000", - "sortCode": null, - "particulars": null, - "code": null, - "dollarAmount": null, - "reference": "", - "calculationType": "Balance" - } - ] - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-26T23:34:53.6856317 + httpStatusCode: OK + pagination: null + problem: null + paymentMethod: + bankAccounts: + - accountName: Casual Worker + accountNumber: "0607050201419000" + sortCode: null + particulars: null + code: null + dollarAmount: null + reference: "" + calculationType: Balance + "400": description: validation error for a bad request content: application/json: @@ -2096,26 +2026,24 @@ paths: application/json: schema: $ref: '#/components/schemas/PaymentMethod' - example: { - "bankAccounts": [ - { - "accountName": "Casual Worker", - "accountNumber": "0607050201419000", - "sortCode": null, - "particulars": null, - "code": null, - "dollarAmount": null, - "reference": "", - "calculationType": "Balance" - } - ] - } + example: + bankAccounts: + - accountName: Casual Worker + accountNumber: "0607050201419000" + sortCode: null + particulars: null + code: null + dollarAmount: null + reference: "" + calculationType: Balance /Employees/{EmployeeID}/PayTemplates: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollNz operationId: getEmployeePayTemplates @@ -2127,44 +2055,38 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeePayTemplates' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T15:09:19.0627389", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 0, - "itemCount": 0 - }, - "problem": null, - "payTemplate": { - "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", - "earningTemplates": [ - { - "payTemplateEarningID": "1527cf6c-93db-41bf-aba2-9d6af1d3c499", - "ratePerUnit": 20, - "numberOfUnits": 8, - "fixedAmount": null, - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "name": "Ordinary Time" - } - ] - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T15:09:19.0627389 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 0 + itemCount: 0 + problem: null + payTemplate: + employeeID: 68342973-c405-4b86-b5d3-d7b877c27995 + earningTemplates: + - payTemplateEarningID: 1527cf6c-93db-41bf-aba2-9d6af1d3c499 + ratePerUnit: 20 + numberOfUnits: 8 + fixedAmount: null + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + name: Ordinary Time + "400": description: validation error for a bad request content: application/json: @@ -2175,7 +2097,8 @@ paths: - $ref: '#/components/parameters/requiredHeader' post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollNz operationId: createEmployeeEarningsTemplate @@ -2191,37 +2114,37 @@ paths: keyPascal: PayTemplateEarningID keySnake: pay_template_earning_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: earningsTemplate - ratePerUnit: key: ratePerUnit keyPascal: RatePerUnit keySnake: rate_per_unit - nonString: true + nonString: true default: 14.25 object: earningsTemplate - is_money: true + is_money: true - numberOfUnits: key: numberOfUnits keyPascal: NumberOfUnits keySnake: number_of_units default: 35.50 - nonString: true - is_money: true + nonString: true + is_money: true object: earningsTemplate - fixedAmount: key: fixedAmount keyPascal: FixedAmount keySnake: fixed_amount default: 50 - nonString: true + nonString: true object: earningsTemplate - earningsRateId: key: earningsRateID keyPascal: EarningsRateID keySnake: earnings_rate_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: earningsTemplate - name: key: name @@ -2256,34 +2179,32 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EarningsTemplateObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T14:48:24.6032145", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "earningTemplate": { - "payTemplateEarningID": "11b4e492-5d56-4eac-a9ce-687d7b9a4a84", - "ratePerUnit": 20, - "numberOfUnits": 8, - "fixedAmount": null, - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "name": "Ordinary Time" - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T14:48:24.6032145 + httpStatusCode: OK + pagination: null + problem: null + earningTemplate: + payTemplateEarningID: 11b4e492-5d56-4eac-a9ce-687d7b9a4a84 + ratePerUnit: 20 + numberOfUnits: 8 + fixedAmount: null + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + name: Ordinary Time + "400": description: validation error for a bad request content: application/json: @@ -2295,18 +2216,18 @@ paths: application/json: schema: $ref: '#/components/schemas/EarningsTemplate' - example: { - "ratePerUnit": 20, - "numberOfUnits": 8, - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "name": "My New One" - } + example: + ratePerUnit: 20 + numberOfUnits: 8 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + name: My New One /Employees/{EmployeeID}/PayTemplates/Earnings/{PayTemplateEarningID}: parameters: - $ref: '#/components/parameters/requiredHeader' put: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollNz operationId: updateEmployeeEarningsTemplate @@ -2322,37 +2243,37 @@ paths: keyPascal: PayTemplateEarningID keySnake: pay_template_earning_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: earningsTemplate - ratePerUnit: key: ratePerUnit keyPascal: RatePerUnit keySnake: rate_per_unit - nonString: true + nonString: true default: 14.25 object: earningsTemplate - is_money: true + is_money: true - numberOfUnits: key: numberOfUnits keyPascal: NumberOfUnits keySnake: number_of_units default: 35.50 - nonString: true - is_money: true + nonString: true + is_money: true object: earningsTemplate - fixedAmount: key: fixedAmount keyPascal: FixedAmount keySnake: fixed_amount default: 50 - nonString: true + nonString: true object: earningsTemplate - earningsRateId: key: earningsRateID keyPascal: EarningsRateID keySnake: earnings_rate_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: earningsTemplate - name: key: name @@ -2387,7 +2308,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -2395,35 +2316,33 @@ paths: x-snake: pay_template_earning_id in: path required: true - description: Id for single pay template earnings object - schema: + description: Id for single pay template earnings object + schema: type: string format: uuid example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EarningsTemplateObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T18:54:08.6524341", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "earningTemplate": { - "payTemplateEarningID": "1527cf6c-93db-41bf-aba2-9d6af1d3c499", - "ratePerUnit": 25, - "numberOfUnits": 4, - "fixedAmount": null, - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "name": "Ordinary Time" - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T18:54:08.6524341 + httpStatusCode: OK + pagination: null + problem: null + earningTemplate: + payTemplateEarningID: 1527cf6c-93db-41bf-aba2-9d6af1d3c499 + ratePerUnit: 25 + numberOfUnits: 4 + fixedAmount: null + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + name: Ordinary Time + "400": description: validation error for a bad request content: application/json: @@ -2435,14 +2354,14 @@ paths: application/json: schema: $ref: '#/components/schemas/EarningsTemplate' - example: { - "ratePerUnit": 25, - "numberOfUnits": 4, - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5" - } + example: + ratePerUnit: 25 + numberOfUnits: 4 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 delete: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollNz operationId: deleteEmployeeEarningsTemplate @@ -2453,7 +2372,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -2461,32 +2380,32 @@ paths: x-snake: pay_template_earning_id in: path required: true - description: Id for single pay template earnings object - schema: + description: Id for single pay template earnings object + schema: type: string format: uuid example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 responses: - '200': + "200": description: deletion successful content: application/json: schema: $ref: '#/components/schemas/EarningsTemplateObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T18:54:09.1368544", - "httpStatusCode": "OK", - "pagination": null, - "problem": null - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T18:54:09.1368544 + httpStatusCode: OK + pagination: null + problem: null /Employees/{EmployeeID}/PayTemplateEarnings: parameters: - $ref: '#/components/parameters/requiredHeader' post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollNz operationId: createMultipleEmployeeEarningsTemplate @@ -2502,37 +2421,37 @@ paths: keyPascal: PayTemplateEarningID keySnake: pay_template_earning_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: earningsTemplate - ratePerUnit: key: ratePerUnit keyPascal: RatePerUnit keySnake: rate_per_unit - nonString: true + nonString: true default: 14.25 object: earningsTemplate - is_money: true + is_money: true - numberOfUnits: key: numberOfUnits keyPascal: NumberOfUnits keySnake: number_of_units default: 35.50 - nonString: true - is_money: true + nonString: true + is_money: true object: earningsTemplate - fixedAmount: key: fixedAmount keyPascal: FixedAmount keySnake: fixed_amount default: 50 - nonString: true + nonString: true object: earningsTemplate - earningsRateId: key: earningsRateID keyPascal: EarningsRateID keySnake: earnings_rate_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: earningsTemplate - name: key: name @@ -2567,44 +2486,38 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeEarningsTemplates' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T15:01:52.9369043", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "earningTemplates": [ - { - "payTemplateEarningID": "1527cf6c-93db-41bf-aba2-9d6af1d3c499", - "ratePerUnit": 20, - "numberOfUnits": 8, - "fixedAmount": null, - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "name": "Ordinary Time" - }, - { - "payTemplateEarningID": "92e757cc-b026-404d-804e-9dc2047a03e6", - "ratePerUnit": 0, - "numberOfUnits": 8, - "fixedAmount": null, - "earningsRateID": "65b83d94-f20f-45e1-85ae-387fcf460c26", - "name": "Salary" - } - ] - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T15:01:52.9369043 + httpStatusCode: OK + pagination: null + problem: null + earningTemplates: + - payTemplateEarningID: 1527cf6c-93db-41bf-aba2-9d6af1d3c499 + ratePerUnit: 20 + numberOfUnits: 8 + fixedAmount: null + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + name: Ordinary Time + - payTemplateEarningID: 92e757cc-b026-404d-804e-9dc2047a03e6 + ratePerUnit: 0 + numberOfUnits: 8 + fixedAmount: null + earningsRateID: 65b83d94-f20f-45e1-85ae-387fcf460c26 + name: Salary + "400": description: validation error for a bad request content: application/json: @@ -2622,7 +2535,9 @@ paths: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollNz operationId: getDeductions @@ -2635,46 +2550,40 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Deductions' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T20:43:53.931198", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 4 - }, - "problem": null, - "deductions": [ - { - "deductionId": "a3760fe4-68a4-4e38-8326-fe616af7dc74", - "deductionName": "KiwiSaver Voluntary Contributions", - "deductionCategory": "KiwiSaverVoluntaryContributions", - "liabilityAccountId": "26c57f04-0436-40cc-9cd9-1a21185d88bb", - "currentRecord": true, - "standardAmount": null - }, - { - "deductionId": "a131596e-2f83-4f6c-9573-99c4cbfcefd1", - "deductionName": "Rent", - "deductionCategory": "NzOther", - "liabilityAccountId": "26c57f04-0436-40cc-9cd9-1a21185d88bb", - "currentRecord": true, - "standardAmount": 200 - } - ] - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T20:43:53.931198 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 4 + problem: null + deductions: + - deductionId: a3760fe4-68a4-4e38-8326-fe616af7dc74 + deductionName: KiwiSaver Voluntary Contributions + deductionCategory: KiwiSaverVoluntaryContributions + liabilityAccountId: 26c57f04-0436-40cc-9cd9-1a21185d88bb + currentRecord: true + standardAmount: null + - deductionId: a131596e-2f83-4f6c-9573-99c4cbfcefd1 + deductionName: Rent + deductionCategory: NzOther + liabilityAccountId: 26c57f04-0436-40cc-9cd9-1a21185d88bb + currentRecord: true + standardAmount: 200 post: security: - - OAuth2: [payroll.settings] + - OAuth2: + - payroll.settings tags: - PayrollNz operationId: createDeduction @@ -2684,7 +2593,7 @@ paths: key: deduction keyPascal: Deduction keySnake: deduction - is_object: true + is_object: true - deductionName: key: deductionName keyPascal: DeductionName @@ -2695,8 +2604,8 @@ paths: key: deductionCategory keyPascal: DeductionCategory keySnake: deduction_category - nonString: true - default: "DeductionCategory.NzOther" + nonString: true + default: DeductionCategory.NzOther php: XeroAPI\XeroPHP\Models\PayrollNz\Deduction\DEDUCTION_CATEGORY_NZ_OTHER node: Deduction.DeductionCategoryEnum.NzOther ruby: XeroRuby::PayrollNz::Deduction::deduction_category::NZ_OTHER @@ -2705,40 +2614,38 @@ paths: csharp: Deduction.DeductionCategoryEnum.NzOther object: deduction - liabilityAccountId: - is_uuid: true + is_uuid: true key: liabilityAccountId keyPascal: LiabilityAccountId keySnake: liability_account_id default: 00000000-0000-0000-0000-000000000000 object: deduction - is_last: true + is_last: true summary: Creates a new deduction for a specific employee parameters: - $ref: '#/components/parameters/idempotencyKey' responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/DeductionObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T20:43:54.9563295", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "deduction": { - "deductionId": "0ee805eb-f5b0-4061-9b35-d9ea550da04e", - "deductionName": "My new deduction", - "deductionCategory": "NzOther", - "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", - "currentRecord": true, - "standardAmount": null - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T20:43:54.9563295 + httpStatusCode: OK + pagination: null + problem: null + deduction: + deductionId: 0ee805eb-f5b0-4061-9b35-d9ea550da04e + deductionName: My new deduction + deductionCategory: NzOther + liabilityAccountId: 568f2e9a-0870-46cc-8678-f83f132ed4e3 + currentRecord: true + standardAmount: null + "400": description: validation error for a bad request content: application/json: @@ -2750,17 +2657,18 @@ paths: application/json: schema: $ref: '#/components/schemas/Deduction' - example: { - "deductionName": "My new deduction", - "deductionCategory": "NzOther", - "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" - } + example: + deductionName: My new deduction + deductionCategory: NzOther + liabilityAccountId: 568f2e9a-0870-46cc-8678-f83f132ed4e3 /Deductions/{deductionId}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollNz operationId: getDeduction @@ -2776,34 +2684,34 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/DeductionObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T20:43:54.846821", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "deduction": { - "deductionId": "a3760fe4-68a4-4e38-8326-fe616af7dc74", - "deductionName": "KiwiSaver Voluntary Contributions", - "deductionCategory": "KiwiSaverVoluntaryContributions", - "liabilityAccountId": "26c57f04-0436-40cc-9cd9-1a21185d88bb", - "currentRecord": true, - "standardAmount": null - } - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T20:43:54.846821 + httpStatusCode: OK + pagination: null + problem: null + deduction: + deductionId: a3760fe4-68a4-4e38-8326-fe616af7dc74 + deductionName: KiwiSaver Voluntary Contributions + deductionCategory: KiwiSaverVoluntaryContributions + liabilityAccountId: 26c57f04-0436-40cc-9cd9-1a21185d88bb + currentRecord: true + standardAmount: null /StatutoryDeductions: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollNz operationId: getStatutoryDeductions @@ -2815,47 +2723,42 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/StatutoryDeductions' - example: { - "id": "e3731829-9801-4809-a1a1-bbe40cd18b7e", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T23:46:21.0212854", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 8 - }, - "problem": null, - "statutoryDeductions": [ - { - "id": "e3731829-9801-4809-a1a1-bbe40cd18b7e", - "name": "Child Support", - "liabilityAccountId": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", - "statutoryDeductionCategory": "ChildSupport", - "currentRecord": true - }, - { - "id": "00000000-0000-0000-0000-000000000000", - "name": "Student Loan", - "liabilityAccountId": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", - "statutoryDeductionCategory": "StudentLoan", - "currentRecord": true - } - ] - } + example: + id: e3731829-9801-4809-a1a1-bbe40cd18b7e + providerName: provider-name + dateTimeUTC: 2020-08-27T23:46:21.0212854 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 8 + problem: null + statutoryDeductions: + - id: e3731829-9801-4809-a1a1-bbe40cd18b7e + name: Child Support + liabilityAccountId: fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488 + statutoryDeductionCategory: ChildSupport + currentRecord: true + - id: 00000000-0000-0000-0000-000000000000 + name: Student Loan + liabilityAccountId: fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488 + statutoryDeductionCategory: StudentLoan + currentRecord: true /StatutoryDeductions/{id}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollNz operationId: getStatutoryDeduction @@ -2869,33 +2772,33 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/StatutoryDeductionObject' - example: { - "id": "e3731829-9801-4809-a1a1-bbe40cd18b7e", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-28T00:01:57.6562992", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "statutoryDeduction": { - "id": "e3731829-9801-4809-a1a1-bbe40cd18b7e", - "name": "Child Support", - "liabilityAccountId": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", - "statutoryDeductionCategory": "ChildSupport", - "currentRecord": true - } - } + example: + id: e3731829-9801-4809-a1a1-bbe40cd18b7e + providerName: provider-name + dateTimeUTC: 2020-08-28T00:01:57.6562992 + httpStatusCode: OK + pagination: null + problem: null + statutoryDeduction: + id: e3731829-9801-4809-a1a1-bbe40cd18b7e + name: Child Support + liabilityAccountId: fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488 + statutoryDeductionCategory: ChildSupport + currentRecord: true /Superannuations: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollNz operationId: getSuperannuations @@ -2907,54 +2810,48 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Superannuations' - example: { - "id": "563273ea-0dae-4f82-86a4-e0db77c008ea", - "providerName": "provider-name", - "dateTimeUTC": "2020-09-14T22:35:14.6806088", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 2 - }, - "problem": null, - "benefits": [ - { - "id": "563273ea-0dae-4f82-86a4-e0db77c008ea", - "name": "KiwiSaver", - "category": "KiwiSaver", - "liabilityAccountId": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", - "expenseAccountId": "b343c3b0-5941-4166-82b4-dd926622e0e2", - "standardAmount": 5, - "percentage": 3, - "calculationTypeNZ": "PercentageOfTaxableEarnings", - "currentRecord": true, - "companyMax": 2 - }, - { - "id": "00000000-0000-0000-0000-000000000000", - "name": "SidSaver", - "category": "Other", - "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", - "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", - "standardAmount": 10, - "percentage": 4, - "calculationTypeNZ": "FixedAmount", - "currentRecord": true, - "companyMax": 4 - } - ] - } + example: + id: 563273ea-0dae-4f82-86a4-e0db77c008ea + providerName: provider-name + dateTimeUTC: 2020-09-14T22:35:14.6806088 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 2 + problem: null + benefits: + - id: 563273ea-0dae-4f82-86a4-e0db77c008ea + name: KiwiSaver + category: KiwiSaver + liabilityAccountId: fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488 + expenseAccountId: b343c3b0-5941-4166-82b4-dd926622e0e2 + standardAmount: 5 + percentage: 3 + calculationTypeNZ: PercentageOfTaxableEarnings + currentRecord: true + companyMax: 2 + - id: 00000000-0000-0000-0000-000000000000 + name: SidSaver + category: Other + liabilityAccountId: 568f2e9a-0870-46cc-8678-f83f132ed4e3 + expenseAccountId: e4eb36f6-97e3-4427-a394-dd4e1b355c2e + standardAmount: 10 + percentage: 4 + calculationTypeNZ: FixedAmount + currentRecord: true + companyMax: 4 post: security: - - OAuth2: [payroll.settings] + - OAuth2: + - payroll.settings tags: - PayrollNz operationId: createSuperannuation @@ -2976,7 +2873,7 @@ paths: java: com.xero.models.payrollnz.Benefit.CategoryEnum.ComplyingFund csharp: Benefit.CategoryEnum.ComplyingFund default: ComplyingFund - nonString: true + nonString: true object: benefit - caluclationTypeNZ: key: calculationTypeNZ @@ -2989,21 +2886,21 @@ paths: java: com.xero.models.payrollnz.Benefit.CalculationTypeNZ.PercentageOfTaxableEarnings csharp: Benefit.CalculationTypeNZ.PercentageOfTaxableEarnings default: PercentageOfTaxableEarnings - nonString: true + nonString: true object: benefit - liabilityAccountId: key: liabilityAccountId keyPascal: LiabilityAccountId keySnake: liability_account_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: benefit - expenseAccountId: key: expenseAccountId keyPascal: ExpenseAccountId keySnake: expense_account_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: benefit - percentage: key: percentage @@ -3011,46 +2908,44 @@ paths: keySnake: percentage default: 3 object: benefit - nonString: true + nonString: true - standardAmount: key: standardAmount keyPascal: StandardAmount keySnake: standard_amount default: 100 - nonString: true + nonString: true object: benefit is_last: true summary: Creates a new superannuation parameters: - $ref: '#/components/parameters/idempotencyKey' responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/SuperannuationObject' - example: { - "id": "8905a754-7ce8-40e2-9fa5-f819deb7adce", - "providerName": "provider-name", - "dateTimeUTC": "2020-09-11T00:36:31.7680431", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "benefit": { - "id": "8905a754-7ce8-40e2-9fa5-f819deb7adce", - "name": "SidSaver", - "category": "Other", - "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", - "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", - "standardAmount": 10, - "percentage": null, - "calculationTypeNZ": "FixedAmount", - "currentRecord": true, - "companyMax": null - } - } - '400': + example: + id: 8905a754-7ce8-40e2-9fa5-f819deb7adce + providerName: provider-name + dateTimeUTC: 2020-09-11T00:36:31.7680431 + httpStatusCode: OK + pagination: null + problem: null + benefit: + id: 8905a754-7ce8-40e2-9fa5-f819deb7adce + name: SidSaver + category: Other + liabilityAccountId: 568f2e9a-0870-46cc-8678-f83f132ed4e3 + expenseAccountId: e4eb36f6-97e3-4427-a394-dd4e1b355c2e + standardAmount: 10 + percentage: null + calculationTypeNZ: FixedAmount + currentRecord: true + companyMax: null + "400": description: validation error for a bad request content: application/json: @@ -3062,20 +2957,21 @@ paths: application/json: schema: $ref: '#/components/schemas/Benefit' - example: { - "name": "SidSaver", - "category": "Other", - "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", - "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", - "CalculationTypeNZ": "FixedAmount", - "standardAmount": 10 - } + example: + name: SidSaver + category: Other + liabilityAccountId: 568f2e9a-0870-46cc-8678-f83f132ed4e3 + expenseAccountId: e4eb36f6-97e3-4427-a394-dd4e1b355c2e + CalculationTypeNZ: FixedAmount + standardAmount: 10 /Superannuations/{SuperannuationID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollNz operationId: getSuperannuation @@ -3090,38 +2986,38 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/SuperannuationObject' - example: { - "id": "563273ea-0dae-4f82-86a4-e0db77c008ea", - "providerName": "provider-name", - "dateTimeUTC": "2020-09-11T00:36:29.5745157", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "benefit": { - "id": "563273ea-0dae-4f82-86a4-e0db77c008ea", - "name": "KiwiSaver", - "category": "KiwiSaver", - "liabilityAccountId": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", - "expenseAccountId": "b343c3b0-5941-4166-82b4-dd926622e0e2", - "standardAmount": null, - "percentage": 3, - "calculationTypeNZ": "PercentageOfTaxableEarnings", - "currentRecord": true, - "companyMax": null - } - } + example: + id: 563273ea-0dae-4f82-86a4-e0db77c008ea + providerName: provider-name + dateTimeUTC: 2020-09-11T00:36:29.5745157 + httpStatusCode: OK + pagination: null + problem: null + benefit: + id: 563273ea-0dae-4f82-86a4-e0db77c008ea + name: KiwiSaver + category: KiwiSaver + liabilityAccountId: fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488 + expenseAccountId: b343c3b0-5941-4166-82b4-dd926622e0e2 + standardAmount: null + percentage: 3 + calculationTypeNZ: PercentageOfTaxableEarnings + currentRecord: true + companyMax: null /EarningsRates: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollNz operationId: getEarningsRates @@ -3134,141 +3030,131 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EarningsRates' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-28T18:25:57.0647738", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 15 - }, - "problem": null, - "earningsRates": [ - { - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "name": "Ordinary Time", - "earningsType": "RegularEarnings", - "rateType": "RatePerUnit", - "typeOfUnits": "hours", - "currentRecord": true, - "expenseAccountID": "1c91e520-a12b-45cc-8194-99950858e5bf", - "fixedAmount": null, - "ratePerUnit": null, - "multipleOfOrdinaryEarningsRate": null - }, - { - "earningsRateID": "31407b3e-0967-4ae0-a7f1-3df4e6481a2e", - "name": "ACC (First Week)", - "earningsType": "OtherGrossEarnings", - "rateType": "MultipleOfOrdinaryEarningsRate", - "typeOfUnits": "hours", - "currentRecord": true, - "expenseAccountID": "1c91e520-a12b-45cc-8194-99950858e5bf", - "fixedAmount": null, - "ratePerUnit": null, - "multipleOfOrdinaryEarningsRate": 0.8 - }, - { - "earningsRateID": "6e5a4cf2-aa38-4558-a46e-f6998dad239b", - "name": "Directors Fees", - "earningsType": "WithholdingIncome", - "rateType": "FixedAmount", - "typeOfUnits": null, - "currentRecord": true, - "expenseAccountID": "1c91e520-a12b-45cc-8194-99950858e5bf", - "fixedAmount": 1000, - "ratePerUnit": null, - "multipleOfOrdinaryEarningsRate": null - } - ] - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-28T18:25:57.0647738 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 15 + problem: null + earningsRates: + - earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + name: Ordinary Time + earningsType: RegularEarnings + rateType: RatePerUnit + typeOfUnits: hours + currentRecord: true + expenseAccountID: 1c91e520-a12b-45cc-8194-99950858e5bf + fixedAmount: null + ratePerUnit: null + multipleOfOrdinaryEarningsRate: null + - earningsRateID: 31407b3e-0967-4ae0-a7f1-3df4e6481a2e + name: ACC (First Week) + earningsType: OtherGrossEarnings + rateType: MultipleOfOrdinaryEarningsRate + typeOfUnits: hours + currentRecord: true + expenseAccountID: 1c91e520-a12b-45cc-8194-99950858e5bf + fixedAmount: null + ratePerUnit: null + multipleOfOrdinaryEarningsRate: 0.8 + - earningsRateID: 6e5a4cf2-aa38-4558-a46e-f6998dad239b + name: Directors Fees + earningsType: WithholdingIncome + rateType: FixedAmount + typeOfUnits: null + currentRecord: true + expenseAccountID: 1c91e520-a12b-45cc-8194-99950858e5bf + fixedAmount: 1000 + ratePerUnit: null + multipleOfOrdinaryEarningsRate: null post: security: - - OAuth2: [payroll.settings] + - OAuth2: + - payroll.settings tags: - PayrollNz operationId: createEarningsRate - x-hasPayrollUkProblem: true + x-hasPayrollUkProblem: true x-example: - - earningsRate: - key: earningsRate - keyPascal: EarningsRate - keySnake: earnings_rate - is_object: true - - earningsType: - key: earningsType - keyPascal: EarningsType - keySnake: earnings_type - php: XeroAPI\XeroPHP\Models\PayrollNz\EarningsRate\EarningsTypeEnum.RegularEarnings - node: EarningsRate.EarningsTypeEnum.REGULAREARNINGS - ruby: XeroRuby::PayrollNz::EarningsRate::EarningsTypeEnum::REGULAREARNINGS - python_string: REGULAREARNINGS - java: com.xero.models.payrollnz.EarningsRate.EarningsTypeEnum.RegularEarnings - csharp: EarningsRate.EarningsTypeEnum.RegularEarnings - default: RegularEarnings - nonString: true - object: earningsRate - - rateType: - key: rateType - keyPascal: RateType - keySnake: rate_type - php: XeroAPI\XeroPHP\Models\PayrollNz\EarningsRate\RateTypeEnum.RatePerUnit - node: EarningsRate.RateTypeEnum.RatePerUnit - ruby: XeroRuby::PayrollNz::EarningsRate::RateTypeEnum::ACCPAYCREDIT - python_string: RATEPERUNIT - java: com.xero.models.payrollnz.EarningsRate.RateTypeEnum.RATEPERUNIT - csharp: EarningsRate.RateTypeEnum.RatePerUnit - default: RatePerUnit - object: earningsRate - nonString: true - - expenseAccountId: - key: expenseAccountID - keyPascal: ExpenseAccountID - keySnake: expense_account_ID - is_uuid: true - default: "00000000-0000-0000-0000-000000000000" - object: earningsRate - is_last: true + - earningsRate: + key: earningsRate + keyPascal: EarningsRate + keySnake: earnings_rate + is_object: true + - earningsType: + key: earningsType + keyPascal: EarningsType + keySnake: earnings_type + php: XeroAPI\XeroPHP\Models\PayrollNz\EarningsRate\EarningsTypeEnum.RegularEarnings + node: EarningsRate.EarningsTypeEnum.REGULAREARNINGS + ruby: XeroRuby::PayrollNz::EarningsRate::EarningsTypeEnum::REGULAREARNINGS + python_string: REGULAREARNINGS + java: com.xero.models.payrollnz.EarningsRate.EarningsTypeEnum.RegularEarnings + csharp: EarningsRate.EarningsTypeEnum.RegularEarnings + default: RegularEarnings + nonString: true + object: earningsRate + - rateType: + key: rateType + keyPascal: RateType + keySnake: rate_type + php: XeroAPI\XeroPHP\Models\PayrollNz\EarningsRate\RateTypeEnum.RatePerUnit + node: EarningsRate.RateTypeEnum.RatePerUnit + ruby: XeroRuby::PayrollNz::EarningsRate::RateTypeEnum::ACCPAYCREDIT + python_string: RATEPERUNIT + java: com.xero.models.payrollnz.EarningsRate.RateTypeEnum.RATEPERUNIT + csharp: EarningsRate.RateTypeEnum.RatePerUnit + default: RatePerUnit + object: earningsRate + nonString: true + - expenseAccountId: + key: expenseAccountID + keyPascal: ExpenseAccountID + keySnake: expense_account_ID + is_uuid: true + default: 00000000-0000-0000-0000-000000000000 + object: earningsRate + is_last: true summary: Creates a new earnings rate parameters: - $ref: '#/components/parameters/idempotencyKey' responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EarningsRateObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-28T18:25:57.8141393", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "earningsRate": { - "earningsRateID": "4369b0ef-a64d-42e1-bb6d-f2fc984de133", - "name": "My Earnings Rate", - "earningsType": "RegularEarnings", - "rateType": "RatePerUnit", - "typeOfUnits": "hours", - "currentRecord": true, - "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", - "fixedAmount": null, - "ratePerUnit": null, - "multipleOfOrdinaryEarningsRate": null - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-28T18:25:57.8141393 + httpStatusCode: OK + pagination: null + problem: null + earningsRate: + earningsRateID: 4369b0ef-a64d-42e1-bb6d-f2fc984de133 + name: My Earnings Rate + earningsType: RegularEarnings + rateType: RatePerUnit + typeOfUnits: hours + currentRecord: true + expenseAccountID: e4eb36f6-97e3-4427-a394-dd4e1b355c2e + fixedAmount: null + ratePerUnit: null + multipleOfOrdinaryEarningsRate: null + "400": description: validation error for a bad request content: application/json: @@ -3280,19 +3166,20 @@ paths: application/json: schema: $ref: '#/components/schemas/EarningsRate' - example: { - "name": "My Earnings Rate", - "earningsType": "RegularEarnings", - "rateType": "RatePerUnit", - "typeOfUnits": "hours", - "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" - } + example: + name: My Earnings Rate + earningsType: RegularEarnings + rateType: RatePerUnit + typeOfUnits: hours + expenseAccountID: e4eb36f6-97e3-4427-a394-dd4e1b355c2e /EarningsRates/{EarningsRateID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollNz operationId: getEarningsRate @@ -3308,38 +3195,38 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EarningsRateObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-28T18:25:57.8191994", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "earningsRate": { - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "name": "Ordinary Time", - "earningsType": "RegularEarnings", - "rateType": "RatePerUnit", - "typeOfUnits": "hours", - "currentRecord": true, - "expenseAccountID": "1c91e520-a12b-45cc-8194-99950858e5bf", - "fixedAmount": null, - "ratePerUnit": null, - "multipleOfOrdinaryEarningsRate": null - } - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-28T18:25:57.8191994 + httpStatusCode: OK + pagination: null + problem: null + earningsRate: + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + name: Ordinary Time + earningsType: RegularEarnings + rateType: RatePerUnit + typeOfUnits: hours + currentRecord: true + expenseAccountID: 1c91e520-a12b-45cc-8194-99950858e5bf + fixedAmount: null + ratePerUnit: null + multipleOfOrdinaryEarningsRate: null /LeaveTypes: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollNz operationId: getLeaveTypes @@ -3360,50 +3247,44 @@ paths: schema: type: boolean responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/LeaveTypes' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T20:49:58.4095603", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 15 - }, - "problem": null, - "leaveTypes": [ - { - "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", - "name": "Annual Leave", - "isPaidLeave": true, - "showOnPayslip": true, - "updatedDateUTC": "2019-09-22T23:09:32Z", - "isActive": true, - "typeOfUnits": "Hours", - "typeOfUnitsToAccrue": "Days" - }, - { - "leaveTypeID": "71b548db-6e40-4b64-be8b-f6a71455d8ab", - "name": "Annual Leave - Cash Up", - "isPaidLeave": true, - "showOnPayslip": true, - "updatedDateUTC": "2019-09-22T23:09:32Z", - "isActive": true, - "typeOfUnits": "Hours", - "typeOfUnitsToAccrue": "Days" - } - ] - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T20:49:58.4095603 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 15 + problem: null + leaveTypes: + - leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4 + name: Annual Leave + isPaidLeave: true + showOnPayslip: true + updatedDateUTC: "2019-09-22T23:09:32Z" + isActive: true + typeOfUnits: Hours + typeOfUnitsToAccrue: Days + - leaveTypeID: 71b548db-6e40-4b64-be8b-f6a71455d8ab + name: Annual Leave - Cash Up + isPaidLeave: true + showOnPayslip: true + updatedDateUTC: "2019-09-22T23:09:32Z" + isActive: true + typeOfUnits: Hours + typeOfUnitsToAccrue: Days post: security: - - OAuth2: [payroll.settings] + - OAuth2: + - payroll.settings tags: - PayrollNz operationId: createLeaveType @@ -3424,46 +3305,44 @@ paths: key: isPaidLeave keyPascal: IsPaidLeave keySnake: is_paid_leave - nonString: true + nonString: true object: leaveType - default: true + default: true - showOnPayslip: key: showOnPayslip keyPascal: ShowOnPayslip keySnake: show_on_payslip - nonString: true + nonString: true object: leaveType - default: true + default: true is_last: true summary: Creates a new leave type parameters: - $ref: '#/components/parameters/idempotencyKey' responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/LeaveTypeObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T20:49:59.9135451", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "leaveType": { - "leaveTypeID": "80464f55-b5c9-4d05-84c7-219d98baa3e2", - "name": "My wqwhhiktun Leave", - "isPaidLeave": false, - "showOnPayslip": true, - "updatedDateUTC": "2020-08-27T20:49:59.8315619", - "isActive": true, - "typeOfUnits": "Hours", - "typeOfUnitsToAccrue": "Hours" - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T20:49:59.9135451 + httpStatusCode: OK + pagination: null + problem: null + leaveType: + leaveTypeID: 80464f55-b5c9-4d05-84c7-219d98baa3e2 + name: My wqwhhiktun Leave + isPaidLeave: false + showOnPayslip: true + updatedDateUTC: 2020-08-27T20:49:59.8315619 + isActive: true + typeOfUnits: Hours + typeOfUnitsToAccrue: Hours + "400": description: validation error for a bad request content: application/json: @@ -3475,17 +3354,18 @@ paths: application/json: schema: $ref: '#/components/schemas/LeaveType' - example: { - "name": "My wqwhhiktun Leave", - "isPaidLeave": false, - "showOnPayslip": true - } + example: + name: My wqwhhiktun Leave + isPaidLeave: false + showOnPayslip: true /LeaveTypes/{LeaveTypeID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollNz operationId: getLeaveType @@ -3501,36 +3381,36 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/LeaveTypeObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T20:49:58.7293665", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "leaveType": { - "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", - "name": "Annual Leave", - "isPaidLeave": true, - "showOnPayslip": true, - "updatedDateUTC": "2019-09-22T23:09:32", - "isActive": true, - "typeOfUnits": "Hours", - "typeOfUnitsToAccrue": "Days" - } - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T20:49:58.7293665 + httpStatusCode: OK + pagination: null + problem: null + leaveType: + leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4 + name: Annual Leave + isPaidLeave: true + showOnPayslip: true + updatedDateUTC: 2019-09-22T23:09:32 + isActive: true + typeOfUnits: Hours + typeOfUnitsToAccrue: Days /Reimbursements: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollNz operationId: getReimbursements @@ -3543,41 +3423,37 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Reimbursements' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T21:59:44.5592312", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 3 - }, - "problem": null, - "reimbursements": [ - { - "reimbursementID": "ddf9b572-5861-4f97-a109-9d612df52242", - "name": "Mileage", - "accountID": "36d33c5d-7dea-4911-9ed0-7fccc16f2b5f", - "currentRecord": true, - "standardAmount": null, - "standardTypeOfUnits": "km", - "standardRatePerUnit": 0.79, - "reimbursementCategory": "NoGST", - "calculationType": "RatePerUnit" - } - ] - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T21:59:44.5592312 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 3 + problem: null + reimbursements: + - reimbursementID: ddf9b572-5861-4f97-a109-9d612df52242 + name: Mileage + accountID: 36d33c5d-7dea-4911-9ed0-7fccc16f2b5f + currentRecord: true + standardAmount: null + standardTypeOfUnits: km + standardRatePerUnit: 0.79 + reimbursementCategory: NoGST + calculationType: RatePerUnit post: security: - - OAuth2: [payroll.settings] + - OAuth2: + - payroll.settings tags: - PayrollNz operationId: createReimbursement @@ -3599,14 +3475,14 @@ paths: keyPascal: AccountID keySnake: account_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: reimbursement is_last: true - calculationType: key: calculationType keyPascal: CalculationType keySnake: calculation_type - nonString: true + nonString: true default: Reimbursement.CalculationTypeEnum.FixedAmount php: XeroAPI\XeroPHP\Models\PayrollNz\Reimbursement\CalculationTypeEnum.FIXEDAMOUNT node: Reimbursement.CalculationTypeEnum.FixedAmount @@ -3619,7 +3495,7 @@ paths: key: reimbursementCategory keyPascal: ReimbursementCategory keySnake: reimbursement_category - nonString: true + nonString: true default: Reimbursement.ReimbursementCategoryEnum.GST php: XeroAPI\XeroPHP\Models\PayrollNz\Reimbursement\ReimbursementCategoryEnum.GST node: Reimbursement.ReimbursementCategoryEnum.GST @@ -3633,32 +3509,30 @@ paths: parameters: - $ref: '#/components/parameters/idempotencyKey' responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/ReimbursementObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T23:25:30.5238274", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "reimbursement": { - "reimbursementID": "c7a8e7fd-b4f1-4f7b-9256-1b3edaa72de7", - "name": "My new Reimburse", - "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", - "currentRecord": true, - "standardAmount": null, - "standardTypeOfUnits": null, - "standardRatePerUnit": null, - "reimbursementCategory": "GSTInclusive", - "calculationType": "FixedAmount" - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T23:25:30.5238274 + httpStatusCode: OK + pagination: null + problem: null + reimbursement: + reimbursementID: c7a8e7fd-b4f1-4f7b-9256-1b3edaa72de7 + name: My new Reimburse + accountID: fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488 + currentRecord: true + standardAmount: null + standardTypeOfUnits: null + standardRatePerUnit: null + reimbursementCategory: GSTInclusive + calculationType: FixedAmount + "400": description: validation error for a bad request content: application/json: @@ -3670,18 +3544,19 @@ paths: application/json: schema: $ref: '#/components/schemas/Reimbursement' - example: { - "name": "My new Reimburse", - "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", - "reimbursementCategory": "GSTInclusive", - "calculationType": "FixedAmount" - } + example: + name: My new Reimburse + accountID: fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488 + reimbursementCategory: GSTInclusive + calculationType: FixedAmount /Reimbursements/{ReimbursementID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollNz operationId: getReimbursement @@ -3697,37 +3572,37 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/ReimbursementObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T21:59:46.5643076", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "reimbursement": { - "reimbursementID": "0d4e5476-1147-4a2c-9db4-ab6a15f81f1d", - "name": "GST", - "accountID": null, - "currentRecord": true, - "standardAmount": null, - "standardTypeOfUnits": null, - "standardRatePerUnit": null, - "reimbursementCategory": "GST", - "calculationType": null - } - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T21:59:46.5643076 + httpStatusCode: OK + pagination: null + problem: null + reimbursement: + reimbursementID: 0d4e5476-1147-4a2c-9db4-ab6a15f81f1d + name: GST + accountID: null + currentRecord: true + standardAmount: null + standardTypeOfUnits: null + standardRatePerUnit: null + reimbursementCategory: GST + calculationType: null /Timesheets: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.timesheets, payroll.timesheets.read] + - OAuth2: + - payroll.timesheets + - payroll.timesheets.read tags: - PayrollNz operationId: getTimesheets @@ -3773,40 +3648,36 @@ paths: type: string example: startDate responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Timesheets' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-28T21:07:39.0921081", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 1 - }, - "problem": null, - "timesheets": [ - { - "timesheetID": "f2a2aff0-9944-411e-bc58-44f22304188d", - "payrollCalendarID": "f6931b89-d9c8-4f25-b4fa-268b5fd24197", - "employeeID": "272a7559-1b8f-4d3a-977b-d05578cb9546", - "startDate": "2020-08-01T00:00:00", - "endDate": "2020-08-31T00:00:00", - "status": "Draft", - "totalHours": 17, - "updatedDateUTC": "2020-08-28T20:50:40" - } - ] - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-28T21:07:39.0921081 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 1 + problem: null + timesheets: + - timesheetID: f2a2aff0-9944-411e-bc58-44f22304188d + payrollCalendarID: f6931b89-d9c8-4f25-b4fa-268b5fd24197 + employeeID: 272a7559-1b8f-4d3a-977b-d05578cb9546 + startDate: 2020-08-01T00:00:00 + endDate: 2020-08-31T00:00:00 + status: Draft + totalHours: 17 + updatedDateUTC: 2020-08-28T20:50:40 post: security: - - OAuth2: [payroll.timesheets] + - OAuth2: + - payroll.timesheets tags: - PayrollNz operationId: createTimesheet @@ -3819,13 +3690,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - endDateValue: key: endDate keyPascal: EndDate @@ -3833,13 +3704,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 30)" - java: "LocalDate.of(2020, Month.OCTOBER, 30)" - csharp: "new DateTime(2020, 10, 12)" - php: "new DateTime('2020-10-30')" - node: "'2020-10-30'" - python: "dateutil.parser.parse('2020-10-30T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 30) + java: LocalDate.of(2020, Month.OCTOBER, 30) + csharp: new DateTime(2020, 10, 12) + php: new DateTime('2020-10-30') + node: '''2020-10-30''' + python: dateutil.parser.parse('2020-10-30T00:00:00Z') + ruby: '''YYYY-MM-DD''' - timesheet: key: timesheet keyPascal: Timesheet @@ -3850,13 +3721,13 @@ paths: keyPascal: PayrollCalendarID keySnake: payroll_calendar_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 - employeeID: key: employeeID keyPascal: EmployeeID keySnake: employee_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 - startDate: is_variable: true nonString: true @@ -3868,7 +3739,7 @@ paths: ruby: start_date object: timesheet - endDate: - is_last: true + is_last: true is_variable: true nonString: true key: endDate @@ -3882,47 +3753,40 @@ paths: parameters: - $ref: '#/components/parameters/idempotencyKey' responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/TimesheetObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-28T21:07:41.7980254", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "timesheet": { - "timesheetID": "d227445a-4188-453a-a196-48163a38188c", - "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", - "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", - "startDate": "2020-04-13T00:00:00", - "endDate": "2020-04-19T00:00:00", - "status": "Draft", - "totalHours": 14, - "updatedDateUTC": "2020-08-28T21:07:41.9676218", - "timesheetLines": [ - { - "timesheetLineID": "ebeda184-6f42-4c44-a19c-3c0308578153", - "date": "2020-04-15T00:00:00", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "trackingItemID": null, - "numberOfUnits": 6 - }, - { - "timesheetLineID": "e8e9d84f-d01d-4ab9-9584-3996c898b89c", - "date": "2020-04-13T00:00:00", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "trackingItemID": null, - "numberOfUnits": 8 - } - ] - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-28T21:07:41.7980254 + httpStatusCode: OK + pagination: null + problem: null + timesheet: + timesheetID: d227445a-4188-453a-a196-48163a38188c + payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030 + employeeID: 68342973-c405-4b86-b5d3-d7b877c27995 + startDate: 2020-04-13T00:00:00 + endDate: 2020-04-19T00:00:00 + status: Draft + totalHours: 14 + updatedDateUTC: 2020-08-28T21:07:41.9676218 + timesheetLines: + - timesheetLineID: ebeda184-6f42-4c44-a19c-3c0308578153 + date: 2020-04-15T00:00:00 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + trackingItemID: null + numberOfUnits: 6 + - timesheetLineID: e8e9d84f-d01d-4ab9-9584-3996c898b89c + date: 2020-04-13T00:00:00 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + trackingItemID: null + numberOfUnits: 8 + "400": description: validation error for a bad request content: application/json: @@ -3934,30 +3798,26 @@ paths: application/json: schema: $ref: '#/components/schemas/Timesheet' - example: { - "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", - "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", - "startDate": "2020-04-13", - "endDate": "2020-04-19", - "timesheetLines": [ - { - "date": "2020-04-13", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "numberOfUnits": 8 - }, - { - "date": "2020-04-15", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "numberOfUnits": 6 - } - ] - } + example: + payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030 + employeeID: 68342973-c405-4b86-b5d3-d7b877c27995 + startDate: "2020-04-13" + endDate: "2020-04-19" + timesheetLines: + - date: "2020-04-13" + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + numberOfUnits: 8 + - date: "2020-04-15" + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + numberOfUnits: 6 /Timesheets/{TimesheetID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.timesheets, payroll.timesheets.read] + - OAuth2: + - payroll.timesheets + - payroll.timesheets.read tags: - PayrollNz operationId: getTimesheet @@ -3973,56 +3833,48 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/TimesheetObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-28T21:07:39.0637818", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "timesheet": { - "timesheetID": "f2a2aff0-9944-411e-bc58-44f22304188d", - "payrollCalendarID": "f6931b89-d9c8-4f25-b4fa-268b5fd24197", - "employeeID": "272a7559-1b8f-4d3a-977b-d05578cb9546", - "startDate": "2020-08-01T00:00:00", - "endDate": "2020-08-31T00:00:00", - "status": "Draft", - "totalHours": 17, - "updatedDateUTC": "2020-08-28T20:50:40", - "timesheetLines": [ - { - "timesheetLineID": "3397aab1-6cac-4804-a72b-00f396b04a08", - "date": "2020-08-01T00:00:00", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "trackingItemID": null, - "numberOfUnits": 7 - }, - { - "timesheetLineID": "11f3608f-c53a-474d-ba17-053849de318b", - "date": "2020-08-02T00:00:00", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "trackingItemID": null, - "numberOfUnits": 5 - }, - { - "timesheetLineID": "f5b416b7-d431-4d54-baff-9cd6de620c70", - "date": "2020-08-03T00:00:00", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "trackingItemID": null, - "numberOfUnits": 5 - } - ] - } - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-28T21:07:39.0637818 + httpStatusCode: OK + pagination: null + problem: null + timesheet: + timesheetID: f2a2aff0-9944-411e-bc58-44f22304188d + payrollCalendarID: f6931b89-d9c8-4f25-b4fa-268b5fd24197 + employeeID: 272a7559-1b8f-4d3a-977b-d05578cb9546 + startDate: 2020-08-01T00:00:00 + endDate: 2020-08-31T00:00:00 + status: Draft + totalHours: 17 + updatedDateUTC: 2020-08-28T20:50:40 + timesheetLines: + - timesheetLineID: 3397aab1-6cac-4804-a72b-00f396b04a08 + date: 2020-08-01T00:00:00 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + trackingItemID: null + numberOfUnits: 7 + - timesheetLineID: 11f3608f-c53a-474d-ba17-053849de318b + date: 2020-08-02T00:00:00 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + trackingItemID: null + numberOfUnits: 5 + - timesheetLineID: f5b416b7-d431-4d54-baff-9cd6de620c70 + date: 2020-08-03T00:00:00 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + trackingItemID: null + numberOfUnits: 5 delete: security: - - OAuth2: [payroll.timesheets] + - OAuth2: + - payroll.timesheets tags: - PayrollNz operationId: deleteTimesheet @@ -4037,21 +3889,20 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/TimesheetLine' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-28T21:07:41.4217222", - "httpStatusCode": "OK", - "pagination": null, - "problem": null - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-28T21:07:41.4217222 + httpStatusCode: OK + pagination: null + problem: null + "400": description: validation error for a bad request content: application/json: @@ -4062,7 +3913,8 @@ paths: - $ref: '#/components/parameters/requiredHeader' post: security: - - OAuth2: [payroll.timesheets] + - OAuth2: + - payroll.timesheets tags: - PayrollNz operationId: createTimesheetLine @@ -4075,13 +3927,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - timesheetLine: key: timesheetLine keyPascal: TimesheetLine @@ -4092,7 +3944,7 @@ paths: keyPascal: TimesheetLineID keySnake: timesheet_line_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: timesheetLine - date: key: date @@ -4109,14 +3961,14 @@ paths: keyPascal: EarningsRateID keySnake: earnings_rate_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: timesheetLine - trackingItemID: key: trackingItemID keyPascal: TrackingItemID keySnake: tracking_item_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: timesheetLine - numberOfUnits: key: numberOfUnits @@ -4124,7 +3976,7 @@ paths: keySnake: number_of_units default: 6 object: timesheetLine - nonString: true + nonString: true is_last: true summary: Create a new timesheet line for a specific time sheet parameters: @@ -4138,28 +3990,26 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/TimesheetLineObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-28T21:07:39.5955147", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "timesheetLine": { - "timesheetLineID": "10c3c63e-6cd0-4630-861f-08a2baa657fa", - "date": "2020-08-03T00:00:00", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "trackingItemID": null, - "numberOfUnits": 1 - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-28T21:07:39.5955147 + httpStatusCode: OK + pagination: null + problem: null + timesheetLine: + timesheetLineID: 10c3c63e-6cd0-4630-861f-08a2baa657fa + date: 2020-08-03T00:00:00 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + trackingItemID: null + numberOfUnits: 1 + "400": description: validation error for a bad request content: application/json: @@ -4171,17 +4021,17 @@ paths: application/json: schema: $ref: '#/components/schemas/TimesheetLine' - example: { - "date": "2020-08-03", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "numberOfUnits": 1 - } + example: + date: "2020-08-03" + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + numberOfUnits: 1 /Timesheets/{TimesheetID}/Approve: parameters: - $ref: '#/components/parameters/requiredHeader' post: security: - - OAuth2: [payroll.timesheets] + - OAuth2: + - payroll.timesheets tags: - PayrollNz operationId: approveTimesheet @@ -4198,61 +4048,50 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/TimesheetObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-28T21:07:40.3918669", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "timesheet": { - "timesheetID": "f2a2aff0-9944-411e-bc58-44f22304188d", - "payrollCalendarID": "f6931b89-d9c8-4f25-b4fa-268b5fd24197", - "employeeID": "272a7559-1b8f-4d3a-977b-d05578cb9546", - "startDate": "2020-08-01T00:00:00", - "endDate": "2020-08-31T00:00:00", - "status": "Approved", - "totalHours": 13, - "updatedDateUTC": "2020-08-28T21:07:40.5613405", - "timesheetLines": [ - { - "timesheetLineID": "10c3c63e-6cd0-4630-861f-08a2baa657fa", - "date": "2020-08-03T00:00:00", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "trackingItemID": null, - "numberOfUnits": 1 - }, - { - "timesheetLineID": "3397aab1-6cac-4804-a72b-00f396b04a08", - "date": "2020-08-04T00:00:00", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "trackingItemID": null, - "numberOfUnits": 2 - }, - { - "timesheetLineID": "11f3608f-c53a-474d-ba17-053849de318b", - "date": "2020-08-02T00:00:00", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "trackingItemID": null, - "numberOfUnits": 5 - }, - { - "timesheetLineID": "f5b416b7-d431-4d54-baff-9cd6de620c70", - "date": "2020-08-03T00:00:00", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "trackingItemID": null, - "numberOfUnits": 5 - } - ] - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-28T21:07:40.3918669 + httpStatusCode: OK + pagination: null + problem: null + timesheet: + timesheetID: f2a2aff0-9944-411e-bc58-44f22304188d + payrollCalendarID: f6931b89-d9c8-4f25-b4fa-268b5fd24197 + employeeID: 272a7559-1b8f-4d3a-977b-d05578cb9546 + startDate: 2020-08-01T00:00:00 + endDate: 2020-08-31T00:00:00 + status: Approved + totalHours: 13 + updatedDateUTC: 2020-08-28T21:07:40.5613405 + timesheetLines: + - timesheetLineID: 10c3c63e-6cd0-4630-861f-08a2baa657fa + date: 2020-08-03T00:00:00 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + trackingItemID: null + numberOfUnits: 1 + - timesheetLineID: 3397aab1-6cac-4804-a72b-00f396b04a08 + date: 2020-08-04T00:00:00 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + trackingItemID: null + numberOfUnits: 2 + - timesheetLineID: 11f3608f-c53a-474d-ba17-053849de318b + date: 2020-08-02T00:00:00 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + trackingItemID: null + numberOfUnits: 5 + - timesheetLineID: f5b416b7-d431-4d54-baff-9cd6de620c70 + date: 2020-08-03T00:00:00 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + trackingItemID: null + numberOfUnits: 5 + "400": description: validation error for a bad request content: application/json: @@ -4263,7 +4102,8 @@ paths: - $ref: '#/components/parameters/requiredHeader' post: security: - - OAuth2: [payroll.timesheets] + - OAuth2: + - payroll.timesheets tags: - PayrollNz operationId: revertTimesheet @@ -4280,61 +4120,50 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/TimesheetObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-28T21:07:41.3053619", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "timesheet": { - "timesheetID": "f2a2aff0-9944-411e-bc58-44f22304188d", - "payrollCalendarID": "f6931b89-d9c8-4f25-b4fa-268b5fd24197", - "employeeID": "272a7559-1b8f-4d3a-977b-d05578cb9546", - "startDate": "2020-08-01T00:00:00", - "endDate": "2020-08-31T00:00:00", - "status": "Draft", - "totalHours": 13, - "updatedDateUTC": "2020-08-28T21:07:41.2608622", - "timesheetLines": [ - { - "timesheetLineID": "10c3c63e-6cd0-4630-861f-08a2baa657fa", - "date": "2020-08-03T00:00:00", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "trackingItemID": null, - "numberOfUnits": 1 - }, - { - "timesheetLineID": "3397aab1-6cac-4804-a72b-00f396b04a08", - "date": "2020-08-04T00:00:00", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "trackingItemID": null, - "numberOfUnits": 2 - }, - { - "timesheetLineID": "11f3608f-c53a-474d-ba17-053849de318b", - "date": "2020-08-02T00:00:00", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "trackingItemID": null, - "numberOfUnits": 5 - }, - { - "timesheetLineID": "f5b416b7-d431-4d54-baff-9cd6de620c70", - "date": "2020-08-03T00:00:00", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "trackingItemID": null, - "numberOfUnits": 5 - } - ] - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-28T21:07:41.3053619 + httpStatusCode: OK + pagination: null + problem: null + timesheet: + timesheetID: f2a2aff0-9944-411e-bc58-44f22304188d + payrollCalendarID: f6931b89-d9c8-4f25-b4fa-268b5fd24197 + employeeID: 272a7559-1b8f-4d3a-977b-d05578cb9546 + startDate: 2020-08-01T00:00:00 + endDate: 2020-08-31T00:00:00 + status: Draft + totalHours: 13 + updatedDateUTC: 2020-08-28T21:07:41.2608622 + timesheetLines: + - timesheetLineID: 10c3c63e-6cd0-4630-861f-08a2baa657fa + date: 2020-08-03T00:00:00 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + trackingItemID: null + numberOfUnits: 1 + - timesheetLineID: 3397aab1-6cac-4804-a72b-00f396b04a08 + date: 2020-08-04T00:00:00 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + trackingItemID: null + numberOfUnits: 2 + - timesheetLineID: 11f3608f-c53a-474d-ba17-053849de318b + date: 2020-08-02T00:00:00 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + trackingItemID: null + numberOfUnits: 5 + - timesheetLineID: f5b416b7-d431-4d54-baff-9cd6de620c70 + date: 2020-08-03T00:00:00 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + trackingItemID: null + numberOfUnits: 5 + "400": description: validation error for a bad request content: application/json: @@ -4345,7 +4174,8 @@ paths: - $ref: '#/components/parameters/requiredHeader' put: security: - - OAuth2: [payroll.timesheets] + - OAuth2: + - payroll.timesheets tags: - PayrollNz operationId: updateTimesheetLine @@ -4359,13 +4189,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - timesheetLine: key: timesheetLine keyPascal: TimesheetLine @@ -4376,7 +4206,7 @@ paths: keyPascal: TimesheetLineID keySnake: timesheet_line_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: timesheetLine - date: key: date @@ -4393,14 +4223,14 @@ paths: keyPascal: EarningsRateID keySnake: earnings_rate_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: timesheetLine - trackingItemID: key: trackingItemID keyPascal: TrackingItemID keySnake: tracking_item_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: timesheetLine - numberOfUnits: key: numberOfUnits @@ -4408,7 +4238,7 @@ paths: keySnake: number_of_units default: 6 object: timesheetLine - nonString: true + nonString: true is_last: true parameters: - $ref: '#/components/parameters/idempotencyKey' @@ -4429,28 +4259,26 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/TimesheetLineObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-28T21:07:39.9074596", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "timesheetLine": { - "timesheetLineID": "3397aab1-6cac-4804-a72b-00f396b04a08", - "date": "2020-08-04T00:00:00", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "trackingItemID": null, - "numberOfUnits": 2 - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-28T21:07:39.9074596 + httpStatusCode: OK + pagination: null + problem: null + timesheetLine: + timesheetLineID: 3397aab1-6cac-4804-a72b-00f396b04a08 + date: 2020-08-04T00:00:00 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + trackingItemID: null + numberOfUnits: 2 + "400": description: validation error for a bad request content: application/json: @@ -4462,14 +4290,14 @@ paths: application/json: schema: $ref: '#/components/schemas/TimesheetLine' - example: { - "date": "2020-08-04", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "numberOfUnits": 2 - } + example: + date: "2020-08-04" + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + numberOfUnits: 2 delete: security: - - OAuth2: [payroll.timesheets] + - OAuth2: + - payroll.timesheets tags: - PayrollNz operationId: deleteTimesheetLine @@ -4492,21 +4320,20 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/TimesheetLine' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-28T22:01:51.861069", - "httpStatusCode": "OK", - "pagination": null, - "problem": null - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-28T22:01:51.861069 + httpStatusCode: OK + pagination: null + problem: null + "400": description: validation error for a bad request content: application/json: @@ -4517,7 +4344,9 @@ paths: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollNz operationId: getPayRunCalendars @@ -4530,48 +4359,42 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayRunCalendars' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-26T23:54:48.3357097", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 2 - }, - "problem": null, - "payRunCalendars": [ - { - "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", - "name": "Weekly", - "calendarType": "Weekly", - "periodStartDate": "2019-07-08T00:00:00", - "periodEndDate": "2019-07-14T00:00:00", - "paymentDate": "2019-07-16T00:00:00", - "updatedDateUTC": "2019-09-24T05:08:45" - }, - { - "payrollCalendarID": "f6931b89-d9c8-4f25-b4fa-268b5fd24197", - "name": "Monthly", - "calendarType": "Monthly", - "periodStartDate": "2019-08-01T00:00:00", - "periodEndDate": "2019-08-31T00:00:00", - "paymentDate": "2019-08-23T00:00:00", - "updatedDateUTC": "2019-09-24T03:11:16" - } - ] - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-26T23:54:48.3357097 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 2 + problem: null + payRunCalendars: + - payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030 + name: Weekly + calendarType: Weekly + periodStartDate: 2019-07-08T00:00:00 + periodEndDate: 2019-07-14T00:00:00 + paymentDate: 2019-07-16T00:00:00 + updatedDateUTC: 2019-09-24T05:08:45 + - payrollCalendarID: f6931b89-d9c8-4f25-b4fa-268b5fd24197 + name: Monthly + calendarType: Monthly + periodStartDate: 2019-08-01T00:00:00 + periodEndDate: 2019-08-31T00:00:00 + paymentDate: 2019-08-23T00:00:00 + updatedDateUTC: 2019-09-24T03:11:16 post: security: - - OAuth2: [payroll.settings] + - OAuth2: + - payroll.settings tags: - PayrollNz operationId: createPayRunCalendar @@ -4584,13 +4407,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - paymentDateValue: key: paymentDate keyPascal: PaymentDate @@ -4598,13 +4421,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 30)" - java: "LocalDate.of(2020, Month.OCTOBER, 30)" - csharp: "new DateTime(2020, 10, 12)" - php: "new DateTime('2020-10-30')" - node: "'2020-10-30'" - python: "dateutil.parser.parse('2020-10-30T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 30) + java: LocalDate.of(2020, Month.OCTOBER, 30) + csharp: new DateTime(2020, 10, 12) + php: new DateTime('2020-10-30') + node: '''2020-10-30''' + python: dateutil.parser.parse('2020-10-30T00:00:00Z') + ruby: '''YYYY-MM-DD''' - payRunCalendar: key: payRunCalendar keyPascal: PayRunCalendar @@ -4614,7 +4437,7 @@ paths: key: calendarType keyPascal: CalendarType keySnake: calendar_type - nonString: true + nonString: true default: CalendarType.Weekly php: XeroAPI\XeroPHP\Models\PayrollNz\CalendarType.WEEKLY node: CalendarType.Weekly @@ -4637,7 +4460,7 @@ paths: key: paymentDate keyPascal: PaymentDate keySnake: payment_date - is_last: true + is_last: true is_variable: true nonString: true default: paymentDate @@ -4648,30 +4471,28 @@ paths: parameters: - $ref: '#/components/parameters/idempotencyKey' responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayRunCalendarObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-26T23:54:49.3159839", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "payRunCalendar": { - "payrollCalendarID": "54e9706a-c4e8-45ff-9c63-6fcac7ee7cde", - "name": "My Weekly Cal", - "calendarType": "Weekly", - "periodStartDate": "2020-05-01T00:00:00", - "periodEndDate": "2020-05-07T00:00:00", - "paymentDate": "2020-05-15T00:00:00", - "updatedDateUTC": "2020-08-26T23:54:49.4863322" - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-26T23:54:49.3159839 + httpStatusCode: OK + pagination: null + problem: null + payRunCalendar: + payrollCalendarID: 54e9706a-c4e8-45ff-9c63-6fcac7ee7cde + name: My Weekly Cal + calendarType: Weekly + periodStartDate: 2020-05-01T00:00:00 + periodEndDate: 2020-05-07T00:00:00 + paymentDate: 2020-05-15T00:00:00 + updatedDateUTC: 2020-08-26T23:54:49.4863322 + "400": description: validation error for a bad request content: application/json: @@ -4683,18 +4504,19 @@ paths: application/json: schema: $ref: '#/components/schemas/PayRunCalendar' - example: { - "name": "My Weekly Cal", - "calendarType": "Weekly", - "periodStartDate": "2020-05-01", - "paymentDate": "2020-05-15" - } + example: + name: My Weekly Cal + calendarType: Weekly + periodStartDate: "2020-05-01" + paymentDate: "2020-05-15" /PayRunCalendars/{PayrollCalendarID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollNz operationId: getPayRunCalendar @@ -4710,35 +4532,35 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayRunCalendarObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-26T23:54:48.4398063", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "payRunCalendar": { - "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", - "name": "Weekly", - "calendarType": "Weekly", - "periodStartDate": "2019-07-08T00:00:00", - "periodEndDate": "2019-07-14T00:00:00", - "paymentDate": "2019-07-16T00:00:00", - "updatedDateUTC": "2019-09-24T05:08:45" - } - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-26T23:54:48.4398063 + httpStatusCode: OK + pagination: null + problem: null + payRunCalendar: + payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030 + name: Weekly + calendarType: Weekly + periodStartDate: 2019-07-08T00:00:00 + periodEndDate: 2019-07-14T00:00:00 + paymentDate: 2019-07-16T00:00:00 + updatedDateUTC: 2019-09-24T05:08:45 /Employees/{EmployeeID}/SalaryAndWages: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollNz operationId: getEmployeeSalaryAndWages @@ -4750,7 +4572,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -4760,54 +4582,47 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/SalaryAndWages' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T00:25:03.6697493", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 2 - }, - "problem": null, - "salaryAndWages": [ - { - "salaryAndWagesID": "b0026f5a-fa8e-43aa-95e4-cec3c0972e39", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "numberOfUnitsPerWeek": 0, - "ratePerUnit": 25, - "numberOfUnitsPerDay": 0, - "daysPerWeek": 0, - "effectiveFrom": "2019-02-07T00:00:00", - "annualSalary": 25, - "status": "Active", - "paymentType": "Hourly", - "workPatternType": "DaysAndHours" - }, - { - "salaryAndWagesID": "0211c70c-93d5-4da1-a570-b66d8df2ca15", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "numberOfUnitsPerWeek": 2, - "ratePerUnit": null, - "numberOfUnitsPerDay": 2, - "daysPerWeek": 1, - "effectiveFrom": "2020-05-01T00:00:00", - "annualSalary": 100, - "status": "Active", - "paymentType": "Salary", - "workPatternType": "DaysAndHours" - } - ] - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T00:25:03.6697493 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 2 + problem: null + salaryAndWages: + - salaryAndWagesID: b0026f5a-fa8e-43aa-95e4-cec3c0972e39 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + numberOfUnitsPerWeek: 0 + ratePerUnit: 25 + numberOfUnitsPerDay: 0 + daysPerWeek: 0 + effectiveFrom: 2019-02-07T00:00:00 + annualSalary: 25 + status: Active + paymentType: Hourly + workPatternType: DaysAndHours + - salaryAndWagesID: 0211c70c-93d5-4da1-a570-b66d8df2ca15 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + numberOfUnitsPerWeek: 2 + ratePerUnit: null + numberOfUnitsPerDay: 2 + daysPerWeek: 1 + effectiveFrom: 2020-05-01T00:00:00 + annualSalary: 100 + status: Active + paymentType: Salary + workPatternType: DaysAndHours + "400": description: validation error for a bad request content: application/json: @@ -4815,7 +4630,8 @@ paths: $ref: '#/components/schemas/Problem' post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollNz operationId: createEmployeeSalaryAndWage @@ -4831,27 +4647,27 @@ paths: keyPascal: EarningsRateID keySnake: earnings_rate_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: salaryAndWage - numberOfUnitsPerDay: key: numberOfUnitsPerDay keyPascal: NumberOfUnitsPerDay keySnake: number_of_units_per_day - default: 0 - nonString: true + default: 0 + nonString: true object: salaryAndWage - daysPerWeek: key: daysPerWeek keyPascal: DaysPerWeek keySnake: days_per_week - default: 0 - nonString: true + default: 0 + nonString: true object: salaryAndWage - paymentType: key: paymentType keyPascal: PaymentType keySnake: payment_type - nonString: true + nonString: true default: SalaryAndWage.PaymentTypeEnum.Hourly php: XeroAPI\XeroPHP\Models\PayrollNz\SalaryAndWage\PaymentTypeEnum.HOURLY node: SalaryAndWage.PaymentTypeEnum.Hourly @@ -4869,39 +4685,37 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/SalaryAndWageObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T00:22:47.464262", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "salaryAndWages": { - "salaryAndWagesID": "0211c70c-93d5-4da1-a570-b66d8df2ca15", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "numberOfUnitsPerWeek": 2, - "ratePerUnit": null, - "numberOfUnitsPerDay": 2, - "daysPerWeek": 1, - "effectiveFrom": "2020-05-01T00:00:00", - "annualSalary": 100, - "status": "Active", - "paymentType": "Salary", - "workPatternType": "DaysAndHours" - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T00:22:47.464262 + httpStatusCode: OK + pagination: null + problem: null + salaryAndWages: + salaryAndWagesID: 0211c70c-93d5-4da1-a570-b66d8df2ca15 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + numberOfUnitsPerWeek: 2 + ratePerUnit: null + numberOfUnitsPerDay: 2 + daysPerWeek: 1 + effectiveFrom: 2020-05-01T00:00:00 + annualSalary: 100 + status: Active + paymentType: Salary + workPatternType: DaysAndHours + "400": description: validation error for a bad request content: application/json: @@ -4913,23 +4727,24 @@ paths: application/json: schema: $ref: '#/components/schemas/SalaryAndWage' - example: { - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "numberOfUnitsPerWeek": 2, - "ratePerUnit": 10, - "numberOfUnitsPerDay": 2, - "daysPerWeek": 1, - "effectiveFrom": "2020-05-01", - "annualSalary": 100, - "status": "Active", - "paymentType": "Salary" - } + example: + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + numberOfUnitsPerWeek: 2 + ratePerUnit: 10 + numberOfUnitsPerDay: 2 + daysPerWeek: 1 + effectiveFrom: "2020-05-01" + annualSalary: 100 + status: Active + paymentType: Salary /Employees/{EmployeeID}/SalaryAndWages/{SalaryAndWagesID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollNz operationId: getEmployeeSalaryAndWage @@ -4941,7 +4756,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -4949,44 +4764,41 @@ paths: x-snake: salary_and_wages_id in: path required: true - description: Id for single pay template earnings object - schema: + description: Id for single pay template earnings object + schema: type: string format: uuid example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/SalaryAndWages' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T00:25:03.8641784", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "salaryAndWages": [ - { - "salaryAndWagesID": "b0026f5a-fa8e-43aa-95e4-cec3c0972e39", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "numberOfUnitsPerWeek": 0, - "ratePerUnit": 25, - "numberOfUnitsPerDay": 0, - "daysPerWeek": 0, - "effectiveFrom": "2019-02-07T00:00:00", - "annualSalary": 25, - "status": "Active", - "paymentType": "Hourly", - "workPatternType": "DaysAndHours" - } - ] - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T00:25:03.8641784 + httpStatusCode: OK + pagination: null + problem: null + salaryAndWages: + - salaryAndWagesID: b0026f5a-fa8e-43aa-95e4-cec3c0972e39 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + numberOfUnitsPerWeek: 0 + ratePerUnit: 25 + numberOfUnitsPerDay: 0 + daysPerWeek: 0 + effectiveFrom: 2019-02-07T00:00:00 + annualSalary: 25 + status: Active + paymentType: Hourly + workPatternType: DaysAndHours put: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollNz operationId: updateEmployeeSalaryAndWage @@ -5002,27 +4814,27 @@ paths: keyPascal: EarningsRateID keySnake: earnings_rate_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: salaryAndWage - numberOfUnitsPerDay: key: numberOfUnitsPerDay keyPascal: NumberOfUnitsPerDay keySnake: number_of_units_per_day - default: 0 - nonString: true + default: 0 + nonString: true object: salaryAndWage - daysPerWeek: key: daysPerWeek keyPascal: DaysPerWeek keySnake: days_per_week - default: 0 - nonString: true + default: 0 + nonString: true object: salaryAndWage - paymentType: key: paymentType keyPascal: PaymentType keySnake: payment_type - nonString: true + nonString: true default: SalaryAndWage.PaymentTypeEnum.Hourly php: XeroAPI\XeroPHP\Models\PayrollNz\SalaryAndWage\PaymentTypeEnum.HOURLY node: SalaryAndWage.PaymentTypeEnum.Hourly @@ -5040,7 +4852,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -5048,40 +4860,38 @@ paths: x-snake: salary_and_wages_id in: path required: true - description: Id for single pay template earnings object - schema: + description: Id for single pay template earnings object + schema: type: string format: uuid example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/SalaryAndWageObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T00:25:11.4976642", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "salaryAndWages": { - "salaryAndWagesID": "1912d614-99d0-43e6-8d63-5b539dcfe358", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "numberOfUnitsPerWeek": 3, - "ratePerUnit": null, - "numberOfUnitsPerDay": 3, - "daysPerWeek": 1, - "effectiveFrom": "2020-05-15T00:00:00", - "annualSalary": 101, - "status": "Active", - "paymentType": "Salary", - "workPatternType": "RegularWeek" - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T00:25:11.4976642 + httpStatusCode: OK + pagination: null + problem: null + salaryAndWages: + salaryAndWagesID: 1912d614-99d0-43e6-8d63-5b539dcfe358 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + numberOfUnitsPerWeek: 3 + ratePerUnit: null + numberOfUnitsPerDay: 3 + daysPerWeek: 1 + effectiveFrom: 2020-05-15T00:00:00 + annualSalary: 101 + status: Active + paymentType: Salary + workPatternType: RegularWeek + "400": description: validation error for a bad request content: application/json: @@ -5093,20 +4903,20 @@ paths: application/json: schema: $ref: '#/components/schemas/SalaryAndWage' - example: { - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "numberOfUnitsPerWeek": 3, - "ratePerUnit": 11, - "numberOfUnitsPerDay": 3, - "daysPerWeek": 1, - "effectiveFrom": "2020-05-15", - "annualSalary": 101, - "status": "Active", - "paymentType": "Salary" - } + example: + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + numberOfUnitsPerWeek: 3 + ratePerUnit: 11 + numberOfUnitsPerDay: 3 + daysPerWeek: 1 + effectiveFrom: "2020-05-15" + annualSalary: 101 + status: Active + paymentType: Salary delete: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollNz operationId: deleteEmployeeSalaryAndWage @@ -5117,7 +4927,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -5125,32 +4935,33 @@ paths: x-snake: salary_and_wages_id in: path required: true - description: Id for single salary and wages object - schema: + description: Id for single salary and wages object + schema: type: string format: uuid example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 responses: - '200': + "200": description: deletion successful content: application/json: schema: $ref: '#/components/schemas/SalaryAndWageObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T00:25:11.5391097", - "httpStatusCode": "OK", - "pagination": null, - "problem": null - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-27T00:25:11.5391097 + httpStatusCode: OK + pagination: null + problem: null /PayRuns: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.payruns, payroll.payruns.read] + - OAuth2: + - payroll.payruns + - payroll.payruns.read tags: - PayrollNz operationId: getPayRuns @@ -5171,44 +4982,40 @@ paths: - Draft - Posted responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayRuns' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-28T23:01:56.762619", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 1 - }, - "problem": null, - "payRuns": [ - { - "payRunID": "8ba9831d-38e4-43d4-808e-472a5d195bce", - "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", - "periodStartDate": "2019-06-10T00:00:00", - "periodEndDate": "2019-06-16T00:00:00", - "paymentDate": "2019-06-18T00:00:00", - "totalCost": 6735.81, - "totalPay": 4524.81, - "payRunStatus": "Draft", - "payRunType": "Scheduled", - "calendarType": "Weekly", - "postedDateTime": null, - "payslipMessage": null - } - ] - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-28T23:01:56.762619 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 1 + problem: null + payRuns: + - payRunID: 8ba9831d-38e4-43d4-808e-472a5d195bce + payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030 + periodStartDate: 2019-06-10T00:00:00 + periodEndDate: 2019-06-16T00:00:00 + paymentDate: 2019-06-18T00:00:00 + totalCost: 6735.81 + totalPay: 4524.81 + payRunStatus: Draft + payRunType: Scheduled + calendarType: Weekly + postedDateTime: null + payslipMessage: null post: security: - - OAuth2: [payroll.payruns] + - OAuth2: + - payroll.payruns tags: - PayrollNz operationId: createPayRun @@ -5223,7 +5030,7 @@ paths: key: payRunType keyPascal: PayRunType keySnake: pay_run_type - nonString: true + nonString: true default: PayRun.PayRunTypeEnum.Scheduled php: XeroAPI\XeroPHP\Models\PayrollNz\PayRun\PayRunTypeEnum.SCHEDULED node: PayRun.PayRunTypeEnum.Scheduled @@ -5238,80 +5045,73 @@ paths: keySnake: payroll_calendar_id is_uuid: true object: payRun - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 is_last: true summary: Creates a pay run parameters: - $ref: '#/components/parameters/idempotencyKey' responses: - '200': + "200": description: created payrun results content: application/json: schema: $ref: '#/components/schemas/PayRunObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-09-10T23:56:16.2964746", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "payRun": { - "payRunID": "591dbf2f-786b-4814-8c61-93bebaee47f9", - "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", - "periodStartDate": "2019-06-17T00:00:00", - "periodEndDate": "2019-06-23T00:00:00", - "paymentDate": "2019-06-25T00:00:00", - "totalCost": 9416.7, - "totalPay": 6137.2, - "payRunStatus": "Draft", - "payRunType": "Scheduled", - "calendarType": "Weekly", - "postedDateTime": null, - "paySlips": [ - { - "paySlipID": "8b3a099c-2309-480a-a6ee-1dc4f4b2668b", - "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", - "lastEdited": null, - "firstName": "Tony", - "lastName": "Starkwpjgdjxdvwson", - "totalEarnings": 3628.8, - "grossEarnings": 3628.8, - "totalPay": 2462.72, - "totalEmployerTaxes": 18.9, - "totalEmployeeTaxes": 1057.22, - "totalDeductions": 0, - "totalReimbursements": 0, - "totalStatutoryDeductions": 108.86, - "totalSuperannuation": 108.86, - "bacsHash": null, - "paymentMethod": "Electronically" - }, - { - "paySlipID": "87ab8047-7066-4609-906a-5b6ee1dc1886", - "employeeID": "1c4f0c92-03ad-43f2-a690-ee51397ece6a", - "lastEdited": null, - "firstName": "GST", - "lastName": "Contractor", - "totalEarnings": 480, - "grossEarnings": 480, - "totalPay": 456, - "totalEmployerTaxes": 0, - "totalEmployeeTaxes": 96, - "totalDeductions": 0, - "totalReimbursements": 72, - "totalStatutoryDeductions": 0, - "totalSuperannuation": 0, - "bacsHash": null, - "paymentMethod": "Electronically" - } - ], - "payslipMessage": null, - "invalidPayeeIDs": null - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-09-10T23:56:16.2964746 + httpStatusCode: OK + pagination: null + problem: null + payRun: + payRunID: 591dbf2f-786b-4814-8c61-93bebaee47f9 + payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030 + periodStartDate: 2019-06-17T00:00:00 + periodEndDate: 2019-06-23T00:00:00 + paymentDate: 2019-06-25T00:00:00 + totalCost: 9416.7 + totalPay: 6137.2 + payRunStatus: Draft + payRunType: Scheduled + calendarType: Weekly + postedDateTime: null + paySlips: + - paySlipID: 8b3a099c-2309-480a-a6ee-1dc4f4b2668b + employeeID: 68342973-c405-4b86-b5d3-d7b877c27995 + lastEdited: null + firstName: Tony + lastName: Starkwpjgdjxdvwson + totalEarnings: 3628.8 + grossEarnings: 3628.8 + totalPay: 2462.72 + totalEmployerTaxes: 18.9 + totalEmployeeTaxes: 1057.22 + totalDeductions: 0 + totalReimbursements: 0 + totalStatutoryDeductions: 108.86 + totalSuperannuation: 108.86 + bacsHash: null + paymentMethod: Electronically + - paySlipID: 87ab8047-7066-4609-906a-5b6ee1dc1886 + employeeID: 1c4f0c92-03ad-43f2-a690-ee51397ece6a + lastEdited: null + firstName: GST + lastName: Contractor + totalEarnings: 480 + grossEarnings: 480 + totalPay: 456 + totalEmployerTaxes: 0 + totalEmployeeTaxes: 96 + totalDeductions: 0 + totalReimbursements: 72 + totalStatutoryDeductions: 0 + totalSuperannuation: 0 + bacsHash: null + paymentMethod: Electronically + payslipMessage: null + invalidPayeeIDs: null + "400": description: validation error for a bad request content: application/json: @@ -5323,21 +5123,22 @@ paths: application/json: schema: $ref: '#/components/schemas/PayRun' - example: { - "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", - "periodStartDate": "2020-09-08", - "periodEndDate": "2020-09-15", - "paymentDate": "2020-09-20", - "payRunStatus": "Draft", - "payRunType": "Scheduled", - "calendarType": "Weekly" - } + example: + payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030 + periodStartDate: "2020-09-08" + periodEndDate: "2020-09-15" + paymentDate: "2020-09-20" + payRunStatus: Draft + payRunType: Scheduled + calendarType: Weekly /PayRuns/{PayRunID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.payruns, payroll.payruns.read] + - OAuth2: + - payroll.payruns + - payroll.payruns.read tags: - PayrollNz operationId: getPayRun @@ -5353,58 +5154,54 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayRunObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-28T23:01:57.3773969", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "payRun": { - "payRunID": "8ba9831d-38e4-43d4-808e-472a5d195bce", - "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", - "periodStartDate": "2019-06-10T00:00:00", - "periodEndDate": "2019-06-16T00:00:00", - "paymentDate": "2019-06-18T00:00:00", - "totalCost": 6735.81, - "totalPay": 4524.81, - "payRunStatus": "Draft", - "payRunType": "Scheduled", - "calendarType": "Weekly", - "postedDateTime": null, - "paySlips": [ - { - "paySlipID": "51a01760-cf9d-4ba1-bf3a-2065d4f8e073", - "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", - "lastEdited": "2020-08-28T21:58:08", - "firstName": "Tony", - "lastName": "Starkmzamlagmdison", - "totalEarnings": 648, - "grossEarnings": 648, - "totalPay": 525, - "totalEmployerTaxes": 3.32, - "totalEmployeeTaxes": 103.56, - "totalDeductions": 0, - "totalReimbursements": 0, - "totalStatutoryDeductions": 19.44, - "totalSuperannuation": 19.44, - "bacsHash": null, - "paymentMethod": "Electronically" - } - ], - "payslipMessage": null, - "invalidPayeeIDs": null - } - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-28T23:01:57.3773969 + httpStatusCode: OK + pagination: null + problem: null + payRun: + payRunID: 8ba9831d-38e4-43d4-808e-472a5d195bce + payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030 + periodStartDate: 2019-06-10T00:00:00 + periodEndDate: 2019-06-16T00:00:00 + paymentDate: 2019-06-18T00:00:00 + totalCost: 6735.81 + totalPay: 4524.81 + payRunStatus: Draft + payRunType: Scheduled + calendarType: Weekly + postedDateTime: null + paySlips: + - paySlipID: 51a01760-cf9d-4ba1-bf3a-2065d4f8e073 + employeeID: 68342973-c405-4b86-b5d3-d7b877c27995 + lastEdited: 2020-08-28T21:58:08 + firstName: Tony + lastName: Starkmzamlagmdison + totalEarnings: 648 + grossEarnings: 648 + totalPay: 525 + totalEmployerTaxes: 3.32 + totalEmployeeTaxes: 103.56 + totalDeductions: 0 + totalReimbursements: 0 + totalStatutoryDeductions: 19.44 + totalSuperannuation: 19.44 + bacsHash: null + paymentMethod: Electronically + payslipMessage: null + invalidPayeeIDs: null put: security: - - OAuth2: [payroll.payruns] + - OAuth2: + - payroll.payruns tags: - PayrollNz operationId: updatePayRun @@ -5417,13 +5214,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - paymentDateValue: key: paymentDate keyPascal: PaymentDate @@ -5431,13 +5228,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 30)" - java: "LocalDate.of(2020, Month.OCTOBER, 30)" - csharp: "new DateTime(2020, 10, 12)" - php: "new DateTime('2020-10-30')" - node: "'2020-10-30'" - python: "dateutil.parser.parse('2020-10-30T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 30) + java: LocalDate.of(2020, Month.OCTOBER, 30) + csharp: new DateTime(2020, 10, 12) + php: new DateTime('2020-10-30') + node: '''2020-10-30''' + python: dateutil.parser.parse('2020-10-30T00:00:00Z') + ruby: '''YYYY-MM-DD''' - payRunCalendar: key: payRunCalendar keyPascal: PayRunCalendar @@ -5447,7 +5244,7 @@ paths: key: calendarType keyPascal: CalendarType keySnake: calendar_type - nonString: true + nonString: true default: CalendarType.Weekly php: XeroAPI\XeroPHP\Models\PayrollNz\CalendarType.WEEKLY node: CalendarType.Weekly @@ -5470,7 +5267,7 @@ paths: key: paymentDate keyPascal: PaymentDate keySnake: payment_date - is_last: true + is_last: true is_variable: true nonString: true default: paymentDate @@ -5489,146 +5286,131 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayRunObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-09-10T17:38:14.8294283", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "payRun": { - "payRunID": "8ba9831d-38e4-43d4-808e-472a5d195bce", - "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", - "periodStartDate": "2019-06-10T00:00:00", - "periodEndDate": "2019-06-16T00:00:00", - "paymentDate": "2019-07-01T00:00:00", - "totalCost": 9806.03, - "totalPay": 6362.53, - "payRunStatus": "Draft", - "payRunType": "Scheduled", - "calendarType": "Weekly", - "postedDateTime": null, - "paySlips": [ - { - "paySlipID": "51a01760-cf9d-4ba1-bf3a-2065d4f8e073", - "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", - "lastEdited": "2020-09-10T17:20:23", - "firstName": "Tony", - "lastName": "Starkwpjgdjxdvwson", - "totalEarnings": 3628.8, - "grossEarnings": 3628.8, - "totalPay": 2362.72, - "totalEmployerTaxes": 18.9, - "totalEmployeeTaxes": 1057.22, - "totalDeductions": 100, - "totalReimbursements": 0, - "totalStatutoryDeductions": 108.86, - "totalSuperannuation": 108.86, - "bacsHash": null, - "paymentMethod": "Electronically" - }, - { - "paySlipID": "499bb866-40fd-44ea-a2d9-91e79e5ac08e", - "employeeID": "1c4f0c92-03ad-43f2-a690-ee51397ece6a", - "lastEdited": "2019-09-24T03:14:29", - "firstName": "GST", - "lastName": "Contractor", - "totalEarnings": 800, - "grossEarnings": 800, - "totalPay": 760, - "totalEmployerTaxes": 0, - "totalEmployeeTaxes": 160, - "totalDeductions": 0, - "totalReimbursements": 120, - "totalStatutoryDeductions": 0, - "totalSuperannuation": 0, - "bacsHash": null, - "paymentMethod": "Electronically" - }, - { - "paySlipID": "f98b6411-7755-41f7-8d89-a3475eadf866", - "employeeID": "2e63a4ff-e911-44fc-8290-a65ec7299b30", - "lastEdited": "2019-09-24T03:14:06", - "firstName": "Dairy", - "lastName": "Milker", - "totalEarnings": 1353.85, - "grossEarnings": 1353.85, - "totalPay": 726.83, - "totalEmployerTaxes": 22.11, - "totalEmployeeTaxes": 290.97, - "totalDeductions": 200, - "totalReimbursements": 21.33, - "totalStatutoryDeductions": 157.38, - "totalSuperannuation": 67.69, - "bacsHash": null, - "paymentMethod": "Electronically" - }, - { - "paySlipID": "0923bc21-900e-4660-b37c-127c59bd4b12", - "employeeID": "9126967a-99a1-4b46-a0f3-43e28737756e", - "lastEdited": "2019-09-24T03:14:15", - "firstName": "General", - "lastName": "Manager", - "totalEarnings": 1730.77, - "grossEarnings": 1730.77, - "totalPay": 1151.71, - "totalEmployerTaxes": 22.77, - "totalEmployeeTaxes": 410.6, - "totalDeductions": 30, - "totalReimbursements": 0, - "totalStatutoryDeductions": 138.46, - "totalSuperannuation": 69.23, - "bacsHash": null, - "paymentMethod": "Electronically" - }, - { - "paySlipID": "df88d132-3cd6-43f3-8c4a-28ca53406138", - "employeeID": "ae679eeb-8708-4e3b-afe9-2de117a7f68f", - "lastEdited": "2019-09-24T03:18:06", - "firstName": "Part-time", - "lastName": "Worker", - "totalEarnings": 450, - "grossEarnings": 450, - "totalPay": 339.45, - "totalEmployerTaxes": 2.27, - "totalEmployeeTaxes": 66.15, - "totalDeductions": 0, - "totalReimbursements": 0, - "totalStatutoryDeductions": 44.4, - "totalSuperannuation": 13.5, - "bacsHash": null, - "paymentMethod": "Electronically" - }, - { - "paySlipID": "ae8d94e8-c30f-4b19-88df-a68c1bda2b90", - "employeeID": "45e50e4b-7979-4d3b-b943-8c4f0cb9df3d", - "lastEdited": "2019-09-24T03:18:25", - "firstName": "Permanent", - "lastName": "Worker", - "totalEarnings": 1400, - "grossEarnings": 1400, - "totalPay": 1021.82, - "totalEmployerTaxes": 13.86, - "totalEmployeeTaxes": 300.18, - "totalDeductions": 22, - "totalReimbursements": 0, - "totalStatutoryDeductions": 56, - "totalSuperannuation": 42, - "bacsHash": null, - "paymentMethod": "Electronically" - } - ], - "payslipMessage": null, - "invalidPayeeIDs": null - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-09-10T17:38:14.8294283 + httpStatusCode: OK + pagination: null + problem: null + payRun: + payRunID: 8ba9831d-38e4-43d4-808e-472a5d195bce + payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030 + periodStartDate: 2019-06-10T00:00:00 + periodEndDate: 2019-06-16T00:00:00 + paymentDate: 2019-07-01T00:00:00 + totalCost: 9806.03 + totalPay: 6362.53 + payRunStatus: Draft + payRunType: Scheduled + calendarType: Weekly + postedDateTime: null + paySlips: + - paySlipID: 51a01760-cf9d-4ba1-bf3a-2065d4f8e073 + employeeID: 68342973-c405-4b86-b5d3-d7b877c27995 + lastEdited: 2020-09-10T17:20:23 + firstName: Tony + lastName: Starkwpjgdjxdvwson + totalEarnings: 3628.8 + grossEarnings: 3628.8 + totalPay: 2362.72 + totalEmployerTaxes: 18.9 + totalEmployeeTaxes: 1057.22 + totalDeductions: 100 + totalReimbursements: 0 + totalStatutoryDeductions: 108.86 + totalSuperannuation: 108.86 + bacsHash: null + paymentMethod: Electronically + - paySlipID: 499bb866-40fd-44ea-a2d9-91e79e5ac08e + employeeID: 1c4f0c92-03ad-43f2-a690-ee51397ece6a + lastEdited: 2019-09-24T03:14:29 + firstName: GST + lastName: Contractor + totalEarnings: 800 + grossEarnings: 800 + totalPay: 760 + totalEmployerTaxes: 0 + totalEmployeeTaxes: 160 + totalDeductions: 0 + totalReimbursements: 120 + totalStatutoryDeductions: 0 + totalSuperannuation: 0 + bacsHash: null + paymentMethod: Electronically + - paySlipID: f98b6411-7755-41f7-8d89-a3475eadf866 + employeeID: 2e63a4ff-e911-44fc-8290-a65ec7299b30 + lastEdited: 2019-09-24T03:14:06 + firstName: Dairy + lastName: Milker + totalEarnings: 1353.85 + grossEarnings: 1353.85 + totalPay: 726.83 + totalEmployerTaxes: 22.11 + totalEmployeeTaxes: 290.97 + totalDeductions: 200 + totalReimbursements: 21.33 + totalStatutoryDeductions: 157.38 + totalSuperannuation: 67.69 + bacsHash: null + paymentMethod: Electronically + - paySlipID: 0923bc21-900e-4660-b37c-127c59bd4b12 + employeeID: 9126967a-99a1-4b46-a0f3-43e28737756e + lastEdited: 2019-09-24T03:14:15 + firstName: General + lastName: Manager + totalEarnings: 1730.77 + grossEarnings: 1730.77 + totalPay: 1151.71 + totalEmployerTaxes: 22.77 + totalEmployeeTaxes: 410.6 + totalDeductions: 30 + totalReimbursements: 0 + totalStatutoryDeductions: 138.46 + totalSuperannuation: 69.23 + bacsHash: null + paymentMethod: Electronically + - paySlipID: df88d132-3cd6-43f3-8c4a-28ca53406138 + employeeID: ae679eeb-8708-4e3b-afe9-2de117a7f68f + lastEdited: 2019-09-24T03:18:06 + firstName: Part-time + lastName: Worker + totalEarnings: 450 + grossEarnings: 450 + totalPay: 339.45 + totalEmployerTaxes: 2.27 + totalEmployeeTaxes: 66.15 + totalDeductions: 0 + totalReimbursements: 0 + totalStatutoryDeductions: 44.4 + totalSuperannuation: 13.5 + bacsHash: null + paymentMethod: Electronically + - paySlipID: ae8d94e8-c30f-4b19-88df-a68c1bda2b90 + employeeID: 45e50e4b-7979-4d3b-b943-8c4f0cb9df3d + lastEdited: 2019-09-24T03:18:25 + firstName: Permanent + lastName: Worker + totalEarnings: 1400 + grossEarnings: 1400 + totalPay: 1021.82 + totalEmployerTaxes: 13.86 + totalEmployeeTaxes: 300.18 + totalDeductions: 22 + totalReimbursements: 0 + totalStatutoryDeductions: 56 + totalSuperannuation: 42 + bacsHash: null + paymentMethod: Electronically + payslipMessage: null + invalidPayeeIDs: null + "400": description: validation error for a bad request content: application/json: @@ -5640,15 +5422,16 @@ paths: application/json: schema: $ref: '#/components/schemas/PayRun' - example: { - "paymentDate": "2019-07-01" - } + example: + paymentDate: "2019-07-01" /PaySlips: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.payslip, payroll.payslip.read] + - OAuth2: + - payroll.payslip + - payroll.payslip.read tags: - PayrollNz operationId: getPaySlips @@ -5669,158 +5452,123 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PaySlips' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-28T22:55:58.6809685", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 6 - }, - "problem": null, - "paySlips": [ - { - "paySlipID": "17d88883-686a-400f-9551-34fa366effc4", - "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", - "payRunID": "be103bd8-321b-419f-8177-48280560771a", - "lastEdited": "2019-09-23T02:13:29", - "firstName": "Tony", - "lastName": "Starkmzamlagmdison", - "totalEarnings": 162, - "grossEarnings": 162, - "totalPay": 137.88, - "totalEmployerTaxes": 0.7, - "totalEmployeeTaxes": 19.26, - "totalDeductions": 0, - "totalReimbursements": 0, - "totalStatutoryDeductions": 4.86, - "totalSuperannuation": 4.86, - "bacsHash": null, - "paymentMethod": "Electronically", - "earningsLines": [ - { - "earningsLineID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "displayName": "Ordinary Time", - "ratePerUnit": 25, - "numberOfUnits": 6, - "fixedAmount": null, - "amount": 150, - "isLinkedToTimesheet": false, - "isAverageDailyPayRate": null, - "isSystemGenerated": true - } - ], - "leaveEarningsLines": [ - { - "earningsLineID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", - "earningsRateID": "39b3560a-5d2f-4538-924a-4349dc86396e", - "displayName": "Holiday Pay", - "ratePerUnit": null, - "numberOfUnits": null, - "fixedAmount": 12, - "amount": 12, - "isLinkedToTimesheet": false, - "isAverageDailyPayRate": null, - "isSystemGenerated": true - } - ], - "timesheetEarningsLines": [], - "deductionLines": [], - "reimbursementLines": [], - "leaveAccrualLines": [ - { - "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", - "numberOfUnits": 12 - }, - { - "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", - "numberOfUnits": 0 - }, - { - "leaveTypeID": "f2f994cf-1899-46f3-ad4f-5d92d78c3719", - "numberOfUnits": 0 - }, - { - "leaveTypeID": "34129765-11cb-4d8c-b568-84a2219beda3", - "numberOfUnits": 0 - } - ], - "superannuationLines": [ - { - "superannuationTypeID": "563273ea-0dae-4f82-86a4-e0db77c008ea", - "displayName": "KiwiSaver", - "amount": 4.86, - "fixedAmount": null, - "percentage": 3, - "manualAdjustment": false - } - ], - "paymentLines": [ - { - "paymentLineID": "a300f7c3-e934-4e67-84c5-d8687cf4a2b4", - "amount": 137.88, - "accountNumber": "0607050201419000", - "sortCode": null, - "accountName": "Casual Worker" - } - ], - "employeeTaxLines": [ - { - "taxLineID": "1d7c6670-c227-4de9-a7fc-fbf7ec16a804", - "description": null, - "amount": 19.26, - "globalTaxTypeID": 11, - "manualAdjustment": false - } - ], - "employerTaxLines": [ - { - "taxLineID": "b790f489-9bbf-4979-a987-53dddf8b648f", - "description": null, - "amount": 0.7, - "globalTaxTypeID": 10, - "manualAdjustment": false - } - ], - "statutoryDeductionLines": [ - { - "statutoryDeductionTypeID": "b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3", - "amount": 4.86, - "fixedAmount": null, - "manualAdjustment": null - } - ], - "taxSettings": { - "periodUnits": 1.0, - "periodType": "weeks", - "taxCode": "M", - "specialTaxRate": null, - "lumpSumTaxCode": "SB", - "lumpSumAmount": null - }, - "grossEarningsHistory": { - "daysPaid": 1, - "unpaidWeeks": 0 - } - } - ] - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-28T22:55:58.6809685 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 6 + problem: null + paySlips: + - paySlipID: 17d88883-686a-400f-9551-34fa366effc4 + employeeID: 68342973-c405-4b86-b5d3-d7b877c27995 + payRunID: be103bd8-321b-419f-8177-48280560771a + lastEdited: 2019-09-23T02:13:29 + firstName: Tony + lastName: Starkmzamlagmdison + totalEarnings: 162 + grossEarnings: 162 + totalPay: 137.88 + totalEmployerTaxes: 0.7 + totalEmployeeTaxes: 19.26 + totalDeductions: 0 + totalReimbursements: 0 + totalStatutoryDeductions: 4.86 + totalSuperannuation: 4.86 + bacsHash: null + paymentMethod: Electronically + earningsLines: + - earningsLineID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + displayName: Ordinary Time + ratePerUnit: 25 + numberOfUnits: 6 + fixedAmount: null + amount: 150 + isLinkedToTimesheet: false + isAverageDailyPayRate: null + isSystemGenerated: true + leaveEarningsLines: + - earningsLineID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6 + earningsRateID: 39b3560a-5d2f-4538-924a-4349dc86396e + displayName: Holiday Pay + ratePerUnit: null + numberOfUnits: null + fixedAmount: 12 + amount: 12 + isLinkedToTimesheet: false + isAverageDailyPayRate: null + isSystemGenerated: true + timesheetEarningsLines: [] + deductionLines: [] + reimbursementLines: [] + leaveAccrualLines: + - leaveTypeID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6 + numberOfUnits: 12 + - leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4 + numberOfUnits: 0 + - leaveTypeID: f2f994cf-1899-46f3-ad4f-5d92d78c3719 + numberOfUnits: 0 + - leaveTypeID: 34129765-11cb-4d8c-b568-84a2219beda3 + numberOfUnits: 0 + superannuationLines: + - superannuationTypeID: 563273ea-0dae-4f82-86a4-e0db77c008ea + displayName: KiwiSaver + amount: 4.86 + fixedAmount: null + percentage: 3 + manualAdjustment: false + paymentLines: + - paymentLineID: a300f7c3-e934-4e67-84c5-d8687cf4a2b4 + amount: 137.88 + accountNumber: "0607050201419000" + sortCode: null + accountName: Casual Worker + employeeTaxLines: + - taxLineID: 1d7c6670-c227-4de9-a7fc-fbf7ec16a804 + description: null + amount: 19.26 + globalTaxTypeID: 11 + manualAdjustment: false + employerTaxLines: + - taxLineID: b790f489-9bbf-4979-a987-53dddf8b648f + description: null + amount: 0.7 + globalTaxTypeID: 10 + manualAdjustment: false + statutoryDeductionLines: + - statutoryDeductionTypeID: b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3 + amount: 4.86 + fixedAmount: null + manualAdjustment: null + taxSettings: + periodUnits: 1.0 + periodType: weeks + taxCode: M + specialTaxRate: null + lumpSumTaxCode: SB + lumpSumAmount: null + grossEarningsHistory: + daysPaid: 1 + unpaidWeeks: 0 /PaySlips/{PaySlipID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.payslip, payroll.payslip.read] + - OAuth2: + - payroll.payslip + - payroll.payslip.read tags: - PayrollNz operationId: getPaySlip @@ -5836,148 +5584,115 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PaySlipObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-28T22:55:59.3854985", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "paySlip": { - "paySlipID": "17d88883-686a-400f-9551-34fa366effc4", - "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", - "payRunID": "be103bd8-321b-419f-8177-48280560771a", - "lastEdited": "2019-09-23T02:13:29", - "firstName": "Tony", - "lastName": "Starkmzamlagmdison", - "totalEarnings": 162, - "grossEarnings": 162, - "totalPay": 137.88, - "totalEmployerTaxes": 0.7, - "totalEmployeeTaxes": 19.26, - "totalDeductions": 0, - "totalReimbursements": 0, - "totalStatutoryDeductions": 4.86, - "totalSuperannuation": 4.86, - "bacsHash": null, - "paymentMethod": "Electronically", - "earningsLines": [ - { - "earningsLineID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "displayName": "Ordinary Time", - "ratePerUnit": 25, - "numberOfUnits": 6, - "fixedAmount": null, - "amount": 150, - "isLinkedToTimesheet": false, - "isAverageDailyPayRate": null, - "isSystemGenerated": true - } - ], - "leaveEarningsLines": [ - { - "earningsLineID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", - "earningsRateID": "39b3560a-5d2f-4538-924a-4349dc86396e", - "displayName": "Holiday Pay", - "ratePerUnit": null, - "numberOfUnits": null, - "fixedAmount": 12, - "amount": 12, - "isLinkedToTimesheet": false, - "isAverageDailyPayRate": null, - "isSystemGenerated": true - } - ], - "timesheetEarningsLines": [], - "deductionLines": [], - "reimbursementLines": [], - "leaveAccrualLines": [ - { - "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", - "numberOfUnits": 12 - }, - { - "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", - "numberOfUnits": 0 - }, - { - "leaveTypeID": "f2f994cf-1899-46f3-ad4f-5d92d78c3719", - "numberOfUnits": 0 - }, - { - "leaveTypeID": "34129765-11cb-4d8c-b568-84a2219beda3", - "numberOfUnits": 0 - } - ], - "superannuationLines": [ - { - "superannuationTypeID": "563273ea-0dae-4f82-86a4-e0db77c008ea", - "displayName": "KiwiSaver", - "amount": 4.86, - "fixedAmount": null, - "percentage": 3, - "manualAdjustment": false - } - ], - "paymentLines": [ - { - "paymentLineID": "a300f7c3-e934-4e67-84c5-d8687cf4a2b4", - "amount": 137.88, - "accountNumber": "0607050201419000", - "sortCode": null, - "accountName": "Casual Worker" - } - ], - "employeeTaxLines": [ - { - "taxLineID": "1d7c6670-c227-4de9-a7fc-fbf7ec16a804", - "description": null, - "amount": 19.26, - "globalTaxTypeID": 11, - "manualAdjustment": false - } - ], - "employerTaxLines": [ - { - "taxLineID": "b790f489-9bbf-4979-a987-53dddf8b648f", - "description": null, - "amount": 0.7, - "globalTaxTypeID": 10, - "manualAdjustment": false - } - ], - "statutoryDeductionLines": [ - { - "statutoryDeductionTypeID": "b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3", - "amount": 4.86, - "fixedAmount": null, - "manualAdjustment": null - } - ], - "taxSettings": { - "periodUnits": 1.0, - "periodType": "weeks", - "taxCode": "M", - "specialTaxRate": null, - "lumpSumTaxCode": "SB", - "lumpSumAmount": null - }, - "grossEarningsHistory": { - "daysPaid": 1, - "unpaidWeeks": 0 - } - } - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-28T22:55:59.3854985 + httpStatusCode: OK + pagination: null + problem: null + paySlip: + paySlipID: 17d88883-686a-400f-9551-34fa366effc4 + employeeID: 68342973-c405-4b86-b5d3-d7b877c27995 + payRunID: be103bd8-321b-419f-8177-48280560771a + lastEdited: 2019-09-23T02:13:29 + firstName: Tony + lastName: Starkmzamlagmdison + totalEarnings: 162 + grossEarnings: 162 + totalPay: 137.88 + totalEmployerTaxes: 0.7 + totalEmployeeTaxes: 19.26 + totalDeductions: 0 + totalReimbursements: 0 + totalStatutoryDeductions: 4.86 + totalSuperannuation: 4.86 + bacsHash: null + paymentMethod: Electronically + earningsLines: + - earningsLineID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + displayName: Ordinary Time + ratePerUnit: 25 + numberOfUnits: 6 + fixedAmount: null + amount: 150 + isLinkedToTimesheet: false + isAverageDailyPayRate: null + isSystemGenerated: true + leaveEarningsLines: + - earningsLineID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6 + earningsRateID: 39b3560a-5d2f-4538-924a-4349dc86396e + displayName: Holiday Pay + ratePerUnit: null + numberOfUnits: null + fixedAmount: 12 + amount: 12 + isLinkedToTimesheet: false + isAverageDailyPayRate: null + isSystemGenerated: true + timesheetEarningsLines: [] + deductionLines: [] + reimbursementLines: [] + leaveAccrualLines: + - leaveTypeID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6 + numberOfUnits: 12 + - leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4 + numberOfUnits: 0 + - leaveTypeID: f2f994cf-1899-46f3-ad4f-5d92d78c3719 + numberOfUnits: 0 + - leaveTypeID: 34129765-11cb-4d8c-b568-84a2219beda3 + numberOfUnits: 0 + superannuationLines: + - superannuationTypeID: 563273ea-0dae-4f82-86a4-e0db77c008ea + displayName: KiwiSaver + amount: 4.86 + fixedAmount: null + percentage: 3 + manualAdjustment: false + paymentLines: + - paymentLineID: a300f7c3-e934-4e67-84c5-d8687cf4a2b4 + amount: 137.88 + accountNumber: "0607050201419000" + sortCode: null + accountName: Casual Worker + employeeTaxLines: + - taxLineID: 1d7c6670-c227-4de9-a7fc-fbf7ec16a804 + description: null + amount: 19.26 + globalTaxTypeID: 11 + manualAdjustment: false + employerTaxLines: + - taxLineID: b790f489-9bbf-4979-a987-53dddf8b648f + description: null + amount: 0.7 + globalTaxTypeID: 10 + manualAdjustment: false + statutoryDeductionLines: + - statutoryDeductionTypeID: b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3 + amount: 4.86 + fixedAmount: null + manualAdjustment: null + taxSettings: + periodUnits: 1.0 + periodType: weeks + taxCode: M + specialTaxRate: null + lumpSumTaxCode: SB + lumpSumAmount: null + grossEarningsHistory: + daysPaid: 1 + unpaidWeeks: 0 put: security: - - OAuth2: [payroll.payslip] + - OAuth2: + - payroll.payslip tags: - PayrollNz operationId: updatePaySlipLineItems @@ -5993,44 +5708,44 @@ paths: keyPascal: EarningsLineID keySnake: earnings_line_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: earningsLine - earningsRateID: key: earningsRateID keyPascal: EarningsRateID keySnake: earnings_rate_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: earningsLine - ratePerUnit: key: ratePerUnit keyPascal: RatePerUnit keySnake: rate_per_unit - nonString: true + nonString: true default: 14.25 - is_money: true + is_money: true object: earningsLine - numberOfUnits: key: numberOfUnits keyPascal: NumberOfUnits keySnake: number_of_units default: 35.50 - nonString: true - is_money: true + nonString: true + is_money: true object: earningsLine - isAverageDailyPayRate: key: isAverageDailyPayRate keyPascal: IsAverageDailyPayRate keySnake: is_average_daily_pay_rate - nonString: true - default: true + nonString: true + default: true object: earningsLine - isSystemGenerated: key: isSystemGenerated keyPascal: IsSystemGenerated keySnake: is_system_generated - default: true - nonString: true + default: true + nonString: true is_last: true object: earningsLine - earningsLines: @@ -6065,7 +5780,7 @@ paths: default: earningsLines python: earnings_lines ruby: earnings_lines - object: paySlip + object: paySlip summary: Creates an employee pay slip parameters: - $ref: '#/components/parameters/idempotencyKey' @@ -6078,173 +5793,132 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PaySlipObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-09-10T17:20:24.2970169", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "paySlip": { - "paySlipID": "51a01760-cf9d-4ba1-bf3a-2065d4f8e073", - "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", - "payRunID": "8ba9831d-38e4-43d4-808e-472a5d195bce", - "lastEdited": "2020-09-10T17:20:23.7335017", - "firstName": "Tony", - "lastName": "Starkwpjgdjxdvwson", - "totalEarnings": 3628.8, - "grossEarnings": 3628.8, - "totalPay": 2362.72, - "totalEmployerTaxes": 18.9, - "totalEmployeeTaxes": 1057.22, - "totalDeductions": 100, - "totalReimbursements": 0, - "totalStatutoryDeductions": 108.86, - "totalSuperannuation": 108.86, - "bacsHash": null, - "paymentMethod": "Electronically", - "earningsLines": [ - { - "earningsLineID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "displayName": "Ordinary Time", - "ratePerUnit": 25, - "numberOfUnits": 0, - "fixedAmount": null, - "amount": 0, - "isLinkedToTimesheet": false, - "isAverageDailyPayRate": null, - "isSystemGenerated": true - }, - { - "earningsLineID": "65b83d94-f20f-45e1-85ae-387fcf460c26", - "earningsRateID": "65b83d94-f20f-45e1-85ae-387fcf460c26", - "displayName": "Salary", - "ratePerUnit": 0, - "numberOfUnits": 8, - "fixedAmount": null, - "amount": 0, - "isLinkedToTimesheet": false, - "isAverageDailyPayRate": null, - "isSystemGenerated": false - } - ], - "leaveEarningsLines": [ - { - "earningsLineID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", - "earningsRateID": "39b3560a-5d2f-4538-924a-4349dc86396e", - "displayName": "Holiday Pay", - "ratePerUnit": null, - "numberOfUnits": null, - "fixedAmount": 268.8, - "amount": 268.8, - "isLinkedToTimesheet": false, - "isAverageDailyPayRate": null, - "isSystemGenerated": true - } - ], - "timesheetEarningsLines": [], - "deductionLines": [ - { - "deductionTypeID": "a3760fe4-68a4-4e38-8326-fe616af7dc74", - "displayName": "KiwiSaver Voluntary Contributions", - "amount": 100, - "subjectToTax": null, - "percentage": null - } - ], - "reimbursementLines": [], - "leaveAccrualLines": [ - { - "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", - "numberOfUnits": 268.8 - }, - { - "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", - "numberOfUnits": 0 - }, - { - "leaveTypeID": "f2f994cf-1899-46f3-ad4f-5d92d78c3719", - "numberOfUnits": 0 - }, - { - "leaveTypeID": "34129765-11cb-4d8c-b568-84a2219beda3", - "numberOfUnits": 0 - } - ], - "superannuationLines": [ - { - "superannuationTypeID": "563273ea-0dae-4f82-86a4-e0db77c008ea", - "displayName": "KiwiSaver", - "amount": 108.86, - "fixedAmount": 3, - "percentage": 3, - "manualAdjustment": false - } - ], - "paymentLines": [ - { - "paymentLineID": "6dc42925-2a11-4041-ac9a-4098e77791d5", - "amount": 2262.72, - "accountNumber": "0607050201419000", - "sortCode": null, - "accountName": "Casual Worker" - }, - { - "paymentLineID": "30d6d414-426b-417d-8d0d-d05ca0e5bc88", - "amount": 100, - "accountNumber": "1234448494848373", - "sortCode": null, - "accountName": "test" - } - ], - "employeeTaxLines": [ - { - "taxLineID": "2faf8f5d-6446-4bea-a2cd-d5cd7e8b9384", - "description": null, - "amount": 1057.22, - "globalTaxTypeID": 11, - "manualAdjustment": false - } - ], - "employerTaxLines": [ - { - "taxLineID": "caa8d4fa-0949-460d-90f5-f43ec9f3db12", - "description": null, - "amount": 18.9, - "globalTaxTypeID": 10, - "manualAdjustment": false - } - ], - "statutoryDeductionLines": [ - { - "statutoryDeductionTypeID": "b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3", - "amount": 108.86, - "fixedAmount": null, - "manualAdjustment": null - } - ], - "taxSettings": { - "periodUnits": 1.0, - "periodType": "weeks", - "taxCode": "M", - "specialTaxRate": null, - "lumpSumTaxCode": "SB", - "lumpSumAmount": null - }, - "grossEarningsHistory": { - "daysPaid": 3, - "unpaidWeeks": 0 - } - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-09-10T17:20:24.2970169 + httpStatusCode: OK + pagination: null + problem: null + paySlip: + paySlipID: 51a01760-cf9d-4ba1-bf3a-2065d4f8e073 + employeeID: 68342973-c405-4b86-b5d3-d7b877c27995 + payRunID: 8ba9831d-38e4-43d4-808e-472a5d195bce + lastEdited: 2020-09-10T17:20:23.7335017 + firstName: Tony + lastName: Starkwpjgdjxdvwson + totalEarnings: 3628.8 + grossEarnings: 3628.8 + totalPay: 2362.72 + totalEmployerTaxes: 18.9 + totalEmployeeTaxes: 1057.22 + totalDeductions: 100 + totalReimbursements: 0 + totalStatutoryDeductions: 108.86 + totalSuperannuation: 108.86 + bacsHash: null + paymentMethod: Electronically + earningsLines: + - earningsLineID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + displayName: Ordinary Time + ratePerUnit: 25 + numberOfUnits: 0 + fixedAmount: null + amount: 0 + isLinkedToTimesheet: false + isAverageDailyPayRate: null + isSystemGenerated: true + - earningsLineID: 65b83d94-f20f-45e1-85ae-387fcf460c26 + earningsRateID: 65b83d94-f20f-45e1-85ae-387fcf460c26 + displayName: Salary + ratePerUnit: 0 + numberOfUnits: 8 + fixedAmount: null + amount: 0 + isLinkedToTimesheet: false + isAverageDailyPayRate: null + isSystemGenerated: false + leaveEarningsLines: + - earningsLineID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6 + earningsRateID: 39b3560a-5d2f-4538-924a-4349dc86396e + displayName: Holiday Pay + ratePerUnit: null + numberOfUnits: null + fixedAmount: 268.8 + amount: 268.8 + isLinkedToTimesheet: false + isAverageDailyPayRate: null + isSystemGenerated: true + timesheetEarningsLines: [] + deductionLines: + - deductionTypeID: a3760fe4-68a4-4e38-8326-fe616af7dc74 + displayName: KiwiSaver Voluntary Contributions + amount: 100 + subjectToTax: null + percentage: null + reimbursementLines: [] + leaveAccrualLines: + - leaveTypeID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6 + numberOfUnits: 268.8 + - leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4 + numberOfUnits: 0 + - leaveTypeID: f2f994cf-1899-46f3-ad4f-5d92d78c3719 + numberOfUnits: 0 + - leaveTypeID: 34129765-11cb-4d8c-b568-84a2219beda3 + numberOfUnits: 0 + superannuationLines: + - superannuationTypeID: 563273ea-0dae-4f82-86a4-e0db77c008ea + displayName: KiwiSaver + amount: 108.86 + fixedAmount: 3 + percentage: 3 + manualAdjustment: false + paymentLines: + - paymentLineID: 6dc42925-2a11-4041-ac9a-4098e77791d5 + amount: 2262.72 + accountNumber: "0607050201419000" + sortCode: null + accountName: Casual Worker + - paymentLineID: 30d6d414-426b-417d-8d0d-d05ca0e5bc88 + amount: 100 + accountNumber: "1234448494848373" + sortCode: null + accountName: test + employeeTaxLines: + - taxLineID: 2faf8f5d-6446-4bea-a2cd-d5cd7e8b9384 + description: null + amount: 1057.22 + globalTaxTypeID: 11 + manualAdjustment: false + employerTaxLines: + - taxLineID: caa8d4fa-0949-460d-90f5-f43ec9f3db12 + description: null + amount: 18.9 + globalTaxTypeID: 10 + manualAdjustment: false + statutoryDeductionLines: + - statutoryDeductionTypeID: b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3 + amount: 108.86 + fixedAmount: null + manualAdjustment: null + taxSettings: + periodUnits: 1.0 + periodType: weeks + taxCode: M + specialTaxRate: null + lumpSumTaxCode: SB + lumpSumAmount: null + grossEarningsHistory: + daysPaid: 3 + unpaidWeeks: 0 + "400": description: validation error for a bad request content: application/json: @@ -6256,191 +5930,150 @@ paths: application/json: schema: $ref: '#/components/schemas/PaySlip' - example: { - "earningsLines": [ - { - "earningsLineID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "displayName": "Ordinary Time", - "ratePerUnit": 25, - "numberOfUnits": 0, - "amount": 0, - "isLinkedToTimesheet": false, - "isSystemGenerated": true - }, - { - "earningsLineID": "65b83d94-f20f-45e1-85ae-387fcf460c26", - "earningsRateID": "65b83d94-f20f-45e1-85ae-387fcf460c26", - "displayName": "Salary", - "ratePerUnit": 0, - "numberOfUnits": 8, - "amount": 0, - "isLinkedToTimesheet": false, - "isSystemGenerated": false - } - ], - "leaveEarningsLines": [ - { - "earningsLineID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", - "earningsRateID": "39b3560a-5d2f-4538-924a-4349dc86396e", - "displayName": "Holiday Pay", - "fixedAmount": 268.8, - "amount": 268.8, - "isLinkedToTimesheet": false, - "isSystemGenerated": true - } - ], - "deductionLines": [ - { - "deductionTypeID": "a3760fe4-68a4-4e38-8326-fe616af7dc74", - "amount": 100 - } - ], - "leaveAccrualLines": [ - { - "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6", - "numberOfUnits": 268.8 - }, - { - "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", - "numberOfUnits": 0 - }, - { - "leaveTypeID": "f2f994cf-1899-46f3-ad4f-5d92d78c3719", - "numberOfUnits": 0 - }, - { - "leaveTypeID": "34129765-11cb-4d8c-b568-84a2219beda3", - "numberOfUnits": 0 - } - ], - "superannuationLines": [ - { - "superannuationTypeID": "563273ea-0dae-4f82-86a4-e0db77c008ea", - "displayName": "KiwiSaver", - "amount": 108.86, - "fixedAmount": 3, - "percentage": 3, - "manualAdjustment": false - } - ], - "employeeTaxLines": [ - { - "taxLineID": "1084146b-e890-489c-aed3-06de80f63d84", - "amount": 1057.22, - "globalTaxTypeID": "11", - "manualAdjustment": false - } - ], - "employerTaxLines": [ - { - "taxLineID": "6f9eb8cd-0f4a-440b-939c-bdb0f6ad694c", - "amount": 18.9, - "globalTaxTypeID": "10", - "manualAdjustment": false - } - ], - "statutoryDeductionLines": [ - { - "statutoryDeductionTypeID": "b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3", - "amount": 108.86 - } - ], - "grossEarningsHistory": { - "daysPaid": 3, - "unpaidWeeks": 0 - } - } + example: + earningsLines: + - earningsLineID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5 + displayName: Ordinary Time + ratePerUnit: 25 + numberOfUnits: 0 + amount: 0 + isLinkedToTimesheet: false + isSystemGenerated: true + - earningsLineID: 65b83d94-f20f-45e1-85ae-387fcf460c26 + earningsRateID: 65b83d94-f20f-45e1-85ae-387fcf460c26 + displayName: Salary + ratePerUnit: 0 + numberOfUnits: 8 + amount: 0 + isLinkedToTimesheet: false + isSystemGenerated: false + leaveEarningsLines: + - earningsLineID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6 + earningsRateID: 39b3560a-5d2f-4538-924a-4349dc86396e + displayName: Holiday Pay + fixedAmount: 268.8 + amount: 268.8 + isLinkedToTimesheet: false + isSystemGenerated: true + deductionLines: + - deductionTypeID: a3760fe4-68a4-4e38-8326-fe616af7dc74 + amount: 100 + leaveAccrualLines: + - leaveTypeID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6 + numberOfUnits: 268.8 + - leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4 + numberOfUnits: 0 + - leaveTypeID: f2f994cf-1899-46f3-ad4f-5d92d78c3719 + numberOfUnits: 0 + - leaveTypeID: 34129765-11cb-4d8c-b568-84a2219beda3 + numberOfUnits: 0 + superannuationLines: + - superannuationTypeID: 563273ea-0dae-4f82-86a4-e0db77c008ea + displayName: KiwiSaver + amount: 108.86 + fixedAmount: 3 + percentage: 3 + manualAdjustment: false + employeeTaxLines: + - taxLineID: 1084146b-e890-489c-aed3-06de80f63d84 + amount: 1057.22 + globalTaxTypeID: "11" + manualAdjustment: false + employerTaxLines: + - taxLineID: 6f9eb8cd-0f4a-440b-939c-bdb0f6ad694c + amount: 18.9 + globalTaxTypeID: "10" + manualAdjustment: false + statutoryDeductionLines: + - statutoryDeductionTypeID: b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3 + amount: 108.86 + grossEarningsHistory: + daysPaid: 3 + unpaidWeeks: 0 /Settings: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollNz operationId: getSettings x-hasPayrollUkProblem: true summary: Retrieves settings responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Settings' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-28T22:18:40.4518638", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "settings": { - "accounts": [ - { - "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", - "type": "PAYELIABILITY", - "code": "825", - "name": "PAYE Payable" - }, - { - "accountID": "e529775e-ea49-4a19-86f0-8d3e1ecda2cd", - "type": "WAGESPAYABLE", - "code": "814", - "name": "Wages Payable - Payroll" - }, - { - "accountID": "1c91e520-a12b-45cc-8194-99950858e5bf", - "type": "WAGESEXPENSE", - "code": "477", - "name": "Salaries" - }, - { - "accountID": "ac993f75-035b-433c-82e0-7b7a2d40802c", - "type": "BANK", - "code": "090", - "name": "Business Bank Account" - } - ] - } - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-28T22:18:40.4518638 + httpStatusCode: OK + pagination: null + problem: null + settings: + accounts: + - accountID: fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488 + type: PAYELIABILITY + code: "825" + name: PAYE Payable + - accountID: e529775e-ea49-4a19-86f0-8d3e1ecda2cd + type: WAGESPAYABLE + code: "814" + name: Wages Payable - Payroll + - accountID: 1c91e520-a12b-45cc-8194-99950858e5bf + type: WAGESEXPENSE + code: "477" + name: Salaries + - accountID: ac993f75-035b-433c-82e0-7b7a2d40802c + type: BANK + code: "090" + name: Business Bank Account /Settings/TrackingCategories: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollNz operationId: getTrackingCategories x-hasPayrollUkProblem: true summary: Retrieves tracking categories responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/TrackingCategories' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-28T22:18:50.0075482", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "trackingCategories": { - "employeeGroupsTrackingCategoryID": "351953c4-8127-4009-88c3-f9cd8c9cbe9f", - "timesheetTrackingCategoryID": "f8c0b291-be04-497a-a083-dd9cd19658b5" - } - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-28T22:18:50.0075482 + httpStatusCode: OK + pagination: null + problem: null + trackingCategories: + employeeGroupsTrackingCategoryID: 351953c4-8127-4009-88c3-f9cd8c9cbe9f + timesheetTrackingCategoryID: f8c0b291-be04-497a-a083-dd9cd19658b5 /Employees/{EmployeeID}/Working-Patterns: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollNz operationId: getEmployeeWorkingPatterns @@ -6452,43 +6085,37 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeWorkingPatternsObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-24T20:16:15.3542191", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 2 - }, - "problem": null, - "payeeWorkingPatterns": [ - { - "payeeWorkingPatternID": "d0a325df-c9d5-4246-9e95-5172328a729b", - "effectiveFrom": "2020-01-01T00:00:00" - }, - { - "payeeWorkingPatternID": "af50c5d4-a0f5-4306-ad61-8505b8ec6286", - "effectiveFrom": "2024-07-09T00:00:00" - } - ] - } - post: + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-24T20:16:15.3542191 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 2 + problem: null + payeeWorkingPatterns: + - payeeWorkingPatternID: d0a325df-c9d5-4246-9e95-5172328a729b + effectiveFrom: 2020-01-01T00:00:00 + - payeeWorkingPatternID: af50c5d4-a0f5-4306-ad61-8505b8ec6286 + effectiveFrom: 2024-07-09T00:00:00 + post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollNz operationId: createEmployeeWorkingPattern @@ -6501,13 +6128,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - workingWeek: key: workingWeek keyPascal: WorkingWeek @@ -6518,51 +6145,51 @@ paths: keyPascal: monday keySnake: monday default: 8 - nonString: true + nonString: true object: workingWeek - tuesday: key: tuesday keyPascal: tuesday keySnake: tuesday default: 8 - nonString: true + nonString: true object: workingWeek - wednesday: key: wednesday keyPascal: wednesday keySnake: wednesday default: 8 - nonString: true + nonString: true object: workingWeek - thursday: key: thursday keyPascal: thursday keySnake: thursday default: 8 - nonString: true + nonString: true object: workingWeek - friday: key: friday keyPascal: friday keySnake: friday default: 8 - nonString: true + nonString: true object: workingWeek - saturday: key: saturday keyPascal: saturday keySnake: saturday default: 0 - nonString: true + nonString: true object: workingWeek - sunday: key: sunday keyPascal: sunday keySnake: sunday default: 0 - nonString: true + nonString: true object: workingWeek - is_last: true + is_last: true summary: Creates an employee working pattern parameters: - $ref: '#/components/parameters/idempotencyKey' @@ -6571,41 +6198,36 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: employee working pattern correctly added content: application/json: schema: $ref: '#/components/schemas/EmployeeWorkingPatternWithWorkingWeeksObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-24T20:53:58.8624623", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "payeeWorkingPattern": { - "payeeWorkingPatternID": "d0a325df-c9d5-4246-9e95-5172328a729b", - "effectiveFrom": "2020-01-01T00:00:00", - "workingWeeks": [ - { - "monday": 0.0, - "tuesday": 3.0000, - "wednesday": 0.0, - "thursday": 0.0, - "friday": 0.0, - "saturday": 0.0, - "sunday": 0.0 - } - ] - } - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-24T20:53:58.8624623 + httpStatusCode: OK + pagination: null + problem: null + payeeWorkingPattern: + payeeWorkingPatternID: d0a325df-c9d5-4246-9e95-5172328a729b + effectiveFrom: 2020-01-01T00:00:00 + workingWeeks: + - monday: 0.0 + tuesday: 3.0000 + wednesday: 0.0 + thursday: 0.0 + friday: 0.0 + saturday: 0.0 + sunday: 0.0 + "400": description: validation error for a bad request content: application/json: @@ -6617,26 +6239,24 @@ paths: application/json: schema: $ref: '#/components/schemas/EmployeeWorkingPatternWithWorkingWeeksRequest' - example: { - "effectiveFrom": "2020-01-01T00:00:00", - "workingWeeks": [ - { - "monday": 0.0, - "tuesday": 3.0000, - "wednesday": 0.0, - "thursday": 0.0, - "friday": 0.0, - "saturday": 0.0, - "sunday": 0.0 - } - ] - } + example: + effectiveFrom: 2020-01-01T00:00:00 + workingWeeks: + - monday: 0.0 + tuesday: 3.0000 + wednesday: 0.0 + thursday: 0.0 + friday: 0.0 + saturday: 0.0 + sunday: 0.0 /Employees/{EmployeeID}/Working-Patterns/{EmployeeWorkingPatternID}: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollNz operationId: getEmployeeWorkingPattern @@ -6648,7 +6268,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -6657,43 +6277,39 @@ paths: in: path required: true description: Employee working pattern id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09f3b118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeWorkingPatternWithWorkingWeeksObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-24T20:16:15.3542191", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "payeeWorkingPattern": { - "payeeWorkingPatternID": "d0a325df-c9d5-4246-9e95-5172328a729b", - "effectiveFrom": "2020-01-01T00:00:00", - "workingWeeks": [ - { - "monday": 0.0, - "tuesday": 3.0000, - "wednesday": 0.0, - "thursday": 0.0, - "friday": 0.0, - "saturday": 0.0, - "sunday": 0.0 - } - ] - } - } + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-24T20:16:15.3542191 + httpStatusCode: OK + pagination: null + problem: null + payeeWorkingPattern: + payeeWorkingPatternID: d0a325df-c9d5-4246-9e95-5172328a729b + effectiveFrom: 2020-01-01T00:00:00 + workingWeeks: + - monday: 0.0 + tuesday: 3.0000 + wednesday: 0.0 + thursday: 0.0 + friday: 0.0 + saturday: 0.0 + sunday: 0.0 delete: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollNz operationId: deleteEmployeeWorkingPattern @@ -6705,7 +6321,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -6714,26 +6330,25 @@ paths: in: path required: true description: Employee working pattern id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09f3b118db9c responses: - '200': + "200": description: successful response content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveObject' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-26T22:11:10.809249", - "httpStatusCode": "OK", - "pagination": null, - "problem": null - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-08-26T22:11:10.809249 + httpStatusCode: OK + pagination: null + problem: null + "400": description: validation error for a bad request content: application/json: @@ -6744,10 +6359,10 @@ components: OAuth2: type: oauth2 description: For more information visit https://developer.xero.com/documentation/oauth2/overview - flows: + flows: authorizationCode: - authorizationUrl: 'https://login.xero.com/identity/connect/authorize' - tokenUrl: 'https://identity.xero.com/connect/token' + authorizationUrl: https://login.xero.com/identity/connect/authorize + tokenUrl: https://identity.xero.com/connect/token scopes: payroll.employees: Grant read-write access to payroll employees payroll.employees.read: Grant read-only access to payroll employees @@ -6760,20 +6375,20 @@ components: payroll.timesheets: Grant read-write access to payroll timesheets payroll.timesheets.read: Grant read-only access to payroll timesheets parameters: - requiredHeader: + requiredHeader: in: header name: Xero-Tenant-Id x-snake: xero_tenant_id description: Xero identifier for Tenant schema: type: string - required: true + required: true idempotencyKey: in: header name: Idempotency-Key x-snake: idempotency_key description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. - example: "KEY_VALUE" + example: KEY_VALUE schema: type: string schemas: @@ -6795,8 +6410,8 @@ components: description: The object returned for a bad request type: object properties: - type: - description: The type of error format + type: + description: The type of error format type: string example: application/problem+json title: @@ -6804,14 +6419,14 @@ components: type: string example: BadRequest status: - description: The error status code + description: The error status code type: string example: 400 detail: description: A description of the error type: string example: Validation error occurred. - instance: + instance: type: string invalidFields: type: array @@ -6827,7 +6442,7 @@ components: reason: description: The reason the error occurred type: string - example: The Date of Birth is required. + example: The Date of Birth is required. Employees: type: object properties: @@ -6857,7 +6472,7 @@ components: - address properties: employeeID: - description: Xero unique identifier for the employee + description: Xero unique identifier for the employee type: string format: uuid example: d90457c4-f1be-4f2e-b4e3-f766390a7e30 @@ -6877,8 +6492,8 @@ components: description: Date of birth of the employee (YYYY-MM-DD) type: string format: date - example: 2019-01-02 - x-is-date: true + example: 2019-01-02 + x-is-date: true address: $ref: '#/components/schemas/Address' email: @@ -6889,8 +6504,8 @@ components: description: The employee’s gender type: string enum: - - M - - F + - M + - F example: F phoneNumber: description: Employee phone number @@ -6964,7 +6579,7 @@ components: description: Start date of the employment (YYYY-MM-DD) type: string format: date - x-is-date: true + x-is-date: true engagementType: description: Engagement type of the employee type: string @@ -7002,7 +6617,7 @@ components: hasSpecialStudentLoanRate: description: Does the employee has a special student loan rate? type: boolean - example: true + example: true specialStudentLoanRatePercentage: description: The employee student loan rate percentage. type: number @@ -7012,7 +6627,7 @@ components: isEligibleForKiwiSaver: description: The employee eligibility for KiwiSaver. type: boolean - example: true + example: true esctRatePercentage: description: Employer superannuation contribution tax rate. type: number @@ -7024,11 +6639,11 @@ components: type: string example: MakeContributions enum: - - MakeContributions - - OptOut - - OnAContributionsHoliday - - OnASavingsSuspension - - NotCurrentlyAKiwiSaverMember + - MakeContributions + - OptOut + - OnAContributionsHoliday + - OnASavingsSuspension + - NotCurrentlyAKiwiSaverMember kiwiSaverEmployeeContributionRatePercentage: description: Employee Contribution percentage. type: number @@ -7040,7 +6655,7 @@ components: type: number format: double x-is-money: true - example: 10.0 + example: 10.0 kiwiSaverEmployerSalarySacrificeContributionRatePercentage: description: Employer Contribution through Salary Sacrifice percentage. type: number @@ -7051,14 +6666,14 @@ components: description: Opt Out Date. type: string format: date - x-is-date: true - example: "2020-06-01T00:00:00" + x-is-date: true + example: 2020-06-01T00:00:00 kiwiSaverContributionHolidayEndDate: description: Contribution holiday expiry date or end date. type: string format: date - x-is-date: true - example: "2019-06-01T00:00:00" + x-is-date: true + example: 2019-06-01T00:00:00 hasStudentLoanBalance: description: Does the employee have a remaining student loan balance? Set a remaining balance if you have received a letter from IR. type: boolean @@ -7073,31 +6688,31 @@ components: description: The date of the letter from IR. type: string format: date - x-is-date: true - example: "2020-07-01T00:00:00" + x-is-date: true + example: 2020-07-01T00:00:00 TaxCode: description: Tax codes used for employee tax type: string enum: - - ND - - M - - ME - - MSL - - MESL - - SB - - S - - SH - - ST - - SBSL - - SSL - - SHSL - - STSL - - WT - - CAE - - EDW - - NSW - - STC - - STCSL + - ND + - M + - ME + - MSL + - MESL + - SB + - S + - SH + - ST + - SBSL + - SSL + - SHSL + - STSL + - WT + - CAE + - EDW + - NSW + - STC + - STCSL EmployeeOpeningBalancesObject: type: object properties: @@ -7120,8 +6735,8 @@ components: description: The opening balance period end date. type: string format: date - x-is-date: true - example: "2020-07-01T00:00:00" + x-is-date: true + example: 2020-07-01T00:00:00 daysPaid: description: The paid number of days. type: integer @@ -7175,15 +6790,15 @@ components: description: The description of the leave (max length = 50) type: string startDate: - description: Start date of the leave (YYYY-MM-DD) + description: Start date of the leave (YYYY-MM-DD) type: string format: date - x-is-date: true + x-is-date: true endDate: - description: End date of the leave (YYYY-MM-DD) + description: End date of the leave (YYYY-MM-DD) type: string format: date - x-is-date: true + x-is-date: true periods: description: The leave period information. The StartDate, EndDate and NumberOfUnits needs to be specified when you do not want to calculate NumberOfUnits automatically. Using incorrect period StartDate and EndDate will result in automatic computation of the NumberOfUnits. type: array @@ -7212,12 +6827,12 @@ components: description: The Pay Period Start Date (YYYY-MM-DD) type: string format: date - x-is-date: true + x-is-date: true periodEndDate: - description: The Pay Period End Date (YYYY-MM-DD) + description: The Pay Period End Date (YYYY-MM-DD) type: string format: date - x-is-date: true + x-is-date: true numberOfUnits: description: The Number of Units for the leave type: number @@ -7227,8 +6842,8 @@ components: description: Period Status type: string enum: - - Approved - - Completed + - Approved + - Completed EmployeeLeaveBalances: type: object properties: @@ -7244,7 +6859,7 @@ components: type: object properties: name: - description: Name of the leave type. + description: Name of the leave type. type: string example: Holiday leaveTypeID: @@ -7272,15 +6887,15 @@ components: EmployeeStatutoryLeaveBalance: type: object properties: - leaveType: + leaveType: description: The type of statutory leave type: string enum: - - Sick - - Adoption - - Maternity - - Paternity - - Sharedparental + - Sick + - Adoption + - Maternity + - Paternity + - Sharedparental balanceRemaining: description: The balance remaining for the corresponding leave type as of specified date. type: number @@ -7290,7 +6905,7 @@ components: description: The units will be "Hours" type: string enum: - - Hours + - Hours EmployeeStatutoryLeavesSummaries: type: object properties: @@ -7306,11 +6921,11 @@ components: type: object properties: statutoryLeaveID: - description: The unique identifier (guid) of a statutory leave. + description: The unique identifier (guid) of a statutory leave. type: string format: uuid employeeID: - description: The unique identifier (guid) of the employee + description: The unique identifier (guid) of the employee type: string format: uuid type: @@ -7323,17 +6938,17 @@ components: - Paternity - Sharedparental startDate: - description: The date when the leave starts + description: The date when the leave starts type: string format: date - x-is-date: true - endDate: - description: The date when the leave ends + x-is-date: true + endDate: + description: The date when the leave ends type: string format: date - x-is-date: true + x-is-date: true isEntitled: - description: Whether the leave was entitled to receive payment + description: Whether the leave was entitled to receive payment type: boolean status: description: The status of the leave @@ -7374,61 +6989,61 @@ components: - sufficientNotice properties: statutoryLeaveID: - description: The unique identifier (guid) of a statutory leave + description: The unique identifier (guid) of a statutory leave type: string format: uuid employeeID: - description: The unique identifier (guid) of the employee + description: The unique identifier (guid) of the employee type: string format: uuid leaveTypeID: - description: The unique identifier (guid) of the "Statutory Sick Leave (non-pensionable)" pay item + description: The unique identifier (guid) of the "Statutory Sick Leave (non-pensionable)" pay item type: string format: uuid startDate: - description: The date when the leave starts + description: The date when the leave starts type: string format: date - x-is-date: true + x-is-date: true endDate: - description: The date when the leave ends + description: The date when the leave ends type: string format: date - x-is-date: true + x-is-date: true type: description: the type of statutory leave type: string - example: "Sick" + example: Sick status: description: the type of statutory leave type: string - example: "Pending" + example: Pending workPattern: - description: The days of the work week the employee is scheduled to work at the time the leave is taken + description: The days of the work week the employee is scheduled to work at the time the leave is taken type: array items: type: string isPregnancyRelated: - description: Whether the sick leave was pregnancy related + description: Whether the sick leave was pregnancy related type: boolean sufficientNotice: - description: Whether the employee provided sufficient notice and documentation as required by the employer supporting the sick leave request + description: Whether the employee provided sufficient notice and documentation as required by the employer supporting the sick leave request type: boolean isEntitled: - description: Whether the leave was entitled to receive payment + description: Whether the leave was entitled to receive payment type: boolean entitlementWeeksRequested: - description: The amount of requested time (in weeks) + description: The amount of requested time (in weeks) type: number format: double x-is-money: true entitlementWeeksQualified: - description: The amount of statutory sick leave time off (in weeks) that is available to take at the time the leave was requested + description: The amount of statutory sick leave time off (in weeks) that is available to take at the time the leave was requested type: number format: double x-is-money: true entitlementWeeksRemaining: - description: A calculated amount of time (in weeks) that remains for the statutory sick leave period + description: A calculated amount of time (in weeks) that remains for the statutory sick leave period type: number format: double x-is-money: true @@ -7436,17 +7051,17 @@ components: description: Whether another leave (Paternity, Shared Parental specifically) occurs during the requested leave's period. While this is allowed it could affect payment amounts type: boolean entitlementFailureReasons: - description: If the leave requested was considered "not entitled", the reasons why are listed here. + description: If the leave requested was considered "not entitled", the reasons why are listed here. type: array items: type: string enum: - - UnableToCalculateAwe - - AweLowerThanLel - - NotQualifiedInPreviousPiw - - ExceededMaximumEntitlementWeeksOfSsp - - ExceededMaximumDurationOfPiw - - SufficientNoticeNotGiven + - UnableToCalculateAwe + - AweLowerThanLel + - NotQualifiedInPreviousPiw + - ExceededMaximumEntitlementWeeksOfSsp + - ExceededMaximumDurationOfPiw + - SufficientNoticeNotGiven EmployeeLeaveTypes: type: object properties: @@ -7542,7 +7157,7 @@ components: enum: - AnnuallyAfter6Months - OnAnniversaryDate - - PercentageOfGrossEarnings + - PercentageOfGrossEarnings - NoAccruals hoursAccruedAnnually: description: The number of hours accrued for the leave annually. This is 0 when the scheduleOfAccrual chosen is "OnHourWorked" @@ -7550,12 +7165,12 @@ components: format: double x-is-money: true maximumToAccrue: - description: The maximum number of hours that can be accrued for the leave + description: The maximum number of hours that can be accrued for the leave type: number format: double x-is-money: true openingBalance: - description: The initial number of hours assigned when the leave was added to the employee + description: The initial number of hours assigned when the leave was added to the employee type: number format: double x-is-money: true @@ -7647,22 +7262,22 @@ components: type: string format: uuid ratePerUnit: - description: The rate per unit + description: The rate per unit type: number format: double x-is-money: true numberOfUnits: - description: The rate per unit + description: The rate per unit type: number format: double x-is-money: true fixedAmount: - description: The fixed amount per period + description: The fixed amount per period type: number format: double x-is-money: true earningsRateID: - description: The corresponding earnings rate identifier + description: The corresponding earnings rate identifier type: string format: uuid name: @@ -7707,9 +7322,9 @@ components: description: Superannuations Category type type: string enum: - - KiwiSaver - - ComplyingFund - - Other + - KiwiSaver + - ComplyingFund + - Other liabilityAccountId: description: Xero identifier for Liability Account type: string @@ -7839,17 +7454,17 @@ components: description: Statutory Deduction Category type: string enum: - - PriorityOrder - - NonPriorityOrder - - TableBased - - ChildSupport - - CourtFines - - InlandRevenueArrears - - MsdRepayments - - StudentLoan - - AdditionalStudentLoan - - VoluntaryStudentLoan - - KiwiSaver + - PriorityOrder + - NonPriorityOrder + - TableBased + - ChildSupport + - CourtFines + - InlandRevenueArrears + - MsdRepayments + - StudentLoan + - AdditionalStudentLoan + - VoluntaryStudentLoan + - KiwiSaver EarningsOrders: type: object properties: @@ -8023,7 +7638,7 @@ components: description: UTC timestamp of last update to the leave type note type: string format: date-time - x-is-datetime: true + x-is-datetime: true isActive: description: Shows whether the leave type is active or not type: boolean @@ -8087,7 +7702,7 @@ components: standardTypeOfUnits: description: Optional Type Of Units. Applicable when calculation type is Rate Per Unit type: string - enum: + enum: - Hours - km standardRatePerUnit: @@ -8126,25 +7741,25 @@ components: timesheetID: description: The Xero identifier for a Timesheet type: string - format: uuid + format: uuid payrollCalendarID: description: The Xero identifier for the Payroll Calendar that the Timesheet applies to type: string - format: uuid + format: uuid employeeID: description: The Xero identifier for the Employee that the Timesheet is for type: string - format: uuid + format: uuid startDate: description: The Start Date of the Timesheet period (YYYY-MM-DD) type: string - format: date - x-is-date: true + format: date + x-is-date: true endDate: description: The End Date of the Timesheet period (YYYY-MM-DD) type: string - format: date - x-is-date: true + format: date + x-is-date: true status: description: Status of the timesheet type: string @@ -8188,20 +7803,20 @@ components: timesheetLineID: description: The Xero identifier for a Timesheet Line type: string - format: uuid + format: uuid date: description: The Date that this Timesheet Line is for (YYYY-MM-DD) type: string - format: date - x-is-date: true + format: date + x-is-date: true earningsRateID: description: The Xero identifier for the Earnings Rate that the Timesheet is for type: string - format: uuid + format: uuid trackingItemID: description: The Xero identifier for the Tracking Item that the Timesheet is for type: string - format: uuid + format: uuid numberOfUnits: description: The Number of Units of the Timesheet Line type: number @@ -8238,7 +7853,7 @@ components: payrollCalendarID: description: Xero unique identifier for the payroll calendar type: string - format: uuid + format: uuid name: description: Name of the calendar type: string @@ -8248,22 +7863,22 @@ components: description: Period start date of the calendar type: string format: date - x-is-date: true + x-is-date: true periodEndDate: description: Period end date of the calendar type: string format: date - x-is-date: true + x-is-date: true paymentDate: description: Payment date of the calendar type: string format: date - x-is-date: true + x-is-date: true updatedDateUTC: description: UTC timestamp of the last update to the pay run calendar type: string format: date-time - x-is-datetime: true + x-is-datetime: true PaymentMethodObject: type: object properties: @@ -8321,11 +7936,11 @@ components: salaryAndWagesID: description: Xero unique identifier for a salary and wages record type: string - format: uuid + format: uuid earningsRateID: description: Xero unique identifier for an earnings rate type: string - format: uuid + format: uuid numberOfUnitsPerWeek: description: The Number of Units per week for the corresponding salary and wages type: number @@ -8340,7 +7955,7 @@ components: description: The Number of Units per day for the corresponding salary and wages type: number format: double - x-is-money: true + x-is-money: true daysPerWeek: description: The days per week for the salary. type: number @@ -8349,8 +7964,8 @@ components: effectiveFrom: description: The effective date of the corresponding salary and wages type: string - format: date - x-is-date: true + format: date + x-is-date: true annualSalary: description: The annual salary type: number @@ -8401,26 +8016,26 @@ components: payRunID: description: Xero unique identifier for the pay run type: string - format: uuid + format: uuid payrollCalendarID: description: Xero unique identifier for the payroll calendar type: string - format: uuid + format: uuid periodStartDate: description: Period start date of the payroll calendar type: string - format: date + format: date x-is-date: true periodEndDate: description: Period end date of the payroll calendar type: string - format: date - x-is-date: true + format: date + x-is-date: true paymentDate: description: Payment date of the pay run type: string - format: date - x-is-date: true + format: date + x-is-date: true totalCost: description: Total cost of the pay run type: number @@ -8435,22 +8050,22 @@ components: description: Pay run status type: string enum: - - Draft - - Posted + - Draft + - Posted payRunType: description: Pay run type type: string enum: - - Scheduled - - Unscheduled - - EarlierYearUpdate + - Scheduled + - Unscheduled + - EarlierYearUpdate calendarType: $ref: '#/components/schemas/CalendarType' postedDateTime: description: Posted date time of the pay run type: string - format: date - x-is-date: true + format: date + x-is-date: true paySlips: type: array items: @@ -8459,13 +8074,13 @@ components: description: Calendar type of the pay run type: string enum: - - Weekly - - Fortnightly - - FourWeekly - - Monthly - - Annual - - Quarterly - - TwiceMonthly + - Weekly + - Fortnightly + - FourWeekly + - Monthly + - Annual + - Quarterly + - TwiceMonthly PaySlipObject: type: object properties: @@ -8492,20 +8107,20 @@ components: paySlipID: description: The Xero identifier for a PaySlip type: string - format: uuid + format: uuid employeeID: description: The Xero identifier for payroll employee type: string - format: uuid + format: uuid payRunID: description: The Xero identifier for the associated payrun type: string - format: uuid + format: uuid lastEdited: description: The date payslip was last updated type: string - format: date - x-is-datetime: true + format: date + x-is-datetime: true firstName: description: Employee first name type: string @@ -8559,7 +8174,7 @@ components: x-is-money: true bacsHash: description: BACS Service User Number - type: string + type: string paymentMethod: description: The payment method code type: string @@ -8607,7 +8222,7 @@ components: earningsRateID: description: Xero identifier for payroll earnings rate type: string - format: uuid + format: uuid displayName: description: name of earnings rate for display in UI type: string @@ -8657,7 +8272,7 @@ components: format: uuid displayName: description: name of earnings rate for display in UI - type: string + type: string ratePerUnit: description: Rate per unit for leave earnings line type: number @@ -8704,7 +8319,7 @@ components: format: uuid displayName: description: name of earnings rate for display in UI - type: string + type: string ratePerUnit: description: Rate per unit for leave earnings line type: number @@ -8747,7 +8362,7 @@ components: format: uuid displayName: description: name of earnings rate for display in UI - type: string + type: string amount: description: The amount of the deduction line type: number @@ -8800,7 +8415,7 @@ components: leaveTypeID: description: Xero identifier for the Leave type type: string - format: uuid + format: uuid numberOfUnits: description: Leave accrual number of units type: number @@ -8816,10 +8431,10 @@ components: superannuationTypeID: description: Xero identifier for payroll superannuation type type: string - format: uuid + format: uuid displayName: description: Benefit display name - type: string + type: string amount: description: The amount of the superannuation line type: number @@ -8837,7 +8452,7 @@ components: x-is-money: true manualAdjustment: description: manual adjustment made - type: boolean + type: boolean PaymentLines: type: array items: @@ -8848,7 +8463,7 @@ components: paymentLineID: description: Xero identifier for payroll payment line type: string - format: uuid + format: uuid amount: description: The amount of the payment line type: number @@ -8859,7 +8474,7 @@ components: type: string sortCode: description: The account sort code - type: string + type: string accountName: description: The account name type: string @@ -8882,10 +8497,10 @@ components: type: number format: double x-is-money: true - globalTaxTypeID: + globalTaxTypeID: description: Tax type ID type: string - manualAdjustment: + manualAdjustment: description: Identifies if the tax line is a manual adjustment type: boolean StatutoryDeductionLines: @@ -8898,7 +8513,7 @@ components: statutoryDeductionTypeID: description: Xero identifier for payroll statutory deduction type type: string - format: uuid + format: uuid amount: description: The amount of the statutory deduction line type: number @@ -8909,7 +8524,7 @@ components: type: number format: double x-is-money: true - manualAdjustment: + manualAdjustment: description: Identifies if the tax line is a manual adjustment type: boolean TaxSettings: @@ -8926,7 +8541,7 @@ components: enum: - weeks - months - example: "weeks" + example: weeks taxCode: $ref: '#/components/schemas/TaxCode' specialTaxRate: @@ -8945,7 +8560,7 @@ components: description: Number of days the employee worked in the pay period (0 - 365) type: integer format: int32 - unpaidWeeks: + unpaidWeeks: description: Number of full weeks the employee didn't work in the pay period (0 - 52) type: integer format: int32 @@ -8971,15 +8586,15 @@ components: accountID: description: The Xero identifier for Settings. type: string - format: uuid + format: uuid type: description: The assigned AccountType type: string enum: - - PAYELIABILITY - - WAGESPAYABLE - - WAGESEXPENSE - - BANK + - PAYELIABILITY + - WAGESPAYABLE + - WAGESEXPENSE + - BANK code: description: A unique 3 digit number for each Account type: string @@ -9136,11 +8751,11 @@ components: payeeWorkingPatternID: description: The Xero identifier for for Employee working pattern type: string - format: uuid + format: uuid effectiveFrom: description: The effective date of the corresponding salary and wages type: string - format: date + format: date x-is-date: true EmployeeWorkingPatterns: type: array @@ -9168,7 +8783,7 @@ components: effectiveFrom: description: The effective date of the corresponding salary and wages type: string - format: date + format: date x-is-date: true workingWeeks: $ref: '#/components/schemas/WorkingWeeks' @@ -9181,7 +8796,7 @@ components: effectiveFrom: description: The effective date of the corresponding salary and wages type: string - format: date + format: date x-is-date: true workingWeeks: $ref: '#/components/schemas/WorkingWeeks' @@ -9193,4 +8808,4 @@ components: problem: $ref: '#/components/schemas/Problem' payeeWorkingPattern: - $ref: '#/components/schemas/EmployeeWorkingPatternWithWorkingWeeks' \ No newline at end of file + $ref: '#/components/schemas/EmployeeWorkingPatternWithWorkingWeeks' diff --git a/xero-payroll-uk.yaml b/xero-payroll-uk.yaml index 10d321bc9..291d42db4 100644 --- a/xero-payroll-uk.yaml +++ b/xero-payroll-uk.yaml @@ -1,13 +1,13 @@ openapi: 3.0.0 info: - version: "6.3.0" - title: 'Xero Payroll UK' - description: 'This is the Xero Payroll API for orgs in the UK region.' - termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" + version: 10.1.0 + title: Xero Payroll UK + description: This is the Xero Payroll API for orgs in the UK region. + termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/ contact: - name: "Xero Platform Team" - email: "api@xero.com" - url: "https://developer.xero.com" + name: Xero Platform Team + email: api@xero.com + url: https://developer.xero.com tags: - name: PayrollUk servers: @@ -17,9 +17,11 @@ paths: /Employees: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollUk operationId: getEmployees @@ -39,105 +41,94 @@ paths: type: integer example: 5 responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Employees' - example: { - "id":"1a14e877-773d-4cd3-b253-f559a4b4be65", - "providerName":"provider-name", - "dateTimeUTC":"2020-03-24T18:43:43.860852", - "httpStatusCode":"OK", - "pagination":{ - "page":1, - "pageSize":100, - "pageCount":1, - "itemCount":3 - }, - "problem":null, - "employees":[ - { - "employeeID":"aad6b292-7b94-408b-93f6-e489867e3fb0", - "firstName":"Jack", - "lastName":"Allan", - "dateOfBirth":"1987-12-23T00:00:00", - "gender":"M", - "email":null, - "phoneNumber":null, - "startDate":"2020-02-03T00:00:00", - "address":{ - "addressLine1":"171 Midsummer Boulevard", - "addressLine2":null, - "city":"Milton Keynes", - "county":null, - "countryName":"UNITED KINGDOM", - "postCode":"MK9 1EB" - }, - "payrollCalendarID":"216d80e6-af55-47b1-b718-9457c3f5d2fe", - "updatedDateUTC":"2020-02-13T16:23:31", - "createdDateUTC":"2020-02-10T10:00:24", - "endDate":null, - "isOffPayrollWorker":false - }, - { - "employeeID":"67e545d4-e8a6-4f98-9f63-85c2383dfe12", - "firstName":"Charlotte", - "lastName":"Danes", - "dateOfBirth":"1993-10-24T00:00:00", - "gender":"F", - "email":null, - "phoneNumber":null, - "startDate":"2020-02-03T00:00:00", - "address":{ - "addressLine1":"171 Midsummer Blvd", - "addressLine2":null, - "city":"Milton Keynes", - "county":null, - "countryName":"UNITED KINGDOM", - "postCode":"MK9 1EB" - }, - "payrollCalendarID":"5e813d9e-949c-461f-8a89-e9ee8955a254", - "updatedDateUTC":"2020-02-13T16:48:51", - "createdDateUTC":"2020-02-13T16:32:12", - "endDate":null, - "isOffPayrollWorker":false - }, - { - "employeeID":"eb4a0c3b-b0d6-440d-bccc-348b7dc92321", - "firstName":"Chelsea", - "lastName":"Serati", - "dateOfBirth":"1976-02-16T00:00:00", - "gender":"F", - "email":null, - "phoneNumber":null, - "startDate":"2019-07-02T00:00:00", - "address":{ - "addressLine1":"171 Midsummer Boulevard", - "addressLine2":null, - "city":"Milton Keynes", - "county":null, - "countryName":"UNITED KINGDOM", - "postCode":"MK9 1EB" - }, - "payrollCalendarID":"d45bc68f-59d6-4000-929d-1058dcfa79e1", - "updatedDateUTC":"2020-02-13T16:53:12", - "createdDateUTC":"2020-02-13T16:46:41", - "endDate":null, - "isOffPayrollWorker":false - } - ] - } - '400': + example: + id: 1a14e877-773d-4cd3-b253-f559a4b4be65 + providerName: provider-name + dateTimeUTC: 2020-03-24T18:43:43.860852 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 3 + problem: null + employees: + - employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + firstName: Jack + lastName: Allan + dateOfBirth: 1987-12-23T00:00:00 + gender: M + email: null + phoneNumber: null + startDate: 2020-02-03T00:00:00 + address: + addressLine1: 171 Midsummer Boulevard + addressLine2: null + city: Milton Keynes + county: null + countryName: UNITED KINGDOM + postCode: MK9 1EB + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + updatedDateUTC: 2020-02-13T16:23:31 + createdDateUTC: 2020-02-10T10:00:24 + endDate: null + isOffPayrollWorker: false + - employeeID: 67e545d4-e8a6-4f98-9f63-85c2383dfe12 + firstName: Charlotte + lastName: Danes + dateOfBirth: 1993-10-24T00:00:00 + gender: F + email: null + phoneNumber: null + startDate: 2020-02-03T00:00:00 + address: + addressLine1: 171 Midsummer Blvd + addressLine2: null + city: Milton Keynes + county: null + countryName: UNITED KINGDOM + postCode: MK9 1EB + payrollCalendarID: 5e813d9e-949c-461f-8a89-e9ee8955a254 + updatedDateUTC: 2020-02-13T16:48:51 + createdDateUTC: 2020-02-13T16:32:12 + endDate: null + isOffPayrollWorker: false + - employeeID: eb4a0c3b-b0d6-440d-bccc-348b7dc92321 + firstName: Chelsea + lastName: Serati + dateOfBirth: 1976-02-16T00:00:00 + gender: F + email: null + phoneNumber: null + startDate: 2019-07-02T00:00:00 + address: + addressLine1: 171 Midsummer Boulevard + addressLine2: null + city: Milton Keynes + county: null + countryName: UNITED KINGDOM + postCode: MK9 1EB + payrollCalendarID: d45bc68f-59d6-4000-929d-1058dcfa79e1 + updatedDateUTC: 2020-02-13T16:53:12 + createdDateUTC: 2020-02-13T16:46:41 + endDate: null + isOffPayrollWorker: false + "400": description: validation error for a bad request content: application/json: schema: $ref: '#/components/schemas/Problem' - post: + post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollUk operationId: createEmployee @@ -151,18 +142,18 @@ paths: object: employee java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2000, Month.OCTOBER, 28)" - java: "LocalDate.of(2000, Month.OCTOBER, 28)" - csharp: "new DateTime(2000, 10, 10)" - php: "new DateTime('2000-10-28')" - node: "'2000-10-28'" - python: "dateutil.parser.parse('2000-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2000, Month.OCTOBER, 28) + java: LocalDate.of(2000, Month.OCTOBER, 28) + csharp: new DateTime(2000, 10, 10) + php: new DateTime('2000-10-28') + node: '''2000-10-28''' + python: dateutil.parser.parse('2000-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - Address: key: address keyPascal: Address keySnake: address - is_object: true + is_object: true - addressLine1: key: addressLine1 keyPascal: AddressLine1 @@ -191,18 +182,18 @@ paths: - employee: key: employee keyPascal: Employee - is_object: true + is_object: true - firstName: key: firstName keyPascal: FirstName - keySnake: first_name - default: "Adam" + keySnake: first_name + default: Adam object: employee - lastName: key: lastName keyPascal: LastName keySnake: last_name - default: "Adamson" + default: Adamson object: employee - dateOfBirth: is_variable: true @@ -223,53 +214,50 @@ paths: default: address python: address ruby: address - object: employee + object: employee summary: Creates employees parameters: - $ref: '#/components/parameters/idempotencyKey' responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeObject' - example: { - "id":"660ff206-fc4a-42f5-8f7d-de886bc2a3d3", - "providerName":"provider-name", - "dateTimeUTC":"2020-03-25T03:12:10.406476", - "httpStatusCode":"OK", - "pagination":null, - "problem":null, - "employee":{ - "employeeID":"316146c7-26a4-4065-b9bd-346d0557ea96", - "title":"Mr", - "firstName":"Mike", - "lastName":"Fancy", - "dateOfBirth":"1999-01-01T00:00:00", - "gender":"M", - "email":"mike@starkindustries.com", - "phoneNumber":null, - "startDate":null, - "nationalInsuranceNumber":null, - "isOffPayrollWorker": false, - "address": { - "addressLine1": "171 Midsummer", - "addressLine2":null, - "city": "Milton Keyness", - "county":null, - "countryName":null, - "postCode": "MK9 1EB" - }, - "payrollCalendarID":null, - "updatedDateUTC":"2020-03-25T03:12:10", - "createdDateUTC":"2020-03-25T03:12:10", - "niCategory":null, - "employeeNumber":null, - "endDate":null - } - } - '400': + example: + id: 660ff206-fc4a-42f5-8f7d-de886bc2a3d3 + providerName: provider-name + dateTimeUTC: 2020-03-25T03:12:10.406476 + httpStatusCode: OK + pagination: null + problem: null + employee: + employeeID: 316146c7-26a4-4065-b9bd-346d0557ea96 + title: Mr + firstName: Mike + lastName: Fancy + dateOfBirth: 1999-01-01T00:00:00 + gender: M + email: mike@starkindustries.com + phoneNumber: null + startDate: null + nationalInsuranceNumber: null + isOffPayrollWorker: false + address: + addressLine1: 171 Midsummer + addressLine2: null + city: Milton Keyness + county: null + countryName: null + postCode: MK9 1EB + payrollCalendarID: null + updatedDateUTC: 2020-03-25T03:12:10 + createdDateUTC: 2020-03-25T03:12:10 + niCategory: null + employeeNumber: null + endDate: null + "400": description: validation error for a bad request content: application/json: @@ -281,26 +269,26 @@ paths: application/json: schema: $ref: '#/components/schemas/Employee' - example: { - "title":"Mr", - "firstName":"Mike", - "lastName":"Fancy", - "dateOfBirth":"1999-01-01T00:00:00", - "gender":"M", - "email":"mike@starkindustries.com", - "isOffPayrollWorker": false, - "address": { - "addressLine1": "171 Midsummer", - "city": "Milton Keyness", - "postCode": "MK9 1EB" - } - } + example: + title: Mr + firstName: Mike + lastName: Fancy + dateOfBirth: 1999-01-01T00:00:00 + gender: M + email: mike@starkindustries.com + isOffPayrollWorker: false + address: + addressLine1: 171 Midsummer + city: Milton Keyness + postCode: MK9 1EB /Employees/{EmployeeID}: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollUk operationId: getEmployee @@ -312,52 +300,50 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeObject' - example: { - "id": "9414291b-a8c6-08fa-b165-9b30b1e6aab5", - "providerName": "!YLT5Y", - "dateTimeUTC": "2018-04-09T05:15:18.1011141", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "employee": { - "employeeID": "d17e008e-3381-45c0-b50c-2fab7757e503", - "title": "Mr.", - "firstName": "Edgar", - "lastName": "Allan Po", - "dateOfBirth": "1985-03-24T00:00:00", - "gender": "M", - "email": "tester1@gmail.com", - "phoneNumber": "0400123456", - "nationalInsuranceNumber": "AB123456C", - "isOffPayrollWorker": false, - "address": { - "addressLine1": "171 Midsummer", - "addressLine2": null, - "city": "Milton Keyness", - "county": null, - "countryName": "UNITED KINGDOM", - "postCode": "MK9 1EB" - }, - "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe", - "updatedDateUTC": "2017-05-12T10:00:24", - "createdDateUTC": "2017-05-12T10:00:24", - "endDate": null - } - } + example: + id: 9414291b-a8c6-08fa-b165-9b30b1e6aab5 + providerName: '!YLT5Y' + dateTimeUTC: 2018-04-09T05:15:18.1011141 + httpStatusCode: OK + pagination: null + problem: null + employee: + employeeID: d17e008e-3381-45c0-b50c-2fab7757e503 + title: Mr. + firstName: Edgar + lastName: Allan Po + dateOfBirth: 1985-03-24T00:00:00 + gender: M + email: tester1@gmail.com + phoneNumber: "0400123456" + nationalInsuranceNumber: AB123456C + isOffPayrollWorker: false + address: + addressLine1: 171 Midsummer + addressLine2: null + city: Milton Keyness + county: null + countryName: UNITED KINGDOM + postCode: MK9 1EB + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + updatedDateUTC: 2017-05-12T10:00:24 + createdDateUTC: 2017-05-12T10:00:24 + endDate: null put: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollUk operationId: updateEmployee @@ -372,18 +358,18 @@ paths: object: employee java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2000, Month.OCTOBER, 28)" - java: "LocalDate.of(2000, Month.OCTOBER, 28)" - csharp: "new DateTime(2000, 10, 10)" - php: "new DateTime('2000-10-28')" - node: "'2000-10-28'" - python: "dateutil.parser.parse('2000-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2000, Month.OCTOBER, 28) + java: LocalDate.of(2000, Month.OCTOBER, 28) + csharp: new DateTime(2000, 10, 10) + php: new DateTime('2000-10-28') + node: '''2000-10-28''' + python: dateutil.parser.parse('2000-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - Address: key: address keyPascal: Address keySnake: address - is_object: true + is_object: true - addressLine1: key: addressLine1 keyPascal: AddressLine1 @@ -412,18 +398,18 @@ paths: - employee: key: employee keyPascal: Employee - is_object: true + is_object: true - firstName: key: firstName keyPascal: FirstName - keySnake: first_name - default: "Adam" + keySnake: first_name + default: Adam object: employee - lastName: key: lastName keyPascal: LastName keySnake: last_name - default: "Adamson" + default: Adamson object: employee - dateOfBirth: is_variable: true @@ -444,7 +430,7 @@ paths: default: address python: address ruby: address - object: employee + object: employee parameters: - $ref: '#/components/parameters/idempotencyKey' - name: EmployeeID @@ -452,51 +438,48 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: successful response content: application/json: schema: $ref: '#/components/schemas/EmployeeObject' - example: { - "id": "9414291b-a8c6-08fa-b165-9b30b1e6aab5", - "providerName": "!YLT5Y", - "dateTimeUTC": "2018-04-09T05:10:51.3504472", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "employee": { - "employeeID": "07f0f9fc-cc95-46ac-9a8a-aa03779f2bde", - "title": "Mr", - "firstName": "Mike", - "lastName": "Johnllsbkrhwopson", - "dateOfBirth": "1999-01-01T00:00:00", - "gender": "M", - "email": "84044@starkindustries.com", - "phoneNumber": "0400123456", - "startDate": "2020-02-03", - "nationalInsuranceNumber": null, - "isOffPayrollWorker": false, - "address": { - "addressLine1": "101 Green St", - "addressLine2":null, - "city": "San Francisco", - "county":null, - "countryName":null, - "postCode": "6TGR4F" - }, - "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe", - "updatedDateUTC": "2020-03-25T17:03:50Z", - "createdDateUTC": "2020-02-10T10:00:24Z", - "endDate": null - } - } - '400': + example: + id: 9414291b-a8c6-08fa-b165-9b30b1e6aab5 + providerName: '!YLT5Y' + dateTimeUTC: 2018-04-09T05:10:51.3504472 + httpStatusCode: OK + pagination: null + problem: null + employee: + employeeID: 07f0f9fc-cc95-46ac-9a8a-aa03779f2bde + title: Mr + firstName: Mike + lastName: Johnllsbkrhwopson + dateOfBirth: 1999-01-01T00:00:00 + gender: M + email: 84044@starkindustries.com + phoneNumber: "0400123456" + startDate: "2020-02-03" + nationalInsuranceNumber: null + isOffPayrollWorker: false + address: + addressLine1: 101 Green St + addressLine2: null + city: San Francisco + county: null + countryName: null + postCode: 6TGR4F + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + updatedDateUTC: "2020-03-25T17:03:50Z" + createdDateUTC: "2020-02-10T10:00:24Z" + endDate: null + "400": description: validation error for a bad request content: application/json: @@ -508,27 +491,26 @@ paths: application/json: schema: $ref: '#/components/schemas/Employee' - example: { - "title": "Mr.", - "firstName": "TestDataUK", - "lastName": "Tester", - "dateOfBirth": "1992-11-22T00:00:00", - "gender": "M", - "email": "tester@gmail.com", - "phoneNumber": "0400123456", - "isOffPayrollWorker": false, - "address": { - "addressLine1": "171 Midsummer", - "city": "Milton Keyness", - "postCode": "MK9 1EB" - } - } + example: + title: Mr. + firstName: TestDataUK + lastName: Tester + dateOfBirth: 1992-11-22T00:00:00 + gender: M + email: tester@gmail.com + phoneNumber: "0400123456" + isOffPayrollWorker: false + address: + addressLine1: 171 Midsummer + city: Milton Keyness + postCode: MK9 1EB /Employees/{EmployeeID}/Employment: parameters: - $ref: '#/components/parameters/requiredHeader' - post: + post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollUk operationId: createEmployment @@ -541,13 +523,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - employment: key: employment keyPascal: Employment @@ -558,7 +540,7 @@ paths: keyPascal: PayrollCalendarID keySnake: payroll_calendar_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: employment - startDate: is_variable: true @@ -570,7 +552,7 @@ paths: python: start_date ruby: start_date object: employment - is_last: true + is_last: true summary: Creates employment detail for a specific employee using a unique employee ID parameters: - $ref: '#/components/parameters/idempotencyKey' @@ -579,32 +561,30 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmploymentObject' - example: { - "id": "0160a355-1e6d-4fdc-9532-c0857feaa515", - "providerName": "provider-name", - "dateTimeUTC": "2020-03-26T18:09:11.6235442", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "employment": { - "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe", - "startDate": "2020-04-01T00:00:00", - "niCategory": "A", - "employeeNumber": "123ABC" - } - } - '400': + example: + id: 0160a355-1e6d-4fdc-9532-c0857feaa515 + providerName: provider-name + dateTimeUTC: 2020-03-26T18:09:11.6235442 + httpStatusCode: OK + pagination: null + problem: null + employment: + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + startDate: 2020-04-01T00:00:00 + niCategory: A + employeeNumber: 123ABC + "400": description: validation error for a bad request content: application/json: @@ -616,67 +596,68 @@ paths: application/json: schema: $ref: '#/components/schemas/Employment' - example: { - "PayrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe", - "StartDate": "2020-04-01", - "EmployeeNumber": "123ABC", - "NICategory": "A" - } + example: + PayrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + StartDate: "2020-04-01" + EmployeeNumber: 123ABC + NICategory: A /Employees/{EmployeeID}/Tax: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollUk operationId: getEmployeeTax x-hasPayrollUkProblem: true - summary: Retrieves tax records for a specific employee using a unique employee ID + summary: Retrieves tax records for a specific employee using a unique employee ID parameters: - name: EmployeeID x-snake: employee_id in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeTaxObject' - example: { - "id": "a8577248-393a-4e7a-8a03-b43b90800b69", - "providerName": "provider-name", - "dateTimeUTC": "2020-03-27T00:14:41.2462046", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "employeeTax": { - "starterType": "New Employee with P45", - "starterDeclaration": "B.) This is currently their only job", - "taxCode": "1185L", - "w1M1": false, - "previousTaxablePay": 2000, - "previousTaxPaid": 200, - "studentLoanDeduction": null, - "hasPostGraduateLoans": false, - "isDirector": false, - "directorshipStartDate": null, - "nicCalculationMethod": null - } - } + example: + id: a8577248-393a-4e7a-8a03-b43b90800b69 + providerName: provider-name + dateTimeUTC: 2020-03-27T00:14:41.2462046 + httpStatusCode: OK + pagination: null + problem: null + employeeTax: + starterType: New Employee with P45 + starterDeclaration: B.) This is currently their only job + taxCode: 1185L + w1M1: false + previousTaxablePay: 2000 + previousTaxPaid: 200 + studentLoanDeduction: null + hasPostGraduateLoans: false + isDirector: false + directorshipStartDate: null + nicCalculationMethod: null /Employees/{EmployeeID}/ukopeningbalances: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollUk operationId: getEmployeeOpeningBalances @@ -688,36 +669,35 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeOpeningBalancesObject' - example: { - "id": "ab1c33de-1927-4210-bf4f-2a55965cb4a9", - "providerName": "provider-name", - "dateTimeUTC": "2020-03-27T01:13:00.6591505", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "openingBalances": { - "statutoryAdoptionPay": 10, - "statutoryMaternityPay": 10, - "statutoryPaternityPay": 10, - "statutorySharedParentalPay": 10, - "statutorySickPay": 10, - "priorEmployeeNumber": "10.0" - } - } + example: + id: ab1c33de-1927-4210-bf4f-2a55965cb4a9 + providerName: provider-name + dateTimeUTC: 2020-03-27T01:13:00.6591505 + httpStatusCode: OK + pagination: null + problem: null + openingBalances: + statutoryAdoptionPay: 10 + statutoryMaternityPay: 10 + statutoryPaternityPay: 10 + statutorySharedParentalPay: 10 + statutorySickPay: 10 + priorEmployeeNumber: "10.0" post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollUk operationId: createEmployeeOpeningBalances @@ -733,7 +713,7 @@ paths: keyPascal: StatutoryMaternityPay keySnake: statutory_maternity_pay is_money: true - nonString: true + nonString: true default: 0.0 object: employeeOpeningBalances - statutoryAdoptionPay: @@ -741,7 +721,7 @@ paths: keyPascal: StatutoryAdoptionPay keySnake: statutory_adoption_pay is_money: true - nonString: true + nonString: true default: 100.0 object: employeeOpeningBalances - statutoryPaternityPay: @@ -749,7 +729,7 @@ paths: keyPascal: StatutoryPaternityPay keySnake: statutory_paternity_pay is_money: true - nonString: true + nonString: true default: 0.0 object: employeeOpeningBalances - statutorySharedParentalPay: @@ -757,7 +737,7 @@ paths: keyPascal: StatutorySharedParentalPay keySnake: statutory_shared_parental_pay is_money: true - nonString: true + nonString: true default: 0.0 object: employeeOpeningBalances - statutorySickPay: @@ -765,7 +745,7 @@ paths: keyPascal: StatutorySickPay keySnake: statutory_sick_pay is_money: true - nonString: true + nonString: true default: 0.0 object: employeeOpeningBalances is_last: true @@ -777,27 +757,26 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeOpeningBalancesObject' - example: { - "id": "0d30ef37-2fb4-4925-b563-faaee361c9cd", - "providerName": "provider-name", - "dateTimeUTC": "2020-03-27T01:06:14.47566", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "openingBalances": null - } - '400': + example: + id: 0d30ef37-2fb4-4925-b563-faaee361c9cd + providerName: provider-name + dateTimeUTC: 2020-03-27T01:06:14.47566 + httpStatusCode: OK + pagination: null + problem: null + openingBalances: null + "400": description: validation error for a bad request content: application/json: @@ -809,17 +788,17 @@ paths: application/json: schema: $ref: '#/components/schemas/EmployeeOpeningBalances' - example: { - "statutoryAdoptionPay": 10, - "statutoryMaternityPay": 10, - "statutoryPaternityPay": 10, - "statutorySharedParentalPay": 10, - "statutorySickPay": 10, - "priorEmployeeNumber": 10 - } + example: + statutoryAdoptionPay: 10 + statutoryMaternityPay: 10 + statutoryPaternityPay: 10 + statutorySharedParentalPay: 10 + statutorySickPay: 10 + priorEmployeeNumber: 10 put: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollUk operationId: updateEmployeeOpeningBalances @@ -835,7 +814,7 @@ paths: keyPascal: StatutoryMaternityPay keySnake: statutory_maternity_pay is_money: true - nonString: true + nonString: true default: 0.0 object: employeeOpeningBalances - statutoryAdoptionPay: @@ -843,7 +822,7 @@ paths: keyPascal: StatutoryAdoptionPay keySnake: statutory_adoption_pay is_money: true - nonString: true + nonString: true default: 100.0 object: employeeOpeningBalances - statutoryPaternityPay: @@ -851,7 +830,7 @@ paths: keyPascal: StatutoryPaternityPay keySnake: statutory_paternity_pay is_money: true - nonString: true + nonString: true default: 0.0 object: employeeOpeningBalances - statutorySharedParentalPay: @@ -859,7 +838,7 @@ paths: keyPascal: StatutorySharedParentalPay keySnake: statutory_shared_parental_pay is_money: true - nonString: true + nonString: true default: 0.0 object: employeeOpeningBalances - statutorySickPay: @@ -867,7 +846,7 @@ paths: keyPascal: StatutorySickPay keySnake: statutory_sick_pay is_money: true - nonString: true + nonString: true default: 0.0 object: employeeOpeningBalances is_last: true @@ -879,27 +858,26 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: successful response content: application/json: schema: $ref: '#/components/schemas/EmployeeOpeningBalancesObject' - example: { - "id": "21953776-783c-426c-bf15-cbde997839c4", - "providerName": "provider-name", - "dateTimeUTC": "2020-03-27T15:45:09.7078637", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "openingBalances": null - } - '400': + example: + id: 21953776-783c-426c-bf15-cbde997839c4 + providerName: provider-name + dateTimeUTC: 2020-03-27T15:45:09.7078637 + httpStatusCode: OK + pagination: null + problem: null + openingBalances: null + "400": description: validation error for a bad request content: application/json: @@ -911,20 +889,21 @@ paths: application/json: schema: $ref: '#/components/schemas/EmployeeOpeningBalances' - example: { - "statutoryAdoptionPay": 20, - "statutoryMaternityPay": 20, - "statutoryPaternityPay": 20, - "statutorySharedParentalPay": 20, - "statutorySickPay": 20, - "priorEmployeeNumber": 20 - } + example: + statutoryAdoptionPay: 20 + statutoryMaternityPay: 20 + statutoryPaternityPay: 20 + statutorySharedParentalPay: 20 + statutorySickPay: 20 + priorEmployeeNumber: 20 /Employees/{EmployeeID}/Leave: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollUk operationId: getEmployeeLeaves @@ -936,46 +915,40 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaves' - example: { - "id": "e4d42712-4876-4b32-987d-1f62538089de", - "providerName": "provider-name", - "dateTimeUTC": "2020-03-27T15:58:16.0929399", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "leave": [ - { - "leaveID": "384bf62a-5884-484d-b675-a3ad9c662f8e", - "leaveTypeID": "ed08dffe-788e-4b24-9630-f0fa2f4d164c", - "description": "Vacation to Majorca", - "startDate": "2020-02-17T00:00:00", - "endDate": "2020-02-21T00:00:00", - "periods": [ - { - "periodStartDate": "2020-02-17T00:00:00", - "periodEndDate": "2020-02-23T00:00:00", - "numberOfUnits": 40, - "periodStatus": "Approved" - } - ], - "updatedDateUTC": "2020-02-10T10:15:53" - } - ] - } + example: + id: e4d42712-4876-4b32-987d-1f62538089de + providerName: provider-name + dateTimeUTC: 2020-03-27T15:58:16.0929399 + httpStatusCode: OK + pagination: null + problem: null + leave: + - leaveID: 384bf62a-5884-484d-b675-a3ad9c662f8e + leaveTypeID: ed08dffe-788e-4b24-9630-f0fa2f4d164c + description: Vacation to Majorca + startDate: 2020-02-17T00:00:00 + endDate: 2020-02-21T00:00:00 + periods: + - periodStartDate: 2020-02-17T00:00:00 + periodEndDate: 2020-02-23T00:00:00 + numberOfUnits: 40 + periodStatus: Approved + updatedDateUTC: 2020-02-10T10:15:53 post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollUk operationId: createEmployeeLeave @@ -988,13 +961,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - endDateValue: key: endDate keyPascal: EndDate @@ -1002,13 +975,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 30)" - java: "LocalDate.of(2020, Month.OCTOBER, 30)" - csharp: "new DateTime(2020, 10, 12)" - php: "new DateTime('2020-10-30')" - node: "'2020-10-30'" - python: "dateutil.parser.parse('2020-10-30T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 30) + java: LocalDate.of(2020, Month.OCTOBER, 30) + csharp: new DateTime(2020, 10, 12) + php: new DateTime('2020-10-30') + node: '''2020-10-30''' + python: dateutil.parser.parse('2020-10-30T00:00:00Z') + ruby: '''YYYY-MM-DD''' - employeeLeave: key: employeeLeave keyPascal: EmployeeLeave @@ -1019,7 +992,7 @@ paths: keyPascal: LeaveTypeID keySnake: leave_type_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: employeeLeave - startDate: is_variable: true @@ -1032,7 +1005,7 @@ paths: ruby: start_date object: employeeLeave - endDate: - is_last: true + is_last: true is_variable: true nonString: true key: endDate @@ -1050,42 +1023,37 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveObject' - example: { - "id": "ef91410a-2be1-42cc-86db-e625344a82e9", - "providerName": "provider-name", - "dateTimeUTC": "2020-03-31T04:32:57.0247198", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "leave": { - "leaveID": "bdfedc6b-363b-4801-8ba6-9a074d400b31", - "leaveTypeID": "1d2778ee-86ea-45c0-bbf8-1045485f6b3f", - "description": "Creating a Description", - "startDate": "2020-03-24T00:00:00", - "endDate": "2020-03-26T00:00:00", - "periods": [ - { - "periodStartDate": "2020-03-23T00:00:00", - "periodEndDate": "2020-03-29T00:00:00", - "numberOfUnits": 24, - "periodStatus": "Approved" - } - ], - "updatedDateUTC": "2020-03-31T04:32:56.9537857" - } - } - '400': + example: + id: ef91410a-2be1-42cc-86db-e625344a82e9 + providerName: provider-name + dateTimeUTC: 2020-03-31T04:32:57.0247198 + httpStatusCode: OK + pagination: null + problem: null + leave: + leaveID: bdfedc6b-363b-4801-8ba6-9a074d400b31 + leaveTypeID: 1d2778ee-86ea-45c0-bbf8-1045485f6b3f + description: Creating a Description + startDate: 2020-03-24T00:00:00 + endDate: 2020-03-26T00:00:00 + periods: + - periodStartDate: 2020-03-23T00:00:00 + periodEndDate: 2020-03-29T00:00:00 + numberOfUnits: 24 + periodStatus: Approved + updatedDateUTC: 2020-03-31T04:32:56.9537857 + "400": description: validation error for a bad request content: application/json: @@ -1097,18 +1065,19 @@ paths: application/json: schema: $ref: '#/components/schemas/EmployeeLeave' - example: { - "leaveTypeID": "1d2778ee-86ea-45c0-bbf8-1045485f6b3f", - "description": "Creating a Description", - "startDate": "2020-03-24", - "endDate": "2020-03-26" - } + example: + leaveTypeID: 1d2778ee-86ea-45c0-bbf8-1045485f6b3f + description: Creating a Description + startDate: "2020-03-24" + endDate: "2020-03-26" /Employees/{EmployeeID}/Leave/{LeaveID}: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollUk operationId: getEmployeeLeave @@ -1120,7 +1089,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -1129,44 +1098,40 @@ paths: in: path required: true description: Leave id for single object - schema: + schema: type: string format: uuid example: c4be24e5-e840-4c92-9eaa-2d86cd596314 responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveObject' - example: { - "id": "6ae25805-fef3-4c9b-9e69-9ccc71a6a8da", - "providerName": "provider-name", - "dateTimeUTC": "2020-03-27T19:58:03.8455417", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "leave": { - "leaveID": "384bf62a-5884-484d-b675-a3ad9c662f8e", - "leaveTypeID": "ed08dffe-788e-4b24-9630-f0fa2f4d164c", - "description": "Vacation to Majorca", - "startDate": "2020-02-17T00:00:00", - "endDate": "2020-02-21T00:00:00", - "periods": [ - { - "periodStartDate": "2020-02-17T00:00:00", - "periodEndDate": "2020-02-23T00:00:00", - "numberOfUnits": 40, - "periodStatus": "Approved" - } - ], - "updatedDateUTC": "2020-02-10T10:15:53" - } - } + example: + id: 6ae25805-fef3-4c9b-9e69-9ccc71a6a8da + providerName: provider-name + dateTimeUTC: 2020-03-27T19:58:03.8455417 + httpStatusCode: OK + pagination: null + problem: null + leave: + leaveID: 384bf62a-5884-484d-b675-a3ad9c662f8e + leaveTypeID: ed08dffe-788e-4b24-9630-f0fa2f4d164c + description: Vacation to Majorca + startDate: 2020-02-17T00:00:00 + endDate: 2020-02-21T00:00:00 + periods: + - periodStartDate: 2020-02-17T00:00:00 + periodEndDate: 2020-02-23T00:00:00 + numberOfUnits: 40 + periodStatus: Approved + updatedDateUTC: 2020-02-10T10:15:53 put: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollUk operationId: updateEmployeeLeave @@ -1179,13 +1144,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - endDateValue: key: endDate keyPascal: EndDate @@ -1193,13 +1158,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 30)" - java: "LocalDate.of(2020, Month.OCTOBER, 30)" - csharp: "new DateTime(2020, 10, 12)" - php: "new DateTime('2020-10-30')" - node: "'2020-10-30'" - python: "dateutil.parser.parse('2020-10-30T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 30) + java: LocalDate.of(2020, Month.OCTOBER, 30) + csharp: new DateTime(2020, 10, 12) + php: new DateTime('2020-10-30') + node: '''2020-10-30''' + python: dateutil.parser.parse('2020-10-30T00:00:00Z') + ruby: '''YYYY-MM-DD''' - employeeLeave: key: employeeLeave keyPascal: EmployeeLeave @@ -1210,7 +1175,7 @@ paths: keyPascal: LeaveTypeID keySnake: leave_type_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: employeeLeave - startDate: is_variable: true @@ -1223,7 +1188,7 @@ paths: ruby: start_date object: employeeLeave - endDate: - is_last: true + is_last: true is_variable: true nonString: true key: endDate @@ -1241,7 +1206,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -1250,42 +1215,37 @@ paths: in: path required: true description: Leave id for single object - schema: + schema: type: string format: uuid - example: c4be24e5-e840-4c92-9eaa-2d86cd596314 + example: c4be24e5-e840-4c92-9eaa-2d86cd596314 responses: - '200': + "200": description: successful response content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveObject' - example: { - "id": "ea115d89-61a0-4a2d-ad77-e3c63a2b401f", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-17T18:18:30.5118218", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "leave": { - "leaveID": "8340b795-50c1-428e-9fda-90badf081ab4", - "leaveTypeID": "ed08dffe-788e-4b24-9630-f0fa2f4d164c", - "description": "Creating a Description", - "startDate": "2020-04-24T00:00:00", - "endDate": "2020-04-26T00:00:00", - "periods": [ - { - "periodStartDate": "2020-04-20T00:00:00", - "periodEndDate": "2020-04-26T00:00:00", - "numberOfUnits": 1, - "periodStatus": "Approved" - } - ], - "updatedDateUTC": "2020-04-17T18:18:30.614537" - } - } - '400': + example: + id: ea115d89-61a0-4a2d-ad77-e3c63a2b401f + providerName: provider-name + dateTimeUTC: 2020-04-17T18:18:30.5118218 + httpStatusCode: OK + pagination: null + problem: null + leave: + leaveID: 8340b795-50c1-428e-9fda-90badf081ab4 + leaveTypeID: ed08dffe-788e-4b24-9630-f0fa2f4d164c + description: Creating a Description + startDate: 2020-04-24T00:00:00 + endDate: 2020-04-26T00:00:00 + periods: + - periodStartDate: 2020-04-20T00:00:00 + periodEndDate: 2020-04-26T00:00:00 + numberOfUnits: 1 + periodStatus: Approved + updatedDateUTC: 2020-04-17T18:18:30.614537 + "400": description: validation error for a bad request content: application/json: @@ -1297,23 +1257,20 @@ paths: application/json: schema: $ref: '#/components/schemas/EmployeeLeave' - example: { - "leaveTypeID": "ed08dffe-788e-4b24-9630-f0fa2f4d164c", - "description": "Creating a Description", - "startDate": "2020-04-24", - "endDate": "2020-04-26", - "periods": [ - { - "periodStartDate": "2020-04-20", - "periodEndDate": "2020-04-26", - "numberOfUnits": 1, - "periodStatus": "Approved" - } - ] - } + example: + leaveTypeID: ed08dffe-788e-4b24-9630-f0fa2f4d164c + description: Creating a Description + startDate: "2020-04-24" + endDate: "2020-04-26" + periods: + - periodStartDate: "2020-04-20" + periodEndDate: "2020-04-26" + numberOfUnits: 1 + periodStatus: Approved delete: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollUk operationId: deleteEmployeeLeave @@ -1325,7 +1282,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -1334,31 +1291,32 @@ paths: in: path required: true description: Leave id for single object - schema: + schema: type: string format: uuid - example: c4be24e5-e840-4c92-9eaa-2d86cd596314 + example: c4be24e5-e840-4c92-9eaa-2d86cd596314 responses: - '200': + "200": description: successful response content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveObject' - example: { - "id": "b0ab87f6-bbca-4c81-b616-c545592f6988", - "providerName": "provider-name", - "dateTimeUTC": "2020-03-31T04:11:42.422139", - "httpStatusCode": "OK", - "pagination": null, - "problem": null - } + example: + id: b0ab87f6-bbca-4c81-b616-c545592f6988 + providerName: provider-name + dateTimeUTC: 2020-03-31T04:11:42.422139 + httpStatusCode: OK + pagination: null + problem: null /Employees/{EmployeeID}/LeaveBalances: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollUk operationId: getEmployeeLeaveBalances @@ -1370,50 +1328,45 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveBalances' - example: { - "id": "a9b96d49-fc15-4e25-8b62-818462ea6dbd", - "providerName": "provider-name", - "dateTimeUTC": "2020-03-31T04:45:06.125346", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 2 - }, - "problem": null, - "leaveBalances": [ - { - "name": "Holiday", - "leaveTypeID": "ed08dffe-788e-4b24-9630-f0fa2f4d164c", - "balance": 32, - "typeOfUnits": "Hours" - }, - { - "name": "Parental Leave", - "leaveTypeID": "1d2778ee-86ea-45c0-bbf8-1045485f6b3f", - "balance": -80, - "typeOfUnits": "Hours" - } - ] - } + example: + id: a9b96d49-fc15-4e25-8b62-818462ea6dbd + providerName: provider-name + dateTimeUTC: 2020-03-31T04:45:06.125346 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 2 + problem: null + leaveBalances: + - name: Holiday + leaveTypeID: ed08dffe-788e-4b24-9630-f0fa2f4d164c + balance: 32 + typeOfUnits: Hours + - name: Parental Leave + leaveTypeID: 1d2778ee-86ea-45c0-bbf8-1045485f6b3f + balance: -80 + typeOfUnits: Hours /Employees/{EmployeeID}/StatutoryLeaveBalance: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollUk operationId: getEmployeeStatutoryLeaveBalances @@ -1425,7 +1378,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -1444,31 +1397,31 @@ paths: type: string format: date responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeStatutoryLeaveBalanceObject' - example: { - "id": "ee863df3-c394-4102-bb91-2b14de404c1c", - "providerName": "provider-name", - "dateTimeUTC": "2020-03-31T05:03:47.418497", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "leaveBalance": { - "leaveType": "Sick", - "balanceRemaining": 1120, - "units": "Hours" - } - } + example: + id: ee863df3-c394-4102-bb91-2b14de404c1c + providerName: provider-name + dateTimeUTC: 2020-03-31T05:03:47.418497 + httpStatusCode: OK + pagination: null + problem: null + leaveBalance: + leaveType: Sick + balanceRemaining: 1120 + units: Hours /StatutoryLeaves/Summary/{EmployeeID}: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollUk operationId: getStatutoryLeaveSummary @@ -1480,7 +1433,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -1491,37 +1444,34 @@ paths: schema: type: boolean responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeStatutoryLeavesSummaries' - example: { - "id": "1908f4d1-b85d-4d6d-a885-6b6e2922ad03", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-02T19:47:06.0791382", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "statutoryLeaves": [ - { - "statutoryLeaveID": "17f4c3c7-d65c-4572-9118-03798f26f813", - "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0", - "type": "Sick", - "endDate": "2020-04-01", - "startDate": "2020-03-28", - "isEntitled": false, - "status": "Pending" - } - ] - } + example: + id: 1908f4d1-b85d-4d6d-a885-6b6e2922ad03 + providerName: provider-name + dateTimeUTC: 2020-04-02T19:47:06.0791382 + httpStatusCode: OK + pagination: null + problem: null + statutoryLeaves: + - statutoryLeaveID: 17f4c3c7-d65c-4572-9118-03798f26f813 + employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + type: Sick + endDate: "2020-04-01" + startDate: "2020-03-28" + isEntitled: false + status: Pending /StatutoryLeaves/Sick: parameters: - $ref: '#/components/parameters/requiredHeader' post: security: - - OAuth2: [payroll.settings] + - OAuth2: + - payroll.settings tags: - PayrollUk operationId: createEmployeeStatutorySickLeave @@ -1534,13 +1484,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - endDateValue: key: endDate keyPascal: EndDate @@ -1548,13 +1498,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 30)" - java: "LocalDate.of(2020, Month.OCTOBER, 30)" - csharp: "new DateTime(2020, 10, 12)" - php: "new DateTime('2020-10-30')" - node: "'2020-10-30'" - python: "dateutil.parser.parse('2020-10-30T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 30) + java: LocalDate.of(2020, Month.OCTOBER, 30) + csharp: new DateTime(2020, 10, 12) + php: new DateTime('2020-10-30') + node: '''2020-10-30''' + python: dateutil.parser.parse('2020-10-30T00:00:00Z') + ruby: '''YYYY-MM-DD''' - employeeStatutorySickLeave: key: employeeStatutorySickLeave keyPascal: EmployeeStatutorySickLeave @@ -1564,15 +1514,15 @@ paths: key: isPregnancyRelated keyPascal: IsPregnancyRelated keySnake: is_pregnancy_related - nonString: true - default: true + nonString: true + default: true object: employeeStatutorySickLeave - leaveTypeID: key: leaveTypeID keyPascal: LeaveTypeID keySnake: leave_type_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: employeeStatutorySickLeave - startDate: is_variable: true @@ -1585,7 +1535,7 @@ paths: ruby: start_date object: employeeStatutorySickLeave - endDate: - is_last: true + is_last: true is_variable: true nonString: true key: endDate @@ -1599,45 +1549,41 @@ paths: parameters: - $ref: '#/components/parameters/idempotencyKey' responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeStatutorySickLeaveObject' - example: { - "id": "35c840a3-04aa-43f1-9171-f7eaf4fd4454", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-20T18:59:28.3440854", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "statutorySickLeave": { - "statutoryLeaveID": "a2b5a1fb-ae21-47b4-876d-0b61fa6b37ab", - "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0", - "leaveTypeID": "aab78802-e9d3-4bbd-bc87-df858054988f", - "startDate": "2020-04-21", - "endDate": "2020-04-24", - "workPattern": [ - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday" - ], - "isPregnancyRelated": false, - "sufficientNotice": true, - "isEntitled": false, - "entitlementWeeksRequested": 0.8, - "entitlementWeeksQualified": 27.2, - "entitlementWeeksRemaining": 26.4, - "overlapsWithOtherLeave": false, - "entitlementFailureReasons": [ - "NotQualifiedInPreviousPiw" - ] - } - } - '400': + example: + id: 35c840a3-04aa-43f1-9171-f7eaf4fd4454 + providerName: provider-name + dateTimeUTC: 2020-04-20T18:59:28.3440854 + httpStatusCode: OK + pagination: null + problem: null + statutorySickLeave: + statutoryLeaveID: a2b5a1fb-ae21-47b4-876d-0b61fa6b37ab + employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + leaveTypeID: aab78802-e9d3-4bbd-bc87-df858054988f + startDate: "2020-04-21" + endDate: "2020-04-24" + workPattern: + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + isPregnancyRelated: false + sufficientNotice: true + isEntitled: false + entitlementWeeksRequested: 0.8 + entitlementWeeksQualified: 27.2 + entitlementWeeksRemaining: 26.4 + overlapsWithOtherLeave: false + entitlementFailureReasons: + - NotQualifiedInPreviousPiw + "400": description: validation error for a bad request content: application/json: @@ -1649,27 +1595,27 @@ paths: application/json: schema: $ref: '#/components/schemas/EmployeeStatutorySickLeave' - example: { - "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0", - "leaveTypeID": "aab78802-e9d3-4bbd-bc87-df858054988f", - "startDate": "2020-04-21", - "endDate": "2020-04-24", - "workPattern": [ - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday" - ], - "isPregnancyRelated": false, - "sufficientNotice": true - } + example: + employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + leaveTypeID: aab78802-e9d3-4bbd-bc87-df858054988f + startDate: "2020-04-21" + endDate: "2020-04-24" + workPattern: + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + isPregnancyRelated: false + sufficientNotice: true /StatutoryLeaves/Sick/{StatutorySickLeaveID}: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollUk operationId: getEmployeeStatutorySickLeave @@ -1681,55 +1627,53 @@ paths: in: path required: true description: Statutory sick leave id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeStatutorySickLeaveObject' - example: { - "id": "c484213d-6225-4ede-bc5e-e81ef350af41", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-17T18:31:49.3895522", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "statutorySickLeave": { - "statutoryLeaveID": "17f4c3c7-d65c-4572-9118-03798f26f813", - "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0", - "leaveTypeID": "054a2b5e-fe51-4494-9486-3e3130323c69", - "startDate": "2020-03-28", - "endDate": "2020-04-01", - "workPattern": [ - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday" - ], - "isPregnancyRelated": false, - "sufficientNotice": true, - "isEntitled": false, - "entitlementWeeksRequested": 0.6, - "entitlementWeeksQualified": 28, - "entitlementWeeksRemaining": 0, - "overlapsWithOtherLeave": false, - "entitlementFailureReasons": [ - "AweLowerThanLel" - ] - } - } + example: + id: c484213d-6225-4ede-bc5e-e81ef350af41 + providerName: provider-name + dateTimeUTC: 2020-04-17T18:31:49.3895522 + httpStatusCode: OK + pagination: null + problem: null + statutorySickLeave: + statutoryLeaveID: 17f4c3c7-d65c-4572-9118-03798f26f813 + employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + leaveTypeID: 054a2b5e-fe51-4494-9486-3e3130323c69 + startDate: "2020-03-28" + endDate: "2020-04-01" + workPattern: + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + isPregnancyRelated: false + sufficientNotice: true + isEntitled: false + entitlementWeeksRequested: 0.6 + entitlementWeeksQualified: 28 + entitlementWeeksRemaining: 0 + overlapsWithOtherLeave: false + entitlementFailureReasons: + - AweLowerThanLel /Employees/{EmployeeID}/LeavePeriods: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollUk operationId: getEmployeeLeavePeriods @@ -1741,7 +1685,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 00000000-0000-0000-0000-000000000000 @@ -1760,35 +1704,29 @@ paths: type: string format: date responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/LeavePeriods' - example: { - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-07T20:33:42.1904008", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "periods": [ - { - "periodStartDate": "2020-02-24T00:00:00", - "periodEndDate": "2020-03-01T00:00:00", - "numberOfUnits": 40, - "periodStatus": null - }, - { - "periodStartDate": "2020-03-02T00:00:00", - "periodEndDate": "2020-03-08T00:00:00", - "numberOfUnits": 32, - "periodStatus": null - } - ] - } - '400': + example: + id: 00000000-0000-0000-0000-000000000000 + providerName: provider-name + dateTimeUTC: 2020-04-07T20:33:42.1904008 + httpStatusCode: OK + pagination: null + problem: null + periods: + - periodStartDate: 2020-02-24T00:00:00 + periodEndDate: 2020-03-01T00:00:00 + numberOfUnits: 40 + periodStatus: null + - periodStartDate: 2020-03-02T00:00:00 + periodEndDate: 2020-03-08T00:00:00 + numberOfUnits: 32 + periodStatus: null + "400": description: validation error for a bad request content: application/json: @@ -1797,9 +1735,11 @@ paths: /Employees/{EmployeeID}/LeaveTypes: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollUk operationId: getEmployeeLeaveTypes @@ -1811,37 +1751,33 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveTypes' - example: { - "id": "d86959c6-94f5-437a-9367-581cb145fc4f", - "providerName": "provider-name", - "dateTimeUTC": "2020-03-27T16:25:56.2931034", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "leaveTypes": [ - { - "leaveTypeID": "ed08dffe-788e-4b24-9630-f0fa2f4d164c", - "scheduleOfAccrual": "OnAnniversaryDate", - "hoursAccruedAnnually": 200, - "maximumToAccrue": 0, - "openingBalance": 72, - "rateAccruedHourly": 0, - "scheduleOfAccrualDate": null - } - ] - } - '400': + example: + id: d86959c6-94f5-437a-9367-581cb145fc4f + providerName: provider-name + dateTimeUTC: 2020-03-27T16:25:56.2931034 + httpStatusCode: OK + pagination: null + problem: null + leaveTypes: + - leaveTypeID: ed08dffe-788e-4b24-9630-f0fa2f4d164c + scheduleOfAccrual: OnAnniversaryDate + hoursAccruedAnnually: 200 + maximumToAccrue: 0 + openingBalance: 72 + rateAccruedHourly: 0 + scheduleOfAccrualDate: null + "400": description: validation error for a bad request content: application/json: @@ -1849,7 +1785,8 @@ paths: $ref: '#/components/schemas/Problem' post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollUk operationId: createEmployeeLeaveType @@ -1865,13 +1802,13 @@ paths: keyPascal: LeaveTypeID keySnake: leave_type_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: employeeLeaveType - scheduleOfAccrual: key: scheduleOfAccrual keyPascal: ScheduleOfAccrual keySnake: schedule_of_accrual - nonString: true + nonString: true default: ScheduleOfAccrualEnum.BeginningOfCalendarYear php: XeroAPI\XeroPHP\Models\PayrollUk\EmployeeLeaveType\ScheduleOfAccrualEnum.BeginningOfCalendarYear node: EmployeeLeaveType.ScheduleOfAccrualEnum.BeginningOfCalendarYear @@ -1884,7 +1821,7 @@ paths: key: openingBalance keyPascal: OpeningBalance keySnake: opening_balance - nonString: true + nonString: true default: 5.25 object: employeeLeaveType - scheduleOfAccrualDate: @@ -1895,7 +1832,7 @@ paths: keySnake: schedule_of_accrual_date object: employeeLeaveType default: 2024-05-01 - is_last: true + is_last: true summary: Creates employee leave type records parameters: - $ref: '#/components/parameters/idempotencyKey' @@ -1904,34 +1841,32 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveTypeObject' - example: { - "id": "3245e4c9-1ec5-4f3e-b659-fdb722733060", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-20T20:24:25.8151387", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "leaveType": { - "leaveTypeID": "4918f233-bd31-43f9-9633-bcc6de1178f2", - "scheduleOfAccrual": "BeginningOfCalendarYear", - "hoursAccruedAnnually": 10, - "maximumToAccrue": 0, - "openingBalance": 0, - "rateAccruedHourly": 0 - } - } - '400': + example: + id: 3245e4c9-1ec5-4f3e-b659-fdb722733060 + providerName: provider-name + dateTimeUTC: 2020-04-20T20:24:25.8151387 + httpStatusCode: OK + pagination: null + problem: null + leaveType: + leaveTypeID: 4918f233-bd31-43f9-9633-bcc6de1178f2 + scheduleOfAccrual: BeginningOfCalendarYear + hoursAccruedAnnually: 10 + maximumToAccrue: 0 + openingBalance: 0 + rateAccruedHourly: 0 + "400": description: validation error for a bad request content: application/json: @@ -1943,17 +1878,18 @@ paths: application/json: schema: $ref: '#/components/schemas/EmployeeLeaveType' - example: { - "leaveTypeID": "4918f233-bd31-43f9-9633-bcc6de1178f2", - "scheduleOfAccrual": "BeginningOfCalendarYear", - "hoursAccruedAnnually": 10 - } + example: + leaveTypeID: 4918f233-bd31-43f9-9633-bcc6de1178f2 + scheduleOfAccrual: BeginningOfCalendarYear + hoursAccruedAnnually: 10 /Employees/{EmployeeID}/PaymentMethods: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollUk operationId: getEmployeePaymentMethod @@ -1965,36 +1901,31 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PaymentMethodObject' - example: { - "id": "33c27fe9-de53-4114-8455-a6392add88b8", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-13T18:22:18.9003328", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "paymentMethod": { - "paymentMethod": "Electronically", - "bankAccounts": [ - { - "accountName": "Oliver Furniss - Santander", - "accountNumber": "12345678", - "sortCode": "111111" - } - ] - } - } - '400': + example: + id: 33c27fe9-de53-4114-8455-a6392add88b8 + providerName: provider-name + dateTimeUTC: 2020-04-13T18:22:18.9003328 + httpStatusCode: OK + pagination: null + problem: null + paymentMethod: + paymentMethod: Electronically + bankAccounts: + - accountName: Oliver Furniss - Santander + accountNumber: "12345678" + sortCode: "111111" + "400": description: validation error for a bad request content: application/json: @@ -2002,7 +1933,8 @@ paths: $ref: '#/components/schemas/Problem' post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollUk operationId: createEmployeePaymentMethod @@ -2030,7 +1962,7 @@ paths: keyPascal: SortCode keySnake: sort_code default: 123411 - is_last: true + is_last: true object: bankAccount - bankAccounts: is_list: true @@ -2072,36 +2004,31 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PaymentMethodObject' - example: { - "id": "6c5eab91-8f3c-4569-a5ce-ab4eec112d35", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-13T18:48:16.6038123", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "paymentMethod": { - "paymentMethod": "Electronically", - "bankAccounts": [ - { - "accountName": "Sid BofA", - "accountNumber": "24987654", - "sortCode": "287654" - } - ] - } - } - '400': + example: + id: 6c5eab91-8f3c-4569-a5ce-ab4eec112d35 + providerName: provider-name + dateTimeUTC: 2020-04-13T18:48:16.6038123 + httpStatusCode: OK + pagination: null + problem: null + paymentMethod: + paymentMethod: Electronically + bankAccounts: + - accountName: Sid BofA + accountNumber: "24987654" + sortCode: "287654" + "400": description: validation error for a bad request content: application/json: @@ -2113,22 +2040,20 @@ paths: application/json: schema: $ref: '#/components/schemas/PaymentMethod' - example: { - "paymentMethod": "Electronically", - "bankAccounts": [ - { - "accountName": "Sid BofA", - "accountNumber": "24987654", - "sortCode": "287654" - } - ] - } + example: + paymentMethod: Electronically + bankAccounts: + - accountName: Sid BofA + accountNumber: "24987654" + sortCode: "287654" /Employees/{EmployeeID}/PayTemplates: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollUk operationId: getEmployeePayTemplate @@ -2140,44 +2065,38 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeePayTemplateObject' - example: { - "id": "3138be2b-96d9-44d0-a01e-80fd527555c8", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-17T15:10:54.4464048", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 0, - "itemCount": 0 - }, - "problem": null, - "payTemplate": { - "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0", - "earningTemplates": [ - { - "payTemplateEarningID": "4e2a0753-56b9-423d-8068-624473bd1c00", - "ratePerUnit": 25, - "numberOfUnits": 10, - "fixedAmount": null, - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "name": "Regular Hours" - } - ] - } - } - '400': + example: + id: 3138be2b-96d9-44d0-a01e-80fd527555c8 + providerName: provider-name + dateTimeUTC: 2020-04-17T15:10:54.4464048 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 0 + itemCount: 0 + problem: null + payTemplate: + employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + earningTemplates: + - payTemplateEarningID: 4e2a0753-56b9-423d-8068-624473bd1c00 + ratePerUnit: 25 + numberOfUnits: 10 + fixedAmount: null + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + name: Regular Hours + "400": description: validation error for a bad request content: application/json: @@ -2189,7 +2108,8 @@ paths: - $ref: '#/components/parameters/requiredHeader' post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollUk operationId: createEmployeeEarningsTemplate @@ -2205,37 +2125,37 @@ paths: keyPascal: PayTemplateEarningID keySnake: pay_template_earning_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: earningsTemplate - ratePerUnit: key: ratePerUnit keyPascal: RatePerUnit keySnake: rate_per_unit - nonString: true + nonString: true default: 14.25 object: earningsTemplate - is_money: true + is_money: true - numberOfUnits: key: numberOfUnits keyPascal: NumberOfUnits keySnake: number_of_units default: 35.50 - nonString: true - is_money: true + nonString: true + is_money: true object: earningsTemplate - fixedAmount: key: fixedAmount keyPascal: FixedAmount keySnake: fixed_amount default: 50 - nonString: true + nonString: true object: earningsTemplate - earningsRateId: key: earningsRateID keyPascal: EarningsRateID keySnake: earnings_rate_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: earningsTemplate - name: key: name @@ -2270,18 +2190,18 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EarningsTemplateObject' - '400': + "400": description: validation error for a bad request content: application/json: @@ -2298,7 +2218,8 @@ paths: - $ref: '#/components/parameters/requiredHeader' put: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollUk operationId: updateEmployeeEarningsTemplate @@ -2314,37 +2235,37 @@ paths: keyPascal: PayTemplateEarningID keySnake: pay_template_earning_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: earningsTemplate - ratePerUnit: key: ratePerUnit keyPascal: RatePerUnit keySnake: rate_per_unit - nonString: true + nonString: true default: 14.25 object: earningsTemplate - is_money: true + is_money: true - numberOfUnits: key: numberOfUnits keyPascal: NumberOfUnits keySnake: number_of_units default: 35.50 - nonString: true - is_money: true + nonString: true + is_money: true object: earningsTemplate - fixedAmount: key: fixedAmount keyPascal: FixedAmount keySnake: fixed_amount default: 50 - nonString: true + nonString: true object: earningsTemplate - earningsRateId: key: earningsRateID keyPascal: EarningsRateID keySnake: earnings_rate_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: earningsTemplate - name: key: name @@ -2379,7 +2300,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -2387,35 +2308,33 @@ paths: x-snake: pay_template_earning_id in: path required: true - description: Id for single pay template earnings object - schema: + description: Id for single pay template earnings object + schema: type: string format: uuid example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EarningsTemplateObject' - example: { - "id": "39603f09-e06f-4cd4-8291-e3ad1df8b35b", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-17T15:52:35.0247503", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "earningTemplate": { - "payTemplateEarningID": "4e2a0753-56b9-423d-8068-624473bd1c00", - "ratePerUnit": 30, - "numberOfUnits": 4, - "fixedAmount": null, - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "name": "Regular Hours" - } - } - '400': + example: + id: 39603f09-e06f-4cd4-8291-e3ad1df8b35b + providerName: provider-name + dateTimeUTC: 2020-04-17T15:52:35.0247503 + httpStatusCode: OK + pagination: null + problem: null + earningTemplate: + payTemplateEarningID: 4e2a0753-56b9-423d-8068-624473bd1c00 + ratePerUnit: 30 + numberOfUnits: 4 + fixedAmount: null + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + name: Regular Hours + "400": description: validation error for a bad request content: application/json: @@ -2427,14 +2346,14 @@ paths: application/json: schema: $ref: '#/components/schemas/EarningsTemplate' - example: { - "ratePerUnit": 30, - "numberOfUnits": 4, - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27" - } + example: + ratePerUnit: 30 + numberOfUnits: 4 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 delete: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollUk operationId: deleteEmployeeEarningsTemplate @@ -2445,7 +2364,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -2453,20 +2372,21 @@ paths: x-snake: pay_template_earning_id in: path required: true - description: Id for single pay template earnings object - schema: + description: Id for single pay template earnings object + schema: type: string format: uuid example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 responses: - '200': + "200": description: deletion successful /Employees/{EmployeeID}/paytemplateearnings: parameters: - $ref: '#/components/parameters/requiredHeader' post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollUk operationId: createMultipleEmployeeEarningsTemplate @@ -2482,37 +2402,37 @@ paths: keyPascal: PayTemplateEarningID keySnake: pay_template_earning_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: earningsTemplate - ratePerUnit: key: ratePerUnit keyPascal: RatePerUnit keySnake: rate_per_unit - nonString: true + nonString: true default: 14.25 object: earningsTemplate - is_money: true + is_money: true - numberOfUnits: key: numberOfUnits keyPascal: NumberOfUnits keySnake: number_of_units default: 35.50 - nonString: true - is_money: true + nonString: true + is_money: true object: earningsTemplate - fixedAmount: key: fixedAmount keyPascal: FixedAmount keySnake: fixed_amount default: 50 - nonString: true + nonString: true object: earningsTemplate - earningsRateId: key: earningsRateID keyPascal: EarningsRateID keySnake: earnings_rate_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: earningsTemplate - name: key: name @@ -2547,44 +2467,38 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EmployeePayTemplates' - example: { - "id": "1c08b529-0827-4e91-a6a1-c479765aa65f", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-17T16:56:35.6264368", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "earningTemplates": [ - { - "payTemplateEarningID": "6b32533d-1111-4a92-ac52-7641315a1719", - "ratePerUnit": 20, - "numberOfUnits": 8, - "fixedAmount": null, - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "name": "Regular Hours" - }, - { - "payTemplateEarningID": "b8b16366-6a60-4b72-97c1-57af555da375", - "ratePerUnit": 20, - "numberOfUnits": 8, - "fixedAmount": null, - "earningsRateID": "973365f3-66b2-4c33-8ae6-14b75f78f68b", - "name": "Overtime Hours" - } - ] - } - '400': + example: + id: 1c08b529-0827-4e91-a6a1-c479765aa65f + providerName: provider-name + dateTimeUTC: 2020-04-17T16:56:35.6264368 + httpStatusCode: OK + pagination: null + problem: null + earningTemplates: + - payTemplateEarningID: 6b32533d-1111-4a92-ac52-7641315a1719 + ratePerUnit: 20 + numberOfUnits: 8 + fixedAmount: null + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + name: Regular Hours + - payTemplateEarningID: b8b16366-6a60-4b72-97c1-57af555da375 + ratePerUnit: 20 + numberOfUnits: 8 + fixedAmount: null + earningsRateID: 973365f3-66b2-4c33-8ae6-14b75f78f68b + name: Overtime Hours + "400": description: validation error for a bad request content: application/json: @@ -2596,24 +2510,15 @@ paths: application/json: schema: $ref: '#/components/schemas/EarningsTemplates' - example: '[ - { - "ratePerUnit":20.0, - "numberOfUnits":8.0, - "earningsRateID":"87f5b43a-cf51-4b74-92de-94c819e82d27" - }, - { - "ratePerUnit":20.0, - "numberOfUnits":8.0, - "earningsRateID":"973365f3-66b2-4c33-8ae6-14b75f78f68b" - } - ]' + example: '[ { "ratePerUnit":20.0, "numberOfUnits":8.0, "earningsRateID":"87f5b43a-cf51-4b74-92de-94c819e82d27" }, { "ratePerUnit":20.0, "numberOfUnits":8.0, "earningsRateID":"973365f3-66b2-4c33-8ae6-14b75f78f68b" } ]' /Benefits: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollUk operationId: getBenefits @@ -2626,46 +2531,42 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Benefits' - example: { - "id": "079865dc-f3df-4783-98a9-67db747ab82c", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-15T18:45:03.617089", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 1 - }, - "problem": null, - "benefits": [ - { - "id": "17ee7e28-9f4c-4675-9590-cc0547c9f7ac", - "name": "Mind The Gap Pensions", - "category": "StakeholderPension", - "liabilityAccountId": "d659ebbf-0760-4e07-a1fb-8de6b9ecdff9", - "expenseAccountId": "edda7154-dfc8-4486-a82b-e5e955408eaa", - "standardAmount": null, - "percentage": 3, - "calculationType": "PercentageOfGross", - "currentRecord": true, - "showBalanceToEmployee": false, - "subjectToNIC": null, - "subjectToPension": null, - "subjectToTax": null, - "isCalculatingOnQualifyingEarnings": null - } - ] - } + example: + id: 079865dc-f3df-4783-98a9-67db747ab82c + providerName: provider-name + dateTimeUTC: 2020-04-15T18:45:03.617089 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 1 + problem: null + benefits: + - id: 17ee7e28-9f4c-4675-9590-cc0547c9f7ac + name: Mind The Gap Pensions + category: StakeholderPension + liabilityAccountId: d659ebbf-0760-4e07-a1fb-8de6b9ecdff9 + expenseAccountId: edda7154-dfc8-4486-a82b-e5e955408eaa + standardAmount: null + percentage: 3 + calculationType: PercentageOfGross + currentRecord: true + showBalanceToEmployee: false + subjectToNIC: null + subjectToPension: null + subjectToTax: null + isCalculatingOnQualifyingEarnings: null post: security: - - OAuth2: [payroll.settings] + - OAuth2: + - payroll.settings tags: - PayrollUk operationId: createBenefit @@ -2690,55 +2591,53 @@ paths: keyPascal: ExpenseAccountID keySnake: expense_account_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: benefit - liabilityAccountID: key: liabilityAccountID keyPascal: LiabilityAccountID keySnake: liability_account_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: benefit - isCalculatingOnQualifyingEarnings: key: isCalculatingOnQualifyingEarnings keyPascal: IsCalculatingOnQualifyingEarnings keySnake: is_calculating_on_qualifying_earnings - nonString: true - default: true + nonString: true + default: true object: benefit is_last: true responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/BenefitObject' - example: { - "id": "95352407-6477-42f1-bd9c-bab28af8b0d9", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-15T18:59:01.5812362", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "benefit": { - "id": "d295bf25-fb61-4f91-9b62-a9ae87633746", - "name": "My Big Bennie", - "category": "StakeholderPension", - "liabilityAccountId": "e0faa299-ca0d-4b0a-9e32-0dfabdf9179a", - "expenseAccountId": "4b03500d-32fd-4616-8d70-e1e56e0519c6", - "standardAmount": null, - "percentage": 25, - "calculationType": "PercentageOfGross", - "currentRecord": true, - "showBalanceToEmployee": true, - "subjectToNIC": null, - "subjectToPension": null, - "subjectToTax": null, - "isCalculatingOnQualifyingEarnings": null - } - } - '400': + example: + id: 95352407-6477-42f1-bd9c-bab28af8b0d9 + providerName: provider-name + dateTimeUTC: 2020-04-15T18:59:01.5812362 + httpStatusCode: OK + pagination: null + problem: null + benefit: + id: d295bf25-fb61-4f91-9b62-a9ae87633746 + name: My Big Bennie + category: StakeholderPension + liabilityAccountId: e0faa299-ca0d-4b0a-9e32-0dfabdf9179a + expenseAccountId: 4b03500d-32fd-4616-8d70-e1e56e0519c6 + standardAmount: null + percentage: 25 + calculationType: PercentageOfGross + currentRecord: true + showBalanceToEmployee: true + subjectToNIC: null + subjectToPension: null + subjectToTax: null + isCalculatingOnQualifyingEarnings: null + "400": description: validation error for a bad request content: application/json: @@ -2750,21 +2649,22 @@ paths: application/json: schema: $ref: '#/components/schemas/Benefit' - example: { - "name": "My Big Bennie", - "category": "StakeholderPension", - "liabilityAccountId": "e0faa299-ca0d-4b0a-9e32-0dfabdf9179a", - "expenseAccountId": "4b03500d-32fd-4616-8d70-e1e56e0519c6", - "standardAmount": 50, - "percentage": 25, - "calculationType": "PercentageOfGross" - } + example: + name: My Big Bennie + category: StakeholderPension + liabilityAccountId: e0faa299-ca0d-4b0a-9e32-0dfabdf9179a + expenseAccountId: 4b03500d-32fd-4616-8d70-e1e56e0519c6 + standardAmount: 50 + percentage: 25 + calculationType: PercentageOfGross /Benefits/{id}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollUk operationId: getBenefit @@ -2779,42 +2679,42 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/BenefitObject' - example: { - "id": "e7959d7b-370d-47e5-bb15-4b68f136ddae", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-15T18:45:04.5134277", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "benefit": { - "id": "17ee7e28-9f4c-4675-9590-cc0547c9f7ac", - "name": "Mind The Gap Pensions", - "category": "StakeholderPension", - "liabilityAccountId": "d659ebbf-0760-4e07-a1fb-8de6b9ecdff9", - "expenseAccountId": "edda7154-dfc8-4486-a82b-e5e955408eaa", - "standardAmount": null, - "percentage": 3, - "calculationType": "PercentageOfGross", - "currentRecord": true, - "showBalanceToEmployee": false, - "subjectToNIC": null, - "subjectToPension": null, - "subjectToTax": null, - "isCalculatingOnQualifyingEarnings": null - } - } + example: + id: e7959d7b-370d-47e5-bb15-4b68f136ddae + providerName: provider-name + dateTimeUTC: 2020-04-15T18:45:04.5134277 + httpStatusCode: OK + pagination: null + problem: null + benefit: + id: 17ee7e28-9f4c-4675-9590-cc0547c9f7ac + name: Mind The Gap Pensions + category: StakeholderPension + liabilityAccountId: d659ebbf-0760-4e07-a1fb-8de6b9ecdff9 + expenseAccountId: edda7154-dfc8-4486-a82b-e5e955408eaa + standardAmount: null + percentage: 3 + calculationType: PercentageOfGross + currentRecord: true + showBalanceToEmployee: false + subjectToNIC: null + subjectToPension: null + subjectToTax: null + isCalculatingOnQualifyingEarnings: null /Deductions: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollUk operationId: getDeductions @@ -2827,66 +2727,60 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Deductions' - example: { - "id": "846b81f3-7192-4a78-a05c-ae5d2c402546", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-20T20:57:39.6123797", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 2 - }, - "problem": null, - "deductions": [ - { - "deductionId": "7c736d59-a624-4584-920b-e9910d2887a0", - "deductionName": "Mind The Gap Pensions (NPA)", - "deductionCategory": "StakeholderPension", - "liabilityAccountId": "d659ebbf-0760-4e07-a1fb-8de6b9ecdff9", - "currentRecord": true, - "standardAmount": null, - "reducesSuperLiability": null, - "reducesTaxLiability": null, - "calculationType": "PercentageOfGross", - "percentage": 5, - "subjectToNIC": null, - "subjectToTax": null, - "isReducedByBasicRate": null, - "applyToPensionCalculations": null, - "isCalculatingOnQualifyingEarnings": null, - "isPension": null - }, - { - "deductionId": "49f301d4-2746-43a6-ba4a-e7001b5b83fc", - "deductionName": "Post-Tax Pension", - "deductionCategory": "StakeholderPensionPostTax", - "liabilityAccountId": "d659ebbf-0760-4e07-a1fb-8de6b9ecdff9", - "currentRecord": true, - "standardAmount": null, - "reducesSuperLiability": null, - "reducesTaxLiability": null, - "calculationType": "PercentageOfGross", - "percentage": 0, - "subjectToNIC": null, - "subjectToTax": null, - "isReducedByBasicRate": null, - "applyToPensionCalculations": false, - "isCalculatingOnQualifyingEarnings": null, - "isPension": true - } - ] - } + example: + id: 846b81f3-7192-4a78-a05c-ae5d2c402546 + providerName: provider-name + dateTimeUTC: 2020-04-20T20:57:39.6123797 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 2 + problem: null + deductions: + - deductionId: 7c736d59-a624-4584-920b-e9910d2887a0 + deductionName: Mind The Gap Pensions (NPA) + deductionCategory: StakeholderPension + liabilityAccountId: d659ebbf-0760-4e07-a1fb-8de6b9ecdff9 + currentRecord: true + standardAmount: null + reducesSuperLiability: null + reducesTaxLiability: null + calculationType: PercentageOfGross + percentage: 5 + subjectToNIC: null + subjectToTax: null + isReducedByBasicRate: null + applyToPensionCalculations: null + isCalculatingOnQualifyingEarnings: null + isPension: null + - deductionId: 49f301d4-2746-43a6-ba4a-e7001b5b83fc + deductionName: Post-Tax Pension + deductionCategory: StakeholderPensionPostTax + liabilityAccountId: d659ebbf-0760-4e07-a1fb-8de6b9ecdff9 + currentRecord: true + standardAmount: null + reducesSuperLiability: null + reducesTaxLiability: null + calculationType: PercentageOfGross + percentage: 0 + subjectToNIC: null + subjectToTax: null + isReducedByBasicRate: null + applyToPensionCalculations: false + isCalculatingOnQualifyingEarnings: null + isPension: true post: security: - - OAuth2: [payroll.settings] + - OAuth2: + - payroll.settings tags: - PayrollUk operationId: createDeduction @@ -2907,7 +2801,7 @@ paths: key: deductionCategory keyPascal: DeductionCategory keySnake: deduction_category - nonString: true + nonString: true default: DeductionCategoryEnum.StakeholderPension php: XeroAPI\XeroPHP\Models\PayrollUk\Deduction\DeductionCategoryEnum.StakeholderPension node: Deduction.DeductionCategoryEnum.StakeholderPension @@ -2921,13 +2815,13 @@ paths: keyPascal: LiabilityAccountId keySnake: liability_account_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: deduction - calculationType: key: calculationType keyPascal: CalculationType keySnake: calculation_type - nonString: true + nonString: true default: CalculationTypeEnum.PercentageOfGross php: XeroAPI\XeroPHP\Models\PayrolUk\Deduction\CalculationTypeEnum.PercentageOfGross node: Deduction.CalculationTypeEnum.PercentageOfGross @@ -2941,39 +2835,37 @@ paths: parameters: - $ref: '#/components/parameters/idempotencyKey' responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/DeductionObject' - example: { - "id": "26cf94f5-6b62-4f76-8e89-44e4d0062566", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-20T23:03:00.7012103", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "deduction": { - "deductionId": "b3695b29-750f-4957-98b4-678e4a529043", - "deductionName": "My new deduction", - "deductionCategory": "SalarySacrifice", - "liabilityAccountId": "e0faa299-ca0d-4b0a-9e32-0dfabdf9179a", - "currentRecord": true, - "standardAmount": null, - "reducesSuperLiability": null, - "reducesTaxLiability": null, - "calculationType": "FixedAmount", - "percentage": null, - "subjectToNIC": null, - "subjectToTax": null, - "isReducedByBasicRate": null, - "applyToPensionCalculations": null, - "isCalculatingOnQualifyingEarnings": null, - "isPension": null - } - } - '400': + example: + id: 26cf94f5-6b62-4f76-8e89-44e4d0062566 + providerName: provider-name + dateTimeUTC: 2020-04-20T23:03:00.7012103 + httpStatusCode: OK + pagination: null + problem: null + deduction: + deductionId: b3695b29-750f-4957-98b4-678e4a529043 + deductionName: My new deduction + deductionCategory: SalarySacrifice + liabilityAccountId: e0faa299-ca0d-4b0a-9e32-0dfabdf9179a + currentRecord: true + standardAmount: null + reducesSuperLiability: null + reducesTaxLiability: null + calculationType: FixedAmount + percentage: null + subjectToNIC: null + subjectToTax: null + isReducedByBasicRate: null + applyToPensionCalculations: null + isCalculatingOnQualifyingEarnings: null + isPension: null + "400": description: validation error for a bad request content: application/json: @@ -2985,18 +2877,19 @@ paths: application/json: schema: $ref: '#/components/schemas/Deduction' - example: { - "deductionName": "My new deduction", - "deductionCategory": "SalarySacrifice", - "liabilityAccountId": "e0faa299-ca0d-4b0a-9e32-0dfabdf9179a", - "calculationType": "FixedAmount" - } + example: + deductionName: My new deduction + deductionCategory: SalarySacrifice + liabilityAccountId: e0faa299-ca0d-4b0a-9e32-0dfabdf9179a + calculationType: FixedAmount /Deductions/{deductionId}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollUk operationId: getDeduction @@ -3012,38 +2905,36 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/DeductionObject' - example: { - "id": "addf44c5-5a3b-4d25-a61c-4e9e85cb27b3", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-20T22:42:54.5394384", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "deduction": { - "deductionId": "7c736d59-a624-4584-920b-e9910d2887a0", - "deductionName": "Mind The Gap Pensions (NPA)", - "deductionCategory": "StakeholderPension", - "liabilityAccountId": "d659ebbf-0760-4e07-a1fb-8de6b9ecdff9", - "currentRecord": true, - "standardAmount": null, - "reducesSuperLiability": null, - "reducesTaxLiability": null, - "calculationType": "PercentageOfGross", - "percentage": 5, - "subjectToNIC": null, - "subjectToTax": null, - "isReducedByBasicRate": null, - "applyToPensionCalculations": null, - "isCalculatingOnQualifyingEarnings": null, - "isPension": null - } - } + example: + id: addf44c5-5a3b-4d25-a61c-4e9e85cb27b3 + providerName: provider-name + dateTimeUTC: 2020-04-20T22:42:54.5394384 + httpStatusCode: OK + pagination: null + problem: null + deduction: + deductionId: 7c736d59-a624-4584-920b-e9910d2887a0 + deductionName: Mind The Gap Pensions (NPA) + deductionCategory: StakeholderPension + liabilityAccountId: d659ebbf-0760-4e07-a1fb-8de6b9ecdff9 + currentRecord: true + standardAmount: null + reducesSuperLiability: null + reducesTaxLiability: null + calculationType: PercentageOfGross + percentage: 5 + subjectToNIC: null + subjectToTax: null + isReducedByBasicRate: null + applyToPensionCalculations: null + isCalculatingOnQualifyingEarnings: null + isPension: null # NZ PAYROLL # /StatutoryDeductions: # parameters: @@ -3098,7 +2989,9 @@ paths: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollUk operationId: getEarningsOrders @@ -3111,89 +3004,72 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EarningsOrders' - example: { - "id": "5bf85b65-c2de-4632-8e5e-cc0ab3d18ff0", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-20T23:21:36.0480051", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 8 - }, - "problem": null, - "statutoryDeductions": [ - { - "id": "d00d0128-500b-4685-8332-8fc8743a395c", - "name": "AEO (maintenance)", - "liabilityAccountId": "921237ae-76ff-4f4c-bf70-5c3c177b149d", - "statutoryDeductionCategory": "PriorityOrder", - "currentRecord": true - }, - { - "id": "f7a63612-a68d-431e-96d4-3fd0708e46b5", - "name": "AEO (fines)", - "liabilityAccountId": "921237ae-76ff-4f4c-bf70-5c3c177b149d", - "statutoryDeductionCategory": "PriorityOrder", - "currentRecord": true - }, - { - "id": "dabd9a53-25ac-4349-9fb3-8005ea781574", - "name": "AEO (civil debts)", - "liabilityAccountId": "921237ae-76ff-4f4c-bf70-5c3c177b149d", - "statutoryDeductionCategory": "NonPriorityOrder", - "currentRecord": true - }, - { - "id": "73ae94bb-182c-4242-8d67-1a281597ca9c", - "name": "CTAEO", - "liabilityAccountId": "921237ae-76ff-4f4c-bf70-5c3c177b149d", - "statutoryDeductionCategory": "PriorityOrder", - "currentRecord": true - }, - { - "id": "649a3c59-3937-43d2-b0e4-5e8942f17ffa", - "name": "Child Support DEO", - "liabilityAccountId": "921237ae-76ff-4f4c-bf70-5c3c177b149d", - "statutoryDeductionCategory": "PriorityOrder", - "currentRecord": true - }, - { - "id": "d4a4441f-452a-4067-97ac-ded4d157c319", - "name": "Earnings Arrestment (Scotland)", - "liabilityAccountId": "921237ae-76ff-4f4c-bf70-5c3c177b149d", - "statutoryDeductionCategory": "TableBased", - "currentRecord": true - }, - { - "id": "deec134a-2378-439c-89db-a71fa57fb28a", - "name": "Conjoined Arrestment Order (Scotland)", - "liabilityAccountId": "921237ae-76ff-4f4c-bf70-5c3c177b149d", - "statutoryDeductionCategory": "TableBased", - "currentRecord": true - }, - { - "id": "750c7c89-0579-45b4-becc-221a52119bd4", - "name": "Current Maintenance Arrest (Scotland)", - "liabilityAccountId": "921237ae-76ff-4f4c-bf70-5c3c177b149d", - "statutoryDeductionCategory": "NonPriorityOrder", - "currentRecord": true - } - ] - } + example: + id: 5bf85b65-c2de-4632-8e5e-cc0ab3d18ff0 + providerName: provider-name + dateTimeUTC: 2020-04-20T23:21:36.0480051 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 8 + problem: null + statutoryDeductions: + - id: d00d0128-500b-4685-8332-8fc8743a395c + name: AEO (maintenance) + liabilityAccountId: 921237ae-76ff-4f4c-bf70-5c3c177b149d + statutoryDeductionCategory: PriorityOrder + currentRecord: true + - id: f7a63612-a68d-431e-96d4-3fd0708e46b5 + name: AEO (fines) + liabilityAccountId: 921237ae-76ff-4f4c-bf70-5c3c177b149d + statutoryDeductionCategory: PriorityOrder + currentRecord: true + - id: dabd9a53-25ac-4349-9fb3-8005ea781574 + name: AEO (civil debts) + liabilityAccountId: 921237ae-76ff-4f4c-bf70-5c3c177b149d + statutoryDeductionCategory: NonPriorityOrder + currentRecord: true + - id: 73ae94bb-182c-4242-8d67-1a281597ca9c + name: CTAEO + liabilityAccountId: 921237ae-76ff-4f4c-bf70-5c3c177b149d + statutoryDeductionCategory: PriorityOrder + currentRecord: true + - id: 649a3c59-3937-43d2-b0e4-5e8942f17ffa + name: Child Support DEO + liabilityAccountId: 921237ae-76ff-4f4c-bf70-5c3c177b149d + statutoryDeductionCategory: PriorityOrder + currentRecord: true + - id: d4a4441f-452a-4067-97ac-ded4d157c319 + name: Earnings Arrestment (Scotland) + liabilityAccountId: 921237ae-76ff-4f4c-bf70-5c3c177b149d + statutoryDeductionCategory: TableBased + currentRecord: true + - id: deec134a-2378-439c-89db-a71fa57fb28a + name: Conjoined Arrestment Order (Scotland) + liabilityAccountId: 921237ae-76ff-4f4c-bf70-5c3c177b149d + statutoryDeductionCategory: TableBased + currentRecord: true + - id: 750c7c89-0579-45b4-becc-221a52119bd4 + name: Current Maintenance Arrest (Scotland) + liabilityAccountId: 921237ae-76ff-4f4c-bf70-5c3c177b149d + statutoryDeductionCategory: NonPriorityOrder + currentRecord: true /EarningsOrders/{id}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollUk operationId: getEarningsOrder @@ -3208,33 +3084,33 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EarningsOrderObject' - example: { - "id": "e0fd1c57-e9d0-4c3f-9a1a-0355ddf7c060", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-20T23:37:30.3398526", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "statutoryDeduction": { - "id": "d00d0128-500b-4685-8332-8fc8743a395c", - "name": "AEO (maintenance)", - "liabilityAccountId": "921237ae-76ff-4f4c-bf70-5c3c177b149d", - "statutoryDeductionCategory": "PriorityOrder", - "currentRecord": true - } - } + example: + id: e0fd1c57-e9d0-4c3f-9a1a-0355ddf7c060 + providerName: provider-name + dateTimeUTC: 2020-04-20T23:37:30.3398526 + httpStatusCode: OK + pagination: null + problem: null + statutoryDeduction: + id: d00d0128-500b-4685-8332-8fc8743a395c + name: AEO (maintenance) + liabilityAccountId: 921237ae-76ff-4f4c-bf70-5c3c177b149d + statutoryDeductionCategory: PriorityOrder + currentRecord: true /EarningsRates: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollUk operationId: getEarningsRates @@ -3247,54 +3123,48 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EarningsRates' - example: { - "id": "fbe7a960-fad3-4293-8de9-0fabfbea615f", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-15T15:00:05.2418623", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 13 - }, - "problem": null, - "earningsRates": [ - { - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "name": "Regular Hours", - "earningsType": "RegularEarnings", - "rateType": "RatePerUnit", - "typeOfUnits": "hours", - "currentRecord": true, - "expenseAccountID": "81da553d-c6c6-411e-95df-cc4ac8f7e1c2", - "fixedAmount": null, - "ratePerUnit": null, - "multipleOfOrdinaryEarningsRate": null - }, - { - "earningsRateID": "973365f3-66b2-4c33-8ae6-14b75f78f68b", - "name": "Overtime Hours", - "earningsType": "OvertimeEarnings", - "rateType": "MultipleOfOrdinaryEarningsRate", - "typeOfUnits": null, - "currentRecord": true, - "expenseAccountID": "81da553d-c6c6-411e-95df-cc4ac8f7e1c2", - "fixedAmount": null, - "ratePerUnit": null, - "multipleOfOrdinaryEarningsRate": 1.5 - } - ] - } + example: + id: fbe7a960-fad3-4293-8de9-0fabfbea615f + providerName: provider-name + dateTimeUTC: 2020-04-15T15:00:05.2418623 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 13 + problem: null + earningsRates: + - earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + name: Regular Hours + earningsType: RegularEarnings + rateType: RatePerUnit + typeOfUnits: hours + currentRecord: true + expenseAccountID: 81da553d-c6c6-411e-95df-cc4ac8f7e1c2 + fixedAmount: null + ratePerUnit: null + multipleOfOrdinaryEarningsRate: null + - earningsRateID: 973365f3-66b2-4c33-8ae6-14b75f78f68b + name: Overtime Hours + earningsType: OvertimeEarnings + rateType: MultipleOfOrdinaryEarningsRate + typeOfUnits: null + currentRecord: true + expenseAccountID: 81da553d-c6c6-411e-95df-cc4ac8f7e1c2 + fixedAmount: null + ratePerUnit: null + multipleOfOrdinaryEarningsRate: 1.5 post: security: - - OAuth2: [payroll.settings] + - OAuth2: + - payroll.settings tags: - PayrollUk operationId: createEarningsRate @@ -3312,7 +3182,7 @@ paths: key: earningsType keyPascal: EarningsType keySnake: earnings_type - nonString: true + nonString: true default: EarningsTypeEnum.RegularEarnings php: XeroAPI\XeroPHP\Models\PayrollUk\EarningsRate\EarningsTypeEnum.RegularEarnings node: EarningsRate.EarningsTypeEnum.RegularEarnings @@ -3333,49 +3203,47 @@ paths: csharp: EarningsRate.RateTypeEnum.RatePerUnit default: RatePerUnit object: earningsRate - nonString: true + nonString: true - expenseAccountID: key: expenseAccountID keyPascal: ExpenseAccountID keySnake: expense_account_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: earningsRate - typeOfUnits: key: typeOfUnits keyPascal: TypeOfUnits keySnake: type_of_units default: Type - object: earningsRate + object: earningsRate is_last: true responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EarningsRateObject' - example: { - "id": "cc5341dd-c652-47f0-b8a3-67a22617ca7b", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-15T18:12:04.6341065", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "earningsRate": { - "earningsRateID": "fcf811a8-3843-4e87-8431-c62e83158aef", - "name": "My Earnings Rate", - "earningsType": "RegularEarnings", - "rateType": "RatePerUnit", - "typeOfUnits": "hours", - "currentRecord": true, - "expenseAccountID": "4b03500d-32fd-4616-8d70-e1e56e0519c6", - "fixedAmount": null, - "ratePerUnit": null, - "multipleOfOrdinaryEarningsRate": null - } - } - '400': + example: + id: cc5341dd-c652-47f0-b8a3-67a22617ca7b + providerName: provider-name + dateTimeUTC: 2020-04-15T18:12:04.6341065 + httpStatusCode: OK + pagination: null + problem: null + earningsRate: + earningsRateID: fcf811a8-3843-4e87-8431-c62e83158aef + name: My Earnings Rate + earningsType: RegularEarnings + rateType: RatePerUnit + typeOfUnits: hours + currentRecord: true + expenseAccountID: 4b03500d-32fd-4616-8d70-e1e56e0519c6 + fixedAmount: null + ratePerUnit: null + multipleOfOrdinaryEarningsRate: null + "400": description: validation error for a bad request content: application/json: @@ -3387,19 +3255,20 @@ paths: application/json: schema: $ref: '#/components/schemas/EarningsRate' - example: { - "name": "My Earnings Rate", - "earningsType": "RegularEarnings", - "rateType": "RatePerUnit", - "typeOfUnits": "hours", - "expenseAccountID": "4b03500d-32fd-4616-8d70-e1e56e0519c6" - } + example: + name: My Earnings Rate + earningsType: RegularEarnings + rateType: RatePerUnit + typeOfUnits: hours + expenseAccountID: 4b03500d-32fd-4616-8d70-e1e56e0519c6 /EarningsRates/{EarningsRateID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollUk operationId: getEarningsRate @@ -3415,38 +3284,38 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/EarningsRateObject' - example: { - "id": "85375ff5-6ccf-4d8c-a976-0531c94597de", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-15T16:54:51.8240698", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "earningsRate": { - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "name": "Regular Hours", - "earningsType": "RegularEarnings", - "rateType": "RatePerUnit", - "typeOfUnits": "hours", - "currentRecord": true, - "expenseAccountID": "81da553d-c6c6-411e-95df-cc4ac8f7e1c2", - "fixedAmount": null, - "ratePerUnit": null, - "multipleOfOrdinaryEarningsRate": null - } - } + example: + id: 85375ff5-6ccf-4d8c-a976-0531c94597de + providerName: provider-name + dateTimeUTC: 2020-04-15T16:54:51.8240698 + httpStatusCode: OK + pagination: null + problem: null + earningsRate: + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + name: Regular Hours + earningsType: RegularEarnings + rateType: RatePerUnit + typeOfUnits: hours + currentRecord: true + expenseAccountID: 81da553d-c6c6-411e-95df-cc4ac8f7e1c2 + fixedAmount: null + ratePerUnit: null + multipleOfOrdinaryEarningsRate: null /LeaveTypes: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollUk operationId: getLeaveTypes @@ -3465,48 +3334,42 @@ paths: schema: type: boolean responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/LeaveTypes' - example: { - "id": "cb429b37-78d3-4b15-9788-83cbd1fd3f72", - "providerName": "provider-name", - "dateTimeUTC": "2020-03-27T18:32:57.9928041", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 12 - }, - "problem": null, - "leaveTypes": [ - { - "leaveTypeID": "ed08dffe-788e-4b24-9630-f0fa2f4d164c", - "name": "Holiday", - "isPaidLeave": true, - "showOnPayslip": true, - "updatedDateUTC": "2020-02-13T15:56:11Z", - "isStatutoryLeave": false, - "isActive": true - }, - { - "leaveTypeID": "1d2778ee-86ea-45c0-bbf8-1045485f6b3f", - "name": "Parental Leave", - "isPaidLeave": true, - "showOnPayslip": true, - "updatedDateUTC": "2020-03-27T18:19:53Z", - "isStatutoryLeave": false, - "isActive": true - } - ] - } + example: + id: cb429b37-78d3-4b15-9788-83cbd1fd3f72 + providerName: provider-name + dateTimeUTC: 2020-03-27T18:32:57.9928041 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 12 + problem: null + leaveTypes: + - leaveTypeID: ed08dffe-788e-4b24-9630-f0fa2f4d164c + name: Holiday + isPaidLeave: true + showOnPayslip: true + updatedDateUTC: "2020-02-13T15:56:11Z" + isStatutoryLeave: false + isActive: true + - leaveTypeID: 1d2778ee-86ea-45c0-bbf8-1045485f6b3f + name: Parental Leave + isPaidLeave: true + showOnPayslip: true + updatedDateUTC: "2020-03-27T18:19:53Z" + isStatutoryLeave: false + isActive: true post: security: - - OAuth2: [payroll.settings] + - OAuth2: + - payroll.settings tags: - PayrollUk operationId: createLeaveType @@ -3527,45 +3390,43 @@ paths: key: isPaidLeave keyPascal: IsPaidLeave keySnake: is_paid_leave - nonString: true + nonString: true object: leaveType - default: true + default: true - showOnPayslip: key: showOnPayslip keyPascal: ShowOnPayslip keySnake: show_on_payslip - nonString: true + nonString: true object: leaveType - default: true + default: true is_last: true summary: Creates a new leave type parameters: - $ref: '#/components/parameters/idempotencyKey' responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/LeaveTypeObject' - example: { - "id": "89aeb982-d6e8-45dd-a853-fcaee4fc99cc", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-21T02:59:35.5461123", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "leaveType": { - "leaveTypeID": "4c027a23-6e7b-4547-808b-c34b2b140fef", - "name": "My opebvwbfxf Leave", - "isPaidLeave": false, - "showOnPayslip": true, - "updatedDateUTC": "2020-04-21T02:59:35.3831249Z", - "isStatutoryLeave": null, - "isActive": true - } - } - '400': + example: + id: 89aeb982-d6e8-45dd-a853-fcaee4fc99cc + providerName: provider-name + dateTimeUTC: 2020-04-21T02:59:35.5461123 + httpStatusCode: OK + pagination: null + problem: null + leaveType: + leaveTypeID: 4c027a23-6e7b-4547-808b-c34b2b140fef + name: My opebvwbfxf Leave + isPaidLeave: false + showOnPayslip: true + updatedDateUTC: "2020-04-21T02:59:35.3831249Z" + isStatutoryLeave: null + isActive: true + "400": description: validation error for a bad request content: application/json: @@ -3577,17 +3438,18 @@ paths: application/json: schema: $ref: '#/components/schemas/LeaveType' - example: { - "name": "My opebvwbfxf Leave", - "isPaidLeave": false, - "showOnPayslip": true - } + example: + name: My opebvwbfxf Leave + isPaidLeave: false + showOnPayslip: true /LeaveTypes/{LeaveTypeID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollUk operationId: getLeaveType @@ -3603,35 +3465,35 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/LeaveTypeObject' - example: { - "id": "684454f6-d808-46e0-b83d-5593a560b9d0", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-21T02:59:34.9401664", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "leaveType": { - "leaveTypeID": "ed08dffe-788e-4b24-9630-f0fa2f4d164c", - "name": "Holiday", - "isPaidLeave": true, - "showOnPayslip": true, - "updatedDateUTC": "2020-04-20T20:14:31", - "isStatutoryLeave": false, - "isActive": true - } - } + example: + id: 684454f6-d808-46e0-b83d-5593a560b9d0 + providerName: provider-name + dateTimeUTC: 2020-04-21T02:59:34.9401664 + httpStatusCode: OK + pagination: null + problem: null + leaveType: + leaveTypeID: ed08dffe-788e-4b24-9630-f0fa2f4d164c + name: Holiday + isPaidLeave: true + showOnPayslip: true + updatedDateUTC: 2020-04-20T20:14:31 + isStatutoryLeave: false + isActive: true /Reimbursements: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollUk operationId: getReimbursements @@ -3644,42 +3506,36 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Reimbursements' - example: { - "id": "eea19a1d-a714-41c0-8730-94b6d4fbac84", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-15T00:17:27.1947108", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 5 - }, - "problem": null, - "reimbursements": [ - { - "reimbursementID": "fef6115f-1606-4a74-be54-312d46b0eb0e", - "name": "Travel Allowance", - "accountID": "c7b73345-7f25-428a-bb97-7b20a1470a53", - "currentRecord": true - }, - { - "reimbursementID": "8e8d7849-26e1-41d1-a41f-7e1d0bfa147b", - "name": "Mileage", - "accountID": "0be1631e-cc7e-4c27-951f-308c3307c0fe", - "currentRecord": true - } - ] - } + example: + id: eea19a1d-a714-41c0-8730-94b6d4fbac84 + providerName: provider-name + dateTimeUTC: 2020-04-15T00:17:27.1947108 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 5 + problem: null + reimbursements: + - reimbursementID: fef6115f-1606-4a74-be54-312d46b0eb0e + name: Travel Allowance + accountID: c7b73345-7f25-428a-bb97-7b20a1470a53 + currentRecord: true + - reimbursementID: 8e8d7849-26e1-41d1-a41f-7e1d0bfa147b + name: Mileage + accountID: 0be1631e-cc7e-4c27-951f-308c3307c0fe + currentRecord: true post: security: - - OAuth2: [payroll.settings] + - OAuth2: + - payroll.settings tags: - PayrollUk operationId: createReimbursement @@ -3701,34 +3557,32 @@ paths: keyPascal: AccountID keySnake: account_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: reimbursement is_last: true summary: Creates a new reimbursement parameters: - $ref: '#/components/parameters/idempotencyKey' responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/ReimbursementObject' - example: { - "id": "310ecff7-8577-4e05-98a3-3ce7ecb2868a", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-15T00:43:39.0988382", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "reimbursement": { - "reimbursementID": "2b1b587a-39f6-43f8-9dd9-a858314333c8", - "name": "My new Reimburse", - "accountID": "9ee28149-32a9-4661-8eab-a28738696983", - "currentRecord": true - } - } - '400': + example: + id: 310ecff7-8577-4e05-98a3-3ce7ecb2868a + providerName: provider-name + dateTimeUTC: 2020-04-15T00:43:39.0988382 + httpStatusCode: OK + pagination: null + problem: null + reimbursement: + reimbursementID: 2b1b587a-39f6-43f8-9dd9-a858314333c8 + name: My new Reimburse + accountID: 9ee28149-32a9-4661-8eab-a28738696983 + currentRecord: true + "400": description: validation error for a bad request content: application/json: @@ -3740,16 +3594,17 @@ paths: application/json: schema: $ref: '#/components/schemas/Reimbursement' - example: { - "name": "My new Reimburse", - "accountID": "9ee28149-32a9-4661-8eab-a28738696983" - } + example: + name: My new Reimburse + accountID: 9ee28149-32a9-4661-8eab-a28738696983 /Reimbursements/{ReimbursementID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollUk operationId: getReimbursement @@ -3765,32 +3620,32 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/ReimbursementObject' - example: { - "id": "9c727a87-a96b-4998-b7e7-6b79347915cc", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-21T03:05:16.5248369", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "reimbursement": { - "reimbursementID": "fef6115f-1606-4a74-be54-312d46b0eb0e", - "name": "Travel Allowance", - "accountID": "c7b73345-7f25-428a-bb97-7b20a1470a53", - "currentRecord": true - } - } + example: + id: 9c727a87-a96b-4998-b7e7-6b79347915cc + providerName: provider-name + dateTimeUTC: 2020-04-21T03:05:16.5248369 + httpStatusCode: OK + pagination: null + problem: null + reimbursement: + reimbursementID: fef6115f-1606-4a74-be54-312d46b0eb0e + name: Travel Allowance + accountID: c7b73345-7f25-428a-bb97-7b20a1470a53 + currentRecord: true /Timesheets: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.timesheets, payroll.timesheets.read] + - OAuth2: + - payroll.timesheets + - payroll.timesheets.read tags: - PayrollUk operationId: getTimesheets @@ -3836,40 +3691,36 @@ paths: type: string example: startDate responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Timesheets' - example: { - "id": "d81c2087-3ecb-4d91-b775-73d85f593370", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-13T21:54:01.8865016", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 1 - }, - "problem": null, - "timesheets": [ - { - "timesheetID": "0c94d453-3d8c-4167-8c25-b4025121d18b", - "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe", - "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0", - "startDate": "2020-04-13T00:00:00", - "endDate": "2020-04-19T00:00:00", - "status": "Approved", - "totalHours": 16, - "updatedDateUTC": "2020-04-13T21:53:39" - } - ] - } + example: + id: d81c2087-3ecb-4d91-b775-73d85f593370 + providerName: provider-name + dateTimeUTC: 2020-04-13T21:54:01.8865016 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 1 + problem: null + timesheets: + - timesheetID: 0c94d453-3d8c-4167-8c25-b4025121d18b + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + startDate: 2020-04-13T00:00:00 + endDate: 2020-04-19T00:00:00 + status: Approved + totalHours: 16 + updatedDateUTC: 2020-04-13T21:53:39 post: security: - - OAuth2: [payroll.timesheets] + - OAuth2: + - payroll.timesheets tags: - PayrollUk operationId: createTimesheet @@ -3882,13 +3733,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - endDateValue: key: endDate keyPascal: EndDate @@ -3896,13 +3747,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 30)" - java: "LocalDate.of(2020, Month.OCTOBER, 30)" - csharp: "new DateTime(2020, 10, 12)" - php: "new DateTime('2020-10-30')" - node: "'2020-10-30'" - python: "dateutil.parser.parse('2020-10-30T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 30) + java: LocalDate.of(2020, Month.OCTOBER, 30) + csharp: new DateTime(2020, 10, 12) + php: new DateTime('2020-10-30') + node: '''2020-10-30''' + python: dateutil.parser.parse('2020-10-30T00:00:00Z') + ruby: '''YYYY-MM-DD''' - timesheet: key: timesheet keyPascal: Timesheet @@ -3913,14 +3764,14 @@ paths: keyPascal: PayrollCalendarID keySnake: payroll_calendar_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: timesheet - employeeID: key: employeeID keyPascal: EmployeeID keySnake: employee_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: timesheet - startDate: is_variable: true @@ -3933,7 +3784,7 @@ paths: ruby: start_date object: timesheet - endDate: - is_last: true + is_last: true is_variable: true nonString: true key: endDate @@ -3947,47 +3798,40 @@ paths: parameters: - $ref: '#/components/parameters/idempotencyKey' responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/TimesheetObject' - example: { - "id": "ef0aa7e2-6f7f-43f6-9186-af670dce7c69", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-21T03:07:37.0148822", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "timesheet": { - "timesheetID": "88d2038a-06f7-4b8a-bdab-809804c0aa1d", - "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe", - "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0", - "startDate": "2020-04-13T00:00:00", - "endDate": "2020-04-19T00:00:00", - "status": "Draft", - "totalHours": 14, - "updatedDateUTC": "2020-04-21T03:07:36.8132834", - "timesheetLines": [ - { - "timesheetLineID": "03060d0c-b14a-4339-aced-51cb2e5313b7", - "date": "2020-04-15T00:00:00", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "trackingItemID": null, - "numberOfUnits": 6 - }, - { - "timesheetLineID": "53ebdb54-b604-4d15-8c42-5162a7fe88e6", - "date": "2020-04-13T00:00:00", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "trackingItemID": null, - "numberOfUnits": 8 - } - ] - } - } - '400': + example: + id: ef0aa7e2-6f7f-43f6-9186-af670dce7c69 + providerName: provider-name + dateTimeUTC: 2020-04-21T03:07:37.0148822 + httpStatusCode: OK + pagination: null + problem: null + timesheet: + timesheetID: 88d2038a-06f7-4b8a-bdab-809804c0aa1d + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + startDate: 2020-04-13T00:00:00 + endDate: 2020-04-19T00:00:00 + status: Draft + totalHours: 14 + updatedDateUTC: 2020-04-21T03:07:36.8132834 + timesheetLines: + - timesheetLineID: 03060d0c-b14a-4339-aced-51cb2e5313b7 + date: 2020-04-15T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 6 + - timesheetLineID: 53ebdb54-b604-4d15-8c42-5162a7fe88e6 + date: 2020-04-13T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 8 + "400": description: validation error for a bad request content: application/json: @@ -3999,30 +3843,26 @@ paths: application/json: schema: $ref: '#/components/schemas/Timesheet' - example: { - "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe", - "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0", - "startDate": "2020-04-13", - "endDate": "2020-04-19", - "timesheetLines": [ - { - "date": "2020-04-13", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "numberOfUnits": 8 - }, - { - "date": "2020-04-15", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "numberOfUnits": 6 - } - ] - } + example: + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + startDate: "2020-04-13" + endDate: "2020-04-19" + timesheetLines: + - date: "2020-04-13" + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + numberOfUnits: 8 + - date: "2020-04-15" + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + numberOfUnits: 6 /Timesheets/{TimesheetID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.timesheets, payroll.timesheets.read] + - OAuth2: + - payroll.timesheets + - payroll.timesheets.read tags: - PayrollUk operationId: getTimesheet @@ -4038,49 +3878,43 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/TimesheetObject' - example: { - "id": "504259ac-df26-482e-bd0a-d792d96453bb", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-14T16:41:00.5013526", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "timesheet": { - "timesheetID": "25c59963-5df2-43c3-88f6-25a3caa63084", - "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe", - "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0", - "startDate": "2020-04-13T00:00:00", - "endDate": "2020-04-19T00:00:00", - "status": "Draft", - "totalHours": 14, - "updatedDateUTC": "2020-04-14T16:31:35", - "timesheetLines": [ - { - "timesheetLineID": "6cc1e5c3-f080-4dbc-a82b-bea256ef939f", - "date": "2020-04-13T00:00:00", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "trackingItemID": null, - "numberOfUnits": 8 - }, - { - "timesheetLineID": "3d900df1-9859-492b-9b00-155860158c0d", - "date": "2020-04-15T00:00:00", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "trackingItemID": null, - "numberOfUnits": 6 - } - ] - } - } + example: + id: 504259ac-df26-482e-bd0a-d792d96453bb + providerName: provider-name + dateTimeUTC: 2020-04-14T16:41:00.5013526 + httpStatusCode: OK + pagination: null + problem: null + timesheet: + timesheetID: 25c59963-5df2-43c3-88f6-25a3caa63084 + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + startDate: 2020-04-13T00:00:00 + endDate: 2020-04-19T00:00:00 + status: Draft + totalHours: 14 + updatedDateUTC: 2020-04-14T16:31:35 + timesheetLines: + - timesheetLineID: 6cc1e5c3-f080-4dbc-a82b-bea256ef939f + date: 2020-04-13T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 8 + - timesheetLineID: 3d900df1-9859-492b-9b00-155860158c0d + date: 2020-04-15T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 6 delete: security: - - OAuth2: [payroll.timesheets] + - OAuth2: + - payroll.timesheets tags: - PayrollUk operationId: deleteTimesheet @@ -4095,13 +3929,13 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/TimesheetLine' - '400': + "400": description: validation error for a bad request content: application/json: @@ -4112,7 +3946,8 @@ paths: - $ref: '#/components/parameters/requiredHeader' post: security: - - OAuth2: [payroll.timesheets] + - OAuth2: + - payroll.timesheets tags: - PayrollUk operationId: createTimesheetLine @@ -4125,13 +3960,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - timesheetLine: key: timesheetLine keyPascal: TimesheetLine @@ -4142,7 +3977,7 @@ paths: keyPascal: TimesheetLineID keySnake: timesheet_line_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: timesheetLine - date: key: date @@ -4159,14 +3994,14 @@ paths: keyPascal: EarningsRateID keySnake: earnings_rate_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: timesheetLine - trackingItemID: key: trackingItemID keyPascal: TrackingItemID keySnake: tracking_item_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: timesheetLine - numberOfUnits: key: numberOfUnits @@ -4174,7 +4009,7 @@ paths: keySnake: number_of_units default: 6 object: timesheetLine - nonString: true + nonString: true is_last: true summary: Creates a new timesheet line for a specific timesheet using a unique timesheet ID parameters: @@ -4188,28 +4023,26 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/TimesheetLineObject' - example: { - "id": "cf701261-529e-47cd-8156-5ec9ab3394ff", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-14T17:19:22.8599292", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "timesheetLine": { - "timesheetLineID": "56fce87e-7f0d-4c19-8f74-7f5656651c81", - "date": "2020-04-14T00:00:00", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "trackingItemID": null, - "numberOfUnits": 1 - } - } - '400': + example: + id: cf701261-529e-47cd-8156-5ec9ab3394ff + providerName: provider-name + dateTimeUTC: 2020-04-14T17:19:22.8599292 + httpStatusCode: OK + pagination: null + problem: null + timesheetLine: + timesheetLineID: 56fce87e-7f0d-4c19-8f74-7f5656651c81 + date: 2020-04-14T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 1 + "400": description: validation error for a bad request content: application/json: @@ -4221,17 +4054,17 @@ paths: application/json: schema: $ref: '#/components/schemas/TimesheetLine' - example: { - "date": "2020-04-14", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "numberOfUnits": 1 - } + example: + date: "2020-04-14" + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + numberOfUnits: 1 /Timesheets/{TimesheetID}/Approve: parameters: - $ref: '#/components/parameters/requiredHeader' post: security: - - OAuth2: [payroll.timesheets] + - OAuth2: + - payroll.timesheets tags: - PayrollUk operationId: approveTimesheet @@ -4248,54 +4081,45 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/TimesheetObject' - example: { - "id": "94c27148-2749-4d85-bc1a-986e6de230ae", - "providerName": "provider-name", - "dateTimeUTC": "2020-06-01T20:32:19.7577043", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "timesheet": { - "timesheetID": "62bd8b5f-8e90-4868-a0e6-62f994f7d659", - "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe", - "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0", - "startDate": "2020-04-13T00:00:00", - "endDate": "2020-04-19T00:00:00", - "status": "Approved", - "totalHours": 9, - "updatedDateUTC": "2020-06-01T20:32:19.9534744", - "timesheetLines": [ - { - "timesheetLineID": "ce6db38f-efe9-49dc-ae42-7e6bad3cb167", - "date": "2020-04-14T00:00:00", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "trackingItemID": null, - "numberOfUnits": 2 - }, - { - "timesheetLineID": "bc8004d2-5965-4f4e-8e46-0519040b4a05", - "date": "2020-04-15T00:00:00", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "trackingItemID": null, - "numberOfUnits": 6 - }, - { - "timesheetLineID": "fd00cd5a-7d0c-4cb7-85ff-66bd3ed2439a", - "date": "2020-04-14T00:00:00", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "trackingItemID": null, - "numberOfUnits": 1 - } - ] - } - } - '400': + example: + id: 94c27148-2749-4d85-bc1a-986e6de230ae + providerName: provider-name + dateTimeUTC: 2020-06-01T20:32:19.7577043 + httpStatusCode: OK + pagination: null + problem: null + timesheet: + timesheetID: 62bd8b5f-8e90-4868-a0e6-62f994f7d659 + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + startDate: 2020-04-13T00:00:00 + endDate: 2020-04-19T00:00:00 + status: Approved + totalHours: 9 + updatedDateUTC: 2020-06-01T20:32:19.9534744 + timesheetLines: + - timesheetLineID: ce6db38f-efe9-49dc-ae42-7e6bad3cb167 + date: 2020-04-14T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 2 + - timesheetLineID: bc8004d2-5965-4f4e-8e46-0519040b4a05 + date: 2020-04-15T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 6 + - timesheetLineID: fd00cd5a-7d0c-4cb7-85ff-66bd3ed2439a + date: 2020-04-14T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 1 + "400": description: validation error for a bad request content: application/json: @@ -4306,7 +4130,8 @@ paths: - $ref: '#/components/parameters/requiredHeader' post: security: - - OAuth2: [payroll.timesheets] + - OAuth2: + - payroll.timesheets tags: - PayrollUk operationId: revertTimesheet @@ -4323,54 +4148,45 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/TimesheetObject' - example: { - "id": "a774530a-a50c-4480-a094-358cf80a7d98", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-14T17:49:23.1119111", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "timesheet": { - "timesheetID": "0fd483c0-3302-48c6-bbd5-7247c9a02460", - "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe", - "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0", - "startDate": "2020-04-13T00:00:00", - "endDate": "2020-04-19T00:00:00", - "status": "Draft", - "totalHours": 15, - "updatedDateUTC": "2020-04-14T17:49:23.2188538", - "timesheetLines": [ - { - "timesheetLineID": "17a08549-1ed1-416b-83e2-c65040119a02", - "date": "2020-04-13T00:00:00", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "trackingItemID": null, - "numberOfUnits": 8 - }, - { - "timesheetLineID": "0e912b7d-dc3f-4b95-a466-3f0f5c8581cb", - "date": "2020-04-15T00:00:00", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "trackingItemID": null, - "numberOfUnits": 6 - }, - { - "timesheetLineID": "d0faac99-f2d4-42b9-ab00-9c2bc6e8fe3a", - "date": "2020-04-14T00:00:00", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "trackingItemID": null, - "numberOfUnits": 1 - } - ] - } - } - '400': + example: + id: a774530a-a50c-4480-a094-358cf80a7d98 + providerName: provider-name + dateTimeUTC: 2020-04-14T17:49:23.1119111 + httpStatusCode: OK + pagination: null + problem: null + timesheet: + timesheetID: 0fd483c0-3302-48c6-bbd5-7247c9a02460 + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + startDate: 2020-04-13T00:00:00 + endDate: 2020-04-19T00:00:00 + status: Draft + totalHours: 15 + updatedDateUTC: 2020-04-14T17:49:23.2188538 + timesheetLines: + - timesheetLineID: 17a08549-1ed1-416b-83e2-c65040119a02 + date: 2020-04-13T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 8 + - timesheetLineID: 0e912b7d-dc3f-4b95-a466-3f0f5c8581cb + date: 2020-04-15T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 6 + - timesheetLineID: d0faac99-f2d4-42b9-ab00-9c2bc6e8fe3a + date: 2020-04-14T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 1 + "400": description: validation error for a bad request content: application/json: @@ -4381,7 +4197,8 @@ paths: - $ref: '#/components/parameters/requiredHeader' put: security: - - OAuth2: [payroll.timesheets] + - OAuth2: + - payroll.timesheets tags: - PayrollUk operationId: updateTimesheetLine @@ -4394,13 +4211,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - timesheetLine: key: timesheetLine keyPascal: TimesheetLine @@ -4411,7 +4228,7 @@ paths: keyPascal: TimesheetLineID keySnake: timesheet_line_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: timesheetLine - date: key: date @@ -4428,14 +4245,14 @@ paths: keyPascal: EarningsRateID keySnake: earnings_rate_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: timesheetLine - trackingItemID: key: trackingItemID keyPascal: TrackingItemID keySnake: tracking_item_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: timesheetLine - numberOfUnits: key: numberOfUnits @@ -4443,7 +4260,7 @@ paths: keySnake: number_of_units default: 6 object: timesheetLine - nonString: true + nonString: true is_last: true summary: Updates a specific timesheet line for a specific timesheet parameters: @@ -4465,28 +4282,26 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/TimesheetLineObject' - example: { - "id": "582b87a6-14f3-409b-be89-f9b9c49db983", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-14T18:07:30.718153", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "timesheetLine": { - "timesheetLineID": "c88edcad-af32-4536-a682-9a4772c21c8d", - "date": "2020-04-14T00:00:00", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "trackingItemID": null, - "numberOfUnits": 2 - } - } - '400': + example: + id: 582b87a6-14f3-409b-be89-f9b9c49db983 + providerName: provider-name + dateTimeUTC: 2020-04-14T18:07:30.718153 + httpStatusCode: OK + pagination: null + problem: null + timesheetLine: + timesheetLineID: c88edcad-af32-4536-a682-9a4772c21c8d + date: 2020-04-14T00:00:00 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + trackingItemID: null + numberOfUnits: 2 + "400": description: validation error for a bad request content: application/json: @@ -4498,14 +4313,14 @@ paths: application/json: schema: $ref: '#/components/schemas/TimesheetLine' - example: { - "date": "2020-04-14", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "numberOfUnits": 2 - } + example: + date: "2020-04-14" + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + numberOfUnits: 2 delete: security: - - OAuth2: [payroll.timesheets] + - OAuth2: + - payroll.timesheets tags: - PayrollUk operationId: deleteTimesheetLine @@ -4528,13 +4343,13 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/TimesheetLine' - '400': + "400": description: validation error for a bad request content: application/json: @@ -4545,7 +4360,9 @@ paths: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollUk operationId: getPayRunCalendars @@ -4558,57 +4375,49 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayRunCalendars' - example: { - "id": "f66c8da6-06c1-47c7-a415-366cb3991858", - "providerName": "provider-name", - "dateTimeUTC": "2020-03-25T18:39:43.9215965", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 3 - }, - "problem": null, - "payRunCalendars": [ - { - "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe", - "name": "Weekly ", - "calendarType": "Weekly", - "periodStartDate": "2020-02-10T00:00:00", - "periodEndDate": "2020-02-16T00:00:00", - "paymentDate": "2020-02-17T00:00:00", - "updatedDateUTC": "2020-02-13T16:53:54" - }, - { - "payrollCalendarID": "d45bc68f-59d6-4000-929d-1058dcfa79e1", - "name": "Fortnightly ", - "calendarType": "Fortnightly", - "periodStartDate": "2020-02-03T00:00:00", - "periodEndDate": "2020-02-16T00:00:00", - "paymentDate": "2020-02-10T00:00:00", - "updatedDateUTC": "2020-02-10T10:02:09" - }, - { - "payrollCalendarID": "5e813d9e-949c-461f-8a89-e9ee8955a254", - "name": "Monthly ", - "calendarType": "Monthly", - "periodStartDate": "2020-03-03T00:00:00", - "periodEndDate": "2020-04-02T00:00:00", - "paymentDate": "2020-03-31T00:00:00", - "updatedDateUTC": "2020-02-13T16:54:07" - } - ] - } + example: + id: f66c8da6-06c1-47c7-a415-366cb3991858 + providerName: provider-name + dateTimeUTC: 2020-03-25T18:39:43.9215965 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 3 + problem: null + payRunCalendars: + - payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + name: 'Weekly ' + calendarType: Weekly + periodStartDate: 2020-02-10T00:00:00 + periodEndDate: 2020-02-16T00:00:00 + paymentDate: 2020-02-17T00:00:00 + updatedDateUTC: 2020-02-13T16:53:54 + - payrollCalendarID: d45bc68f-59d6-4000-929d-1058dcfa79e1 + name: 'Fortnightly ' + calendarType: Fortnightly + periodStartDate: 2020-02-03T00:00:00 + periodEndDate: 2020-02-16T00:00:00 + paymentDate: 2020-02-10T00:00:00 + updatedDateUTC: 2020-02-10T10:02:09 + - payrollCalendarID: 5e813d9e-949c-461f-8a89-e9ee8955a254 + name: 'Monthly ' + calendarType: Monthly + periodStartDate: 2020-03-03T00:00:00 + periodEndDate: 2020-04-02T00:00:00 + paymentDate: 2020-03-31T00:00:00 + updatedDateUTC: 2020-02-13T16:54:07 post: security: - - OAuth2: [payroll.settings] + - OAuth2: + - payroll.settings tags: - PayrollUk operationId: createPayRunCalendar @@ -4621,13 +4430,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - paymentDateValue: key: paymentDate keyPascal: PaymentDate @@ -4635,13 +4444,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 30)" - java: "LocalDate.of(2020, Month.OCTOBER, 30)" - csharp: "new DateTime(2020, 10, 12)" - php: "new DateTime('2020-10-30')" - node: "'2020-10-30'" - python: "dateutil.parser.parse('2020-10-30T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 30) + java: LocalDate.of(2020, Month.OCTOBER, 30) + csharp: new DateTime(2020, 10, 12) + php: new DateTime('2020-10-30') + node: '''2020-10-30''' + python: dateutil.parser.parse('2020-10-30T00:00:00Z') + ruby: '''YYYY-MM-DD''' - payRunCalendar: key: payRunCalendar keyPascal: PayRunCalendar @@ -4651,7 +4460,7 @@ paths: key: calendarType keyPascal: CalendarType keySnake: calendar_type - nonString: true + nonString: true default: PayRunCalendar.CalendarTypeEnum.Weekly php: XeroAPI\XeroPHP\Models\PayrollUk\PayRunCalendar\CalendarTypeEnum.WEEKLY node: PayRunCalendar.CalendarTypeEnum.Weekly @@ -4674,7 +4483,7 @@ paths: key: paymentDate keyPascal: PaymentDate keySnake: payment_date - is_last: true + is_last: true is_variable: true nonString: true default: paymentDate @@ -4685,30 +4494,28 @@ paths: parameters: - $ref: '#/components/parameters/idempotencyKey' responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayRunCalendarObject' - example: { - "id": "ef25e7f2-b5d6-454c-8147-396c373565dd", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-13T17:01:06.2708245", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "payRunCalendar": { - "payrollCalendarID": "5f29322d-9123-49be-bef0-9b14c35653d1", - "name": "My Weekly Cal", - "calendarType": "Weekly", - "periodStartDate": "2020-05-01T00:00:00", - "periodEndDate": "2020-05-07T00:00:00", - "paymentDate": "2020-05-15T00:00:00", - "updatedDateUTC": "2020-04-13T17:01:06.4944331" - } - } - '400': + example: + id: ef25e7f2-b5d6-454c-8147-396c373565dd + providerName: provider-name + dateTimeUTC: 2020-04-13T17:01:06.2708245 + httpStatusCode: OK + pagination: null + problem: null + payRunCalendar: + payrollCalendarID: 5f29322d-9123-49be-bef0-9b14c35653d1 + name: My Weekly Cal + calendarType: Weekly + periodStartDate: 2020-05-01T00:00:00 + periodEndDate: 2020-05-07T00:00:00 + paymentDate: 2020-05-15T00:00:00 + updatedDateUTC: 2020-04-13T17:01:06.4944331 + "400": description: validation error for a bad request content: application/json: @@ -4720,18 +4527,19 @@ paths: application/json: schema: $ref: '#/components/schemas/PayRunCalendar' - example: { - "name": "My Weekly Cal", - "calendarType": "Weekly", - "periodStartDate": "2020-05-01", - "paymentDate": "2020-05-15" - } + example: + name: My Weekly Cal + calendarType: Weekly + periodStartDate: "2020-05-01" + paymentDate: "2020-05-15" /PayRunCalendars/{PayRunCalendarID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollUk operationId: getPayRunCalendar @@ -4747,35 +4555,35 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayRunCalendarObject' - example: { - "id": "dae942a3-b4fb-4b24-839b-14e1073f8cca", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-13T16:48:49.6902155", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "payRunCalendar": { - "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe", - "name": "Weekly ", - "calendarType": "Weekly", - "periodStartDate": "2020-02-10T00:00:00", - "periodEndDate": "2020-02-16T00:00:00", - "paymentDate": "2020-02-17T00:00:00", - "updatedDateUTC": "2020-02-13T16:53:54" - } - } + example: + id: dae942a3-b4fb-4b24-839b-14e1073f8cca + providerName: provider-name + dateTimeUTC: 2020-04-13T16:48:49.6902155 + httpStatusCode: OK + pagination: null + problem: null + payRunCalendar: + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + name: 'Weekly ' + calendarType: Weekly + periodStartDate: 2020-02-10T00:00:00 + periodEndDate: 2020-02-16T00:00:00 + paymentDate: 2020-02-17T00:00:00 + updatedDateUTC: 2020-02-13T16:53:54 /Employees/{EmployeeID}/SalaryAndWages: parameters: - $ref: '#/components/parameters/requiredHeader' - get: + get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollUk operationId: getEmployeeSalaryAndWages @@ -4787,7 +4595,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -4797,40 +4605,35 @@ paths: schema: type: integer responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/SalaryAndWages' - example: { - "id": "56273e64-dff0-4542-96f3-54ad3ac27431", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-10T22:47:38.8995493", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 1 - }, - "problem": null, - "salaryAndWages": [ - { - "salaryAndWagesID": "49c33012-c1ac-456c-91fd-cb7e6db6f5fe", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "numberOfUnitsPerWeek": 40, - "ratePerUnit": null, - "numberOfUnitsPerDay": null, - "daysPerWeek": null, - "effectiveFrom": "2020-04-01T00:00:00", - "annualSalary": 25000, - "status": "Active", - "paymentType": "Salary" - } - ] - } - '400': + example: + id: 56273e64-dff0-4542-96f3-54ad3ac27431 + providerName: provider-name + dateTimeUTC: 2020-04-10T22:47:38.8995493 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 1 + problem: null + salaryAndWages: + - salaryAndWagesID: 49c33012-c1ac-456c-91fd-cb7e6db6f5fe + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + numberOfUnitsPerWeek: 40 + ratePerUnit: null + numberOfUnitsPerDay: null + daysPerWeek: null + effectiveFrom: 2020-04-01T00:00:00 + annualSalary: 25000 + status: Active + paymentType: Salary + "400": description: validation error for a bad request content: application/json: @@ -4838,7 +4641,8 @@ paths: $ref: '#/components/schemas/Problem' post: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollUk operationId: createEmployeeSalaryAndWage @@ -4854,27 +4658,27 @@ paths: keyPascal: EarningsRateID keySnake: earnings_rate_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: salaryAndWage - numberOfUnitsPerDay: key: numberOfUnitsPerDay keyPascal: NumberOfUnitsPerDay keySnake: number_of_units_per_day - default: 0 - nonString: true + default: 0 + nonString: true object: salaryAndWage - numberOfUnitsPerWeek: key: numberOfUnitsPerWeek keyPascal: NumberOfUnitsPerWeek keySnake: number_of_units_per_week - default: 0 - nonString: true + default: 0 + nonString: true object: salaryAndWage - paymentType: key: paymentType keyPascal: PaymentType keySnake: payment_type - nonString: true + nonString: true default: SalaryAndWage.PaymentTypeEnum.Salary php: XeroAPI\XeroPHP\Models\PayrollUk\SalaryAndWage\PaymentTypeEnum.SALARY node: SalaryAndWage.PaymentTypeEnum.Salary @@ -4887,7 +4691,7 @@ paths: key: status keyPascal: Status keySnake: status - nonString: true + nonString: true default: SalaryAndWage.StatusEnum.Active php: XeroAPI\XeroPHP\Models\PayrollUk\SalaryAndWage\StatusEnum.ACTIVE node: SalaryAndWage.StatusEnum.Active @@ -4905,38 +4709,36 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/SalaryAndWageObject' - example: { - "id": "a15f15ec-a8ed-420b-82f6-1546a9bf6d57", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-10T23:46:35.2234544", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "salaryAndWages": { - "salaryAndWagesID": "1477fc72-b38d-4c0e-a46e-8657f0f32340", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "numberOfUnitsPerWeek": 2, - "ratePerUnit": null, - "numberOfUnitsPerDay": 2, - "daysPerWeek": null, - "effectiveFrom": "2020-05-01T00:00:00", - "annualSalary": 100, - "status": "Pending", - "paymentType": "Salary" - } - } - '400': + example: + id: a15f15ec-a8ed-420b-82f6-1546a9bf6d57 + providerName: provider-name + dateTimeUTC: 2020-04-10T23:46:35.2234544 + httpStatusCode: OK + pagination: null + problem: null + salaryAndWages: + salaryAndWagesID: 1477fc72-b38d-4c0e-a46e-8657f0f32340 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + numberOfUnitsPerWeek: 2 + ratePerUnit: null + numberOfUnitsPerDay: 2 + daysPerWeek: null + effectiveFrom: 2020-05-01T00:00:00 + annualSalary: 100 + status: Pending + paymentType: Salary + "400": description: validation error for a bad request content: application/json: @@ -4948,22 +4750,23 @@ paths: application/json: schema: $ref: '#/components/schemas/SalaryAndWage' - example: { - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "numberOfUnitsPerWeek": 2, - "ratePerUnit": 10, - "numberOfUnitsPerDay": 2, - "effectiveFrom": "2020-05-01", - "annualSalary": 100, - "status": "ACTIVE", - "paymentType": "Salary" - } + example: + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + numberOfUnitsPerWeek: 2 + ratePerUnit: 10 + numberOfUnitsPerDay: 2 + effectiveFrom: "2020-05-01" + annualSalary: 100 + status: ACTIVE + paymentType: Salary /Employees/{EmployeeID}/SalaryAndWages/{SalaryAndWagesID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.employees, payroll.employees.read] + - OAuth2: + - payroll.employees + - payroll.employees.read tags: - PayrollUk operationId: getEmployeeSalaryAndWage @@ -4975,7 +4778,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -4983,43 +4786,40 @@ paths: x-snake: salary_and_wages_id in: path required: true - description: Id for single pay template earnings object - schema: + description: Id for single pay template earnings object + schema: type: string format: uuid example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/SalaryAndWages' - example: { - "id": "cd4f35e7-5062-494a-96c4-f81e9083b0b9", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-10T23:21:48.6291438", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "salaryAndWages": [ - { - "salaryAndWagesID": "49c33012-c1ac-456c-91fd-cb7e6db6f5fe", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "numberOfUnitsPerWeek": 40, - "ratePerUnit": null, - "numberOfUnitsPerDay": null, - "daysPerWeek": null, - "effectiveFrom": "2020-04-01T00:00:00", - "annualSalary": 25000, - "status": "Active", - "paymentType": "Salary" - } - ] - } + example: + id: cd4f35e7-5062-494a-96c4-f81e9083b0b9 + providerName: provider-name + dateTimeUTC: 2020-04-10T23:21:48.6291438 + httpStatusCode: OK + pagination: null + problem: null + salaryAndWages: + - salaryAndWagesID: 49c33012-c1ac-456c-91fd-cb7e6db6f5fe + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + numberOfUnitsPerWeek: 40 + ratePerUnit: null + numberOfUnitsPerDay: null + daysPerWeek: null + effectiveFrom: 2020-04-01T00:00:00 + annualSalary: 25000 + status: Active + paymentType: Salary put: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollUk operationId: updateEmployeeSalaryAndWage @@ -5035,27 +4835,27 @@ paths: keyPascal: EarningsRateID keySnake: earnings_rate_id is_uuid: true - default: "00000000-0000-0000-0000-000000000000" + default: 00000000-0000-0000-0000-000000000000 object: salaryAndWage - numberOfUnitsPerDay: key: numberOfUnitsPerDay keyPascal: NumberOfUnitsPerDay keySnake: number_of_units_per_day - default: 0 - nonString: true + default: 0 + nonString: true object: salaryAndWage - numberOfUnitsPerWeek: key: numberOfUnitsPerWeek keyPascal: NumberOfUnitsPerWeek keySnake: number_of_units_per_week - default: 0 - nonString: true + default: 0 + nonString: true object: salaryAndWage - paymentType: key: paymentType keyPascal: PaymentType keySnake: payment_type - nonString: true + nonString: true default: SalaryAndWage.PaymentTypeEnum.Salary php: XeroAPI\XeroPHP\Models\PayrollUk\SalaryAndWage\PaymentTypeEnum.SALARY node: SalaryAndWage.PaymentTypeEnum.Salary @@ -5068,7 +4868,7 @@ paths: key: status keyPascal: Status keySnake: status - nonString: true + nonString: true default: SalaryAndWage.StatusEnum.Active php: XeroAPI\XeroPHP\Models\PayrollUk\SalaryAndWage\StatusEnum.ACTIVE node: SalaryAndWage.StatusEnum.Active @@ -5086,7 +4886,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -5094,39 +4894,37 @@ paths: x-snake: salary_and_wages_id in: path required: true - description: Id for single pay template earnings object - schema: + description: Id for single pay template earnings object + schema: type: string format: uuid example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/SalaryAndWageObject' - example: { - "id": "d12a31ee-e094-4e67-9092-0d5e1d7569a6", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-13T16:39:11.7310047", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "salaryAndWages": { - "salaryAndWagesID": "e9c7f567-b0a0-483c-b45f-d072e399352b", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "numberOfUnitsPerWeek": 3, - "ratePerUnit": null, - "numberOfUnitsPerDay": null, - "daysPerWeek": null, - "effectiveFrom": "2020-05-15T00:00:00", - "annualSalary": 101, - "status": "Pending", - "paymentType": "Salary" - } - } - '400': + example: + id: d12a31ee-e094-4e67-9092-0d5e1d7569a6 + providerName: provider-name + dateTimeUTC: 2020-04-13T16:39:11.7310047 + httpStatusCode: OK + pagination: null + problem: null + salaryAndWages: + salaryAndWagesID: e9c7f567-b0a0-483c-b45f-d072e399352b + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + numberOfUnitsPerWeek: 3 + ratePerUnit: null + numberOfUnitsPerDay: null + daysPerWeek: null + effectiveFrom: 2020-05-15T00:00:00 + annualSalary: 101 + status: Pending + paymentType: Salary + "400": description: validation error for a bad request content: application/json: @@ -5138,18 +4936,18 @@ paths: application/json: schema: $ref: '#/components/schemas/SalaryAndWage' - example: { - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "numberOfUnitsPerWeek": 3, - "ratePerUnit": 11, - "effectiveFrom": "2020-05-15", - "annualSalary": 101, - "status": "ACTIVE", - "paymentType": "Salary" - } + example: + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + numberOfUnitsPerWeek: 3 + ratePerUnit: 11 + effectiveFrom: "2020-05-15" + annualSalary: 101 + status: ACTIVE + paymentType: Salary delete: security: - - OAuth2: [payroll.employees] + - OAuth2: + - payroll.employees tags: - PayrollUk operationId: deleteEmployeeSalaryAndWage @@ -5160,7 +4958,7 @@ paths: in: path required: true description: Employee id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -5168,20 +4966,22 @@ paths: x-snake: salary_and_wages_id in: path required: true - description: Id for single salary and wages object - schema: + description: Id for single salary and wages object + schema: type: string format: uuid example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 responses: - '200': + "200": description: deletion successful /PayRuns: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.payruns, payroll.payruns.read] + - OAuth2: + - payroll.payruns + - payroll.payruns.read tags: - PayrollUk operationId: getPayRuns @@ -5202,61 +5002,56 @@ paths: - Draft - Posted responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayRuns' - example: { - "id": "d748445b-fd11-4832-a85a-905fbfcf3d7c", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-10T21:55:55.0725037", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 2 - }, - "problem": null, - "payRuns": [ - { - "payRunID": "e0a59d82-6229-4be4-9d66-49891b4d933e", - "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe", - "periodStartDate": "2020-02-03T00:00:00", - "periodEndDate": "2020-02-09T00:00:00", - "paymentDate": "2020-02-10T00:00:00", - "totalCost": 490.39, - "totalPay": 376.92, - "payRunStatus": "Draft", - "payRunType": "Scheduled", - "calendarType": "Weekly", - "postedDateTime": null, - "payslipMessage": null - }, - { - "payRunID": "ea4f0a14-2c41-4583-9845-9e455972b326", - "payrollCalendarID": "5e813d9e-949c-461f-8a89-e9ee8955a254", - "periodStartDate": "2020-02-03T00:00:00", - "periodEndDate": "2020-03-02T00:00:00", - "paymentDate": "2020-02-28T00:00:00", - "totalCost": 1502.08, - "totalPay": 1294.65, - "payRunStatus": "Posted", - "payRunType": "Scheduled", - "calendarType": "Monthly", - "postedDateTime": "2020-02-13T16:54:11", - "payslipMessage": null - } - ] - } + example: + id: d748445b-fd11-4832-a85a-905fbfcf3d7c + providerName: provider-name + dateTimeUTC: 2020-04-10T21:55:55.0725037 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 2 + problem: null + payRuns: + - payRunID: e0a59d82-6229-4be4-9d66-49891b4d933e + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + periodStartDate: 2020-02-03T00:00:00 + periodEndDate: 2020-02-09T00:00:00 + paymentDate: 2020-02-10T00:00:00 + totalCost: 490.39 + totalPay: 376.92 + payRunStatus: Draft + payRunType: Scheduled + calendarType: Weekly + postedDateTime: null + payslipMessage: null + - payRunID: ea4f0a14-2c41-4583-9845-9e455972b326 + payrollCalendarID: 5e813d9e-949c-461f-8a89-e9ee8955a254 + periodStartDate: 2020-02-03T00:00:00 + periodEndDate: 2020-03-02T00:00:00 + paymentDate: 2020-02-28T00:00:00 + totalCost: 1502.08 + totalPay: 1294.65 + payRunStatus: Posted + payRunType: Scheduled + calendarType: Monthly + postedDateTime: 2020-02-13T16:54:11 + payslipMessage: null /PayRuns/{PayRunID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.payruns, payroll.payruns.read] + - OAuth2: + - payroll.payruns + - payroll.payruns.read tags: - PayrollUk operationId: getPayRun @@ -5272,58 +5067,54 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayRunObject' - example: { - "id": "84471d62-74b6-4b21-845c-6d1e6f031172", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-10T21:55:55.745211", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "payRun": { - "payRunID": "e0a59d82-6229-4be4-9d66-49891b4d933e", - "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe", - "periodStartDate": "2020-02-03T00:00:00", - "periodEndDate": "2020-02-09T00:00:00", - "paymentDate": "2020-02-10T00:00:00", - "totalCost": 490.39, - "totalPay": 376.92, - "payRunStatus": "Draft", - "payRunType": "Scheduled", - "calendarType": "Weekly", - "postedDateTime": null, - "paySlips": [ - { - "paySlipID": "ed3fb9b3-e9a1-44fa-a224-8be49facbbe8", - "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0", - "lastEdited": null, - "firstName": "Mike", - "lastName": "Johnpitragibigson", - "totalEarnings": 480.77, - "grossEarnings": 480.77, - "totalPay": 386.54, - "totalEmployerTaxes": 0, - "totalEmployeeTaxes": 94.23, - "totalDeductions": 9.62, - "totalReimbursements": 0, - "totalCourtOrders": 0, - "totalBenefits": 9.62, - "bacsHash": null, - "paymentMethod": null - } - ], - "payslipMessage": null, - "invalidPayeeIDs": null - } - } + example: + id: 84471d62-74b6-4b21-845c-6d1e6f031172 + providerName: provider-name + dateTimeUTC: 2020-04-10T21:55:55.745211 + httpStatusCode: OK + pagination: null + problem: null + payRun: + payRunID: e0a59d82-6229-4be4-9d66-49891b4d933e + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + periodStartDate: 2020-02-03T00:00:00 + periodEndDate: 2020-02-09T00:00:00 + paymentDate: 2020-02-10T00:00:00 + totalCost: 490.39 + totalPay: 376.92 + payRunStatus: Draft + payRunType: Scheduled + calendarType: Weekly + postedDateTime: null + paySlips: + - paySlipID: ed3fb9b3-e9a1-44fa-a224-8be49facbbe8 + employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + lastEdited: null + firstName: Mike + lastName: Johnpitragibigson + totalEarnings: 480.77 + grossEarnings: 480.77 + totalPay: 386.54 + totalEmployerTaxes: 0 + totalEmployeeTaxes: 94.23 + totalDeductions: 9.62 + totalReimbursements: 0 + totalCourtOrders: 0 + totalBenefits: 9.62 + bacsHash: null + paymentMethod: null + payslipMessage: null + invalidPayeeIDs: null put: security: - - OAuth2: [payroll.payruns] + - OAuth2: + - payroll.payruns tags: - PayrollUk operationId: updatePayRun @@ -5336,13 +5127,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' - paymentDateValue: key: paymentDate keyPascal: PaymentDate @@ -5350,13 +5141,13 @@ paths: is_date: true java_datatype: LocalDate csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 30)" - java: "LocalDate.of(2020, Month.OCTOBER, 30)" - csharp: "new DateTime(2020, 10, 12)" - php: "new DateTime('2020-10-30')" - node: "'2020-10-30'" - python: "dateutil.parser.parse('2020-10-30T00:00:00Z')" - ruby: "'YYYY-MM-DD'" + default: LocalDate.of(2020, Month.OCTOBER, 30) + java: LocalDate.of(2020, Month.OCTOBER, 30) + csharp: new DateTime(2020, 10, 12) + php: new DateTime('2020-10-30') + node: '''2020-10-30''' + python: dateutil.parser.parse('2020-10-30T00:00:00Z') + ruby: '''YYYY-MM-DD''' - payRunCalendar: key: payRunCalendar keyPascal: PayRunCalendar @@ -5366,7 +5157,7 @@ paths: key: calendarType keyPascal: CalendarType keySnake: calendar_type - nonString: true + nonString: true default: CalendarType.Weekly php: XeroAPI\XeroPHP\Models\PayrollUk\CalendarType.WEEKLY node: CalendarType.Weekly @@ -5389,7 +5180,7 @@ paths: key: paymentDate keyPascal: PaymentDate keySnake: payment_date - is_last: true + is_last: true is_variable: true nonString: true default: paymentDate @@ -5408,56 +5199,51 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayRunObject' - example: { - "id": "f567524d-34d6-412b-97e3-f97152c1bbc2", - "providerName": "provider-name", - "dateTimeUTC": "2020-06-03T18:33:25.3607921", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "payRun": { - "payRunID": "e0a59d82-6229-4be4-9d66-49891b4d933e", - "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe", - "periodStartDate": "2020-02-03T00:00:00", - "periodEndDate": "2020-02-09T00:00:00", - "paymentDate": "2020-05-01T00:00:00", - "totalCost": 523.79, - "totalPay": 445.04, - "payRunStatus": "Draft", - "payRunType": "Scheduled", - "calendarType": "Weekly", - "postedDateTime": null, - "paySlips": [ - { - "paySlipID": "ed3fb9b3-e9a1-44fa-a224-8be49facbbe8", - "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0", - "lastEdited": null, - "firstName": "Mike", - "lastName": "Johncfvhitgezvson", - "totalEarnings": 480.77, - "grossEarnings": 480.77, - "totalPay": 445.04, - "totalEmployerTaxes": 43.02, - "totalEmployeeTaxes": 35.73, - "totalDeductions": 0, - "totalReimbursements": 0, - "totalCourtOrders": 0, - "totalBenefits": 0, - "bacsHash": null, - "paymentMethod": "Electronically" - } - ], - "payslipMessage": null, - "invalidPayeeIDs": null - } - } - '400': + example: + id: f567524d-34d6-412b-97e3-f97152c1bbc2 + providerName: provider-name + dateTimeUTC: 2020-06-03T18:33:25.3607921 + httpStatusCode: OK + pagination: null + problem: null + payRun: + payRunID: e0a59d82-6229-4be4-9d66-49891b4d933e + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + periodStartDate: 2020-02-03T00:00:00 + periodEndDate: 2020-02-09T00:00:00 + paymentDate: 2020-05-01T00:00:00 + totalCost: 523.79 + totalPay: 445.04 + payRunStatus: Draft + payRunType: Scheduled + calendarType: Weekly + postedDateTime: null + paySlips: + - paySlipID: ed3fb9b3-e9a1-44fa-a224-8be49facbbe8 + employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + lastEdited: null + firstName: Mike + lastName: Johncfvhitgezvson + totalEarnings: 480.77 + grossEarnings: 480.77 + totalPay: 445.04 + totalEmployerTaxes: 43.02 + totalEmployeeTaxes: 35.73 + totalDeductions: 0 + totalReimbursements: 0 + totalCourtOrders: 0 + totalBenefits: 0 + bacsHash: null + paymentMethod: Electronically + payslipMessage: null + invalidPayeeIDs: null + "400": description: validation error for a bad request content: application/json: @@ -5469,15 +5255,16 @@ paths: application/json: schema: $ref: '#/components/schemas/PayRun' - example: { - "paymentDate": "2020-05-01" - } + example: + paymentDate: "2020-05-01" /Payslips: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.payslip, payroll.payslip.read] + - OAuth2: + - payroll.payslip + - payroll.payslip.read tags: - PayrollUk operationId: getPaySlips @@ -5498,111 +5285,91 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Payslips' - example: { - "id": "c07aa280-478b-48b5-a778-499cf95c9781", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-10T21:50:46.3775117", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 1 - }, - "problem": null, - "paySlips": [ - { - "paySlipID": "ed3fb9b3-e9a1-44fa-a224-8be49facbbe8", - "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0", - "payRunID": "e0a59d82-6229-4be4-9d66-49891b4d933e", - "lastEdited": null, - "firstName": "Mike", - "lastName": "Johnpitragibigson", - "totalEarnings": 480.77, - "grossEarnings": 480.77, - "totalPay": 386.54, - "totalEmployerTaxes": 0, - "totalEmployeeTaxes": 94.23, - "totalDeductions": 9.62, - "totalReimbursements": 0, - "totalCourtOrders": 0, - "totalBenefits": 9.62, - "bacsHash": null, - "paymentMethod": null, - "earningsLines": [ - { - "earningsLineID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "displayName": "Regular Hours", - "ratePerUnit": 12.019231, - "numberOfUnits": 40, - "fixedAmount": null, - "amount": 480.77, - "isLinkedToTimesheet": false, - "isAverageDailyPayRate": null - } - ], - "leaveEarningsLines": [], - "timesheetEarningsLines": [], - "deductionLines": [], - "reimbursementLines": [], - "leaveAccrualLines": [ - { - "leaveTypeID": "ed08dffe-788e-4b24-9630-f0fa2f4d164c", - "numberOfUnits": 0 - } - ], - "benefitLines": [], - "paymentLines": [ - { - "paymentLineID": "08ceb312-07af-4ce0-ae9a-176532f07009", - "amount": 384.3, - "accountNumber": null, - "sortCode": null, - "accountName": null - } - ], - "employeeTaxLines": [ - { - "taxLineID": "e7dc717a-4399-4702-9e15-adb87e568dc9", - "description": "PAYE", - "amount": 48.6, - "globalTaxTypeID": 1, - "manualAdjustment": false - }, - { - "taxLineID": "c774af0b-4776-4c81-9c96-ad18e4b35f40", - "description": "Employee National Insurance Contribution", - "amount": 38.25, - "globalTaxTypeID": 2, - "manualAdjustment": false - } - ], - "employerTaxLines": [ - { - "taxLineID": "8de7a488-57ed-4d58-b76a-d9f9460ebded", - "description": "Employer National Insurance Contribution", - "amount": 43.99, - "globalTaxTypeID": 3, - "manualAdjustment": false - } - ], - "courtOrderLines": [] - } - ] - } + example: + id: c07aa280-478b-48b5-a778-499cf95c9781 + providerName: provider-name + dateTimeUTC: 2020-04-10T21:50:46.3775117 + httpStatusCode: OK + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 1 + problem: null + paySlips: + - paySlipID: ed3fb9b3-e9a1-44fa-a224-8be49facbbe8 + employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + payRunID: e0a59d82-6229-4be4-9d66-49891b4d933e + lastEdited: null + firstName: Mike + lastName: Johnpitragibigson + totalEarnings: 480.77 + grossEarnings: 480.77 + totalPay: 386.54 + totalEmployerTaxes: 0 + totalEmployeeTaxes: 94.23 + totalDeductions: 9.62 + totalReimbursements: 0 + totalCourtOrders: 0 + totalBenefits: 9.62 + bacsHash: null + paymentMethod: null + earningsLines: + - earningsLineID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + displayName: Regular Hours + ratePerUnit: 12.019231 + numberOfUnits: 40 + fixedAmount: null + amount: 480.77 + isLinkedToTimesheet: false + isAverageDailyPayRate: null + leaveEarningsLines: [] + timesheetEarningsLines: [] + deductionLines: [] + reimbursementLines: [] + leaveAccrualLines: + - leaveTypeID: ed08dffe-788e-4b24-9630-f0fa2f4d164c + numberOfUnits: 0 + benefitLines: [] + paymentLines: + - paymentLineID: 08ceb312-07af-4ce0-ae9a-176532f07009 + amount: 384.3 + accountNumber: null + sortCode: null + accountName: null + employeeTaxLines: + - taxLineID: e7dc717a-4399-4702-9e15-adb87e568dc9 + description: PAYE + amount: 48.6 + globalTaxTypeID: 1 + manualAdjustment: false + - taxLineID: c774af0b-4776-4c81-9c96-ad18e4b35f40 + description: Employee National Insurance Contribution + amount: 38.25 + globalTaxTypeID: 2 + manualAdjustment: false + employerTaxLines: + - taxLineID: 8de7a488-57ed-4d58-b76a-d9f9460ebded + description: Employer National Insurance Contribution + amount: 43.99 + globalTaxTypeID: 3 + manualAdjustment: false + courtOrderLines: [] /Payslips/{PayslipID}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.payslip, payroll.payslip.read] + - OAuth2: + - payroll.payslip + - payroll.payslip.read tags: - PayrollUk operationId: getPaySlip @@ -5618,209 +5385,175 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/PayslipObject' - example: { - "id": "80c558c3-bc7a-48d0-91b2-20b8ec784f0d", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-10T22:04:35.1798025", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "paySlip": { - "paySlipID": "ed3fb9b3-e9a1-44fa-a224-8be49facbbe8", - "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0", - "payRunID": "e0a59d82-6229-4be4-9d66-49891b4d933e", - "lastEdited": null, - "firstName": "Mike", - "lastName": "Johnpitragibigson", - "totalEarnings": 480.77, - "grossEarnings": 480.77, - "totalPay": 386.54, - "totalEmployerTaxes": 0, - "totalEmployeeTaxes": 94.23, - "totalDeductions": 9.62, - "totalReimbursements": 0, - "totalCourtOrders": 0, - "totalBenefits": 9.62, - "bacsHash": null, - "paymentMethod": null, - "earningsLines": [ - { - "earningsLineID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27", - "displayName": "Regular Hours", - "ratePerUnit": 12.019231, - "numberOfUnits": 40, - "fixedAmount": null, - "amount": 480.77, - "isLinkedToTimesheet": false, - "isAverageDailyPayRate": null - } - ], - "leaveEarningsLines": [], - "timesheetEarningsLines": [], - "deductionLines": [], - "reimbursementLines": [], - "leaveAccrualLines": [ - { - "leaveTypeID": "ed08dffe-788e-4b24-9630-f0fa2f4d164c", - "numberOfUnits": 0 - } - ], - "benefitLines": [], - "paymentLines": [ - { - "paymentLineID": "08ceb312-07af-4ce0-ae9a-176532f07009", - "amount": 384.3, - "accountNumber": null, - "sortCode": null, - "accountName": null - } - ], - "employeeTaxLines": [ - { - "taxLineID": "e7dc717a-4399-4702-9e15-adb87e568dc9", - "description": "PAYE", - "amount": 48.6, - "globalTaxTypeID": 1, - "manualAdjustment": false - }, - { - "taxLineID": "c774af0b-4776-4c81-9c96-ad18e4b35f40", - "description": "Employee National Insurance Contribution", - "amount": 38.25, - "globalTaxTypeID": 2, - "manualAdjustment": false - } - ], - "employerTaxLines": [ - { - "taxLineID": "8de7a488-57ed-4d58-b76a-d9f9460ebded", - "description": "Employer National Insurance Contribution", - "amount": 43.99, - "globalTaxTypeID": 3, - "manualAdjustment": false - } - ], - "courtOrderLines": [] - } - } + example: + id: 80c558c3-bc7a-48d0-91b2-20b8ec784f0d + providerName: provider-name + dateTimeUTC: 2020-04-10T22:04:35.1798025 + httpStatusCode: OK + pagination: null + problem: null + paySlip: + paySlipID: ed3fb9b3-e9a1-44fa-a224-8be49facbbe8 + employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 + payRunID: e0a59d82-6229-4be4-9d66-49891b4d933e + lastEdited: null + firstName: Mike + lastName: Johnpitragibigson + totalEarnings: 480.77 + grossEarnings: 480.77 + totalPay: 386.54 + totalEmployerTaxes: 0 + totalEmployeeTaxes: 94.23 + totalDeductions: 9.62 + totalReimbursements: 0 + totalCourtOrders: 0 + totalBenefits: 9.62 + bacsHash: null + paymentMethod: null + earningsLines: + - earningsLineID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27 + displayName: Regular Hours + ratePerUnit: 12.019231 + numberOfUnits: 40 + fixedAmount: null + amount: 480.77 + isLinkedToTimesheet: false + isAverageDailyPayRate: null + leaveEarningsLines: [] + timesheetEarningsLines: [] + deductionLines: [] + reimbursementLines: [] + leaveAccrualLines: + - leaveTypeID: ed08dffe-788e-4b24-9630-f0fa2f4d164c + numberOfUnits: 0 + benefitLines: [] + paymentLines: + - paymentLineID: 08ceb312-07af-4ce0-ae9a-176532f07009 + amount: 384.3 + accountNumber: null + sortCode: null + accountName: null + employeeTaxLines: + - taxLineID: e7dc717a-4399-4702-9e15-adb87e568dc9 + description: PAYE + amount: 48.6 + globalTaxTypeID: 1 + manualAdjustment: false + - taxLineID: c774af0b-4776-4c81-9c96-ad18e4b35f40 + description: Employee National Insurance Contribution + amount: 38.25 + globalTaxTypeID: 2 + manualAdjustment: false + employerTaxLines: + - taxLineID: 8de7a488-57ed-4d58-b76a-d9f9460ebded + description: Employer National Insurance Contribution + amount: 43.99 + globalTaxTypeID: 3 + manualAdjustment: false + courtOrderLines: [] /Settings: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollUk operationId: getSettings x-hasPayrollUkProblem: true summary: Retrieves payroll settings responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Settings' - example: { - "id": "3cb41871-980a-47e4-878f-7c576b0d3677", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-10T21:27:04.8905569", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "settings": { - "accounts": [ - { - "accountID": "9ee28149-32a9-4661-8eab-a28738696983", - "type": "WAGESPAYABLE", - "code": "814", - "name": "Wages Payable - Payroll" - }, - { - "accountID": "81da553d-c6c6-411e-95df-cc4ac8f7e1c2", - "type": "WAGESEXPENSE", - "code": "477", - "name": "Salaries" - }, - { - "accountID": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", - "type": "BANK", - "code": "090", - "name": "Business Bank Account" - }, - { - "accountID": "43072840-e67b-45df-8b90-f52ebedb2779", - "type": "PAYELIABILITY", - "code": "825", - "name": "PAYE Payable" - }, - { - "accountID": "a2377a9f-f5bd-4327-8f85-e3461b591912", - "type": "NICLIABILITY", - "code": "826", - "name": "NIC Payable" - }, - { - "accountID": "4e24254c-2770-433d-9845-8925ded5e14a", - "type": "EMPLOYERSNIC", - "code": "479", - "name": "Employers National Insurance" - }, - { - "accountID": "9ee28149-32a9-4661-8eab-a28738696983", - "type": "PAYEECONTRIBUTION", - "code": "814", - "name": "Wages Payable - Payroll" - } - ] - } - } + example: + id: 3cb41871-980a-47e4-878f-7c576b0d3677 + providerName: provider-name + dateTimeUTC: 2020-04-10T21:27:04.8905569 + httpStatusCode: OK + pagination: null + problem: null + settings: + accounts: + - accountID: 9ee28149-32a9-4661-8eab-a28738696983 + type: WAGESPAYABLE + code: "814" + name: Wages Payable - Payroll + - accountID: 81da553d-c6c6-411e-95df-cc4ac8f7e1c2 + type: WAGESEXPENSE + code: "477" + name: Salaries + - accountID: bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4 + type: BANK + code: "090" + name: Business Bank Account + - accountID: 43072840-e67b-45df-8b90-f52ebedb2779 + type: PAYELIABILITY + code: "825" + name: PAYE Payable + - accountID: a2377a9f-f5bd-4327-8f85-e3461b591912 + type: NICLIABILITY + code: "826" + name: NIC Payable + - accountID: 4e24254c-2770-433d-9845-8925ded5e14a + type: EMPLOYERSNIC + code: "479" + name: Employers National Insurance + - accountID: 9ee28149-32a9-4661-8eab-a28738696983 + type: PAYEECONTRIBUTION + code: "814" + name: Wages Payable - Payroll /Settings/trackingCategories: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [payroll.settings, payroll.settings.read] + - OAuth2: + - payroll.settings + - payroll.settings.read tags: - PayrollUk operationId: getTrackingCategories x-hasPayrollUkProblem: true summary: Retrieves tracking categories responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/TrackingCategories' - example: { - "id": "e56628f7-a25e-4d23-88c5-56e2895e2143", - "providerName": "provider-name", - "dateTimeUTC": "2020-04-10T21:13:21.498344", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "trackingCategories": { - "employeeGroupsTrackingCategoryID": "9d8ad8f6-0d0f-41e0-8851-ef47e8b54ae6", - "timesheetTrackingCategoryID": "1d7d2015-10e7-4ecb-8b44-f331c8b63e2d" - } - } + example: + id: e56628f7-a25e-4d23-88c5-56e2895e2143 + providerName: provider-name + dateTimeUTC: 2020-04-10T21:13:21.498344 + httpStatusCode: OK + pagination: null + problem: null + trackingCategories: + employeeGroupsTrackingCategoryID: 9d8ad8f6-0d0f-41e0-8851-ef47e8b54ae6 + timesheetTrackingCategoryID: 1d7d2015-10e7-4ecb-8b44-f331c8b63e2d components: securitySchemes: OAuth2: type: oauth2 description: For more information visit https://developer.xero.com/documentation/oauth2/overview - flows: + flows: authorizationCode: - authorizationUrl: 'https://login.xero.com/identity/connect/authorize' - tokenUrl: 'https://identity.xero.com/connect/token' + authorizationUrl: https://login.xero.com/identity/connect/authorize + tokenUrl: https://identity.xero.com/connect/token scopes: payroll.employees: Grant read-write access to payroll employees payroll.employees.read: Grant read-only access to payroll employees @@ -5833,20 +5566,20 @@ components: payroll.timesheets: Grant read-write access to payroll timesheets payroll.timesheets.read: Grant read-only access to payroll timesheets parameters: - requiredHeader: + requiredHeader: in: header name: Xero-Tenant-Id x-snake: xero_tenant_id description: Xero identifier for Tenant schema: type: string - required: true + required: true idempotencyKey: in: header name: Idempotency-Key x-snake: idempotency_key description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. - example: "KEY_VALUE" + example: KEY_VALUE schema: type: string schemas: @@ -5868,8 +5601,8 @@ components: description: The object returned for a bad request type: object properties: - type: - description: The type of error format + type: + description: The type of error format type: string example: application/problem+json title: @@ -5877,14 +5610,14 @@ components: type: string example: BadRequest status: - description: The error status code + description: The error status code type: string example: 400 detail: description: A description of the error type: string example: Validation error occurred. - instance: + instance: type: string invalidFields: type: array @@ -5900,7 +5633,7 @@ components: reason: description: The reason the error occurred type: string - example: The Date of Birth is required. + example: The Date of Birth is required. Employees: type: object properties: @@ -5932,7 +5665,7 @@ components: - address properties: employeeID: - description: Xero unique identifier for the employee + description: Xero unique identifier for the employee type: string format: uuid example: d90457c4-f1be-4f2e-b4e3-f766390a7e30 @@ -5952,8 +5685,8 @@ components: description: Date of birth of the employee (YYYY-MM-DD) type: string format: date - example: 2019-01-02 - x-is-date: true + example: 2019-01-02 + x-is-date: true address: $ref: '#/components/schemas/Address' email: @@ -5964,8 +5697,8 @@ components: description: The employee’s gender type: string enum: - - M - - F + - M + - F example: F phoneNumber: description: Employee phone number @@ -6029,7 +5762,7 @@ components: description: Start date of the employment (YYYY-MM-DD) type: string format: date - x-is-date: true + x-is-date: true employeeNumber: description: The employment number of the employee type: string @@ -6038,19 +5771,19 @@ components: description: The NI Category of the employee type: string enum: - - A - - B - - C - - F - - H - - I - - J - - L - - M - - S - - V - - X - - Z + - A + - B + - C + - F + - H + - I + - J + - L + - M + - S + - V + - X + - Z example: A EmployeeTaxObject: type: object @@ -6077,7 +5810,7 @@ components: type: string example: 1185L w1M1: - description: Describes whether the tax settings is W1M1 + description: Describes whether the tax settings is W1M1 type: boolean previousTaxablePay: description: The previous taxable pay @@ -6085,12 +5818,12 @@ components: format: double x-is-money: true previousTaxPaid: - description: The tax amount previously paid + description: The tax amount previously paid type: number format: double x-is-money: true studentLoanDeduction: - description: The employee's student loan deduction type + description: The employee's student loan deduction type type: string example: Plan Type 2 hasPostGraduateLoans: @@ -6103,7 +5836,7 @@ components: description: The directorship start date type: string format: date - x-is-date: true + x-is-date: true nicCalculationMethod: description: NICs calculation method type: string @@ -6141,7 +5874,7 @@ components: format: double x-is-money: true statutorySickPay: - description: The total accumulated statutory sick pay amount received by the employee for current fiscal year to date + description: The total accumulated statutory sick pay amount received by the employee for current fiscal year to date type: number format: double x-is-money: true @@ -6189,15 +5922,15 @@ components: description: The description of the leave (max length = 50) type: string startDate: - description: Start date of the leave (YYYY-MM-DD) + description: Start date of the leave (YYYY-MM-DD) type: string format: date - x-is-date: true + x-is-date: true endDate: - description: End date of the leave (YYYY-MM-DD) + description: End date of the leave (YYYY-MM-DD) type: string format: date - x-is-date: true + x-is-date: true periods: description: The leave period information. The StartDate, EndDate and NumberOfUnits needs to be specified when you do not want to calculate NumberOfUnits automatically. Using incorrect period StartDate and EndDate will result in automatic computation of the NumberOfUnits. type: array @@ -6226,12 +5959,12 @@ components: description: The Pay Period Start Date (YYYY-MM-DD) type: string format: date - x-is-date: true + x-is-date: true periodEndDate: - description: The Pay Period End Date (YYYY-MM-DD) + description: The Pay Period End Date (YYYY-MM-DD) type: string format: date - x-is-date: true + x-is-date: true numberOfUnits: description: The Number of Units for the leave type: number @@ -6240,8 +5973,8 @@ components: description: Period Status type: string enum: - - Approved - - Completed + - Approved + - Completed EmployeeLeaveBalances: type: object properties: @@ -6257,7 +5990,7 @@ components: type: object properties: name: - description: Name of the leave type. + description: Name of the leave type. type: string example: Holiday leaveTypeID: @@ -6284,15 +6017,15 @@ components: EmployeeStatutoryLeaveBalance: type: object properties: - leaveType: + leaveType: description: The type of statutory leave type: string enum: - - Sick - - Adoption - - Maternity - - Paternity - - Sharedparental + - Sick + - Adoption + - Maternity + - Paternity + - Sharedparental balanceRemaining: description: The balance remaining for the corresponding leave type as of specified date. type: number @@ -6301,7 +6034,7 @@ components: description: The units will be "Hours" type: string enum: - - Hours + - Hours EmployeeStatutoryLeavesSummaries: type: object properties: @@ -6317,11 +6050,11 @@ components: type: object properties: statutoryLeaveID: - description: The unique identifier (guid) of a statutory leave. + description: The unique identifier (guid) of a statutory leave. type: string format: uuid employeeID: - description: The unique identifier (guid) of the employee + description: The unique identifier (guid) of the employee type: string format: uuid type: @@ -6334,17 +6067,17 @@ components: - Paternity - Sharedparental startDate: - description: The date when the leave starts + description: The date when the leave starts type: string format: date - x-is-date: true - endDate: - description: The date when the leave ends + x-is-date: true + endDate: + description: The date when the leave ends type: string format: date - x-is-date: true + x-is-date: true isEntitled: - description: Whether the leave was entitled to receive payment + description: Whether the leave was entitled to receive payment type: boolean status: description: The status of the leave @@ -6385,76 +6118,76 @@ components: - sufficientNotice properties: statutoryLeaveID: - description: The unique identifier (guid) of a statutory leave + description: The unique identifier (guid) of a statutory leave type: string format: uuid employeeID: - description: The unique identifier (guid) of the employee + description: The unique identifier (guid) of the employee type: string format: uuid leaveTypeID: - description: The unique identifier (guid) of the "Statutory Sick Leave (non-pensionable)" pay item + description: The unique identifier (guid) of the "Statutory Sick Leave (non-pensionable)" pay item type: string format: uuid startDate: - description: The date when the leave starts + description: The date when the leave starts type: string format: date - x-is-date: true + x-is-date: true endDate: - description: The date when the leave ends + description: The date when the leave ends type: string format: date - x-is-date: true + x-is-date: true type: description: the type of statutory leave type: string - example: "Sick" + example: Sick status: description: the type of statutory leave type: string - example: "Pending" + example: Pending workPattern: - description: The days of the work week the employee is scheduled to work at the time the leave is taken + description: The days of the work week the employee is scheduled to work at the time the leave is taken type: array items: type: string isPregnancyRelated: - description: Whether the sick leave was pregnancy related + description: Whether the sick leave was pregnancy related type: boolean sufficientNotice: - description: Whether the employee provided sufficient notice and documentation as required by the employer supporting the sick leave request + description: Whether the employee provided sufficient notice and documentation as required by the employer supporting the sick leave request type: boolean isEntitled: - description: Whether the leave was entitled to receive payment + description: Whether the leave was entitled to receive payment type: boolean entitlementWeeksRequested: - description: The amount of requested time (in weeks) + description: The amount of requested time (in weeks) type: number format: double entitlementWeeksQualified: - description: The amount of statutory sick leave time off (in weeks) that is available to take at the time the leave was requested + description: The amount of statutory sick leave time off (in weeks) that is available to take at the time the leave was requested type: number format: double entitlementWeeksRemaining: - description: A calculated amount of time (in weeks) that remains for the statutory sick leave period + description: A calculated amount of time (in weeks) that remains for the statutory sick leave period type: number format: double overlapsWithOtherLeave: description: Whether another leave (Paternity, Shared Parental specifically) occurs during the requested leave's period. While this is allowed it could affect payment amounts type: boolean entitlementFailureReasons: - description: If the leave requested was considered "not entitled", the reasons why are listed here. + description: If the leave requested was considered "not entitled", the reasons why are listed here. type: array items: type: string enum: - - UnableToCalculateAwe - - AweLowerThanLel - - NotQualifiedInPreviousPiw - - ExceededMaximumEntitlementWeeksOfSsp - - ExceededMaximumDurationOfPiw - - SufficientNoticeNotGiven + - UnableToCalculateAwe + - AweLowerThanLel + - NotQualifiedInPreviousPiw + - ExceededMaximumEntitlementWeeksOfSsp + - ExceededMaximumDurationOfPiw + - SufficientNoticeNotGiven EmployeeLeaveTypes: type: object properties: @@ -6491,18 +6224,18 @@ components: enum: - BeginningOfCalendarYear - OnAnniversaryDate - - EachPayPeriod + - EachPayPeriod - OnHourWorked hoursAccruedAnnually: description: The number of hours accrued for the leave annually. This is 0 when the scheduleOfAccrual chosen is "OnHourWorked" type: number format: double maximumToAccrue: - description: The maximum number of hours that can be accrued for the leave + description: The maximum number of hours that can be accrued for the leave type: number format: double openingBalance: - description: The initial number of hours assigned when the leave was added to the employee + description: The initial number of hours assigned when the leave was added to the employee type: number format: double rateAccruedHourly: @@ -6565,22 +6298,22 @@ components: type: string format: uuid ratePerUnit: - description: The rate per unit + description: The rate per unit type: number format: double x-is-money: true numberOfUnits: - description: The rate per unit + description: The rate per unit type: number format: double x-is-money: true fixedAmount: - description: The fixed amount per period + description: The fixed amount per period type: number format: double x-is-money: true earningsRateID: - description: The corresponding earnings rate identifier + description: The corresponding earnings rate identifier type: string format: uuid name: @@ -6627,8 +6360,8 @@ components: description: Category type of the employer pension type: string enum: - - StakeholderPension - - Other + - StakeholderPension + - Other liabilityAccountId: description: Xero identifier for Liability Account type: string @@ -6792,20 +6525,20 @@ components: description: Statutory Deduction Category type: string enum: - - AdditionalStudentLoan - - ChildSupport - - CourtFines - - Creditor - - FederalLevy - - InlandRevenueArrears - - KiwiSaver - - MsdRepayments - - NonPriorityOrder - - PriorityOrder - - TableBased - - StudentLoan - - VoluntaryStudentLoan - - USChildSupport + - AdditionalStudentLoan + - ChildSupport + - CourtFines + - Creditor + - FederalLevy + - InlandRevenueArrears + - KiwiSaver + - MsdRepayments + - NonPriorityOrder + - PriorityOrder + - TableBased + - StudentLoan + - VoluntaryStudentLoan + - USChildSupport EarningsOrders: type: object properties: @@ -6991,7 +6724,7 @@ components: description: UTC timestamp of last update to the leave type note type: string format: date-time - x-is-datetime: true + x-is-datetime: true isActive: description: Shows whether the leave type is active or not type: boolean @@ -7069,25 +6802,25 @@ components: timesheetID: description: The Xero identifier for a Timesheet type: string - format: uuid + format: uuid payrollCalendarID: description: The Xero identifier for the Payroll Calendar that the Timesheet applies to type: string - format: uuid + format: uuid employeeID: description: The Xero identifier for the Employee that the Timesheet is for type: string - format: uuid + format: uuid startDate: description: The Start Date of the Timesheet period (YYYY-MM-DD) type: string - format: date - x-is-date: true + format: date + x-is-date: true endDate: description: The End Date of the Timesheet period (YYYY-MM-DD) type: string - format: date - x-is-date: true + format: date + x-is-date: true status: description: Status of the timesheet type: string @@ -7098,7 +6831,7 @@ components: totalHours: description: The Total Hours of the Timesheet type: number - format: double + format: double updatedDateUTC: description: The UTC date time that the Timesheet was last updated type: string @@ -7129,24 +6862,24 @@ components: timesheetLineID: description: The Xero identifier for a Timesheet Line type: string - format: uuid + format: uuid date: description: The Date that this Timesheet Line is for (YYYY-MM-DD) type: string - format: date - x-is-date: true + format: date + x-is-date: true earningsRateID: description: The Xero identifier for the Earnings Rate that the Timesheet is for type: string - format: uuid + format: uuid trackingItemID: description: The Xero identifier for the Tracking Item that the Timesheet is for type: string - format: uuid + format: uuid numberOfUnits: description: The Number of Units of the Timesheet Line type: number - format: double + format: double PayRunCalendars: type: object properties: @@ -7178,7 +6911,7 @@ components: payrollCalendarID: description: Xero unique identifier for the payroll calendar type: string - format: uuid + format: uuid name: description: Name of the calendar type: string @@ -7196,22 +6929,22 @@ components: description: Period start date of the calendar type: string format: date - x-is-date: true + x-is-date: true periodEndDate: description: Period end date of the calendar type: string format: date - x-is-date: true + x-is-date: true paymentDate: description: Payment date of the calendar type: string format: date - x-is-date: true + x-is-date: true updatedDateUTC: description: UTC timestamp of the last update to the pay run calendar type: string format: date-time - x-is-datetime: true + x-is-datetime: true PaymentMethodObject: type: object properties: @@ -7270,32 +7003,32 @@ components: salaryAndWagesID: description: Xero unique identifier for a salary and wages record type: string - format: uuid + format: uuid earningsRateID: description: Xero unique identifier for an earnings rate type: string - format: uuid + format: uuid numberOfUnitsPerWeek: description: The Number of Units per week for the corresponding salary and wages type: number - format: double + format: double ratePerUnit: description: The rate of each unit for the corresponding salary and wages type: number - format: double + format: double numberOfUnitsPerDay: description: The Number of Units per day for the corresponding salary and wages type: number - format: double + format: double effectiveFrom: description: The effective date of the corresponding salary and wages type: string - format: date - x-is-date: true + format: date + x-is-date: true annualSalary: description: The annual salary type: number - format: double + format: double status: description: The current status of the corresponding salary and wages type: string @@ -7335,62 +7068,62 @@ components: payRunID: description: Xero unique identifier for the pay run type: string - format: uuid + format: uuid payrollCalendarID: description: Xero unique identifier for the payroll calendar type: string - format: uuid + format: uuid periodStartDate: description: Period start date of the payroll calendar type: string - format: date + format: date x-is-date: true periodEndDate: description: Period end date of the payroll calendar type: string - format: date - x-is-date: true + format: date + x-is-date: true paymentDate: description: Payment date of the pay run type: string - format: date - x-is-date: true + format: date + x-is-date: true totalCost: description: Total cost of the pay run type: number - format: double + format: double totalPay: description: Total pay of the pay run type: number - format: double + format: double payRunStatus: description: Pay run status type: string enum: - - Draft - - Posted + - Draft + - Posted payRunType: description: Pay run type type: string enum: - - Scheduled - - Unscheduled - - EarlierYearUpdate + - Scheduled + - Unscheduled + - EarlierYearUpdate calendarType: description: Calendar type of the pay run type: string enum: - - Weekly - - Fortnightly - - FourWeekly - - Monthly - - Annual - - Quarterly + - Weekly + - Fortnightly + - FourWeekly + - Monthly + - Annual + - Quarterly postedDateTime: description: Posted date time of the pay run type: string - format: date - x-is-date: true + format: date + x-is-date: true paySlips: type: array items: @@ -7421,20 +7154,20 @@ components: paySlipID: description: The Xero identifier for a Payslip type: string - format: uuid + format: uuid employeeID: description: The Xero identifier for payroll employee type: string - format: uuid + format: uuid payRunID: description: The Xero identifier for the associated payrun type: string - format: uuid + format: uuid lastEdited: description: The date payslip was last updated type: string - format: date - x-is-datetime: true + format: date + x-is-datetime: true firstName: description: Employee first name type: string @@ -7444,42 +7177,42 @@ components: totalEarnings: description: Total earnings before any deductions. Same as gross earnings for UK. type: number - format: double + format: double grossEarnings: description: Total earnings before any deductions. Same as total earnings for UK. type: number - format: double + format: double totalPay: description: The employee net pay type: number - format: double + format: double totalEmployerTaxes: description: The employer's tax obligation type: number - format: double + format: double totalEmployeeTaxes: description: The part of an employee's earnings that is deducted for tax purposes type: number - format: double + format: double totalDeductions: description: Total amount subtracted from an employee's earnings to reach total pay type: number - format: double + format: double totalReimbursements: description: Total reimbursements are nontaxable payments to an employee used to repay out-of-pocket expenses when the person incurs those expenses through employment type: number - format: double + format: double totalCourtOrders: description: Total amounts required by law to subtract from the employee's earnings type: number - format: double + format: double totalBenefits: description: Benefits (also called fringe benefits, perquisites or perks) are various non-earnings compensations provided to employees in addition to their normal earnings or salaries type: number - format: double + format: double bacsHash: description: BACS Service User Number - type: string + type: string paymentMethod: description: The payment method code type: string @@ -7523,26 +7256,26 @@ components: earningsRateID: description: Xero identifier for payroll earnings rate type: string - format: uuid + format: uuid displayName: description: name of earnings rate for display in UI type: string ratePerUnit: description: Rate per unit for earnings line type: number - format: double + format: double numberOfUnits: description: Earnings number of units type: number - format: double + format: double fixedAmount: description: Earnings fixed amount. Only applicable if the EarningsRate RateType is Fixed type: number - format: double + format: double amount: description: The amount of the earnings line. type: number - format: double + format: double isLinkedToTimesheet: description: Identifies if the earnings is taken from the timesheet. False for earnings line type: boolean @@ -7559,23 +7292,23 @@ components: earningsRateID: description: Xero identifier for payroll leave earnings rate type: string - format: uuid + format: uuid ratePerUnit: description: Rate per unit for leave earnings line type: number - format: double + format: double numberOfUnits: description: Leave earnings number of units type: number - format: double + format: double fixedAmount: description: Leave earnings fixed amount. Only applicable if the EarningsRate RateType is Fixed type: number - format: double + format: double amount: description: The amount of the earnings line. type: number - format: double + format: double isLinkedToTimesheet: description: Identifies if the leave earnings is taken from the timesheet. False for leave earnings line type: boolean @@ -7589,23 +7322,23 @@ components: earningsRateID: description: Xero identifier for payroll timesheet earnings rate type: string - format: uuid + format: uuid ratePerUnit: description: Rate per unit for timesheet earnings line type: number - format: double + format: double numberOfUnits: description: Timesheet earnings number of units type: number - format: double + format: double fixedAmount: description: Timesheet earnings fixed amount. Only applicable if the EarningsRate RateType is Fixed type: number - format: double + format: double amount: description: The amount of the timesheet earnings line. type: number - format: double + format: double isLinkedToTimesheet: description: Identifies if the timesheet earnings is taken from the timesheet. False for leave earnings line type: boolean @@ -7619,18 +7352,18 @@ components: deductionTypeID: description: Xero identifier for payroll deduction type: string - format: uuid + format: uuid amount: description: The amount of the deduction line type: number - format: double + format: double subjectToTax: description: Identifies if the deduction is subject to tax type: boolean percentage: description: Deduction rate percentage type: number - format: double + format: double ReimbursementLines: type: array items: @@ -7660,11 +7393,11 @@ components: leaveTypeID: description: Xero identifier for the Leave type type: string - format: uuid + format: uuid numberOfUnits: description: Leave accrual number of units type: number - format: double + format: double BenefitLines: type: array items: @@ -7675,22 +7408,22 @@ components: benefitTypeID: description: Xero identifier for payroll benefit type type: string - format: uuid + format: uuid displayName: description: Benefit display name - type: string + type: string amount: description: The amount of the benefit line. type: number - format: double + format: double fixedAmount: description: Benefit fixed amount type: number - format: double + format: double percentage: description: Benefit rate percentage type: number - format: double + format: double PaymentLines: type: array items: @@ -7701,17 +7434,17 @@ components: paymentLineID: description: Xero identifier for payroll payment line type: string - format: uuid + format: uuid amount: description: The amount of the payment line type: number - format: double + format: double accountNumber: description: The account number type: string sortCode: description: The account sort code - type: string + type: string accountName: description: The account name type: string @@ -7735,11 +7468,11 @@ components: amount: description: The amount of the tax line type: number - format: double - globalTaxTypeID: + format: double + globalTaxTypeID: description: Tax type ID type: string - manualAdjustment: + manualAdjustment: description: Identifies if the tax line is a manual adjustment type: boolean CourtOrderLines: @@ -7752,11 +7485,11 @@ components: courtOrderTypeID: description: Xero identifier for payroll court order type type: string - format: uuid + format: uuid amount: description: Amount type: number - format: double + format: double Settings: type: object properties: @@ -7779,18 +7512,18 @@ components: accountID: description: The Xero identifier for Settings. type: string - format: uuid + format: uuid type: description: The assigned AccountType type: string enum: - - BANK - - EMPLOYERSNIC - - NICLIABILITY - - PAYEECONTRIBUTION - - PAYELIABILITY - - WAGESPAYABLE - - WAGESEXPENSE + - BANK + - EMPLOYERSNIC + - NICLIABILITY + - PAYEECONTRIBUTION + - PAYELIABILITY + - WAGESPAYABLE + - WAGESEXPENSE code: description: A unique 3 digit number for each Account type: string @@ -7863,4 +7596,4 @@ components: timesheetTrackingCategoryID: description: The Xero identifier for Timesheet tracking category. type: string - format: uuid \ No newline at end of file + format: uuid diff --git a/xero-projects.yaml b/xero-projects.yaml index 068bd60d2..b674d7e55 100644 --- a/xero-projects.yaml +++ b/xero-projects.yaml @@ -1,26 +1,28 @@ openapi: 3.0.0 info: - version: "6.3.0" + version: 10.1.0 title: Xero Projects API - description: This is the Xero Projects API - termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" + description: This is the Xero Projects API + termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/ contact: - name: "Xero Platform Team" - email: "api@xero.com" - url: "https://developer.xero.com" + name: Xero Platform Team + email: api@xero.com + url: https://developer.xero.com license: - name: MIT - url: 'https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE' + name: MIT + url: https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE servers: - description: Xero API server for projects - url: 'https://api.xero.com/projects.xro/2.0' + url: https://api.xero.com/projects.xro/2.0 paths: /Projects: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [projects, projects.read] + - OAuth2: + - projects + - projects.read tags: - Project summary: Retrieves all projects @@ -32,7 +34,7 @@ paths: in: query required: false description: Search for all projects that match a comma separated list of projectIds - schema: + schema: type: array items: type: string @@ -42,20 +44,20 @@ paths: in: query required: false description: Filter for projects for a specific contact - schema: + schema: type: string format: uuid - name: states in: query required: false description: Filter for projects in a particular state (INPROGRESS or CLOSED) - schema: + schema: type: string - name: page in: query required: false description: set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. - schema: + schema: type: integer example: 1 default: 1 @@ -64,96 +66,79 @@ paths: in: query required: false description: Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. - schema: + schema: type: integer minimum: 1 maximum: 500 default: 50 example: 100 responses: - '200': + "200": description: OK/success, returns a list of project objects content: application/json: schema: $ref: '#/components/schemas/Projects' - example: { - "pagination": { - "page": 1, - "pageSize": 50, - "pageCount": 1, - "itemCount": 9 - }, - "items": [ - { - "projectId": "b021e7cb-1903-4292-b48b-5b27b4271e3e", - "contactId": "216830cb-9a68-487e-928b-c1a7ccc4fc81", - "name": "FooProject28916", - "currencyCode": "AUD", - "minutesLogged": 180, - "totalTaskAmount": { - "currency": "AUD", - "value": 60.0 - }, - "totalExpenseAmount": { - "currency": "AUD", - "value": 499.0 - }, - "minutesToBeInvoiced": 180, - "taskAmountToBeInvoiced": { - "currency": "AUD", - "value": 60.0 - }, - "taskAmountInvoiced": { - "currency": "AUD", - "value": 0.0 - }, - "expenseAmountToBeInvoiced": { - "currency": "AUD", - "value": 499.0 - }, - "expenseAmountInvoiced": { - "currency": "AUD", - "value": 0.0 - }, - "projectAmountInvoiced": { - "currency": "AUD", - "value": 0.0 - }, - "deposit": { - "currency": "AUD", - "value": 0.0 - }, - "depositApplied": { - "currency": "AUD", - "value": 0.0 - }, - "creditNoteAmount": { - "currency": "AUD", - "value": 0.0 - }, - "totalInvoiced": { - "currency": "AUD", - "value": 0.0 - }, - "totalToBeInvoiced": { - "currency": "AUD", - "value": 559.0 - }, - "deadlineUtc": "2020-03-03T15:00:00Z", - "estimate": { - "currency": "AUD", - "value": 99.99 - }, - "status": "INPROGRESS" - } - ] - } - '400': - $ref: '#/components/responses/400Error' + example: + pagination: + page: 1 + pageSize: 50 + pageCount: 1 + itemCount: 9 + items: + - projectId: b021e7cb-1903-4292-b48b-5b27b4271e3e + contactId: 216830cb-9a68-487e-928b-c1a7ccc4fc81 + name: FooProject28916 + currencyCode: AUD + minutesLogged: 180 + totalTaskAmount: + currency: AUD + value: 60.0 + totalExpenseAmount: + currency: AUD + value: 499.0 + minutesToBeInvoiced: 180 + taskAmountToBeInvoiced: + currency: AUD + value: 60.0 + taskAmountInvoiced: + currency: AUD + value: 0.0 + expenseAmountToBeInvoiced: + currency: AUD + value: 499.0 + expenseAmountInvoiced: + currency: AUD + value: 0.0 + projectAmountInvoiced: + currency: AUD + value: 0.0 + deposit: + currency: AUD + value: 0.0 + depositApplied: + currency: AUD + value: 0.0 + creditNoteAmount: + currency: AUD + value: 0.0 + totalInvoiced: + currency: AUD + value: 0.0 + totalToBeInvoiced: + currency: AUD + value: 559.0 + deadlineUtc: "2020-03-03T15:00:00Z" + estimate: + currency: AUD + value: 99.99 + status: INPROGRESS + "400": + $ref: '#/components/responses/400Error' post: - security: - - OAuth2: [projects] + security: + - OAuth2: + - projects tags: - Project summary: Create one or more new projects @@ -167,90 +152,72 @@ paths: application/json: schema: $ref: '#/components/schemas/ProjectCreateOrUpdate' - example: - '{ - "contactId": "00000000-0000-0000-000-000000000000", - "name": "New Kitchen", - "deadlineUtc": "2019-12-10T12:59:59Z", - "estimateAmount": "99.99" - }' + example: '{ "contactId": "00000000-0000-0000-000-000000000000", "name": "New Kitchen", "deadlineUtc": "2019-12-10T12:59:59Z", "estimateAmount": "99.99" }' responses: - '201': + "201": description: OK/success, returns the new project object content: application/json: schema: $ref: '#/components/schemas/Project' - example: { - "projectId": "ed957eee-bc6f-4f52-a663-aa42e6af9620", - "contactId": "216830cb-9a68-487e-928b-c1a7ccc4fc81", - "name": "New Kitchen", - "currencyCode": "AUD", - "minutesLogged": 0, - "totalTaskAmount": { - "currency": "AUD", - "value": 0.0 - }, - "totalExpenseAmount": { - "currency": "AUD", - "value": 0.0 - }, - "minutesToBeInvoiced": 0, - "taskAmountToBeInvoiced": { - "currency": "AUD", - "value": 0.0 - }, - "taskAmountInvoiced": { - "currency": "AUD", - "value": 0.0 - }, - "expenseAmountToBeInvoiced": { - "currency": "AUD", - "value": 0.0 - }, - "expenseAmountInvoiced": { - "currency": "AUD", - "value": 0.0 - }, - "projectAmountInvoiced": { - "currency": "AUD", - "value": 0.0 - }, - "deposit": { - "currency": "AUD", - "value": 0.0 - }, - "depositApplied": { - "currency": "AUD", - "value": 0.0 - }, - "creditNoteAmount": { - "currency": "AUD", - "value": 0.0 - }, - "totalInvoiced": { - "currency": "AUD", - "value": 0.0 - }, - "totalToBeInvoiced": { - "currency": "AUD", - "value": 0.0 - }, - "deadlineUtc": "2020-03-03T15:00:00Z", - "estimate": { - "currency": "AUD", - "value": 99.99 - }, - "status": "INPROGRESS" - } - '400': + example: + projectId: ed957eee-bc6f-4f52-a663-aa42e6af9620 + contactId: 216830cb-9a68-487e-928b-c1a7ccc4fc81 + name: New Kitchen + currencyCode: AUD + minutesLogged: 0 + totalTaskAmount: + currency: AUD + value: 0.0 + totalExpenseAmount: + currency: AUD + value: 0.0 + minutesToBeInvoiced: 0 + taskAmountToBeInvoiced: + currency: AUD + value: 0.0 + taskAmountInvoiced: + currency: AUD + value: 0.0 + expenseAmountToBeInvoiced: + currency: AUD + value: 0.0 + expenseAmountInvoiced: + currency: AUD + value: 0.0 + projectAmountInvoiced: + currency: AUD + value: 0.0 + deposit: + currency: AUD + value: 0.0 + depositApplied: + currency: AUD + value: 0.0 + creditNoteAmount: + currency: AUD + value: 0.0 + totalInvoiced: + currency: AUD + value: 0.0 + totalToBeInvoiced: + currency: AUD + value: 0.0 + deadlineUtc: "2020-03-03T15:00:00Z" + estimate: + currency: AUD + value: 99.99 + status: INPROGRESS + "400": $ref: '#/components/responses/400Error' - '/Projects/{projectId}': + /Projects/{projectId}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [projects, projects.read] + - OAuth2: + - projects + - projects.read tags: - Project summary: Retrieves a single project @@ -266,79 +233,66 @@ paths: type: string format: uuid responses: - '200': + "200": description: OK/success, returns the specified project object content: application/json: schema: $ref: '#/components/schemas/Project' - example: { - "projectId": "b021e7cb-1903-4292-b48b-5b27b4271e3e", - "contactId": "216830cb-9a68-487e-928b-c1a7ccc4fc81", - "name": "Remodeling 2012", - "currencyCode": "AUD", - "minutesLogged": 180, - "totalTaskAmount": { - "currency": "AUD", - "value": 60.0 - }, - "totalExpenseAmount": { - "currency": "AUD", - "value": 499.0 - }, - "minutesToBeInvoiced": 180, - "taskAmountToBeInvoiced": { - "currency": "AUD", - "value": 60.0 - }, - "taskAmountInvoiced": { - "currency": "AUD", - "value": 0.0 - }, - "expenseAmountToBeInvoiced": { - "currency": "AUD", - "value": 499.0 - }, - "expenseAmountInvoiced": { - "currency": "AUD", - "value": 0.0 - }, - "projectAmountInvoiced": { - "currency": "AUD", - "value": 0.0 - }, - "deposit": { - "currency": "AUD", - "value": 0.0 - }, - "depositApplied": { - "currency": "AUD", - "value": 0.0 - }, - "creditNoteAmount": { - "currency": "AUD", - "value": 0.0 - }, - "totalInvoiced": { - "currency": "AUD", - "value": 0.0 - }, - "totalToBeInvoiced": { - "currency": "AUD", - "value": 559.0 - }, - "deadlineUtc": "2020-03-03T15:00:00Z", - "estimate": { - "currency": "AUD", - "value": 99.99 - }, - "status": "INPROGRESS" - } - '400': - $ref: '#/components/responses/400Error' + example: + projectId: b021e7cb-1903-4292-b48b-5b27b4271e3e + contactId: 216830cb-9a68-487e-928b-c1a7ccc4fc81 + name: Remodeling 2012 + currencyCode: AUD + minutesLogged: 180 + totalTaskAmount: + currency: AUD + value: 60.0 + totalExpenseAmount: + currency: AUD + value: 499.0 + minutesToBeInvoiced: 180 + taskAmountToBeInvoiced: + currency: AUD + value: 60.0 + taskAmountInvoiced: + currency: AUD + value: 0.0 + expenseAmountToBeInvoiced: + currency: AUD + value: 499.0 + expenseAmountInvoiced: + currency: AUD + value: 0.0 + projectAmountInvoiced: + currency: AUD + value: 0.0 + deposit: + currency: AUD + value: 0.0 + depositApplied: + currency: AUD + value: 0.0 + creditNoteAmount: + currency: AUD + value: 0.0 + totalInvoiced: + currency: AUD + value: 0.0 + totalToBeInvoiced: + currency: AUD + value: 559.0 + deadlineUtc: "2020-03-03T15:00:00Z" + estimate: + currency: AUD + value: 99.99 + status: INPROGRESS + "400": + $ref: '#/components/responses/400Error' put: - security: - - OAuth2: [projects] + security: + - OAuth2: + - projects tags: - Project summary: Updates a specific project @@ -361,21 +315,17 @@ paths: application/json: schema: $ref: '#/components/schemas/ProjectCreateOrUpdate' - example: - '{ - "name": "New Kitchen", - "deadlineUtc": "2017-04-23T18:25:43.511Z", - "estimateAmount": 99.99 - }' + example: '{ "name": "New Kitchen", "deadlineUtc": "2017-04-23T18:25:43.511Z", "estimateAmount": 99.99 }' responses: - '204': + "204": description: Success - return response 204 no content x-isEmpty: true - '400': + "400": $ref: '#/components/responses/400Error' patch: - security: - - OAuth2: [projects] + security: + - OAuth2: + - projects tags: - Project summary: creates a project for the specified contact @@ -398,22 +348,21 @@ paths: application/json: schema: $ref: '#/components/schemas/ProjectPatch' - example: - '{ - "status": "INPROGRESS" - }' + example: '{ "status": "INPROGRESS" }' responses: - '204': + "204": description: Success - return response 204 no content x-isEmpty: true - '400': + "400": $ref: '#/components/responses/400Error' /ProjectsUsers: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [projects, projects.read] + - OAuth2: + - projects + - projects.read tags: - Project summary: Retrieves a list of all project users @@ -424,7 +373,7 @@ paths: in: query required: false description: set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. - schema: + schema: type: integer example: 1 default: 1 @@ -433,47 +382,42 @@ paths: in: query required: false description: Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500. - schema: + schema: type: integer minimum: 1 maximum: 500 default: 50 example: 100 responses: - '200': + "200": description: OK/success, returns a list of project users content: application/json: schema: $ref: '#/components/schemas/ProjectUsers' - example: { - "pagination": { - "page": 1, - "pageSize": 50, - "pageCount": 1, - "itemCount": 2 - }, - "items":[ - { - "userId": "740add2a-a703-4b8a-a670-1093919c2040", - "name": "Test User", - "email": "test@xero.com" - }, - { - "userId": "00000000-0000-0000-0000-000000000000", - "name": "API Team", - "email": "api@xero.com" - } - ] - } - '400': - $ref: '#/components/responses/400Error' + example: + pagination: + page: 1 + pageSize: 50 + pageCount: 1 + itemCount: 2 + items: + - userId: 740add2a-a703-4b8a-a670-1093919c2040 + name: Test User + email: test@xero.com + - userId: 00000000-0000-0000-0000-000000000000 + name: API Team + email: api@xero.com + "400": + $ref: '#/components/responses/400Error' /Projects/{projectId}/Tasks: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [projects, projects.read] + - OAuth2: + - projects + - projects.read tags: - Project summary: Retrieves all project tasks @@ -490,7 +434,7 @@ paths: format: uuid - name: page in: query - description: Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. + description: Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. schema: type: integer example: 1 @@ -504,62 +448,54 @@ paths: - name: taskIds x-snake: task_ids in: query - description: "Search for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={taskID},{taskID}" + description: Search for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={taskID},{taskID} schema: type: string - name: chargeType - $ref: '#/components/parameters/chargeType' + $ref: '#/components/parameters/chargeType' responses: - '200': + "200": description: OK/success, returns a list of task objects content: application/json: schema: $ref: '#/components/schemas/Tasks' - example: { - "pagination": { - "page": 1, - "pageSize": 50, - "pageCount": 1, - "itemCount": 1 - }, - "items": [ - { - "name": "Demolition", - "rate": { - "currency": "AUD", - "value": 20.0 - }, - "chargeType": "TIME", - "status": "ACTIVE", - "estimateMinutes": 12000, - "taskId": "7be77337-feec-4458-bb1b-dbaa5a4aafce", - "projectId": "b021e7cb-1903-4292-b48b-5b27b4271e3e", - "totalMinutes": 180, - "totalAmount": { - "currency": "AUD", - "value": 60.0 - }, - "minutesToBeInvoiced": 180, - "minutesInvoiced": 0, - "nonChargeableMinutes": 0, - "fixedMinutes": 0, - "amountToBeInvoiced": { - "currency": "AUD", - "value": 60.0 - }, - "amountInvoiced": { - "currency": "AUD", - "value": 0.0 - } - } - ] - } - '400': + example: + pagination: + page: 1 + pageSize: 50 + pageCount: 1 + itemCount: 1 + items: + - name: Demolition + rate: + currency: AUD + value: 20.0 + chargeType: TIME + status: ACTIVE + estimateMinutes: 12000 + taskId: 7be77337-feec-4458-bb1b-dbaa5a4aafce + projectId: b021e7cb-1903-4292-b48b-5b27b4271e3e + totalMinutes: 180 + totalAmount: + currency: AUD + value: 60.0 + minutesToBeInvoiced: 180 + minutesInvoiced: 0 + nonChargeableMinutes: 0 + fixedMinutes: 0 + amountToBeInvoiced: + currency: AUD + value: 60.0 + amountInvoiced: + currency: AUD + value: 0.0 + "400": $ref: '#/components/responses/400Error' post: security: - - OAuth2: [projects] + - OAuth2: + - projects tags: - Project summary: Allows you to create a task @@ -582,54 +518,48 @@ paths: application/json: schema: $ref: '#/components/schemas/TaskCreateOrUpdate' - example: - '{ - "status": "INPROGRESS" - }' + example: '{ "status": "INPROGRESS" }' responses: - '201': + "201": description: OK/success, returns the new task object content: application/json: schema: $ref: '#/components/schemas/Task' - example: { - "name": "Demolition", - "rate": { - "currency": "AUD", - "value": 20 - }, - "chargeType": "TIME", - "status": "ACTIVE", - "estimateMinutes": 12000, - "taskId": "00000000-0000-0000-0000-000000000000", - "projectId": "00000000-0000-0000-0000-000000000000", - "totalMinutes": 300, - "totalAmount": { - "currency": "AUD", - "value": 100 - }, - "minutesToBeInvoiced": 300, - "minutesInvoiced": 0, - "nonChargeableMinutes": 0, - "fixedMinutes": 0, - "amountToBeInvoiced": { - "currency": "AUD", - "value": 100 - }, - "amountInvoiced": { - "currency": "AUD", - "value": 0 - } - } - '400': + example: + name: Demolition + rate: + currency: AUD + value: 20 + chargeType: TIME + status: ACTIVE + estimateMinutes: 12000 + taskId: 00000000-0000-0000-0000-000000000000 + projectId: 00000000-0000-0000-0000-000000000000 + totalMinutes: 300 + totalAmount: + currency: AUD + value: 100 + minutesToBeInvoiced: 300 + minutesInvoiced: 0 + nonChargeableMinutes: 0 + fixedMinutes: 0 + amountToBeInvoiced: + currency: AUD + value: 100 + amountInvoiced: + currency: AUD + value: 0 + "400": $ref: '#/components/responses/400Error' /Projects/{projectId}/Tasks/{taskId}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [projects, projects.read] + - OAuth2: + - projects + - projects.read tags: - Project summary: Retrieves a single project task @@ -648,51 +578,47 @@ paths: x-snake: task_id in: path required: true - description: "You can specify an individual task by appending the taskId to the endpoint, i.e. GET https://.../tasks/{taskID}" + description: You can specify an individual task by appending the taskId to the endpoint, i.e. GET https://.../tasks/{taskID} schema: type: string format: uuid responses: - '200': + "200": description: OK/success, returns the specified task object content: application/json: schema: $ref: '#/components/schemas/Task' - example: { - "name": "Demolition", - "rate": { - "currency": "AUD", - "value": 20 - }, - "chargeType": "TIME", - "status": "ACTIVE", - "estimateMinutes": 12000, - "taskId": "7be77337-feec-4458-bb1b-dbaa5a4aafce", - "projectId": "b021e7cb-1903-4292-b48b-5b27b4271e3e", - "totalMinutes": 300, - "totalAmount": { - "currency": "AUD", - "value": 100 - }, - "minutesToBeInvoiced": 300, - "minutesInvoiced": 0, - "nonChargeableMinutes": 0, - "fixedMinutes": 0, - "amountToBeInvoiced": { - "currency": "AUD", - "value": 100 - }, - "amountInvoiced": { - "currency": "AUD", - "value": 0 - } - } - '400': + example: + name: Demolition + rate: + currency: AUD + value: 20 + chargeType: TIME + status: ACTIVE + estimateMinutes: 12000 + taskId: 7be77337-feec-4458-bb1b-dbaa5a4aafce + projectId: b021e7cb-1903-4292-b48b-5b27b4271e3e + totalMinutes: 300 + totalAmount: + currency: AUD + value: 100 + minutesToBeInvoiced: 300 + minutesInvoiced: 0 + nonChargeableMinutes: 0 + fixedMinutes: 0 + amountToBeInvoiced: + currency: AUD + value: 100 + amountInvoiced: + currency: AUD + value: 0 + "400": $ref: '#/components/responses/400Error' put: security: - - OAuth2: [projects] + - OAuth2: + - projects tags: - Project summary: Allows you to update a task @@ -723,16 +649,17 @@ paths: application/json: schema: $ref: '#/components/schemas/TaskCreateOrUpdate' - example: '' + example: "" responses: - '204': + "204": description: OK/Success - return response 204 no content x-isEmpty: true - '400': + "400": $ref: '#/components/responses/400Error' delete: security: - - OAuth2: [projects] + - OAuth2: + - projects tags: - Project summary: Allows you to delete a task @@ -756,17 +683,19 @@ paths: type: string format: uuid responses: - '204': + "204": description: Success - return response 204 no content x-isEmpty: true - '400': + "400": $ref: '#/components/responses/400Error' /Projects/{projectId}/Time: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [projects, projects.read] + - OAuth2: + - projects + - projects.read tags: - Project summary: Retrieves all time entries associated with a specific project @@ -811,7 +740,7 @@ paths: format: uuid - name: page in: query - description: Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. + description: Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. schema: type: integer example: 1 @@ -824,75 +753,69 @@ paths: example: 10 - name: states in: query - description: "Comma-separated list of states to find. Will find all time entries that are in the status of whatever is specified. " - schema: + description: "Comma-separated list of states to find. Will find all time entries that are in the status of whatever is specified.\t" + schema: type: array items: type: string - name: isChargeable x-snake: is_chargeable in: query - description: "Finds all time entries which relate to tasks with the charge type `TIME` or `FIXED`." + description: Finds all time entries which relate to tasks with the charge type `TIME` or `FIXED`. schema: type: boolean - name: dateAfterUtc x-snake: date_after_utc in: query - description: "ISO 8601 UTC date. Finds all time entries on or after this date filtered on the `dateUtc` field." + description: ISO 8601 UTC date. Finds all time entries on or after this date filtered on the `dateUtc` field. schema: type: string format: date-time - name: dateBeforeUtc x-snake: date_before_utc in: query - description: "ISO 8601 UTC date. Finds all time entries on or before this date filtered on the `dateUtc` field." + description: ISO 8601 UTC date. Finds all time entries on or before this date filtered on the `dateUtc` field. schema: type: string format: date-time responses: - '200': + "200": description: OK/success, returns a list of time entry objects content: application/json: schema: $ref: '#/components/schemas/TimeEntries' - example: { - "pagination": { - "page": 1, - "pageSize": 50, - "pageCount": 1, - "itemCount": 9 - }, - "items":[ - { - "timeEntryId": "3cd35eca-704f-4bca-b258-236028ae8ed1", - "userId": "740add2a-a703-4b8a-a670-1093919c2040", - "projectId": "b021e7cb-1903-4292-b48b-5b27b4271e3e", - "taskId": "7be77337-feec-4458-bb1b-dbaa5a4aafce", - "dateUtc": "2020-02-27T15:00:00Z", - "dateEnteredUtc": "2020-02-28T03:24:29.2215641Z", - "duration":45, - "description": "My description", - "status": "ACTIVE" - }, - { - "timeEntryId": "00000000-0000-0000-0000-000000000000", - "userId": "00000000-0000-0000-0000-000000000000", - "projectId": "00000000-0000-0000-0000-000000000000", - "taskId": "00000000-0000-0000-0000-000000000000", - "dateUtc": "2020-02-26T15:00:00Z", - "dateEnteredUtc": "2020-02-28T03:24:29.2215641Z", - "duration":30, - "description": "My description", - "status": "ACTIVE" - } - ] - } - '400': + example: + pagination: + page: 1 + pageSize: 50 + pageCount: 1 + itemCount: 9 + items: + - timeEntryId: 3cd35eca-704f-4bca-b258-236028ae8ed1 + userId: 740add2a-a703-4b8a-a670-1093919c2040 + projectId: b021e7cb-1903-4292-b48b-5b27b4271e3e + taskId: 7be77337-feec-4458-bb1b-dbaa5a4aafce + dateUtc: "2020-02-27T15:00:00Z" + dateEnteredUtc: "2020-02-28T03:24:29.2215641Z" + duration: 45 + description: My description + status: ACTIVE + - timeEntryId: 00000000-0000-0000-0000-000000000000 + userId: 00000000-0000-0000-0000-000000000000 + projectId: 00000000-0000-0000-0000-000000000000 + taskId: 00000000-0000-0000-0000-000000000000 + dateUtc: "2020-02-26T15:00:00Z" + dateEnteredUtc: "2020-02-28T03:24:29.2215641Z" + duration: 30 + description: My description + status: ACTIVE + "400": $ref: '#/components/responses/400Error' post: security: - - OAuth2: [projects] + - OAuth2: + - projects tags: - Project summary: Creates a time entry for a specific project @@ -915,39 +838,39 @@ paths: application/json: schema: $ref: '#/components/schemas/TimeEntryCreateOrUpdate' - example: { - "userId": "00000000-0000-0000-0000-000000000000", - "taskId": "00000000-0000-0000-0000-000000000000", - "dateUtc": "2020-02-26T15:00:00Z", - "duration":30, - "description": "My description" - } + example: + userId: 00000000-0000-0000-0000-000000000000 + taskId: 00000000-0000-0000-0000-000000000000 + dateUtc: "2020-02-26T15:00:00Z" + duration: 30 + description: My description responses: - '200': + "200": description: OK/success, returns the newly created time entry content: application/json: schema: $ref: '#/components/schemas/TimeEntry' - example: { - "timeEntryId": "c6539534-f1d2-43a6-80df-3bd1f8aca24d", - "userId": "c6539534-f1d2-43a6-80df-3bd1f8aca24d", - "projectId": "b021e7cb-1903-4292-b48b-5b27b4271e3e", - "taskId": "7be77337-feec-4458-bb1b-dbaa5a4aafce", - "dateUtc": "2020-02-26T15:00:00Z", - "dateEnteredUtc": "2020-02-28T20:37:42.8652832Z", - "duration":30, - "description": "My description", - "status": "ACTIVE" - } - '400': + example: + timeEntryId: c6539534-f1d2-43a6-80df-3bd1f8aca24d + userId: c6539534-f1d2-43a6-80df-3bd1f8aca24d + projectId: b021e7cb-1903-4292-b48b-5b27b4271e3e + taskId: 7be77337-feec-4458-bb1b-dbaa5a4aafce + dateUtc: "2020-02-26T15:00:00Z" + dateEnteredUtc: "2020-02-28T20:37:42.8652832Z" + duration: 30 + description: My description + status: ACTIVE + "400": $ref: '#/components/responses/400Error' /Projects/{projectId}/Time/{timeEntryId}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [projects, projects.read] + - OAuth2: + - projects + - projects.read tags: - Project summary: Retrieves a single time entry for a specific project @@ -971,28 +894,28 @@ paths: type: string format: uuid responses: - '200': - description: OK/success, returns the specified time entry + "200": + description: OK/success, returns the specified time entry content: application/json: schema: $ref: '#/components/schemas/TimeEntry' - example: { - "timeEntryId": "3cd35eca-704f-4bca-b258-236028ae8ed1", - "userId": "740add2a-a703-4b8a-a670-1093919c2040", - "projectId": "b021e7cb-1903-4292-b48b-5b27b4271e3e", - "taskId": "7be77337-feec-4458-bb1b-dbaa5a4aafce", - "dateUtc": "2020-02-27T15:00:00Z", - "dateEnteredUtc": "2020-02-21T21:41:22.2642727Z", - "duration":45, - "description": "My description", - "status": "ACTIVE" - } - '400': + example: + timeEntryId: 3cd35eca-704f-4bca-b258-236028ae8ed1 + userId: 740add2a-a703-4b8a-a670-1093919c2040 + projectId: b021e7cb-1903-4292-b48b-5b27b4271e3e + taskId: 7be77337-feec-4458-bb1b-dbaa5a4aafce + dateUtc: "2020-02-27T15:00:00Z" + dateEnteredUtc: "2020-02-21T21:41:22.2642727Z" + duration: 45 + description: My description + status: ACTIVE + "400": $ref: '#/components/responses/400Error' put: security: - - OAuth2: [projects] + - OAuth2: + - projects tags: - Project summary: Updates a time entry for a specific project @@ -1023,22 +946,22 @@ paths: application/json: schema: $ref: '#/components/schemas/TimeEntryCreateOrUpdate' - example: { - "userId": "00000000-0000-0000-0000-000000000000", - "taskId": "00000000-0000-0000-0000-000000000000", - "dateUtc": "2020-02-27T15:00:00Z", - "duration":45, - "description": "My UPDATED description" - } + example: + userId: 00000000-0000-0000-0000-000000000000 + taskId: 00000000-0000-0000-0000-000000000000 + dateUtc: "2020-02-27T15:00:00Z" + duration: 45 + description: My UPDATED description responses: - '204': + "204": description: Success - return response 204 no content x-isEmpty: true - '400': + "400": $ref: '#/components/responses/400Error' delete: security: - - OAuth2: [projects] + - OAuth2: + - projects tags: - Project summary: Deletes a time entry for a specific project @@ -1062,20 +985,20 @@ paths: type: string format: uuid responses: - '204': + "204": description: Success - return response 204 no content x-isEmpty: true - '400': + "400": $ref: '#/components/responses/400Error' components: securitySchemes: OAuth2: type: oauth2 description: For more information - flows: + flows: authorizationCode: - authorizationUrl: 'https://login.xero.com/identity/connect/authorize' - tokenUrl: 'https://identity.xero.com/connect/token' + authorizationUrl: https://login.xero.com/identity/connect/authorize + tokenUrl: https://identity.xero.com/connect/token scopes: email: Grant read-only access to your email openid: Grant read-only access to your open id @@ -1083,32 +1006,32 @@ components: projects: Grant read-write access to projects projects.read: Grant read-only access to projects parameters: - requiredHeader: + requiredHeader: in: header name: Xero-Tenant-Id x-snake: xero_tenant_id description: Xero identifier for Tenant schema: type: string - required: true + required: true chargeType: in: query name: chargeType x-snake: charge_type - schema: + schema: $ref: '#/components/schemas/ChargeType' idempotencyKey: in: header name: Idempotency-Key x-snake: idempotency_key description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. - example: "KEY_VALUE" + example: KEY_VALUE schema: type: string schemas: - Projects: + Projects: externalDocs: - url: 'https://developer.xero.com/documentation/projects/projects' + url: https://developer.xero.com/documentation/projects/projects type: object properties: pagination: @@ -1119,19 +1042,19 @@ components: $ref: '#/components/schemas/Project' ProjectCreateOrUpdate: externalDocs: - url: 'https://developer.xero.com/documentation/projects/projects' + url: https://developer.xero.com/documentation/projects/projects type: object properties: contactId: externalDocs: - url: 'https://developer.xero.com/documentation/api/contacts' + url: https://developer.xero.com/documentation/api/contacts type: string format: uuid - example: '01234567-89ab-cdef-0123-456789abcdef' + example: 01234567-89ab-cdef-0123-456789abcdef description: Identifier of the contact this project was created for. - name: + name: type: string - example: 'New Kitchen' + example: New Kitchen description: Name of the project. estimateAmount: type: number @@ -1141,15 +1064,15 @@ components: deadlineUtc: type: string format: date-time - example: '2019-12-10T12:59:59Z' + example: "2019-12-10T12:59:59Z" description: Deadline for the project. UTC Date Time in ISO-8601 format. required: - name ProjectPatch: externalDocs: - url: 'https://developer.xero.com/documentation/projects/projects' + url: https://developer.xero.com/documentation/projects/projects type: object - properties: + properties: status: $ref: '#/components/schemas/ProjectStatus' type: string @@ -1157,24 +1080,24 @@ components: - status Project: externalDocs: - url: 'https://developer.xero.com/documentation/projects/projects' + url: https://developer.xero.com/documentation/projects/projects type: object properties: projectId: type: string format: uuid - example: '254553fa-2be8-4991-bd5e-70a97ea12ef8' + example: 254553fa-2be8-4991-bd5e-70a97ea12ef8 description: Identifier of the project. contactId: externalDocs: - url: 'https://developer.xero.com/documentation/api/contacts' + url: https://developer.xero.com/documentation/api/contacts type: string format: uuid - example: '01234567-89ab-cdef-0123-456789abcdef' + example: 01234567-89ab-cdef-0123-456789abcdef description: Identifier of the contact this project was created for. - name: + name: type: string - example: 'New Kitchen' + example: New Kitchen description: Name of the project. currencyCode: $ref: '#/components/schemas/CurrencyCode' @@ -1212,7 +1135,7 @@ components: deadlineUtc: type: string format: date-time - example: '2019-12-10T12:59:59Z' + example: "2019-12-10T12:59:59Z" description: Deadline for the project. UTC Date Time in ISO-8601 format. totalInvoiced: $ref: '#/components/schemas/Amount' @@ -1224,13 +1147,13 @@ components: type: string $ref: '#/components/schemas/ProjectStatus' required: - - name + - name Pagination: properties: page: type: integer example: 1 - description: Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. + description: Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. pageSize: type: integer example: 10 @@ -1243,9 +1166,9 @@ components: type: integer example: 2 description: Number of items returned - ProjectUsers: + ProjectUsers: externalDocs: - url: 'https://developer.xero.com/documentation/projects/users' + url: https://developer.xero.com/documentation/projects/users type: object properties: pagination: @@ -1256,211 +1179,211 @@ components: $ref: '#/components/schemas/ProjectUser' ProjectUser: externalDocs: - url: 'https://developer.xero.com/documentation/projects/users' + url: https://developer.xero.com/documentation/projects/users type: object properties: userId: type: string format: uuid - example: '254553fa-2be8-4991-bd5e-70a97ea12ef8' + example: 254553fa-2be8-4991-bd5e-70a97ea12ef8 description: Identifier of the user of the project. - name: + name: type: string - example: 'Sidney Allen' + example: Sidney Allen description: Full name of the user. - email: + email: type: string - example: 'sidneyallen@xero.com' + example: sidneyallen@xero.com description: Email address of the user. Amount: type: object properties: - currency: - $ref: '#/components/schemas/CurrencyCode' - type: string - value: - type: number - format: double - x-is-money: true - example: 1.00 + currency: + $ref: '#/components/schemas/CurrencyCode' + type: string + value: + type: number + format: double + x-is-money: true + example: 1.00 ProjectStatus: description: Status for project - example: "INPROGRESS" + example: INPROGRESS type: string - enum: - - INPROGRESS - - CLOSED + enum: + - INPROGRESS + - CLOSED CurrencyCode: description: 3 letter alpha code for the ISO-4217 currency code, e.g. USD, AUD. - example: "AUD" + example: AUD type: string enum: - - AED - - AFN - - ALL - - AMD - - ANG - - AOA - - ARS - - AUD - - AWG - - AZN - - BAM - - BBD - - BDT - - BGN - - BHD - - BIF - - BMD - - BND - - BOB - - BRL - - BSD - - BTN - - BWP - - BYN - - BZD - - CAD - - CDF - - CHF - - CLP - - CNY - - COP - - CRC - - CUC - - CUP - - CVE - - CZK - - DJF - - DKK - - DOP - - DZD - - EGP - - ERN - - ETB - - EUR - - FJD - - FKP - - GBP - - GEL - - GGP - - GHS - - GIP - - GMD - - GNF - - GTQ - - GYD - - HKD - - HNL - - HRK - - HTG - - HUF - - IDR - - ILS - - IMP - - INR - - IQD - - IRR - - ISK - - JEP - - JMD - - JOD - - JPY - - KES - - KGS - - KHR - - KMF - - KPW - - KRW - - KWD - - KYD - - KZT - - LAK - - LBP - - LKR - - LRD - - LSL - - LYD - - MAD - - MDL - - MGA - - MKD - - MMK - - MNT - - MOP - - MRU - - MUR - - MVR - - MWK - - MXN - - MYR - - MZN - - NAD - - NGN - - NIO - - NOK - - NPR - - NZD - - OMR - - PAB - - PEN - - PGK - - PHP - - PKR - - PLN - - PYG - - QAR - - RON - - RSD - - RUB - - RWF - - SAR - - SBD - - SCR - - SDG - - SEK - - SGD - - SHP - - SLL - - SOS - - SPL - - SRD - - STN - - SVC - - SYP - - SZL - - THB - - TJS - - TMT - - TND - - TOP - - TRY - - TTD - - TVD - - TWD - - TZS - - UAH - - UGX - - USD - - UYU - - UZS - - VEF - - VND - - VUV - - WST - - XAF - - XCD - - XDR - - XOF - - XPF - - YER - - ZAR - - ZMW - - ZMK - - ZWD + - AED + - AFN + - ALL + - AMD + - ANG + - AOA + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRU + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STN + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XCD + - XDR + - XOF + - XPF + - YER + - ZAR + - ZMW + - ZMK + - ZWD Error: externalDocs: - url: 'https://developer.xero.com/documentation/projects/projects-response-codes' + url: https://developer.xero.com/documentation/projects/projects-response-codes type: object properties: message: @@ -1469,9 +1392,9 @@ components: modelState: type: object description: Array of Elements of validation Errors - Tasks: + Tasks: externalDocs: - url: 'https://developer.xero.com/documentation/projects/projects' + url: https://developer.xero.com/documentation/projects/projects type: object properties: pagination: @@ -1482,13 +1405,13 @@ components: $ref: '#/components/schemas/Task' Task: externalDocs: - url: 'https://developer.xero.com/documentation/projects/projects' + url: https://developer.xero.com/documentation/projects/projects type: object properties: taskId: type: string format: uuid - example: '00000000-0000-0000-000-000000000000' + example: 00000000-0000-0000-000-000000000000 description: Identifier of the task. name: type: string @@ -1505,7 +1428,7 @@ components: projectId: type: string format: uuid - example: '00000000-0000-0000-000-000000000000' + example: 00000000-0000-0000-000-000000000000 description: Identifier of the project task belongs to. totalMinutes: type: integer @@ -1539,7 +1462,7 @@ components: - LOCKED description: Status of the task. When a task of ChargeType is `FIXED` and the rate amount is invoiced the status will be set to `INVOICED` and can't be modified. A task with ChargeType of `TIME` or `NON_CHARGEABLE` cannot have a status of `INVOICED`. A `LOCKED` state indicates that the task is currently changing state (for example being invoiced) and can't be modified. ChargeType: - description: "Can be `TIME`, `FIXED` or `NON_CHARGEABLE`, defines how the task will be charged. Use `TIME` when you want to charge per hour and `FIXED` to charge as a fixed amount. If the task will not be charged use `NON_CHARGEABLE`." + description: Can be `TIME`, `FIXED` or `NON_CHARGEABLE`, defines how the task will be charged. Use `TIME` when you want to charge per hour and `FIXED` to charge as a fixed amount. If the task will not be charged use `NON_CHARGEABLE`. type: string enum: - TIME @@ -1547,14 +1470,14 @@ components: - NON_CHARGEABLE TaskCreateOrUpdate: externalDocs: - url: 'https://developer.xero.com/documentation/projects/projects' + url: https://developer.xero.com/documentation/projects/projects type: object properties: name: type: string - description: "Name of the task. Max length 100 characters." + description: Name of the task. Max length 100 characters. maximum: 100 - rate: + rate: $ref: '#/components/schemas/Amount' type: number chargeType: @@ -1569,7 +1492,7 @@ components: - chargeType TimeEntries: externalDocs: - url: 'https://developer.xero.com/documentation/projects/time' + url: https://developer.xero.com/documentation/projects/time type: object properties: pagination: @@ -1580,28 +1503,28 @@ components: $ref: '#/components/schemas/TimeEntry' TimeEntry: externalDocs: - url: 'https://developer.xero.com/documentation/projects/time' + url: https://developer.xero.com/documentation/projects/time type: object properties: timeEntryId: type: string format: uuid - example: '00000000-0000-0000-000-000000000000' + example: 00000000-0000-0000-000-000000000000 description: Identifier of the time entry. userId: type: string format: uuid - example: '00000000-0000-0000-000-000000000000' + example: 00000000-0000-0000-000-000000000000 description: The xero user identifier of the person who logged time. projectId: type: string format: uuid - example: '00000000-0000-0000-000-000000000000' + example: 00000000-0000-0000-000-000000000000 description: Identifier of the project, that the task (which the time entry is logged against) belongs to. taskId: type: string format: uuid - example: '00000000-0000-0000-000-000000000000' + example: 00000000-0000-0000-000-000000000000 description: Identifier of the task that time entry is logged against. dateUtc: type: string @@ -1623,32 +1546,32 @@ components: - ACTIVE - LOCKED - INVOICED - description: "Status of the time entry. By default a time entry is created with status of `ACTIVE`. A `LOCKED` state indicates that the time entry is currently changing state (for example being invoiced). Updates are not allowed when in this state. It will have a status of INVOICED once it is invoiced." + description: Status of the time entry. By default a time entry is created with status of `ACTIVE`. A `LOCKED` state indicates that the time entry is currently changing state (for example being invoiced). Updates are not allowed when in this state. It will have a status of INVOICED once it is invoiced. TimeEntryCreateOrUpdate: externalDocs: - url: 'https://developer.xero.com/documentation/projects/time' + url: https://developer.xero.com/documentation/projects/time type: object properties: userId: type: string format: uuid - example: '00000000-0000-0000-000-000000000000' - description: "The xero user identifier of the person logging the time." + example: 00000000-0000-0000-000-000000000000 + description: The xero user identifier of the person logging the time. taskId: type: string format: uuid - example: '00000000-0000-0000-000-000000000000' - description: "Identifier of the task that time entry is logged against." + example: 00000000-0000-0000-000-000000000000 + description: Identifier of the task that time entry is logged against. dateUtc: type: string format: date-time - description: "Date time entry is logged on. UTC Date Time in ISO-8601 format." + description: Date time entry is logged on. UTC Date Time in ISO-8601 format. duration: type: integer - description: "Number of minutes to be logged. Duration is between 1 and 59940 inclusively." + description: Number of minutes to be logged. Duration is between 1 and 59940 inclusively. description: type: string - description: "An optional description of the time entry, will be set to null if not provided during update." + description: An optional description of the time entry, will be set to null if not provided during update. required: - userId - taskId @@ -1660,4 +1583,4 @@ components: content: application/json: schema: - $ref: '#/components/schemas/Error' \ No newline at end of file + $ref: '#/components/schemas/Error' diff --git a/xero_accounting.yaml b/xero_accounting.yaml index 278647155..01fa08c6f 100644 --- a/xero_accounting.yaml +++ b/xero_accounting.yaml @@ -1,29163 +1,25375 @@ -openapi: 3.0.0 -info: - title: Xero Accounting API - version: "6.3.0" - termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" - contact: - name: "Xero Platform Team" - email: "api@xero.com" - url: "https://developer.xero.com" -servers: - - description: The Xero Accounting API exposes accounting and related functions of the main Xero application and can be used for a variety of purposes such as creating transactions like invoices and credit notes, right through to extracting accounting data via our reports endpoint. - url: https://api.xero.com/api.xro/2.0 -paths: - /Accounts: - parameters: - - $ref: '#/components/parameters/requiredHeader' - type: string - get: - security: - - OAuth2: [accounting.settings, accounting.settings.read] - tags: - - Accounting - operationId: getAccounts - summary: Retrieves the full chart of accounts - parameters: - - $ref: '#/components/parameters/ifModifiedSince' - - in: query - name: where - description: Filter by an any element - example: Status=="ACTIVE" AND Type=="BANK" - x-example-csharp: Status==\"ACTIVE\" - x-example-java: Status=="' + Account.StatusEnum.ACTIVE+ '" - x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Account::STATUS_ACTIVE . '" - x-example-ruby: Status==#{XeroRuby::Accounting::Account::ACTIVE} - schema: - type: string - - in: query - name: order - description: Order by an any element - example: "Name ASC" - schema: - type: string - responses: - '200': - description: Success - return response of type Accounts array with 0 to n Account - content: - application/json: - schema: - $ref: '#/components/schemas/Accounts' - example: { - "Accounts": [{ - "AccountID": "ebd06280-af70-4bed-97c6-7451a454ad85", - "Code": "091", - "Name": "Business Savings Account", - "Type": "BANK", - "TaxType": "NONE", - "EnablePaymentsToAccount": false, - "BankAccountNumber": "0209087654321050", - "BankAccountType": "BANK", - "CurrencyCode": "NZD" - },{ - "AccountID": "7d05a53d-613d-4eb2-a2fc-dcb6adb80b80", - "Code": "200", - "Name": "Sales", - "Type": "REVENUE", - "TaxType": "OUTPUT2", - "Description": "Income from any normal business activity", - "EnablePaymentsToAccount": false - }] - } - put: - security: - - OAuth2: [accounting.settings] - tags: - - Accounting - operationId: createAccount - summary: Creates a new chart of accounts - parameters: - - $ref: '#/components/parameters/idempotencyKey' - x-hasAccountingValidationError: true - x-example: - - object: - is_object: true - key: account - keyPascal: Account - - code: - key: code - keyPascal: Code - default: 123456 - object: account - - name: - key: name - keyPascal: Name - default: FooBar - object: account - - type: - key: type - keyPascal: Type - default: EXPENSE - nonString: true - php: XeroAPI\XeroPHP\Models\Accounting\AccountType::EXPENSE - node: AccountType.EXPENSE - ruby: XeroRuby::Accounting::AccountType::EXPENSE - python: AccountType.EXPENSE - java: com.xero.models.accounting.AccountType.EXPENSE - csharp: AccountType.EXPENSE - object: account - - description: - is_last: true - key: description - keyPascal: Description - default: "Hello World" - object: account - responses: - '200': - description: Success - created new Account and return response of type Accounts array with new Account - content: - application/json: - schema: - $ref: '#/components/schemas/Accounts' - example: { - "Id": "11814c9d-3b5e-492e-93b0-fad16bf3244f", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1550793549392)/", - "Accounts": [ - { - "AccountID": "66b262e2-561e-423e-8937-47d558f13442", - "Code": "123456", - "Name": "Foobar", - "Status": "ACTIVE", - "Type": "EXPENSE", - "TaxType": "INPUT", - "Description": "Hello World", - "Class": "EXPENSE", - "EnablePaymentsToAccount": false, - "ShowInExpenseClaims": false, - "ReportingCode": "EXP", - "ReportingCodeName": "Expense", - "UpdatedDateUTC": "/Date(1550793549320+0000)/" - } - ] - } - '400': - description: Validation Error - some data was incorrect returns response of type Error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: { - "ErrorNumber": 10, - "Type": "ValidationException", - "Message": "A validation exception occurred", - "Elements": [ - { - "AccountID": "00000000-0000-0000-0000-000000000000", - "Code": "123456", - "Name": "Foobar", - "Type": "EXPENSE", - "Description": "Hello World", - "ValidationErrors": [ - { - "Message": "Please enter a unique Name." - } - ] - } - ] - } - requestBody: - required: true - description: Account object in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/Account' - example: { - "Code":"123456", - "Name":"Foobar", - "Type":"EXPENSE", - "Description":"Hello World" - } - '/Accounts/{AccountID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.settings, accounting.settings.read] - tags: - - Accounting - operationId: getAccount - summary: Retrieves a single chart of accounts by using a unique account Id - parameters: - - $ref: '#/components/parameters/AccountID' - responses: - '200': - description: Success - return response of type Accounts array with one Account - content: - application/json: - schema: - $ref: '#/components/schemas/Accounts' - example: { - "Id": "323455cc-9511-4451-a873-248d2983f38e", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1550797359081)/", - "Accounts": [ - { - "AccountID": "99ce6032-0678-4aa0-8148-240c75fee33a", - "Code": "123456", - "Name": "FooBar", - "Status": "ACTIVE", - "Type": "EXPENSE", - "TaxType": "INPUT", - "Description": "Hello World", - "Class": "EXPENSE", - "EnablePaymentsToAccount": false, - "ShowInExpenseClaims": false, - "ReportingCode": "EXP", - "ReportingCodeName": "Expense", - "UpdatedDateUTC": "/Date(1550797359120+0000)/" - } - ] - } - post: - security: - - OAuth2: [accounting.settings] - tags: - - Accounting - operationId: updateAccount - summary: Updates a chart of accounts - x-hasAccountingValidationError: true - x-example: - - account: - is_object: true - key: account - keyPascal: Account - - code: - key: code - keyPascal: Code - default: 123456 - object: account - - name: - key: name - keyPascal: Name - default: BarFoo - object: account - - type: - key: type - keyPascal: Type - default: EXPENSE - nonString: true - php: XeroAPI\XeroPHP\Models\Accounting\AccountType::EXPENSE - node: AccountType.EXPENSE - ruby: XeroRuby::Accounting::AccountType::EXPENSE - python: AccountType.EXPENSE - java: com.xero.models.accounting.AccountType.EXPENSE - csharp: AccountType.EXPENSE - object: account - - description: - key: description - keyPascal: Description - default: "Hello World" - object: account - - taxType: - is_last: true - key: taxType - keyPascal: TaxType - keySnake: tax_type - default: NONE - object: account - - accounts: - is_object: true - key: accounts - keyPascal: Accounts - - accounts: - is_last: true - is_array_add: true - key: accounts - keyPascal: Accounts - java: Accounts - csharp: Account - object: account - parameters: - - $ref: '#/components/parameters/AccountID' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - update existing Account and return response of type Accounts array with updated Account - content: - application/json: - schema: - $ref: '#/components/schemas/Accounts' - example: { - "Id": "9012e75c-ec08-40a9-ae15-153fc1f35c4d", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1550795389340)/", - "Accounts": [ - { - "AccountID": "99ce6032-0678-4aa0-8148-240c75fee33a", - "Code": "654321", - "Name": "BarFoo", - "Status": "ACTIVE", - "Type": "EXPENSE", - "TaxType": "INPUT", - "Description": "Good Bye World", - "Class": "EXPENSE", - "EnablePaymentsToAccount": false, - "ShowInExpenseClaims": false, - "ReportingCode": "EXP", - "ReportingCodeName": "Expense", - "UpdatedDateUTC": "/Date(1550795389333+0000)/" - } - ] - } - '400': - description: Validation Error - some data was incorrect returns response of type Error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: { - "ErrorNumber": 10, - "Type": "ValidationException", - "Message": "A validation exception occurred", - "Elements": [ - { - "AccountID": "00000000-0000-0000-0000-000000000000", - "Code": "123456", - "Name": "Foobar", - "Type": "EXPENSE", - "Description": "Hello World", - "ValidationErrors": [ - { - "Message": "Please enter a unique Name." - } - ] - } - ] - } - requestBody: - required: true - description: Request of type Accounts array with one Account - content: - application/json: - schema: - $ref: '#/components/schemas/Accounts' - example: { - "Accounts":[ - { - "Code":"123456", - "Name":"BarFoo", - "AccountID":"99ce6032-0678-4aa0-8148-240c75fee33a", - "Type":"EXPENSE", - "Description":"GoodBye World", - "TaxType":"INPUT", - "EnablePaymentsToAccount":false, - "ShowInExpenseClaims":false, - "Class":"EXPENSE", - "ReportingCode":"EXP", - "ReportingCodeName":"Expense", - "UpdatedDateUTC":"2019-02-21T16:29:47.96-08:00" - } - ] - } - delete: - security: - - OAuth2: [accounting.settings] - tags: - - Accounting - operationId: deleteAccount - x-hasAccountingValidationError: true - summary: Deletes a chart of accounts - parameters: - - $ref: '#/components/parameters/AccountID' - responses: - '200': - description: Success - delete existing Account and return response of type Accounts array with deleted Account - content: - application/json: - schema: - $ref: '#/components/schemas/Accounts' - example: { - "Id": "76bb0543-8efe-4acc-b7f6-67dfcdec37b4", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1550798217216)/", - "Accounts": [ - { - "AccountID": "7f3c0bec-f3e7-4073-b4d6-cc56dd027ef1", - "Code": "123456", - "Name": "FooBar", - "Status": "DELETED", - "Type": "EXPENSE", - "TaxType": "INPUT", - "Description": "Hello World", - "Class": "EXPENSE", - "EnablePaymentsToAccount": false, - "ShowInExpenseClaims": false, - "ReportingCode": "EXP", - "ReportingCodeName": "Expense", - "UpdatedDateUTC": "/Date(1550798217210+0000)/" - } - ] - } - '400': - description: Validation Error - some data was incorrect returns response of type Error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: { - "ErrorNumber": 10, - "Type": "ValidationException", - "Message": "A validation exception occurred", - "Elements": [ - { - "AccountID": "00000000-0000-0000-0000-000000000000", - "Code": "123456", - "Name": "Foobar", - "Type": "EXPENSE", - "Description": "Hello World", - "ValidationErrors": [ - { - "Message": "Please enter a unique Name." - } - ] - } - ] - } - '/Accounts/{AccountID}/Attachments': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getAccountAttachments - summary: Retrieves attachments for a specific accounts by using a unique account Id - parameters: - - $ref: '#/components/parameters/AccountID' - responses: - '200': - description: Success - return response of type Attachments array of Attachment - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "439c1573-3cd8-4697-a9f6-81fa651ee8f3", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1550852630329)/", - "Attachments": [ - { - "AttachmentID": "52a643be-cd5c-489f-9778-53a9fd337756", - "FileName": "sample5.jpg", - "Url": "https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '/Accounts/{AccountID}/Attachments/{AttachmentID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getAccountAttachmentById - summary: Retrieves a specific attachment from a specific account using a unique attachment Id - parameters: - - $ref: '#/components/parameters/AccountID' - - $ref: '#/components/parameters/AttachmentID' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of attachment for Account as binary data - content: - application/octet-stream: - schema: - type: string - format: binary - '/Accounts/{AccountID}/Attachments/{FileName}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getAccountAttachmentByFileName - summary: Retrieves an attachment for a specific account by filename - parameters: - - $ref: '#/components/parameters/AccountID' - - $ref: '#/components/parameters/FileName' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of attachment for Account as binary data - content: - application/octet-stream: - schema: - type: string - format: binary - post: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: updateAccountAttachmentByFileName - x-hasAccountingValidationError: true - summary: Updates attachment on a specific account by filename - parameters: - - $ref: '#/components/parameters/AccountID' - - $ref: '#/components/parameters/FileName' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Attachments array of Attachment - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "c8d6413a-1da2-4faa-9848-21f60443e906", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1550859714477)/", - "Attachments": [ - { - "AttachmentID": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "FileName": "sample5.jpg", - "Url": "https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '400': - description: Validation Error - some data was incorrect returns response of type Error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - put: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: createAccountAttachmentByFileName - x-hasAccountingValidationError: true - summary: Creates an attachment on a specific account - parameters: - - $ref: '#/components/parameters/AccountID' - - $ref: '#/components/parameters/FileName' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Attachments array of Attachment - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "724cdff5-bcd1-4c5c-977e-e864c24258e0", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1550856817769)/", - "Attachments": [ - { - "AttachmentID": "ab95b276-9dce-4925-9077-439818ba270f", - "FileName": "sample5.jpg", - "Url": "https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - /BatchPayments: - parameters: - - $ref: '#/components/parameters/requiredHeader' - description: Batch payments allow you to bundle multiple bills or invoices into one payment transaction. This means a single payment in Xero can be reconciled with a single transaction on the bank statement making for a much simpler bank reconciliation experience. - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getBatchPayments - summary: Retrieves either one or many batch payments for invoices - parameters: - - $ref: '#/components/parameters/ifModifiedSince' - - in: query - name: where - description: Filter by an any element - example: Status=="AUTHORISED" - x-example-csharp: Status==\"AUTHORISED\" - x-example-java: Status=="' + BatchPayment.StatusEnum.AUTHORISED + '" - x-example-php: Status=="' . XeroAPI\XeroPHP\Models\Accounting\BatchPayment::STATUS_AUTHORISED . '" - x-example-ruby: Status==#{XeroRuby::Accounting::BatchPayment::AUTHORISED} - schema: - type: string - - in: query - name: order - description: Order by an any element - example: "Date ASC" - schema: - type: string - responses: - '200': - description: Success - return response of type BatchPayments array of BatchPayment objects - content: - application/json: - schema: - $ref: '#/components/schemas/BatchPayments' - example: { - "Id": "6ab84949-4fe5-4788-a135-4d8f690d24d7", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1550866184006)/", - "BatchPayments": [ - { - "Account": { - "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9" - }, - "Reference": "Hello World", - "BatchPaymentID": "d0e9bbbf-5b8a-48b6-906a-035591fcb061", - "DateString": "2017-11-28T00:00:00", - "Date": "/Date(1511827200000+0000)/", - "Payments": [ - { - "Invoice": { - "InvoiceID": "0975dec2-0cf6-498d-9c9f-c6775b45c61d", - "Payments": [], - "CreditNotes": [], - "Prepayments": [], - "Overpayments": [], - "HasErrors": false, - "IsDiscounted": false, - "LineItems": [] - }, - "PaymentID": "97ec2ef8-f4d6-4de5-9f2a-385d41cdc2fc", - "Amount": 200.00 - }, - { - "Invoice": { - "InvoiceID": "600982d9-6605-4e11-afa1-d8dec2be7b52", - "Payments": [], - "CreditNotes": [], - "Prepayments": [], - "Overpayments": [], - "HasErrors": false, - "IsDiscounted": false, - "LineItems": [] - }, - "PaymentID": "e232795f-b919-4865-a754-12f6ae8402c0", - "Amount": 200.00 - }, - { - "Invoice": { - "InvoiceID": "99a2bd54-4ab1-413c-90bb-57f6464fe5d6", - "Payments": [], - "CreditNotes": [], - "Prepayments": [], - "Overpayments": [], - "HasErrors": false, - "IsDiscounted": false, - "LineItems": [] - }, - "PaymentID": "c2d571a5-38ff-4d37-9d43-dfadb4ad53ff", - "Amount": 200.00 - }, - { - "Invoice": { - "InvoiceID": "c81942c8-bfc5-4c88-a21a-b892a4a8c1c5", - "Payments": [], - "CreditNotes": [], - "Prepayments": [], - "Overpayments": [], - "HasErrors": false, - "IsDiscounted": false, - "LineItems": [] - }, - "PaymentID": "0f3c18dc-49bd-47a4-a875-03c84a29978f", - "Amount": 200.00 - }, - { - "Invoice": { - "InvoiceID": "6c9a1d89-8319-42f6-87d6-7690e748af85", - "Payments": [], - "CreditNotes": [], - "Prepayments": [], - "Overpayments": [], - "HasErrors": false, - "IsDiscounted": false, - "LineItems": [] - }, - "PaymentID": "43541eed-f3ac-44ac-88cb-9fe1cb7ed8b8", - "Amount": 200.00 - } - ], - "Type": "RECBATCH", - "Status": "AUTHORISED", - "TotalAmount": 1000.00, - "UpdatedDateUTC": "/Date(1511893792820+0000)/", - "IsReconciled": false - } - ] - } - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createBatchPayment - summary: Creates one or many batch payments for invoices - x-hasAccountingValidationError: true - x-example: - - currDate: - is_date: true - key: currDate - keyPascal: CurrDate - keySnake: curr_date - java_datatype: LocalDate - default: "LocalDate.now()" - java: "LocalDate.now()" - csharp: "DateTime.Now" - node: "'2020-12-10'" - php: "new DateTime('2020-12-10')" - python: "dateutil.parser.parse('2020-12-03T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - paymentAccount: - is_object: true - key: paymentAccount - keyPascal: Account - keySnake: payment_account - - accountID: - is_last: true - is_uuid: true - key: accountID - keyPascal: AccountID - keySnake: account_id - default: 00000000-0000-0000-0000-000000000000 - object: paymentAccount - - bankAccount: - is_object: true - key: bankAccount - keyPascal: Account - keySnake: bank_account - - accountID: - is_last: true - is_uuid: true - key: accountID - keyPascal: AccountID - keySnake: account_id - default: 00000000-0000-0000-0000-000000000000 - object: bankAccount - - invoice: - is_object: true - key: invoice - keyPascal: Invoice - - invoiceID: - is_last: true - is_uuid: true - key: invoiceID - keyPascal: InvoiceID - keySnake: invoice_id - default: "00000000-0000-0000-0000-000000000000" - object: invoice - - payment: - is_object: true - key: payment - keyPascal: Payment - - set_bankaccount: - is_variable: true - nonString: true - key: account - keyPascal: Account - default: bankAccount - python: bank_account - ruby: bank_account - object: payment - - date: - is_variable: true - nonString: true - key: date - keyPascal: Date - default: currDate - python: curr_date - ruby: curr_date - object: payment - - amount: - nonString: true - key: amount - keyPascal: Amount - default: 1.00 - is_money: true - object: payment - - set_invoice: - is_last: true - is_variable: true - nonString: true - key: invoice - keyPascal: Invoice - default: invoice - object: payment - - payments: - is_list: true - key: payments - keyPascal: Payment - - add_payments: - is_last: true - is_list_add: true - key: payments - keyPascal: Payments - object: payment - - batchPayment: - is_object: true - key: batchPayment - keyPascal: BatchPayment - keySnake: batch_payment - - set_paymentaccount: - is_variable: true - nonString: true - key: account - keyPascal: Account - default: paymentAccount - python: payment_account - ruby: payment_account - object: batchPayment - - reference: - key: reference - keyPascal: Reference - default: "hello foobar" - object: batchPayment - - date: - is_variable: true - nonString: true - key: date - keyPascal: Date - default: currDate - python: curr_date - ruby: curr_date - object: batchPayment - - set_payments: - is_last: true - is_variable: true - nonString: true - key: payments - keyPascal: Payments - default: payments - object: batchPayment - - batchPayments: - is_object: true - key: batchPayments - keyPascal: BatchPayments - - add_batchPayments: - is_last: true - is_array_add: true - key: batchPayments - keyPascal: BatchPayments - keySnake: batch_payments - java: BatchPayments - python: batch_payment - ruby: batch_payment - csharp: BatchPayment - object: batchPayment - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type BatchPayments array of BatchPayment objects - content: - application/json: - schema: - $ref: '#/components/schemas/BatchPayments' - example: { - "Id": "424745ed-6356-46ad-87d4-3585f9062fb4", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1550865988111)/", - "BatchPayments": [ - { - "Account": { - "AccountID": "5ec2f302-cd60-4f8b-a915-9229dd45e6fa" - }, - "Reference": "Foobar123", - "BatchPaymentID": "d318c343-208e-49fe-b04a-45642349bcf1", - "DateString": "2019-02-22T00:00:00", - "Date": "/Date(1550793600000+0000)/", - "Payments": [ - { - "Invoice": { - "InvoiceID": "3323652c-155e-433b-8a73-4dde7cfbf410", - "Payments": [], - "CreditNotes": [], - "Prepayments": [], - "Overpayments": [], - "HasErrors": false, - "IsDiscounted": false, - "LineItems": [] - }, - "PaymentID": "c05098fa-ae3c-4f00-80ec-0a9df07dedff", - "Amount": 1.00 - }, - { - "Invoice": { - "InvoiceID": "e4abafb4-1f5b-4d9f-80b3-9a7b815bc302", - "Payments": [], - "CreditNotes": [], - "Prepayments": [], - "Overpayments": [], - "HasErrors": false, - "IsDiscounted": false, - "LineItems": [] - }, - "PaymentID": "96409489-2f7d-4804-9a6d-6b939b0e038a", - "Amount": 1.00 - }, - { - "Invoice": { - "InvoiceID": "e6039672-b161-40cd-b07b-a0178e7186ad", - "Payments": [], - "CreditNotes": [], - "Prepayments": [], - "Overpayments": [], - "HasErrors": false, - "IsDiscounted": false, - "LineItems": [] - }, - "PaymentID": "d2796067-bf71-4f06-b386-81f1454fa866", - "Amount": 1.00 - } - ], - "Type": "RECBATCH", - "Status": "AUTHORISED", - "TotalAmount": 3.00, - "UpdatedDateUTC": "/Date(1550865987783+0000)/", - "IsReconciled": false - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: BatchPayments with an array of Payments in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/BatchPayments' - example: { - "BatchPayments": [ - { - "Account": { - "AccountID": "00000000-0000-0000-0000-000000000000" - }, - "Reference": "ref", - "Date": "2018-08-01", - "Payments": [ - { - "Account": { - "Code": "001" - }, - "Date": "2019-12-31", - "Amount": 500, - "Invoice": { - "InvoiceID": "00000000-0000-0000-0000-000000000000", - "LineItems": [], - "Contact": {}, - "Type": "ACCPAY" - } - } - ] - } - ] - } - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: deleteBatchPayment - summary: Updates a specific batch payment for invoices and credit notes - parameters: - - $ref: '#/components/parameters/idempotencyKey' - x-hasAccountingValidationError: true - x-example: - - batchPaymentDelete: - is_object: true - key: batchPaymentDelete - keyPascal: BatchPaymentDelete - - status: - is_last: true - key: status - keyPascal: Status - default: DELETED - object: batchPaymentDelete - - batchPaymentID: - is_last: true - is_uuid: true - key: batchPaymentID - keyPascal: BatchPaymentID - keySnake: batch_payment_id - default: 00000000-0000-0000-0000-000000000000 - object: batchPaymentDelete - responses: - '200': - description: Success - return response of type BatchPayments array for updated BatchPayment - content: - application/json: - schema: - $ref: '#/components/schemas/BatchPayments' - example: { - "Id": "ee23328c-4a8b-4ee7-8fb6-9796ffab9cb0", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC": "/Date(1583945852489)/", - "BatchPayments": [ - { - "Account": { - "AccountID": "efb6e3a4-3156-4cee-bfe1-a282a3cc1d8f" - }, - "BatchPaymentID": "b649632e-2782-4c74-95a5-d994d7140ed9", - "DateString": "2022-08-01T00:00:00", - "Date": "/Date(1659312000000+0000)/", - "Payments": [], - "Type": "PAYBATCH", - "Status": "DELETED", - "TotalAmount": 18.00, - "UpdatedDateUTC": "/Date(1659377631813+0000)/", - "IsReconciled": false - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/BatchPaymentDelete' - example: { - "BatchPaymentID": "9bf296e9-0748-4d29-a3dc-24dde1098030", - "Status":"DELETED" - } - '/BatchPayments/{BatchPaymentID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getBatchPayment - summary: Retrieves a specific batch payment using a unique batch payment Id - parameters: - - $ref: '#/components/parameters/BatchPaymentID' - responses: - '200': - description: Success - return response of type BatchPayments array with matching batch payment Id - content: - application/json: - schema: - $ref: '#/components/schemas/BatchPayments' - example: { - "Id": "6ab84949-4fe5-4788-a135-4d8f690d24d7", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1550866184006)/", - "BatchPayments": [ - { - "Account": { - "AccountID": "13918178-849a-4823-9a31-57b7eac713d7" - }, - "Reference": "ref", - "BatchPaymentID": "44a1013e-4946-4a73-b207-dfe5424a5ea5", - "DateString": "2018-10-03T00:00:00", - "Date": "/Date(1538524800000+0000)/", - "Payments": [ - { - "Invoice": { - "InvoiceID": "5aa9451d-95d1-4f95-a966-bbab2573f71c", - "Payments": [], - "CreditNotes": [], - "Prepayments": [], - "Overpayments": [], - "HasErrors": false, - "IsDiscounted": false, - "LineItems": [] - }, - "PaymentID": "a22a64cb-364e-43fa-9a1f-bb2cd1f4adde", - "Reference": "ref/cheque", - "Amount": 913.55 - }, - { - "Invoice": { - "InvoiceID": "30a87092-31b5-4a2c-831e-327486533dd2", - "Payments": [], - "CreditNotes": [], - "Prepayments": [], - "Overpayments": [], - "HasErrors": false, - "IsDiscounted": false, - "LineItems": [] - }, - "PaymentID": "6e20be79-32d8-4ae1-978e-f76d9b245c02", - "Amount": 495 - }, - { - "Invoice": { - "InvoiceID": "86d6e00f-ef56-49f7-9a54-796ccd5ca057", - "Payments": [], - "CreditNotes": [], - "Prepayments": [], - "Overpayments": [], - "HasErrors": false, - "IsDiscounted": false, - "LineItems": [] - }, - "PaymentID": "4ba761b8-5940-4a3f-bcdf-7775adb00332", - "Amount": 3080 - } - ], - "Type": "RECBATCH", - "Status": "AUTHORISED", - "TotalAmount": 4488.55, - "UpdatedDateUTC": "/Date(1538525239370+0000)/", - "IsReconciled": false - } - ] - } - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: deleteBatchPaymentByUrlParam - summary: Updates a specific batch payment for invoices and credit notes - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/BatchPaymentID' - responses: - '200': - description: Success - return response of type BatchPayments array for updated BatchPayment - content: - application/json: - schema: - $ref: '#/components/schemas/BatchPayments' - example: { - "Id": "ee23328c-4a8b-4ee7-8fb6-9796ffab9cb0", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC": "/Date(1583945852489)/", - "BatchPayments": [ - { - "Account": { - "AccountID": "efb6e3a4-3156-4cee-bfe1-a282a3cc1d8f" - }, - "BatchPaymentID": "b649632e-2782-4c74-95a5-d994d7140ed9", - "DateString": "2022-08-01T00:00:00", - "Date": "/Date(1659312000000+0000)/", - "Payments": [], - "Type": "PAYBATCH", - "Status": "DELETED", - "TotalAmount": 18.00, - "UpdatedDateUTC": "/Date(1659377631813+0000)/", - "IsReconciled": false - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/BatchPaymentDeleteByUrlParam' - example: { - "Status":"DELETED" - } - '/BatchPayments/{BatchPaymentID}/History': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getBatchPaymentHistory - summary: Retrieves history from a specific batch payment - parameters: - - $ref: '#/components/parameters/BatchPaymentID' - responses: - '200': - description: Success - return response of HistoryRecords array of 0 to N HistoryRecord - content: - application/json: - schema: - $ref: '#/components/schemas/HistoryRecords' - example: { - "Id": "c58e2f9c-baad-42a4-8bb7-f32b6f88fa04", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1550898452503)/", - "HistoryRecords": [ - { - "Changes": "Approved", - "DateUTCString": "2017-11-28T18:29:52", - "DateUTC": "/Date(1511893792813+0000)/", - "User": "Buzz Lightyear", - "Details": "" - } - ] - } - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createBatchPaymentHistoryRecord - summary: Creates a history record for a specific batch payment - x-hasAccountingValidationError: true - x-example: - - historyRecord: - is_object: true - key: historyRecord - keyPascal: HistoryRecord - keySnake: history_record - - Details: - is_last: true - key: details - keyPascal: Details - default: Hello World - object: historyRecord - - historyRecords: - is_object: true - key: historyRecords - keyPascal: HistoryRecords - - add_historyRecord: - is_last: true - is_array_add: true - key: historyRecords - keyPascal: HistoryRecords - keySnake: history_records - java: HistoryRecords - python: history_record - ruby: history_record - csharp: HistoryRecord - object: historyRecord - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/BatchPaymentID' - responses: - '200': - description: Success - return response of type HistoryRecords array of HistoryRecord objects - content: - application/json: - schema: - $ref: '#/components/schemas/HistoryRecords' - example: { - "Id": "d7525479-3392-44c0-bb37-ff4a0b5df5bd", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1550899400362)/", - "HistoryRecords": [ - { - "DateUTCString": "2019-02-23T05:23:20", - "DateUTC": "/Date(1550899400362)/", - "Details": "Hello World", - "ValidationErrors": [] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - $ref: '#/components/requestBodies/historyRecords' - /BankTransactions: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getBankTransactions - summary: Retrieves any spent or received money transactions - parameters: - - $ref: '#/components/parameters/ifModifiedSince' - - in: query - name: where - description: Filter by an any element - example: Status=="AUTHORISED" - x-example-java: Status=="' + BankTransaction.StatusEnum.AUTHORISED + '" - x-example-csharp: Status==\"AUTHORISED\" - x-example-php: Status=="' . XeroAPI\XeroPHP\Models\Accounting\BankTransaction::STATUS_AUTHORISED . '" - x-example-ruby: Status==#{XeroRuby::Accounting::BankTransaction::AUTHORISED} - schema: - type: string - - in: query - name: order - description: Order by an any element - example: "Type ASC" - schema: - type: string - - in: query - name: page - description: Up to 100 bank transactions will be returned in a single API call with line items details - example: 1 - schema: - type: integer - - $ref: '#/components/parameters/unitdp' - - $ref: '#/components/parameters/pageSize' - responses: - '200': - description: Success - return response of type BankTransactions array with 0 to n BankTransaction - content: - application/json: - schema: - $ref: '#/components/schemas/BankTransactions' - example: { - "Id": "18e7e80c-5dca-4a57-974e-8b572cc5efe8", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551212901659)/", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 3 - }, - "BankTransactions": [ - { - "BankTransactionID": "db54aab0-ad40-4ced-bcff-0940ba20db2c", - "BankAccount": { - "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9", - "Code": "088", - "Name": "Business Wells Fargo" - }, - "BatchPayment": { - "Account": { - "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9" - }, - "BatchPaymentID": "b54aa50c-794c-461b-89d1-846e1b84d9c0", - "Date": "/Date(1476316800000+0000)/", - "Type": "RECBATCH", - "Status": "AUTHORISED", - "TotalAmount": "12.00", - "UpdatedDateUTC": "/Date(1476392487037+0000)/", - "IsReconciled": "false" - }, - "Type": "RECEIVE", - "IsReconciled": false, - "PrepaymentID": "cb62750f-b49c-464b-a45b-e2e2c514c8a9", - "HasAttachments": true, - "Contact": { - "ContactID": "9c2c64de-12c9-4167-b503-e2c0e1aa1f49", - "Name": "sam", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2016-10-13T00:00:00", - "Date": "/Date(1476316800000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "Exclusive", - "LineItems": [], - "SubTotal": 10, - "TotalTax": 0, - "Total": 10, - "UpdatedDateUTC": "/Date(1476389616437+0000)/", - "CurrencyCode": "USD" - }, - { - "BankTransactionID": "29a69c45-64ca-4805-a1cc-34990de837b3", - "BankAccount": { - "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9", - "Code": "088", - "Name": "Business Wells Fargo" - }, - "Type": "SPEND-OVERPAYMENT", - "IsReconciled": false, - "OverpaymentID": "7d457db3-3b0a-47e9-8b79-81252a7bcdcb", - "HasAttachments": false, - "Contact": { - "ContactID": "9c2c64de-12c9-4167-b503-e2c0e1aa1f49", - "Name": "sam", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2016-10-13T00:00:00", - "Date": "/Date(1476316800000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "NoTax", - "LineItems": [], - "SubTotal": 9, - "TotalTax": 0, - "Total": 9, - "UpdatedDateUTC": "/Date(1476389930500+0000)/", - "CurrencyCode": "USD" - }, - { - "BankTransactionID": "0b89bf5c-d40b-4514-96be-36a739fb0188", - "BankAccount": { - "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9", - "Code": "088", - "Name": "Business Wells Fargo" - }, - "Type": "SPEND-OVERPAYMENT", - "IsReconciled": false, - "OverpaymentID": "bf9b5f33-c0d6-4182-84a2-40848023e5a1", - "HasAttachments": false, - "Contact": { - "ContactID": "9c2c64de-12c9-4167-b503-e2c0e1aa1f49", - "Name": "sam", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2016-10-13T00:00:00", - "Date": "/Date(1476316800000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "NoTax", - "LineItems": [], - "SubTotal": 8, - "TotalTax": 0, - "Total": 8, - "UpdatedDateUTC": "/Date(1476392487037+0000)/", - "CurrencyCode": "USD" - } - ] - } - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createBankTransactions - summary: Creates one or more spent or received money transaction - x-hasAccountingValidationError: true - x-example: - - contact: - is_object: true - key: contact - keyPascal: Contact - - contactID: - is_uuid: true - is_last: true - key: contactID - keyPascal: ContactID - keySnake: contact_id - default: 00000000-0000-0000-0000-000000000000 - object: contact - - lineItem: - is_object: true - key: lineItem - keyPascal: LineItem - keySnake: line_item - - description: - key: description - keyPascal: Description - default: Foobar - object: lineItem - - quantity: - nonString: true - key: quantity - keyPascal: Quantity - default: 1.0 - is_money: true - object: lineItem - - unitAmount: - nonString: true - key: unitAmount - keyPascal: UnitAmount - keySnake: unit_amount - default: 20.0 - is_money: true - object: lineItem - - accountCode: - is_last: true - key: accountCode - keyPascal: AccountCode - keySnake: account_code - default: "000" - object: lineItem - - line_items: - is_list: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - csharp: LineItem - java: LineItem - - add_lineitems: - is_last: true - is_list_add: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - java: LineItems - python: line_item - ruby: line_item - csharp: LineItem - object: lineItem - - bankAccount: - is_object: true - key: bankAccount - keyPascal: Account - keySnake: bank_account - - accountID: - is_last: true - is_uuid: true - key: accountID - keyPascal: AccountID - keySnake: account_id - default: 00000000-0000-0000-0000-000000000000 - object: bankAccount - - bankTransaction: - is_object: true - key: bankTransaction - keyPascal: BankTransaction - keySnake: bank_transaction - - type: - nonString: true - key: type - keyPascal: Type - default: RECEIVE - php: XeroAPI\XeroPHP\Models\Accounting\BankTransaction::TYPE_RECEIVE - node: BankTransaction.TypeEnum.RECEIVE - ruby: XeroRuby::Accounting::BankTransaction::RECEIVE - python_string: RECEIVE - java: com.xero.models.accounting.BankTransaction.TypeEnum.RECEIVE - csharp: BankTransaction.TypeEnum.RECEIVE - object: bankTransaction - - set_contact: - is_variable: true - nonString: true - key: contact - keyPascal: Contact - default: contact - object: bankTransaction - - set_lineitems: - is_variable: true - nonString: true - key: lineItems - keyPascal: LineItems - object: bankTransaction - default: lineItems - - set_bankaccount: - is_last: true - is_variable: true - nonString: true - key: bankAccount - keyPascal: BankAccount - keySnake: bank_account - python: bank_account - ruby: bank_account - default: bankAccount - object: bankTransaction - - bankTransactions: - is_object: true - key: bankTransactions - keyPascal: BankTransactions - - add_bankTransaction: - is_last: true - is_array_add: true - key: bankTransactions - keyPascal: BankTransactions - keySnake: bank_transactions - java: BankTransactions - python: bank_transaction - ruby: bank_transaction - csharp: BankTransaction - object: bankTransaction - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/unitdp' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type BankTransactions array with new BankTransaction - content: - application/json: - schema: - $ref: '#/components/schemas/BankTransactions' - example: { - "Id": "5bc1d776-3c7f-4fe8-9b2d-09e747077a88", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551213568047)/", - "BankTransactions": [ - { - "BankTransactionID": "1289c190-e46d-434b-9628-463ffdb52f00", - "BankAccount": { - "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9", - "Code": "088", - "Name": "Business Wells Fargo" - }, - "Type": "SPEND", - "Reference": "", - "IsReconciled": false, - "CurrencyRate": 1.000000, - "Contact": { - "ContactID": "5cc8cf28-567e-4d43-b287-687cfcaec47c", - "ContactStatus": "ACTIVE", - "Name": "Katherine Warren", - "FirstName": "Katherine", - "LastName": "Warren", - "EmailAddress": "kat.warren@clampett.com", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "" - }, - { - "AddressType": "POBOX", - "AddressLine1": "", - "AddressLine2": "", - "AddressLine3": "", - "AddressLine4": "", - "City": "Palo Alto", - "Region": "CA", - "PostalCode": "94020", - "Country": "United States" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "847-1294", - "PhoneAreaCode": "(626)", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1503348544227+0000)/", - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2019-02-26T00:00:00", - "Date": "/Date(1551139200000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "Inclusive", - "LineItems": [ - { - "Description": "Foobar", - "UnitAmount": 20.00, - "TaxType": "TAX001", - "TaxAmount": 1.74, - "LineAmount": 20.00, - "AccountCode": "400", - "Tracking": [], - "Quantity": 1.0000, - "LineItemID": "d2a06879-da49-4d6c-83b5-72a93a523ec6", - "AccountID": "ebd06280-af70-4bed-97c6-7451a454ad85", - "ValidationErrors": [] - } - ], - "SubTotal": 18.26, - "TotalTax": 1.74, - "Total": 20.00, - "UpdatedDateUTC": "/Date(1551213567813+0000)/", - "CurrencyCode": "USD", - "StatusAttributeString": "ERROR", - "ValidationErrors": [ - { - "Message": "The Contact must contain at least 1 of the following elements to identify the contact: Name, ContactID, ContactNumber" - } - ] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: BankTransactions with an array of BankTransaction objects in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/BankTransactions' - example: { bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, contact: { contactID: "00000000-0000-0000-0000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "000" } ], bankAccount: { code: "000" }}]} - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: updateOrCreateBankTransactions - summary: Updates or creates one or more spent or received money transaction - x-hasAccountingValidationError: true - x-example: - - contact: - is_object: true - key: contact - keyPascal: Contact - - contactID: - is_uuid: true - is_last: true - key: contactID - keyPascal: ContactID - keySnake: contact_id - default: 00000000-0000-0000-0000-000000000000 - object: contact - - lineItem: - is_object: true - key: lineItem - keyPascal: LineItem - keySnake: line_item - - description: - key: description - keyPascal: Description - default: Foobar - object: lineItem - - quantity: - nonString: true - key: quantity - keyPascal: Quantity - default: 1.0 - is_money: true - object: lineItem - - unitAmount: - nonString: true - key: unitAmount - keyPascal: UnitAmount - keySnake: unit_amount - default: 20.0 - is_money: true - object: lineItem - - accountCode: - is_last: true - key: accountCode - keyPascal: AccountCode - keySnake: account_code - default: "000" - object: lineItem - - line_items: - is_list: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - csharp: LineItem - java: LineItem - - add_lineitems: - is_last: true - is_list_add: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - java: LineItems - python: line_item - ruby: line_item - csharp: LineItem - object: lineItem - - bankAccount: - is_object: true - key: bankAccount - keyPascal: Account - keySnake: bank_account - - accountID: - is_last: true - is_uuid: true - key: accountID - keyPascal: AccountID - keySnake: account_id - default: 00000000-0000-0000-0000-000000000000 - object: bankAccount - - bankTransaction: - is_object: true - key: bankTransaction - keyPascal: BankTransaction - keySnake: bank_transaction - - type: - nonString: true - key: type - keyPascal: Type - default: RECEIVE - php: XeroAPI\XeroPHP\Models\Accounting\BankTransaction::TYPE_RECEIVE - node: BankTransaction.TypeEnum.RECEIVE - ruby: XeroRuby::Accounting::BankTransaction::RECEIVE - python_string: RECEIVE - java: com.xero.models.accounting.BankTransaction.TypeEnum.RECEIVE - csharp: BankTransaction.TypeEnum.RECEIVE - object: bankTransaction - - set_contact: - is_variable: true - nonString: true - key: contact - keyPascal: Contact - default: contact - object: bankTransaction - - set_lineitems: - is_variable: true - nonString: true - key: lineItems - keyPascal: LineItems - object: bankTransaction - default: lineItems - - set_bankaccount: - is_last: true - is_variable: true - nonString: true - key: bankAccount - keyPascal: BankAccount - keySnake: bank_account - python: bank_account - ruby: bank_account - default: bankAccount - object: bankTransaction - - bankTransactions: - is_object: true - key: bankTransactions - keyPascal: BankTransactions - - add_bankTransaction: - is_last: true - is_array_add: true - key: bankTransactions - keyPascal: BankTransactions - keySnake: bank_transactions - java: BankTransactions - python: bank_transaction - ruby: bank_transaction - csharp: BankTransaction - object: bankTransaction - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/unitdp' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type BankTransactions array with new BankTransaction - content: - application/json: - schema: - $ref: '#/components/schemas/BankTransactions' - example: { - "Id": "5bc1d776-3c7f-4fe8-9b2d-09e747077a88", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551213568047)/", - "BankTransactions": [ - { - "BankTransactionID": "1289c190-e46d-434b-9628-463ffdb52f00", - "BankAccount": { - "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9", - "Code": "088", - "Name": "Business Wells Fargo" - }, - "Type": "SPEND", - "Reference": "", - "IsReconciled": false, - "CurrencyRate": 1.000000, - "Contact": { - "ContactID": "5cc8cf28-567e-4d43-b287-687cfcaec47c", - "ContactStatus": "ACTIVE", - "Name": "Katherine Warren", - "FirstName": "Katherine", - "LastName": "Warren", - "EmailAddress": "kat.warren@clampett.com", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "" - }, - { - "AddressType": "POBOX", - "AddressLine1": "", - "AddressLine2": "", - "AddressLine3": "", - "AddressLine4": "", - "City": "Palo Alto", - "Region": "CA", - "PostalCode": "94020", - "Country": "United States" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "847-1294", - "PhoneAreaCode": "(626)", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1503348544227+0000)/", - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2019-02-26T00:00:00", - "Date": "/Date(1551139200000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "Inclusive", - "LineItems": [ - { - "Description": "Foobar", - "UnitAmount": 20.00, - "TaxType": "TAX001", - "TaxAmount": 1.74, - "LineAmount": 20.00, - "AccountCode": "400", - "Tracking": [], - "Quantity": 1.0000, - "LineItemID": "d2a06879-da49-4d6c-83b5-72a93a523ec6", - "AccountID": "ebd06280-af70-4bed-97c6-7451a454ad85", - "ValidationErrors": [] - } - ], - "SubTotal": 18.26, - "TotalTax": 1.74, - "Total": 20.00, - "UpdatedDateUTC": "/Date(1551213567813+0000)/", - "CurrencyCode": "USD", - "StatusAttributeString": "ERROR", - "ValidationErrors": [ - { - "Message": "The Contact must contain at least 1 of the following elements to identify the contact: Name, ContactID, ContactNumber" - } - ] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/BankTransactions' - example: { - "BankTransactions": [ - { - "Type": "SPEND", - "Contact": { - "ContactID": "00000000-0000-0000-0000-000000000000" - }, - "Lineitems": [ - { - "Description": "Foobar", - "Quantity": 1, - "UnitAmount": 20, - "AccountCode": "400" - } - ], - "BankAccount": { - "Code": "088" - } - } - ] - } - '/BankTransactions/{BankTransactionID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getBankTransaction - summary: Retrieves a single spent or received money transaction by using a unique bank transaction Id - parameters: - - $ref: '#/components/parameters/BankTransactionID' - - $ref: '#/components/parameters/unitdp' - responses: - '200': - description: Success - return response of type BankTransactions array with a specific BankTransaction - content: - application/json: - schema: - $ref: '#/components/schemas/BankTransactions' - example: { - "Id": "612e204d-21ab-469b-ac84-afe0697b4461", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551212902962)/", - "BankTransactions": [ - { - "BankTransactionID": "db54aab0-ad40-4ced-bcff-0940ba20db2c", - "BankAccount": { - "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9", - "Code": "088", - "Name": "Business Wells Fargo" - }, - "BatchPayment": { - "Account": { - "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9" - }, - "BatchPaymentID": "b54aa50c-794c-461b-89d1-846e1b84d9c0", - "Date": "/Date(1476316800000+0000)/", - "Type": "RECBATCH", - "Status": "AUTHORISED", - "TotalAmount": "12.00", - "UpdatedDateUTC": "/Date(1476392487037+0000)/", - "IsReconciled": "false" - }, - "Type": "RECEIVE", - "IsReconciled": false, - "CurrencyRate": 1.000000, - "PrepaymentID": "cb62750f-b49c-464b-a45b-e2e2c514c8a9", - "HasAttachments": true, - "Attachments": [ - { - "AttachmentID": "45dd3143-9856-42d2-9a6c-53814f67a33e", - "FileName": "sample2.jpg", - "Url": "https://api.xero.com/api.xro/2.0/banktransaction/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample2.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ], - "Contact": { - "ContactID": "9c2c64de-12c9-4167-b503-e2c0e1aa1f49", - "ContactStatus": "ACTIVE", - "Name": "sam", - "EmailAddress": "", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "" - }, - { - "AddressType": "POBOX", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1518821703467+0000)/", - "ContactGroups": [], - "DefaultCurrency": "USD", - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2016-10-13T00:00:00", - "Date": "/Date(1476316800000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "hello", - "UnitAmount": 10.00, - "TaxType": "OUTPUT", - "TaxAmount": 0.00, - "LineAmount": 10.00, - "AccountCode": "400", - "Tracking": [], - "Quantity": 1.0000, - "LineItemID": "40bec527-a744-4149-96c5-0ab643b51158", - "AccountID": "ebd06280-af70-4bed-97c6-7451a454ad85", - "ValidationErrors": [] - } - ], - "SubTotal": 10.00, - "TotalTax": 0.00, - "Total": 10.00, - "UpdatedDateUTC": "/Date(1476389616437+0000)/", - "CurrencyCode": "USD" - } - ] - } - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: updateBankTransaction - summary: Updates a single spent or received money transaction - x-hasAccountingValidationError: true - x-example: - - contact: - is_object: true - key: contact - keyPascal: Contact - - contactID: - is_uuid: true - is_last: true - key: contactID - keyPascal: ContactID - keySnake: contact_id - default: 00000000-0000-0000-0000-000000000000 - object: contact - - lineItem: - is_object: true - key: lineItem - keyPascal: LineItem - keySnake: line_item - - description: - key: description - keyPascal: Description - default: Foobar - object: lineItem - - quantity: - nonString: true - key: quantity - keyPascal: Quantity - default: 1.0 - is_money: true - object: lineItem - - unitAmount: - nonString: true - key: unitAmount - keyPascal: UnitAmount - keySnake: unit_amount - default: 20.0 - is_money: true - object: lineItem - - accountCode: - is_last: true - key: accountCode - keyPascal: AccountCode - keySnake: account_code - default: "000" - object: lineItem - - line_items: - is_list: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - csharp: LineItem - java: LineItem - - add_lineitems: - is_last: true - is_list_add: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - java: LineItems - python: line_item - ruby: line_item - csharp: LineItem - object: lineItem - - bankAccount: - is_object: true - key: bankAccount - keyPascal: Account - keySnake: bank_account - - accountID: - is_last: true - is_uuid: true - key: accountID - keyPascal: AccountID - keySnake: account_id - default: 00000000-0000-0000-0000-000000000000 - object: bankAccount - - bankTransaction: - is_object: true - key: bankTransaction - keyPascal: BankTransaction - keySnake: bank_transaction - - reference: - key: reference - keyPascal: Reference - default: You just updated - object: bankTransaction - - type: - nonString: true - key: type - keyPascal: Type - default: RECEIVE - php: XeroAPI\XeroPHP\Models\Accounting\BankTransaction::TYPE_RECEIVE - node: BankTransaction.TypeEnum.RECEIVE - ruby: XeroRuby::Accounting::BankTransaction::RECEIVE - python_string: RECEIVE - java: com.xero.models.accounting.BankTransaction.TypeEnum.RECEIVE - csharp: BankTransaction.TypeEnum.RECEIVE - object: bankTransaction - - set_contact: - is_variable: true - nonString: true - key: contact - keyPascal: Contact - default: contact - object: bankTransaction - - set_lineitems: - is_variable: true - nonString: true - key: lineItems - keyPascal: LineItems - object: bankTransaction - default: lineItems - - set_bankaccount: - is_last: true - is_variable: true - nonString: true - key: bankAccount - keyPascal: BankAccount - keySnake: bank_account - python: bank_account - ruby: bank_account - default: bankAccount - object: bankTransaction - - bankTransactions: - is_object: true - key: bankTransactions - keyPascal: BankTransactions - - add_bankTransaction: - is_last: true - is_array_add: true - key: bankTransactions - keyPascal: BankTransactions - keySnake: bank_transactions - java: BankTransactions - python: bank_transaction - ruby: bank_transaction - csharp: BankTransaction - object: bankTransaction - parameters: - - $ref: '#/components/parameters/BankTransactionID' - - $ref: '#/components/parameters/unitdp' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type BankTransactions array with updated BankTransaction - content: - application/json: - schema: - $ref: '#/components/schemas/BankTransactions' - example: { - "Id": "f2c7f037-96fc-49bd-8f59-d3c7bfdd4746", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551213568875)/", - "BankTransactions": [ - { - "BankTransactionID": "1289c190-e46d-434b-9628-463ffdb52f00", - "BankAccount": { - "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9", - "Code": "088", - "Name": "Business Wells Fargo" - }, - "Type": "SPEND", - "Reference": "You just updated", - "IsReconciled": false, - "CurrencyRate": 1.000000, - "HasAttachments": false, - "Attachments": [], - "Contact": { - "ContactID": "5cc8cf28-567e-4d43-b287-687cfcaec47c", - "ContactStatus": "ACTIVE", - "Name": "Katherine Warren", - "FirstName": "Katherine", - "LastName": "Warren", - "EmailAddress": "kat.warren@clampett.com", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "" - }, - { - "AddressType": "POBOX", - "AddressLine1": "", - "AddressLine2": "", - "AddressLine3": "", - "AddressLine4": "", - "City": "Palo Alto", - "Region": "CA", - "PostalCode": "94020", - "Country": "United States" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "847-1294", - "PhoneAreaCode": "(626)", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1503348544227+0000)/", - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2019-02-25T00:00:00", - "Date": "/Date(1551052800000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "Inclusive", - "LineItems": [ - { - "Description": "Foobar", - "UnitAmount": 20.00, - "TaxType": "TAX001", - "TaxAmount": 1.74, - "LineAmount": 20.00, - "AccountCode": "400", - "Tracking": [], - "Quantity": 1.0000, - "LineItemID": "d2a06879-da49-4d6c-83b5-72a93a523ec6", - "AccountID": "ebd06280-af70-4bed-97c6-7451a454ad85", - "ValidationErrors": [] - } - ], - "SubTotal": 18.26, - "TotalTax": 1.74, - "Total": 20.00, - "UpdatedDateUTC": "/Date(1551213568733+0000)/", - "CurrencyCode": "USD" - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/BankTransactions' - example: { - "BankTransactions": [ - { - "Type": "SPEND", - "Contact": { - "ContactID": "00000000-0000-0000-0000-000000000000", - "ContactStatus": "ACTIVE", - "Name": "Buzz Lightyear", - "FirstName": "Buzz", - "LastName": "Lightyear", - "EmailAddress": "buzz.Lightyear@email.com", - "ContactPersons": [], - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "" - }, - { - "AddressType": "POBOX", - "AddressLine1": "", - "AddressLine2": "", - "AddressLine3": "", - "AddressLine4": "", - "City": "Palo Alto", - "Region": "CA", - "PostalCode": "94020", - "Country": "United States" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "847-1294", - "PhoneAreaCode": "(626)", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "2017-08-21T13:49:04.227-07:00", - "ContactGroups": [] - }, - "Lineitems": [], - "BankAccount": { - "Code": "088", - "Name": "Business Wells Fargo", - "AccountID": "00000000-0000-0000-0000-000000000000" - }, - "IsReconciled": false, - "Date": "2019-02-25", - "Reference": "You just updated", - "CurrencyCode": "USD", - "CurrencyRate": 1, - "Status": "AUTHORISED", - "LineAmountTypes": "Inclusive", - "TotalTax": 1.74, - "BankTransactionID": "00000000-0000-0000-0000-000000000000", - "UpdatedDateUTC": "2019-02-26T12:39:27.813-08:00" - } - ] - } - '/BankTransactions/{BankTransactionID}/Attachments': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getBankTransactionAttachments - summary: Retrieves any attachments from a specific bank transactions - parameters: - - $ref: '#/components/parameters/BankTransactionID' - responses: - '200': - description: Success - return response of type Attachments array with 0 to n Attachment - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "c50798e1-29e9-4a30-a452-bb6e42e400c8", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551303999577)/", - "Attachments": [ - { - "AttachmentID": "4508a692-e52c-4ad8-a138-2f13e22bf57b", - "FileName": "sample5.jpg", - "Url": "https://api.xero.com/api.xro/2.0/BankTransactions/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample5.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - }, - { - "AttachmentID": "45dd3143-9856-42d2-9a6c-53814f67a33e", - "FileName": "sample2.jpg", - "Url": "https://api.xero.com/api.xro/2.0/BankTransactions/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample2.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '/BankTransactions/{BankTransactionID}/Attachments/{AttachmentID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getBankTransactionAttachmentById - summary: Retrieves specific attachments from a specific BankTransaction using a unique attachment Id - parameters: - - $ref: '#/components/parameters/BankTransactionID' - - $ref: '#/components/parameters/AttachmentID' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of attachment for BankTransaction as binary data - content: - application/octet-stream: - schema: - type: string - format: binary - '/BankTransactions/{BankTransactionID}/Attachments/{FileName}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getBankTransactionAttachmentByFileName - summary: Retrieves a specific attachment from a specific bank transaction by filename - parameters: - - $ref: '#/components/parameters/BankTransactionID' - - $ref: '#/components/parameters/FileName' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of attachment for BankTransaction as binary data - content: - application/octet-stream: - schema: - type: string - format: binary - post: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: updateBankTransactionAttachmentByFileName - x-hasAccountingValidationError: true - summary: Updates a specific attachment from a specific bank transaction by filename - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/BankTransactionID' - - $ref: '#/components/parameters/FileName' - responses: - '200': - description: Success - return response of Attachments array of Attachment - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "572ad2fe-8c23-45aa-82f9-864485327685", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551286166630)/", - "Attachments": [ - { - "AttachmentID": "4508a692-e52c-4ad8-a138-2f13e22bf57b", - "FileName": "sample5.jpg", - "Url": "https://api.xero.com/api.xro/2.0/BankTransactions/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample5.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - put: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: createBankTransactionAttachmentByFileName - x-hasAccountingValidationError: true - summary: Creates an attachment for a specific bank transaction by filename - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/BankTransactionID' - - $ref: '#/components/parameters/FileName' - responses: - '200': - description: Success - return response of Attachments array of Attachment - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "572ad2fe-8c23-45aa-82f9-864485327685", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551286166630)/", - "Attachments": [ - { - "AttachmentID": "4508a692-e52c-4ad8-a138-2f13e22bf57b", - "FileName": "sample5.jpg", - "Url": "https://api.xero.com/api.xro/2.0/BankTransactions/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample5.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - '/BankTransactions/{BankTransactionID}/History': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getBankTransactionsHistory - summary: Retrieves history from a specific bank transaction using a unique bank transaction Id - parameters: - - $ref: '#/components/parameters/BankTransactionID' - responses: - '200': - $ref: '#/components/responses/HistoryRetrieved' - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createBankTransactionHistoryRecord - summary: Creates a history record for a specific bank transactions - x-hasAccountingValidationError: true - x-example: - - historyRecord: - is_object: true - key: historyRecord - keyPascal: HistoryRecord - keySnake: history_record - - Details: - is_last: true - key: details - keyPascal: Details - default: Hello World - object: historyRecord - - historyRecords: - is_object: true - key: historyRecords - keyPascal: HistoryRecords - - add_historyRecord: - is_last: true - is_array_add: true - key: historyRecords - keyPascal: HistoryRecords - keySnake: history_records - java: HistoryRecords - python: history_record - ruby: history_record - csharp: HistoryRecord - object: historyRecord - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/BankTransactionID' - responses: - '200': - $ref: '#/components/responses/HistoryRecordCreated' - '400': - $ref: '#/components/responses/400Error' - requestBody: - $ref: '#/components/requestBodies/historyRecords' - /BankTransfers: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getBankTransfers - summary: Retrieves all bank transfers - parameters: - - $ref: '#/components/parameters/ifModifiedSince' - - in: query - name: where - description: Filter by an any element - example: HasAttachments==true - schema: - type: string - - in: query - name: order - description: Order by an any element - example: "Amount ASC" - schema: - type: string - responses: - '200': - description: Success - return response of BankTransfers array of 0 to N BankTransfer - content: - application/json: - schema: - $ref: '#/components/schemas/BankTransfers' - example: { - "Id": "dfc0d130-9007-4a98-a5ef-6f01700f18e2", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551311318988)/", - "BankTransfers": [ - { - "BankTransferID": "6221458a-ef7a-4d5f-9b1c-1b96ce03833c", - "CreatedDateUTCString": "2016-10-17T20:46:01", - "CreatedDateUTC": "/Date(1476737161140+0000)/", - "DateString": "2016-11-12T21:10:00", - "Date": "/Date(1478985000000+0000)/", - "FromBankAccount": { - "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9", - "Name": "Business Wells Fargo" - }, - "ToBankAccount": { - "AccountID": "7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa", - "Name": "My Savings" - }, - "Amount": 20.00, - "FromBankTransactionID": "a3eca480-bc04-4292-9bbd-5c57b8ba12b4", - "ToBankTransactionID": "4ca13f40-f3a0-4530-a442-a600f5696118", - "FromIsReconciled": true, - "ToIsReconciled": true, - "Reference": "Sub 098801", - "HasAttachments": true - }, - { - "BankTransferID": "9f0153d5-617c-4903-887b-3875807aa27a", - "CreatedDateUTCString": "2016-10-21T23:28:42", - "CreatedDateUTC": "/Date(1477092522333+0000)/", - "DateString": "2016-10-19T20:10:00", - "Date": "/Date(1476907800000+0000)/", - "FromBankAccount": { - "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9", - "Name": "Business Wells Fargo" - }, - "ToBankAccount": { - "AccountID": "7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa", - "Name": "My Savings" - }, - "Amount": 20.00, - "FromBankTransactionID": "cb74287e-5682-4973-b354-93e2c7a836d3", - "ToBankTransactionID": "4c48ba6c-f318-4405-aee6-b5efa2c70f55", - "FromIsReconciled": false, - "ToIsReconciled": false, - "Reference": "Sub 098801", - "HasAttachments": false - } - ] - } - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createBankTransfer - summary: Creates a bank transfer - parameters: - - $ref: '#/components/parameters/idempotencyKey' - x-hasAccountingValidationError: true - x-example: - - fromBankAccount: - is_object: true - key: fromBankAccount - keyPascal: Account - - accountID: - is_last: true - is_uuid: true - key: accountID - keyPascal: AccountID - keySnake: account_id - default: 00000000-0000-0000-0000-000000000000 - object: fromBankAccount - - toBankAccount: - is_object: true - key: toBankAccount - keyPascal: Account - - accountID: - is_last: true - is_uuid: true - key: accountID - keyPascal: AccountID - keySnake: account_id - default: 00000000-0000-0000-0000-000000000000 - object: toBankAccount - - bankTransfer: - is_object: true - key: bankTransfer - keyPascal: BankTransfer - keySnake: bank_transfer - - set_fromBankAccount: - is_variable: true - nonString: true - key: fromBankAccount - keyPascal: FromBankAccount - keySnake: from_bank_account - default: fromBankAccount - object: bankTransfer - - set_toBankAccount: - is_variable: true - nonString: true - key: toBankAccount - keyPascal: ToBankAccount - keySnake: to_bank_account - default: toBankAccount - object: bankTransfer - - amount: - is_last: true - nonString: true - key: amount - keyPascal: Amount - default: 1.0 - is_money: true - object: bankTransfer - - bankTransfers: - is_object: true - key: bankTransfers - keyPascal: BankTransfers - - add_bankTransfer: - is_last: true - is_array_add: true - key: bankTransfers - keyPascal: BankTransfers - keySnake: bank_transfers - java: BankTransfers - python: bank_transfer - ruby: bank_transfer - csharp: BankTransfer - object: bankTransfer - responses: - '200': - description: Success - return response of BankTransfers array of one BankTransfer - content: - application/json: - schema: - $ref: '#/components/schemas/BankTransfers' - example: { - "Id": "ae767b68-affd-4e17-bac0-83eaf1854dcd", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551311317475)/", - "BankTransfers": [ - { - "BankTransferID": "76eea4b6-f026-464c-b6f3-5fb39a196145", - "DateString": "2019-02-27T00:00:00", - "Date": "/Date(1551225600000+0000)/", - "FromBankAccount": { - "AccountID": "7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa", - "Code": "090", - "Name": "My Savings" - }, - "ToBankAccount": { - "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9", - "Code": "088", - "Name": "Business Wells Fargo" - }, - "Amount": 50.00, - "FromBankTransactionID": "e4059952-5acb-4a56-b076-53fad85f2930", - "ToBankTransactionID": "88e4ac17-293b-4e5a-8d8b-3ce3a0b1ee17", - "FromIsReconciled": true, - "ToIsReconciled": true, - "Reference": "Sub 098801", - "CurrencyRate": 1.000000, - "ValidationErrors": [] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: BankTransfers with array of BankTransfer objects in request body - content: - application/json: - schema: - $ref: '#/components/schemas/BankTransfers' - example: { - "BankTransfers": [ - { - "FromBankAccount": { - "Code": "090", - "Name": "My Savings", - "AccountID": "00000000-0000-0000-0000-000000000000", - "Type": "BANK", - "BankAccountNumber": "123455", - "Status": "ACTIVE", - "BankAccountType": "BANK", - "CurrencyCode": "USD", - "TaxType": "NONE", - "EnablePaymentsToAccount": false, - "ShowInExpenseClaims": false, - "Class": "ASSET", - "ReportingCode": "ASS", - "ReportingCodeName": "Assets", - "HasAttachments": false, - "UpdatedDateUTC": "2016-10-17T13:45:33.993-07:00" - }, - "ToBankAccount": { - "Code": "088", - "Name": "Business Wells Fargo", - "AccountID": "00000000-0000-0000-0000-000000000000", - "Type": "BANK", - "BankAccountNumber": "123455", - "Status": "ACTIVE", - "BankAccountType": "BANK", - "CurrencyCode": "USD", - "TaxType": "NONE", - "EnablePaymentsToAccount": false, - "ShowInExpenseClaims": false, - "Class": "ASSET", - "ReportingCode": "ASS", - "ReportingCodeName": "Assets", - "HasAttachments": false, - "UpdatedDateUTC": "2016-06-03T08:31:14.517-07:00" - }, - "Amount": "50.00", - "FromIsReconciled": true, - "ToIsReconciled": true, - "Reference": "Sub 098801" - } - ] - } - '/BankTransfers/{BankTransferID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getBankTransfer - summary: Retrieves specific bank transfers by using a unique bank transfer Id - parameters: - - $ref: '#/components/parameters/BankTransferID' - responses: - '200': - description: Success - return response of BankTransfers array with one BankTransfer - content: - application/json: - schema: - $ref: '#/components/schemas/BankTransfers' - example: { - "Id": "1a5fa46d-5ece-4ef2-89b1-77c293b5d833", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551311320368)/", - "BankTransfers": [ - { - "BankTransferID": "6221458a-ef7a-4d5f-9b1c-1b96ce03833c", - "CreatedDateUTCString": "2016-10-17T20:46:01", - "CreatedDateUTC": "/Date(1476737161140+0000)/", - "DateString": "2016-11-12T21:10:00", - "Date": "/Date(1478985000000+0000)/", - "FromBankAccount": { - "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9", - "Code": "088", - "Name": "Business Wells Fargo" - }, - "ToBankAccount": { - "AccountID": "7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa", - "Code": "090", - "Name": "My Savings" - }, - "Amount": 20.00, - "FromBankTransactionID": "a3eca480-bc04-4292-9bbd-5c57b8ba12b4", - "ToBankTransactionID": "4ca13f40-f3a0-4530-a442-a600f5696118", - "FromIsReconciled": false, - "ToIsReconciled": false, - "Reference": "Sub 098801", - "CurrencyRate": 1.000000, - "HasAttachments": true, - "Attachments": [ - { - "AttachmentID": "e05a6fd8-0e47-47a9-9799-b809c8267260", - "FileName": "HelloWorld.jpg", - "Url": "https://api.xero.com/api.xro/2.0/banktransfer/6221458a-ef7a-4d5f-9b1c-1b96ce03833c/Attachments/HelloWorld.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - ] - } - '/BankTransfers/{BankTransferID}/Attachments': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getBankTransferAttachments - summary: Retrieves attachments from a specific bank transfer - parameters: - - $ref: '#/components/parameters/BankTransferID' - responses: - '200': - description: Success - return response of Attachments array of 0 to N Attachment for a Bank Transfer - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "5cb6b587-7b02-46b6-97fe-d8ad8f20321b", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551397557272)/", - "Attachments": [ - { - "AttachmentID": "e05a6fd8-0e47-47a9-9799-b809c8267260", - "FileName": "HelloWorld.jpg", - "Url": "https://api.xero.com/api.xro/2.0/BankTransfers/6221458a-ef7a-4d5f-9b1c-1b96ce03833c/Attachments/HelloWorld.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '/BankTransfers/{BankTransferID}/Attachments/{AttachmentID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getBankTransferAttachmentById - summary: Retrieves a specific attachment from a specific bank transfer using a unique attachment ID - parameters: - - $ref: '#/components/parameters/BankTransferID' - - $ref: '#/components/parameters/AttachmentID' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of binary data from the Attachment to a Bank Transfer - content: - application/octet-stream: - schema: - type: string - format: binary - '/BankTransfers/{BankTransferID}/Attachments/{FileName}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getBankTransferAttachmentByFileName - summary: Retrieves a specific attachment on a specific bank transfer by file name - parameters: - - $ref: '#/components/parameters/BankTransferID' - - $ref: '#/components/parameters/FileName' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of binary data from the Attachment to a Bank Transfer - content: - application/octet-stream: - schema: - type: string - format: binary - post: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: updateBankTransferAttachmentByFileName - x-hasAccountingValidationError: true - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/BankTransferID' - - $ref: '#/components/parameters/FileName' - responses: - '200': - description: Success - return response of Attachments array of 0 to N Attachment for a Bank Transfer - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "c7810140-19c2-4ff7-b3ec-b7e95ce7becf", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551398138226)/", - "Attachments": [ - { - "AttachmentID": "0851935c-c4c5-4de8-9247-ce22efde6f82", - "FileName": "sample5.jpg", - "Url": "https://api.xero.com/api.xro/2.0/BankTransfers/6221458a-ef7a-4d5f-9b1c-1b96ce03833c/Attachments/sample5.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - put: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: createBankTransferAttachmentByFileName - x-hasAccountingValidationError: true - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/BankTransferID' - - $ref: '#/components/parameters/FileName' - responses: - '200': - description: Success - return response of Attachments array of 0 to N Attachment for a Bank Transfer - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "b73ba149-76a9-4e7c-a5c6-b9230022f416", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551397998372)/", - "Attachments": [ - { - "AttachmentID": "9478be4c-c707-48c1-b4a7-83d8eaf442b5", - "FileName": "sample5.jpg", - "Url": "https://api.xero.com/api.xro/2.0/BankTransfers/6221458a-ef7a-4d5f-9b1c-1b96ce03833c/Attachments/sample5.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - '/BankTransfers/{BankTransferID}/History': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getBankTransferHistory - summary: Retrieves history from a specific bank transfer using a unique bank transfer Id - parameters: - - $ref: '#/components/parameters/BankTransferID' - responses: - '200': - $ref: '#/components/responses/HistoryRetrieved' - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createBankTransferHistoryRecord - summary: Creates a history record for a specific bank transfer - x-hasAccountingValidationError: true - x-example: - - historyRecord: - is_object: true - key: historyRecord - keyPascal: HistoryRecord - keySnake: history_record - - Details: - is_last: true - key: details - keyPascal: Details - default: Hello World - object: historyRecord - - historyRecords: - is_object: true - key: historyRecords - keyPascal: HistoryRecords - - add_historyRecord: - is_last: true - is_array_add: true - key: historyRecords - keyPascal: HistoryRecords - keySnake: history_records - java: HistoryRecords - python: history_record - ruby: history_record - csharp: HistoryRecord - object: historyRecord - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/BankTransferID' - responses: - '200': - $ref: '#/components/responses/HistoryRecordCreated' - '400': - $ref: '#/components/responses/400Error' - requestBody: - $ref: '#/components/requestBodies/historyRecords' - /BrandingThemes: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.settings, accounting.settings.read] - tags: - - Accounting - operationId: getBrandingThemes - summary: Retrieves all the branding themes - responses: - '200': - description: Success - return response of type BrandingThemes - content: - application/json: - schema: - $ref: '#/components/schemas/BrandingThemes' - example: { - "Id": "d1a1beea-bdfe-4ee4-9dbc-27226a26cd68", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1550881711906)/", - "BrandingThemes": [ - { - "BrandingThemeID": "dabc7637-62c1-4941-8a6e-ee44fa5090e7", - "Name": "Standard", - "SortOrder": 0, - "CreatedDateUTC": "/Date(1464967643813+0000)/" - } - ] - } - '/BrandingThemes/{BrandingThemeID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.settings, accounting.settings.read] - tags: - - Accounting - operationId: getBrandingTheme - summary: Retrieves a specific branding theme using a unique branding theme Id - parameters: - - $ref: '#/components/parameters/BrandingThemeID' - responses: - '200': - description: Success - return response of type BrandingThemes with one BrandingTheme - content: - application/json: - schema: - $ref: '#/components/schemas/BrandingThemes' - example: { - "Id": "df671650-cf14-4a7f-b609-4166933719bc", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1550881713071)/", - "BrandingThemes": [ - { - "BrandingThemeID": "dabc7637-62c1-4941-8a6e-ee44fa5090e7", - "Name": "Standard", - "SortOrder": 0, - "CreatedDateUTC": "/Date(1464967643813+0000)/" - } - ] - } - '/BrandingThemes/{BrandingThemeID}/PaymentServices': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [paymentservices] - tags: - - Accounting - operationId: getBrandingThemePaymentServices - summary: Retrieves the payment services for a specific branding theme - x-excludeFromPreview: true - parameters: - - $ref: '#/components/parameters/BrandingThemeID' - responses: - '200': - description: Success - return response of type PaymentServices array with 0 to N PaymentService - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentServices' - example: { - "Id": "bfd5adbe-0e92-48f0-8c5a-39072f6c4ed3", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551139339419)/", - "PaymentServices": [ - { - "PaymentServiceID": "8cc53aa4-ae01-45b9-b06c-69c42eeae61f", - "PaymentServiceName": "Buzz Lightyear", - "PaymentServiceType": "PayPal" - }, - { - "PaymentServiceID": "dede7858-14e3-4a46-bf95-4d4cc491e645", - "PaymentServiceName": "ACME Payment", - "PaymentServiceUrl": "https://www.payupnow.com/", - "PaymentServiceType": "Custom", - "PayNowText": "Pay Now" - } - ] - } - post: - security: - - OAuth2: [paymentservices] - tags: - - Accounting - operationId: createBrandingThemePaymentServices - summary: Creates a new custom payment service for a specific branding theme - x-excludeFromPreview: true - x-hasAccountingValidationError: true - x-example: - - object: - is_object: true - key: paymentService - keyPascal: PaymentService - keySnake: payment_service - - paymentServiceID: - is_uuid: true - key: paymentServiceID - keyPascal: PaymentServiceID - keySnake: payment_service_id - default: 00000000-0000-0000-0000-000000000000 - object: paymentService - - paymentServiceName: - key: paymentServiceName - keyPascal: PaymentServiceName - keySnake: payment_service_name - default: ACME Payments - object: paymentService - - paymentServiceUrl: - key: paymentServiceUrl - keyPascal: PaymentServiceUrl - keySnake: payment_service_url - default: "https://www.payupnow.com/" - object: paymentService - - payNowText: - is_last: true - key: payNowText - keyPascal: PayNowText - keySnake: pay_now_text - default: Pay Now - object: paymentService - - paymentServices: - is_object: true - key: paymentServices - keyPascal: PaymentServices - - add_paymentService: - is_last: true - is_array_add: true - key: paymentServices - keyPascal: PaymentServices - java: PaymentServices - csharp: PaymentService - object: paymentService - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/BrandingThemeID' - responses: - '200': - description: Success - return response of type PaymentServices array with newly created PaymentService - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentServices' - example: { - "Id": "918feecb-067a-4ed9-841b-571c04eaada3", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551139338915)/", - "PaymentServices": [ - { - "PaymentServiceID": "00000000-0000-0000-0000-000000000000", - "PaymentServiceName": "ACME Payments", - "PaymentServiceUrl": "https://www.payupnow.com/", - "PaymentServiceType": "Custom", - "PayNowText": "Pay Now" - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: PaymentServices array with PaymentService object in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentServices' - example: { - "PaymentServices": [ - { - "PaymentServiceID": "54b3b4f6-0443-4fba-bcd1-61ec0c35ca55", - "PaymentServiceName": "PayUpNow", - "PaymentServiceUrl": "https://www.payupnow.com/", - "PaymentServiceType": "Custom", - "PayNowText": "Time To Pay" - } - ] - } - '/Budgets': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.budgets.read] - tags: - - Accounting - operationId: getBudgets - summary: 'Retrieve a list of budgets' - parameters: - - in: query - name: IDs - x-snake: ids - description: Filter by BudgetID. Allows you to retrieve a specific individual budget. - style: form - explode: false - example: '"00000000-0000-0000-0000-000000000000"' - x-example-java: UUID.fromString("00000000-0000-0000-0000-000000000000") - x-example-php: '"00000000-0000-0000-0000-000000000000"' - x-example-csharp: Guid.Parse("00000000-0000-0000-0000-000000000000"); - schema: - type: string - items: - type: string - format: uuid - - in: query - name: DateTo - x-snake: date_to - description: Filter by start date - example: "2019-10-31" - schema: - type: string - format: date - - in: query - name: DateFrom - x-snake: date_from - description: Filter by end date - example: "2019-10-31" - schema: - type: string - format: date - responses: - '200': - description: Success - return response of type Budgets array with 0 to N Budgets - content: - application/json: - schema: - $ref: '#/components/schemas/Budgets' - example: { - "Id": "04e93d48-e72f-4775-b7dd-15a041fab972", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551399323399)/", - "Budgets": [ - { - "BudgetID": "847da917-9565-466c-a9cd-3ecf7eb9d094", - "Status": "APPROVED", - "Description": "FY2021 budget", - "Type": "TRACKING", - "UpdatedDateUTC": "/Date(1622138002077+0000)/", - "BudgetLines": [], - "Tracking": [] - }, - { - "BudgetID": "93a4bab1-0021-4320-a2ec-c250528b4bc5", - "Status": "APPROVED", - "Description": "Overall Budget", - "Type": "OVERALL", - "UpdatedDateUTC": "/Date(1622137786913+0000)/", - "BudgetLines": [], - "Tracking": [] - } - ] - } - '/Budgets/{BudgetID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.budgets.read] - tags: - - Accounting - operationId: getBudget - summary: Retrieves a specific budget, which includes budget lines - parameters: - - $ref: '#/components/parameters/BudgetID' - - in: query - name: DateTo - x-snake: date_to - description: Filter by start date - example: "2019-10-31" - schema: - type: string - format: date - - in: query - name: DateFrom - x-snake: date_from - description: Filter by end date - example: "2019-10-31" - schema: - type: string - format: date - responses: - '200': - description: Success - return response of type Invoices array with specified Invoices - content: - application/json: - schema: - $ref: '#/components/schemas/Budgets' - example: { - "Id": "04e93d48-e72f-4775-b7dd-15a041fab972", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551399323399)/", - "Budgets": { - "BudgetID": "c1d195d4-92aa-4abd-867a-7ac2f9d60500", - "Type": "TRACKING", - "Description": "Daniels Northern Budget", - "UpdatedDateUTC": "2017-08-14T01:18:26.74", - "Tracking": [ - { - "TrackingCategoryID": "e94ba240-3edf-4ef3-8317-10147b968f94", - "Name": "Region", - "TrackingOptionID": "e94ba240-3edf-4ef3-8317-10147b968f94", - "Option": "North" - }, - { - "TrackingCategoryID": "d8580491-4167-4a81-9624-ad3bdd8e46ce", - "Name": "Salesperson", - "TrackingOptionID": "9c24de87-a2b7-439d-a216-35d1af7bdec3", - "Option": "Daniel" - } - ], - "BudgetLines": [ - { - "AccountID": "9c24de87-a2b7-439d-a216-35d1af7bdec3", - "AccountCode": "200", - "BudgetBalances": [ - { - "Period": "2019-08", - "Amount": "1000", - "Notes": "Sample note" - }, - { - "Period": "2019-09", - "Amount": "1050", - "Notes": "" - }, - { - "Period": "2019-10", - "Amount": "1102", - "Notes": "" - } - ] - }, - { - "AccountID": "385f90ae-e798-4990-9b1c-db8eb8b735c2", - "AccountCode": "420", - "BudgetBalances": [ - { - "Period": "2019-08", - "Amount": "500", - "Notes": "" - }, - { - "Period": "2019-09", - "Amount": "505", - "Notes": "Special Month" - }, - { - "Period": "2019-10", - "Amount": "510", - "Notes": "" - } - ] - } - ] - } - } - - '/Contacts': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.contacts, accounting.contacts.read] - tags: - - Accounting - operationId: getContacts - summary: 'Retrieves all contacts in a Xero organisation' - parameters: - - $ref: '#/components/parameters/ifModifiedSince' - - in: query - name: where - description: Filter by an any element - example: ContactStatus=="ACTIVE" - x-example-csharp: ContactStatus==\"ACTIVE\" - x-example-java: ContactStatus=="' + Contact.ContactStatusEnum.ACTIVE + '" - x-example-php: ContactStatus=="' . \XeroAPI\XeroPHP\Models\Accounting\Contact::CONTACT_STATUS_ACTIVE . '" - x-example-ruby: ContactStatus==#{XeroRuby::Accounting::Contact::ACTIVE} - schema: - type: string - - in: query - name: order - description: Order by an any element - example: "Name ASC" - schema: - type: string - - in: query - name: IDs - x-snake: ids - description: Filter by a comma separated list of ContactIDs. Allows you to retrieve a specific set of contacts in a single call. - style: form - explode: false - example: '"00000000-0000-0000-0000-000000000000"' - x-example-java: Arrays.asList(UUID.fromString("00000000-0000-0000-0000-000000000000")) - x-example-php: '"00000000-0000-0000-0000-000000000000"' - x-example-csharp: new List<Guid>{Guid.Parse("00000000-0000-0000-0000-000000000000")}; - schema: - type: array - items: - type: string - format: uuid - - in: query - name: page - description: e.g. page=1 - Up to 100 contacts will be returned in a single API call. - example: 1 - schema: - type: integer - - in: query - name: includeArchived - x-snake: include_archived - description: e.g. includeArchived=true - Contacts with a status of ARCHIVED will be included in the response - example: true - x-example-python: "True" - schema: - type: boolean - - $ref: '#/components/parameters/summaryOnly' - - in: query - name: searchTerm - x-snake: search_term - description: Search parameter that performs a case-insensitive text search across the Name, FirstName, LastName, ContactNumber and EmailAddress fields. - example: "Joe Bloggs" - schema: - type: string - - $ref: '#/components/parameters/pageSize' - responses: - '200': - description: Success - return response of type Contacts array with 0 to N Contact - content: - application/json: - schema: - $ref: '#/components/schemas/Contacts' - example: { - "Id": "04e93d48-e72f-4775-b7dd-15a041fab972", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551399323399)/", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 2 - }, - "Contacts": [ - { - "ContactID": "5cc8cf28-567e-4d43-b287-687cfcaec47c", - "ContactStatus": "ACTIVE", - "Name": "Katherine Warren", - "FirstName": "Katherine", - "LastName": "Warren", - "CompanyNumber": "NumberBusiness1234", - "EmailAddress": "kat.warren@clampett.com", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "" - }, - { - "AddressType": "POBOX", - "AddressLine1": "", - "AddressLine2": "", - "AddressLine3": "", - "AddressLine4": "", - "City": "Palo Alto", - "Region": "CA", - "PostalCode": "94020", - "Country": "United States" - } - ], - "Phones": [ - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DEFAULT", - "PhoneNumber": "847-1294", - "PhoneAreaCode": "(626)", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1503348544227+0000)/", - "ContactGroups": [], - "IsSupplier": true, - "IsCustomer": true, - "SalesDefaultLineAmountType": "INCLUSIVE", - "PurchasesDefaultLineAmountType": "INCLUSIVE", - "Balances": { - "AccountsReceivable": { - "Outstanding": 760.00, - "Overdue": 920.00 - }, - "AccountsPayable": { - "Outstanding": 231.60, - "Overdue": 360.00 - } - }, - "ContactPersons": [], - "HasAttachments": false, - "HasValidationErrors": false - }, - { - "ContactID": "3ec601ad-eddc-4ccb-a8ac-736e88293b1b", - "ContactStatus": "ACTIVE", - "Name": "Lisa Parker", - "FirstName": "Lisa", - "LastName": "Parker", - "EmailAddress": "lparker@parkerandco.com", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "" - }, - { - "AddressType": "POBOX", - "AddressLine1": "", - "AddressLine2": "", - "AddressLine3": "", - "AddressLine4": "", - "City": "Anchorage", - "Region": "AK", - "PostalCode": "99501", - "Country": "United States" - } - ], - "Phones": [ - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DEFAULT", - "PhoneNumber": "266-3583", - "PhoneAreaCode": "(510)", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1503348546760+0000)/", - "ContactGroups": [], - "IsSupplier": false, - "IsCustomer": false, - "ContactPersons": [], - "HasAttachments": false, - "HasValidationErrors": false - } - ] - } - put: - security: - - OAuth2: [accounting.contacts] - tags: - - Accounting - operationId: createContacts - summary: 'Creates multiple contacts (bulk) in a Xero organisation' - x-hasAccountingValidationError: true - x-example: - - phone: - is_object: true - key: phone - keyPascal: Phone - - phoneNumber: - key: phoneNumber - keyPascal: PhoneNumber - keySnake: phone_number - default: 555-1212 - object: phone - - phoneType: - is_last: true - nonString: true - key: phoneType - keyPascal: PhoneType - keySnake: phone_type - default: MOBILE - php: XeroAPI\XeroPHP\Models\Accounting\Phone::PHONE_TYPE_MOBILE - node: Phone.PhoneTypeEnum.MOBILE - ruby: XeroRuby::Accounting::PhoneType::MOBILE - python_string: MOBILE - java: com.xero.models.accounting.Phone.PhoneTypeEnum.MOBILE - csharp: Phone.PhoneTypeEnum.MOBILE - object: phone - - phones: - is_list: true - key: phones - keyPascal: Phone - - add_phone: - is_last: true - is_list_add: true - key: phones - keyPascal: Phones - object: phone - - contact: - is_object: true - key: contact - keyPascal: Contact - - name: - key: name - keyPascal: Name - default: Bruce Banner - object: contact - - emailAddress: - key: emailAddress - keyPascal: EmailAddress - keySnake: email_address - default: hulk@avengers.com - object: contact - - set_phones: - is_last: true - is_variable: true - nonString: true - key: phones - keyPascal: Phones - default: phones - object: contact - - contacts: - is_object: true - key: contacts - keyPascal: Contacts - - add_contact: - is_last: true - is_array_add: true - key: contacts - keyPascal: Contacts - java: Contacts - csharp: Contact - object: contact - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Contacts array with newly created Contact - content: - application/json: - schema: - $ref: '#/components/schemas/Contacts' - example: { - "Id": "e997d6d7-6dad-4458-beb8-d9c1bf7f2edf", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551399321121)/", - "Contacts": [ - { - "ContactID": "3ff6d40c-af9a-40a3-89ce-3c1556a25591", - "ContactStatus": "ACTIVE", - "CompanyNumber": "NumberBusiness1234", - "Name": "Foo9987", - "EmailAddress": "sid32476@blah.com", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "" - }, - { - "AddressType": "POBOX", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "555-1212", - "PhoneAreaCode": "415", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1551399321043+0000)/", - "ContactGroups": [], - "IsSupplier": false, - "IsCustomer": false, - "SalesDefaultLineAmountType": "INCLUSIVE", - "PurchasesDefaultLineAmountType": "INCLUSIVE", - "SalesTrackingCategories": [], - "PurchasesTrackingCategories": [], - "PaymentTerms": { - "Bills": { - "Day": 15, - "Type": "OFCURRENTMONTH" - }, - "Sales": { - "Day": 10, - "Type": "DAYSAFTERBILLMONTH" - } - }, - "ContactPersons": [], - "HasValidationErrors": false - } - ] - } - '400': - description: Validation Error - some data was incorrect returns response of type Error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: { - "ErrorNumber": 10, - "Type": "ValidationException", - "Message": "A validation exception occurred", - "Elements": [ - { - "ContactID": "00000000-0000-0000-0000-000000000000", - "AccountNumber": "12345-ABCD", - "Name": "Buzz Lightyear", - "EmailAddress": "buzzlightyear@email.com", - "AccountsReceivableTaxType": "NONE", - "AccountsPayableTaxType": "INPUT", - "Addresses": [ - { - "AddressType": "STREET", - "AddressLine1": "101 Green St", - "AddressLine2": "5th floor", - "City": "San Francisco", - "Region": "CA", - "PostalCode": "94041", - "Country": "US", - "AttentionTo": "Rod Drury", - "ValidationErrors": [] - } - ], - "Phones": [ - { - "PhoneType": "MOBILE", - "PhoneNumber": "555-1212", - "PhoneAreaCode": "415", - "ValidationErrors": [] - } - ], - "ContactGroups": [], - "PaymentTerms": { - "Bills": { - "Day": 15, - "Type": "OFCURRENTMONTH", - "ValidationErrors": [] - }, - "Sales": { - "Day": 10, - "Type": "DAYSAFTERBILLMONTH", - "ValidationErrors": [] - } - }, - "ContactPersons": [], - "HasValidationErrors": true, - "ValidationErrors": [ - { - "Message": "The contact name Buzz Lightyear is already assigned to another contact. The contact name must be unique across all active contacts." - } - ] - } - ] - } - requestBody: - required: true - description: Contacts with an array of Contact objects to create in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/Contacts' - example: { - "Contacts": [ - { - "ContactID": "3ff6d40c-af9a-40a3-89ce-3c1556a25591", - "ContactStatus": "ACTIVE", - "Name": "Foo9987", - "EmailAddress": "sid32476@blah.com", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "" - }, - { - "AddressType": "POBOX", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "555-1212", - "PhoneAreaCode": "415", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1551399321043+0000)/", - "ContactGroups": [], - "IsSupplier": false, - "IsCustomer": false, - "SalesTrackingCategories": [], - "PurchasesTrackingCategories": [], - "PaymentTerms": { - "Bills": { - "Day": 15, - "Type": "OFCURRENTMONTH" - }, - "Sales": { - "Day": 10, - "Type": "DAYSAFTERBILLMONTH" - } - }, - "ContactPersons": [] - } - ] - } - post: - security: - - OAuth2: [accounting.contacts] - tags: - - Accounting - operationId: updateOrCreateContacts - summary: 'Updates or creates one or more contacts in a Xero organisation' - x-hasAccountingValidationError: true - x-example: - - phone: - is_object: true - key: phone - keyPascal: Phone - - phoneNumber: - key: phoneNumber - keyPascal: PhoneNumber - keySnake: phone_number - default: 555-1212 - object: phone - - phoneType: - is_last: true - nonString: true - key: phoneType - keyPascal: PhoneType - keySnake: phone_type - default: MOBILE - php: XeroAPI\XeroPHP\Models\Accounting\Phone::PHONE_TYPE_MOBILE - node: Phone.PhoneTypeEnum.MOBILE - ruby: XeroRuby::Accounting::PhoneType::MOBILE - python_string: MOBILE - java: com.xero.models.accounting.Phone.PhoneTypeEnum.MOBILE - csharp: Phone.PhoneTypeEnum.MOBILE - object: phone - - phones: - is_list: true - key: phones - keyPascal: Phone - - add_phone: - is_last: true - is_list_add: true - key: phones - keyPascal: Phones - object: phone - - contact: - is_object: true - key: contact - keyPascal: Contact - - name: - key: name - keyPascal: Name - default: Bruce Banner - object: contact - - emailAddress: - key: emailAddress - keyPascal: EmailAddress - keySnake: email_address - default: hulk@avengers.com - object: contact - - set_phones: - is_last: true - is_variable: true - nonString: true - key: phones - keyPascal: Phones - default: phones - object: contact - - contacts: - is_object: true - key: contacts - keyPascal: Contacts - - add_contact: - is_last: true - is_array_add: true - key: contacts - keyPascal: Contacts - java: Contacts - csharp: Contact - object: contact - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Contacts array with newly created Contact - content: - application/json: - schema: - $ref: '#/components/schemas/Contacts' - example: { - "Id": "e997d6d7-6dad-4458-beb8-d9c1bf7f2edf", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551399321121)/", - "Contacts": [ - { - "ContactID": "00000000-0000-0000-0000-000000000000", - "ContactStatus": "ACTIVE", - "Name": "Bruce Banner", - "CompanyNumber": "NumberBusiness1234", - "EmailAddress": "bruce@banner.com", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "" - }, - { - "AddressType": "POBOX", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "555-1212", - "PhoneAreaCode": "415", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1551399321043+0000)/", - "ContactGroups": [], - "IsSupplier": false, - "IsCustomer": false, - "SalesDefaultLineAmountType": "INCLUSIVE", - "PurchasesDefaultLineAmountType": "INCLUSIVE", - "SalesTrackingCategories": [], - "PurchasesTrackingCategories": [], - "PaymentTerms": { - "Bills": { - "Day": 15, - "Type": "OFCURRENTMONTH" - }, - "Sales": { - "Day": 10, - "Type": "DAYSAFTERBILLMONTH" - } - }, - "ContactPersons": [], - "HasValidationErrors": false - } - ] - } - '400': - description: Validation Error - some data was incorrect returns response of type Error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: { - "ErrorNumber": 10, - "Type": "ValidationException", - "Message": "A validation exception occurred", - "Elements": [ - { - "ContactID": "00000000-0000-0000-0000-000000000000", - "AccountNumber": "12345-ABCD", - "Name": "Buzz Lightyear", - "EmailAddress": "buzzlightyear@email.com", - "AccountsReceivableTaxType": "NONE", - "AccountsPayableTaxType": "INPUT", - "Addresses": [ - { - "AddressType": "STREET", - "AddressLine1": "101 Green St", - "AddressLine2": "5th floor", - "City": "San Francisco", - "Region": "CA", - "PostalCode": "94041", - "Country": "US", - "AttentionTo": "Rod Drury", - "ValidationErrors": [] - } - ], - "Phones": [ - { - "PhoneType": "MOBILE", - "PhoneNumber": "555-1212", - "PhoneAreaCode": "415", - "ValidationErrors": [] - } - ], - "ContactGroups": [], - "PaymentTerms": { - "Bills": { - "Day": 15, - "Type": "OFCURRENTMONTH", - "ValidationErrors": [] - }, - "Sales": { - "Day": 10, - "Type": "DAYSAFTERBILLMONTH", - "ValidationErrors": [] - } - }, - "ContactPersons": [], - "HasValidationErrors": true, - "ValidationErrors": [ - { - "Message": "The contact name Buzz Lightyear is already assigned to another contact. The contact name must be unique across all active contacts." - } - ] - } - ] - } - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Contacts' - example: { - "Contacts": [ - { - "Name": "Bruce Banner", - "EmailAddress": "hulk@avengers.com", - "Phones": [ - { - "PhoneType": "MOBILE", - "PhoneNumber": "555-1212", - "PhoneAreaCode": "415" - } - ], - "PaymentTerms": { - "Bills": { - "Day": 15, - "Type": "OFCURRENTMONTH" - }, - "Sales": { - "Day": 10, - "Type": "DAYSAFTERBILLMONTH" - } - } - } - ] - } - '/Contacts/{ContactNumber}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.contacts, accounting.contacts.read] - tags: - - Accounting - operationId: getContactByContactNumber - summary: 'Retrieves a specific contact by contact number in a Xero organisation' - parameters: - - required: true - in: path - name: ContactNumber - x-snake: contact_number - description: This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50). - example: "SB2" - schema: - type: string - responses: - '200': - description: Success - return response of type Contacts array with a unique Contact - content: - application/json: - schema: - $ref: '#/components/schemas/Contacts' - example: { - "Id": "5c83b115-a6e8-4f2a-877f-ba63d009235b", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551462703288)/", - "Contacts": [ - { - "ContactID": "8138a266-fb42-49b2-a104-014b7045753d", - "ContactNumber": "SB2", - "AccountNumber": "1234567", - "ContactStatus": "ACTIVE", - "Name": "Acme Parts Co.", - "FirstName": "Blake", - "LastName": "Kohler", - "CompanyNumber": "NumberBusiness1234", - "EmailAddress": "bk@krave.co", - "BankAccountDetails": "12334567", - "TaxNumber": "123-22-3456", - "AccountsReceivableTaxType": "TAX003", - "AccountsPayableTaxType": "TAX022", - "Addresses": [ - { - "AddressType": "STREET", - "AddressLine1": "123 Fake Street", - "City": "Vancouver", - "Region": "British Columbia", - "PostalCode": "V6B 2T4", - "Country": "", - "AttentionTo": "" - }, - { - "AddressType": "POBOX", - "AddressLine1": "1234 Fake Street", - "City": "Vancouver", - "Region": "British Columbia", - "PostalCode": "V6B 2T4", - "Country": "", - "AttentionTo": "Blake" - } - ], - "Phones": [ - { - "PhoneType": "DDI", - "PhoneNumber": "489-44493", - "PhoneAreaCode": "345", - "PhoneCountryCode": "4" - }, - { - "PhoneType": "DEFAULT", - "PhoneNumber": "408-0914", - "PhoneAreaCode": "604", - "PhoneCountryCode": "1" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "123-9933", - "PhoneAreaCode": "123", - "PhoneCountryCode": "2" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "999-44", - "PhoneAreaCode": "234", - "PhoneCountryCode": "3" - } - ], - "UpdatedDateUTC": "/Date(1551459777193+0000)/", - "ContactGroups": [], - "IsSupplier": true, - "IsCustomer": true, - "SalesDefaultLineAmountType": "INCLUSIVE", - "PurchasesDefaultLineAmountType": "INCLUSIVE", - "DefaultCurrency": "USD", - "Discount": 13.00, - "Website": "http://www.google.com", - "BrandingTheme": { - "BrandingThemeID": "dabc7637-62c1-4941-8a6e-ee44fa5090e7", - "Name": "Standard" - }, - "PurchasesDefaultAccountCode": "660", - "SalesDefaultAccountCode": "002", - "BatchPayments": { - "BankAccountNumber": "12334567", - "BankAccountName": "Citi Bank", - "Details": "biz checking", - "Code": "", - "Reference": "" - }, - "Balances": { - "AccountsReceivable": { - "Outstanding": 118.90, - "Overdue": 136.90 - }, - "AccountsPayable": { - "Outstanding": -43.60, - "Overdue": 40.00 - } - }, - "PaymentTerms": { - "Bills": { - "Day": 12, - "Type": "OFFOLLOWINGMONTH" - }, - "Sales": { - "Day": 14, - "Type": "OFCURRENTMONTH" - } - }, - "ContactPersons": [ - { - "FirstName": "Sue", - "LastName": "Johnson", - "EmailAddress": "sue.johnson@krave.com", - "IncludeInEmails": true - } - ], - "HasAttachments": true, - "Attachments": [ - { - "AttachmentID": "04e0a3e3-b116-456a-9f32-9706f0d33afa", - "FileName": "sample5.jpg", - "Url": "https://api.xero.com/api.xro/2.0/contact/8138a266-fb42-49b2-a104-014b7045753d/Attachments/sample5.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ], - "HasValidationErrors": false - } - ] - } - '/Contacts/{ContactID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.contacts, accounting.contacts.read] - tags: - - Accounting - operationId: getContact - summary: 'Retrieves a specific contacts in a Xero organisation using a unique contact Id' - parameters: - - $ref: '#/components/parameters/ContactID' - responses: - '200': - description: Success - return response of type Contacts array with a unique Contact - content: - application/json: - schema: - $ref: '#/components/schemas/Contacts' - example: { - "Id": "5c83b115-a6e8-4f2a-877f-ba63d009235b", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551462703288)/", - "Contacts": [ - { - "ContactID": "8138a266-fb42-49b2-a104-014b7045753d", - "ContactNumber": "SB2", - "AccountNumber": "1234567", - "ContactStatus": "ACTIVE", - "Name": "Acme Parts Co.", - "FirstName": "Blake", - "LastName": "Kohler", - "CompanyNumber": "NumberBusiness1234", - "EmailAddress": "bk@krave.co", - "BankAccountDetails": "12334567", - "TaxNumber": "123-22-3456", - "AccountsReceivableTaxType": "TAX003", - "AccountsPayableTaxType": "TAX022", - "Addresses": [ - { - "AddressType": "STREET", - "AddressLine1": "123 Fake Street", - "City": "Vancouver", - "Region": "British Columbia", - "PostalCode": "V6B 2T4", - "Country": "", - "AttentionTo": "" - }, - { - "AddressType": "POBOX", - "AddressLine1": "1234 Fake Street", - "City": "Vancouver", - "Region": "British Columbia", - "PostalCode": "V6B 2T4", - "Country": "", - "AttentionTo": "Blake" - } - ], - "Phones": [ - { - "PhoneType": "DDI", - "PhoneNumber": "489-44493", - "PhoneAreaCode": "345", - "PhoneCountryCode": "4" - }, - { - "PhoneType": "DEFAULT", - "PhoneNumber": "408-0914", - "PhoneAreaCode": "604", - "PhoneCountryCode": "1" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "123-9933", - "PhoneAreaCode": "123", - "PhoneCountryCode": "2" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "999-44", - "PhoneAreaCode": "234", - "PhoneCountryCode": "3" - } - ], - "UpdatedDateUTC": "/Date(1551459777193+0000)/", - "ContactGroups": [], - "IsSupplier": true, - "IsCustomer": true, - "SalesDefaultLineAmountType": "INCLUSIVE", - "PurchasesDefaultLineAmountType": "INCLUSIVE", - "DefaultCurrency": "USD", - "Discount": 13.00, - "Website": "http://www.google.com", - "BrandingTheme": { - "BrandingThemeID": "dabc7637-62c1-4941-8a6e-ee44fa5090e7", - "Name": "Standard" - }, - "PurchasesDefaultAccountCode": "660", - "SalesDefaultAccountCode": "002", - "BatchPayments": { - "BankAccountNumber": "12334567", - "BankAccountName": "Citi Bank", - "Details": "biz checking", - "Code": "", - "Reference": "" - }, - "Balances": { - "AccountsReceivable": { - "Outstanding": 118.90, - "Overdue": 136.90 - }, - "AccountsPayable": { - "Outstanding": -43.60, - "Overdue": 40.00 - } - }, - "PaymentTerms": { - "Bills": { - "Day": 12, - "Type": "OFFOLLOWINGMONTH" - }, - "Sales": { - "Day": 14, - "Type": "OFCURRENTMONTH" - } - }, - "ContactPersons": [ - { - "FirstName": "Sue", - "LastName": "Johnson", - "EmailAddress": "sue.johnson@krave.com", - "IncludeInEmails": true - } - ], - "HasAttachments": true, - "Attachments": [ - { - "AttachmentID": "04e0a3e3-b116-456a-9f32-9706f0d33afa", - "FileName": "sample5.jpg", - "Url": "https://api.xero.com/api.xro/2.0/contact/8138a266-fb42-49b2-a104-014b7045753d/Attachments/sample5.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ], - "HasValidationErrors": false - } - ] - } - post: - security: - - OAuth2: [accounting.contacts] - tags: - - Accounting - operationId: updateContact - summary: 'Updates a specific contact in a Xero organisation' - x-hasAccountingValidationError: true - x-example: - - contact: - is_object: true - key: contact - keyPascal: Contact - - name: - key: name - keyPascal: Name - default: Thanos - object: contact - - contactID: - is_last: true - is_uuid: true - key: contactID - keyPascal: ContactID - default: 00000000-0000-0000-0000-000000000000 - object: contact - - contacts: - is_object: true - key: contacts - keyPascal: Contacts - - add_contact: - is_last: true - is_array_add: true - key: contacts - keyPascal: Contacts - java: Contacts - csharp: Contact - object: contact - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/ContactID' - responses: - '200': - description: Success - return response of type Contacts array with an updated Contact - content: - application/json: - schema: - $ref: '#/components/schemas/Contacts' - example: { - "Id": "4166b727-c3f0-4881-acd0-d4f7c0e8fcda", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551400031795)/", - "Contacts": [ - { - "ContactID": "d5be01fb-b09f-4c3a-9c67-e10c2a03412c", - "ContactStatus": "ACTIVE", - "Name": "FooBar", - "EmailAddress": "sid30680@blah.com", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "" - }, - { - "AddressType": "POBOX", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "555-1212", - "PhoneAreaCode": "415", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1551400031763+0000)/", - "ContactGroups": [], - "IsSupplier": false, - "IsCustomer": false, - "SalesDefaultLineAmountType": "INCLUSIVE", - "PurchasesDefaultLineAmountType": "INCLUSIVE", - "SalesTrackingCategories": [], - "PurchasesTrackingCategories": [], - "PaymentTerms": { - "Bills": { - "Day": 15, - "Type": "OFCURRENTMONTH" - }, - "Sales": { - "Day": 10, - "Type": "DAYSAFTERBILLMONTH" - } - }, - "ContactPersons": [], - "HasValidationErrors": false - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - description: an array of Contacts containing single Contact object with properties to update - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Contacts' - example: { "Contacts": [{ "ContactID": "00000000-0000-0000-0000-000000000000", "Name": "Thanos" }]} - '/Contacts/{ContactID}/Attachments': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getContactAttachments - x-hasAccountingValidationError: true - summary: 'Retrieves attachments for a specific contact in a Xero organisation' - responses: - '200': - description: Success - return response of type Attachments array with 0 to N Attachment - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "0f63b631-a205-496d-b1d2-e6b13a9b497b", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551483890413)/", - "Attachments": [ - { - "AttachmentID": "04e0a3e3-b116-456a-9f32-9706f0d33afa", - "FileName": "sample5.jpg", - "Url": "https://api.xero.com/api.xro/2.0/Contacts/8138a266-fb42-49b2-a104-014b7045753d/Attachments/sample5.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - parameters: - - $ref: '#/components/parameters/ContactID' - '/Contacts/{ContactID}/Attachments/{AttachmentID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getContactAttachmentById - summary: Retrieves a specific attachment from a specific contact using a unique attachment Id - parameters: - - $ref: '#/components/parameters/ContactID' - - $ref: '#/components/parameters/AttachmentID' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of attachment for Contact as binary data - content: - application/octet-stream: - schema: - type: string - format: binary - '/Contacts/{ContactID}/Attachments/{FileName}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getContactAttachmentByFileName - summary: Retrieves a specific attachment from a specific contact by file name - parameters: - - $ref: '#/components/parameters/ContactID' - - $ref: '#/components/parameters/FileName' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of attachment for Contact as binary data - content: - application/octet-stream: - schema: - type: string - format: binary - post: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: updateContactAttachmentByFileName - x-hasAccountingValidationError: true - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/ContactID' - - $ref: '#/components/parameters/FileName' - responses: - '200': - description: Success - return response of type Attachments array with an updated Attachment - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "8543ae1a-297c-49b8-bf91-47decac452d5", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1551485146555)/", - "Attachments": [ - { - "AttachmentID": "8b537c1b-bbb5-47fd-857e-370c369dda7c", - "FileName": "HelloWorld.jpg", - "Url": "https://api.xero.com/api.xro/2.0/Contacts/8138a266-fb42-49b2-a104-014b7045753d/Attachments/HelloWorld.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - put: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: createContactAttachmentByFileName - x-hasAccountingValidationError: true - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/ContactID' - - $ref: '#/components/parameters/FileName' - responses: - '200': - description: Success - return response of type Attachments array with an newly created Attachment - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "a5eddf71-86aa-42f5-99e2-0aaf9caf96b6", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1551484292734)/", - "Attachments": [ - { - "AttachmentID": "27e37b01-6996-4ebe-836c-95fd472ad674", - "FileName": "sample5.jpg", - "Url": "https://api.xero.com/api.xro/2.0/Contacts/8138a266-fb42-49b2-a104-014b7045753d/Attachments/sample5.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - '/Contacts/{ContactID}/CISSettings': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.settings, accounting.settings.read] - tags: - - Accounting - operationId: getContactCISSettings - summary: 'Retrieves CIS settings for a specific contact in a Xero organisation' - parameters: - - $ref: '#/components/parameters/ContactID' - responses: - '200': - description: Success - return response of type CISSettings for a specific Contact - content: - application/json: - schema: - $ref: '#/components/schemas/CISSettings' - example: { - "CISSetting": [ - { - "CISContractorEnabled": true, - "CISSubContractorEnabled": true, - "Rate": 100, - } - ] - } - '/Contacts/{ContactID}/History': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.contacts, accounting.contacts.read] - tags: - - Accounting - operationId: getContactHistory - summary: Retrieves history records for a specific contact - parameters: - - $ref: '#/components/parameters/ContactID' - responses: - '200': - $ref: '#/components/responses/HistoryRetrieved' - put: - security: - - OAuth2: [accounting.contacts] - tags: - - Accounting - operationId: createContactHistory - summary: Creates a new history record for a specific contact - x-hasAccountingValidationError: true - x-example: - - historyRecord: - is_object: true - key: historyRecord - keyPascal: HistoryRecord - keySnake: history_record - - Details: - is_last: true - key: details - keyPascal: Details - default: Hello World - object: historyRecord - - historyRecords: - is_object: true - key: historyRecords - keyPascal: HistoryRecords - - add_historyRecord: - is_last: true - is_array_add: true - key: historyRecords - keyPascal: HistoryRecords - keySnake: history_records - java: HistoryRecords - python: history_record - ruby: history_record - csharp: HistoryRecord - object: historyRecord - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/ContactID' - requestBody: - $ref: '#/components/requestBodies/historyRecords' - responses: - '200': - $ref: '#/components/responses/HistoryRecordCreated' - '400': - $ref: '#/components/responses/400Error' - /ContactGroups: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.contacts, accounting.contacts.read] - tags: - - Accounting - operationId: getContactGroups - summary: Retrieves the contact Id and name of each contact group - parameters: - - in: query - name: where - description: Filter by an any element - example: Status=="ACTIVE" - x-example-csharp: Status==\"ACTIVE\" - x-example-java: Status=="' + ContactGroup.StatusEnum.ACTIVE + '" - x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\ContactGroup::STATUS_ACTIVE . '" - x-example-ruby: Status==#{XeroRuby::Accounting::ContactGroup::ACTIVE} - schema: - type: string - - in: query - name: order - description: Order by an any element - example: "Name ASC" - schema: - type: string - responses: - '200': - description: Success - return response of type Contact Groups array of Contact Group - content: - application/json: - schema: - $ref: '#/components/schemas/ContactGroups' - example: { - "Id": "b825df86-1a72-49c9-97dd-36afc7d04bd5", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1551746015603)/", - "ContactGroups": [ - { - "ContactGroupID": "d7a86b80-8dac-4d89-a334-9dcf5753676c", - "Name": "Suppliers", - "Status": "ACTIVE", - "Contacts": [], - "HasValidationErrors": false - }, - { - "ContactGroupID": "ab089fd4-012f-4043-a6e4-e7be01e87e50", - "Name": "Old Group84262", - "Status": "ACTIVE", - "Contacts": [], - "HasValidationErrors": false - } - ] - } - put: - security: - - OAuth2: [accounting.contacts] - tags: - - Accounting - operationId: createContactGroup - summary: Creates a contact group - parameters: - - $ref: '#/components/parameters/idempotencyKey' - x-hasAccountingValidationError: true - x-example: - - contact: - is_object: true - key: contactGroup - keyPascal: ContactGroup - keySnake: contact_group - - name: - is_last: true - key: name - keyPascal: Name - default: VIPs - object: contactGroup - - contactGroups: - is_object: true - key: contactGroups - keyPascal: ContactGroups - - add_ContactGroup: - is_last: true - is_array_add: true - key: contactGroups - keyPascal: ContactGroups - keySnake: contact_groups - java: ContactGroups - python: contact_group - ruby: contact_group - csharp: ContactGroup - object: contactGroup - responses: - '200': - description: Success - return response of type Contact Groups array of newly created Contact Group - content: - application/json: - schema: - $ref: '#/components/schemas/ContactGroups' - example: { - "Id": "5afe53f9-2271-45b8-9767-88d023b71d34", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1551745740920)/", - "ContactGroups": [ - { - "ContactGroupID": "d7a86b80-8dac-4d89-a334-9dcf5753676c", - "Name": "Suppliers", - "Status": "ACTIVE", - "Contacts": [], - "HasValidationErrors": false - } - ] - } - '400': - description: Validation Error - some data was incorrect returns response of type Error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: { - "ErrorNumber": 10, - "Type": "ValidationException", - "Message": "A validation exception occurred", - "Elements": [ - { - "ContactGroupID": "00000000-0000-0000-0000-000000000000", - "Name": "Suppliers", - "Contacts": [], - "HasValidationErrors": true, - "ValidationErrors": [ - { - "Message": "You’ve reached the limit of 100 contact groups." - } - ] - } - ] - } - requestBody: - description: ContactGroups with an array of names in request body - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ContactGroups' - example: { "ContactGroups": [{ "Name": "VIPs" }]} - '/ContactGroups/{ContactGroupID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.contacts, accounting.contacts.read] - tags: - - Accounting - operationId: getContactGroup - summary: Retrieves a specific contact group by using a unique contact group Id - parameters: - - $ref: '#/components/parameters/ContactGroupID' - responses: - '200': - description: Success - return response of type Contact Groups array with a specific Contact Group - content: - application/json: - schema: - $ref: '#/components/schemas/ContactGroups' - example: { - "Id": "079c14f6-2c2d-464e-a2c7-0edf7e465723", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1551746772976)/", - "ContactGroups": [ - { - "ContactGroupID": "17b44ed7-4389-4162-91cb-3dd5766e4e22", - "Name": "Oasis", - "Status": "ACTIVE", - "Contacts": [ - { - "ContactID": "4e1753b9-018a-4775-b6aa-1bc7871cfee3", - "Name": "Noel Gallagher", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "Name": "Liam Gallagher", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - } - ], - "HasValidationErrors": false - } - ] - } - post: - security: - - OAuth2: [accounting.contacts] - tags: - - Accounting - operationId: updateContactGroup - summary: Updates a specific contact group - x-hasAccountingValidationError: true - x-example: - - contact: - is_object: true - key: contactGroup - keyPascal: ContactGroup - keySnake: contact_group - - name: - is_last: true - key: name - keyPascal: Name - default: Vendor - object: contactGroup - - contactGroups: - is_object: true - key: contactGroups - keyPascal: ContactGroups - - add_ContactGroup: - is_last: true - is_array_add: true - key: contactGroups - keyPascal: ContactGroups - keySnake: contact_groups - java: ContactGroups - python: contact_group - ruby: contact_group - csharp: ContactGroup - object: contactGroup - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/ContactGroupID' - responses: - '200': - description: Success - return response of type Contact Groups array of updated Contact Group - content: - application/json: - schema: - $ref: '#/components/schemas/ContactGroups' - example: { - "Id": "b1ba6cdb-1637-4209-bb92-bd0c593f3243", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1551746288544)/", - "ContactGroups": [ - { - "ContactGroupID": "13f47537-7c1d-4e62-966e-617d76558fc5", - "Name": "Supplier Vendor", - "Status": "ACTIVE", - "Contacts": [], - "HasValidationErrors": false - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - description: an array of Contact groups with Name of specific group to update - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ContactGroups' - example: { - "ContactGroups":[ - { - "Name":"Suppliers" - } - ] - } - '/ContactGroups/{ContactGroupID}/Contacts': - parameters: - - $ref: '#/components/parameters/requiredHeader' - put: - security: - - OAuth2: [accounting.contacts] - tags: - - Accounting - operationId: createContactGroupContacts - summary: Creates contacts to a specific contact group - x-hasAccountingValidationError: true - x-example: - - contact: - is_object: true - key: contact - keyPascal: Contact - - contactID: - is_last: true - is_uuid: true - key: contactID - keyPascal: ContactID - keySnake: contact_id - default: 00000000-0000-0000-0000-000000000000 - object: contact - - contacts: - is_object: true - key: contacts - keyPascal: Contacts - - add_contact: - is_last: true - is_array_add: true - key: contacts - keyPascal: Contacts - java: Contacts - csharp: Contact - object: contact - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/ContactGroupID' - responses: - '200': - description: Success - return response of type Contacts array of added Contacts - content: - application/json: - schema: - $ref: '#/components/schemas/Contacts' - example: { - "Id": "99db8024-6895-45c8-a1b5-54805aa8689c", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1551747495785)/", - "Contacts": [ - { - "ContactID": "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false, - "ValidationErrors": [] - }, - { - "ContactID": "4e1753b9-018a-4775-b6aa-1bc7871cfee3", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false, - "ValidationErrors": [] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - description: Contacts with array of contacts specifying the ContactID to be added to ContactGroup in body of request - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Contacts' - example: { - "Contacts": [ - { - "ContactID": "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7" - }, - { - "ContactID": "4e1753b9-018a-4775-b6aa-1bc7871cfee3" - } - ] - } - delete: - security: - - OAuth2: [accounting.contacts] - tags: - - Accounting - operationId: deleteContactGroupContacts - summary: Deletes all contacts from a specific contact group - parameters: - - $ref: '#/components/parameters/ContactGroupID' - responses: - '204': - description: Success - return response 204 no content - x-isEmpty: true - '/ContactGroups/{ContactGroupID}/Contacts/{ContactID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - delete: - security: - - OAuth2: [accounting.contacts] - tags: - - Accounting - operationId: deleteContactGroupContact - summary: Deletes a specific contact from a contact group using a unique contact Id - parameters: - - $ref: '#/components/parameters/ContactGroupID' - - $ref: '#/components/parameters/ContactID' - responses: - '204': - description: Success - return response 204 no content - x-isEmpty: true - '400': - $ref: '#/components/responses/400Error' - /CreditNotes: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getCreditNotes - summary: Retrieves any credit notes - parameters: - - $ref: '#/components/parameters/ifModifiedSince' - - in: query - name: where - description: Filter by an any element - example: Status=="DRAFT" - x-example-csharp: Status==\"DRAFT\" - x-example-java: Status=="' + CreditNote.StatusEnum.DRAFT + '" - x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\CreditNote::STATUS_DRAFT . '" - x-example-ruby: Status==#{XeroRuby::Accounting::CreditNote::DRAFT} - schema: - type: string - - in: query - name: order - description: Order by an any element - example: "CreditNoteNumber ASC" - schema: - type: string - - in: query - name: page - description: e.g. page=1 – Up to 100 credit notes will be returned in a single API call with line items shown for each credit note - example: 1 - schema: - type: integer - - $ref: '#/components/parameters/unitdp' - - $ref: '#/components/parameters/pageSize' - responses: - '200': - description: Success - return response of type Credit Notes array of CreditNote - content: - application/json: - schema: - $ref: '#/components/schemas/CreditNotes' - example: { - "Id": "306379b0-3d75-4c77-953a-be08fa0efae8", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1551812506620)/", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 2 - }, - "CreditNotes": [ - { - "CreditNoteID": "249f15fa-f2a7-4acc-8769-0984103f2225", - "CreditNoteNumber": "CN-0005", - "Payments": [ - { - "PaymentID": "6b037c9b-2e5d-4905-84d3-eabfb3438242", - "Date": "/Date(1552521600000+0000)/", - "Amount": 2.00, - "Reference": "Too much", - "CurrencyRate": 1.000000, - "HasAccount": false, - "HasValidationErrors": false - } - ], - "ID": "249f15fa-f2a7-4acc-8769-0984103f2225", - "CurrencyRate": 1.000000, - "Type": "ACCRECCREDIT", - "Reference": "US Tour", - "RemainingCredit": 32.50, - "Allocations": [], - "HasAttachments": true, - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "Name": "Liam Gallagher", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2019-03-05T00:00:00", - "Date": "/Date(1551744000000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "Exclusive", - "LineItems": [], - "SubTotal": 30.00, - "TotalTax": 4.50, - "Total": 34.50, - "UpdatedDateUTC": "/Date(1551812346157+0000)/", - "CurrencyCode": "NZD" - }, - { - "CreditNoteID": "f8021bd2-9a6a-4c19-8477-163da0b9290f", - "CreditNoteNumber": "", - "Payments": [], - "ID": "f8021bd2-9a6a-4c19-8477-163da0b9290f", - "CurrencyRate": 1.000000, - "Type": "ACCPAYCREDIT", - "Reference": "", - "RemainingCredit": 46.00, - "Allocations": [], - "HasAttachments": false, - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "Name": "Liam Gallagher", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2019-01-05T00:00:00", - "Date": "/Date(1546646400000+0000)/", - "Status": "DRAFT", - "LineAmountTypes": "Exclusive", - "LineItems": [], - "SubTotal": 40.00, - "TotalTax": 6.00, - "Total": 46.00, - "UpdatedDateUTC": "/Date(1551812506153+0000)/", - "CurrencyCode": "NZD" - } - ] - } - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createCreditNotes - summary: Creates a new credit note - x-hasAccountingValidationError: true - x-example: - - currDate: - is_date: true - key: currDate - keyPascal: CurrDate - keySnake: curr_date - java_datatype: LocalDate - default: "LocalDate.now()" - java: "LocalDate.now()" - node: "'2020-12-10'" - csharp: "DateTime.Now" - php: "new DateTime('2020-12-10')" - python: "dateutil.parser.parse('2020-12-03T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - contact: - is_object: true - key: contact - keyPascal: Contact - - contactID: - is_last: true - is_uuid: true - key: contactID - keyPascal: ContactID - keySnake: contact_id - default: 00000000-0000-0000-0000-000000000000 - object: contact - - lineItem: - is_object: true - key: lineItem - keyPascal: LineItem - keySnake: line_item - - description: - key: description - keyPascal: Description - default: Foobar - object: lineItem - - quantity: - nonString: true - key: quantity - keyPascal: Quantity - default: 1.0 - is_money: true - object: lineItem - - unitAmount: - nonString: true - key: unitAmount - keyPascal: UnitAmount - keySnake: unit_amount - default: 20.0 - is_money: true - object: lineItem - - accountCode: - is_last: true - key: accountCode - keyPascal: AccountCode - keySnake: account_code - default: "000" - object: lineItem - - line_items: - is_list: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - csharp: LineItem - java: LineItem - - add_lineitems: - is_last: true - is_list_add: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - java: LineItems - python: line_item - ruby: line_item - csharp: LineItem - object: lineItem - - creditNote: - is_object: true - key: creditNote - keyPascal: CreditNote - keySnake: credit_note - - type: - nonString: true - key: type - keyPascal: Type - default: ACCPAYCREDIT - php: XeroAPI\XeroPHP\Models\Accounting\CreditNote::TYPE_ACCPAYCREDIT - node: CreditNote.TypeEnum.ACCPAYCREDIT - ruby: XeroRuby::Accounting::CreditNote::ACCPAYCREDIT - python_string: ACCPAYCREDIT - java: com.xero.models.accounting.CreditNote.TypeEnum.ACCPAYCREDIT - csharp: CreditNote.TypeEnum.ACCPAYCREDIT - object: creditNote - - set_contact: - is_variable: true - nonString: true - key: contact - keyPascal: Contact - default: contact - object: creditNote - - date: - is_variable: true - nonString: true - key: date - keyPascal: Date - default: currDate - python: curr_date - ruby: curr_date - object: creditNote - - set_lineitem: - is_last: true - is_variable: true - nonString: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - default: lineItems - python: line_items - ruby: line_items - object: creditNote - - creditNotes: - is_object: true - key: creditNotes - keyPascal: CreditNotes - - add_creditNote: - is_last: true - is_array_add: true - key: creditNotes - keyPascal: CreditNotes - keySnake: credit_notes - java: CreditNotes - python: credit_note - ruby: credit_note - csharp: CreditNote - object: creditNote - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/unitdp' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Credit Notes array of newly created CreditNote - content: - application/json: - schema: - $ref: '#/components/schemas/CreditNotes' - example: { - "Id": "5e57a661-42da-4a19-96a0-00405a0e946d", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1551812702713)/", - "CreditNotes": [ - { - "CreditNoteID": "f9256f04-5a99-4680-acb9-6b4639cc439a", - "CreditNoteNumber": "", - "Payments": [], - "ID": "f9256f04-5a99-4680-acb9-6b4639cc439a", - "CurrencyRate": 1.000000, - "Type": "ACCPAYCREDIT", - "Reference": "", - "RemainingCredit": 46.00, - "Allocations": [], - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "ContactStatus": "ACTIVE", - "Name": "Liam Gallagher", - "FirstName": "Liam", - "LastName": "Gallagher", - "EmailAddress": "liam@rockstar.com", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "", - "AttentionTo": "" - }, - { - "AddressType": "POBOX", - "City": "Anytown", - "Region": "NY", - "PostalCode": "10101", - "Country": "USA", - "AttentionTo": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "222-2222", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "333-2233", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "444-3433", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1551747281053+0000)/", - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2019-01-05T00:00:00", - "Date": "/Date(1546646400000+0000)/", - "Status": "DRAFT", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Foobar", - "UnitAmount": 20.00, - "TaxType": "INPUT2", - "TaxAmount": 6.00, - "LineAmount": 40.00, - "AccountCode": "400", - "Tracking": [], - "Quantity": 2.0000, - "ValidationErrors": [] - } - ], - "SubTotal": 40.00, - "TotalTax": 6.00, - "Total": 46.00, - "UpdatedDateUTC": "/Date(1551812702650+0000)/", - "CurrencyCode": "NZD", - "StatusAttributeString": "OK", - "ValidationErrors": [ - { - "Message": "An existing Credit Note with the specified CreditNoteID could not be found" - } - ] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - description: Credit Notes with array of CreditNote object in body of request - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CreditNotes' - example: { - "CreditNotes":[ - { - "Type":"ACCPAYCREDIT", - "Contact":{ - "ContactID":"430fa14a-f945-44d3-9f97-5df5e28441b8" - }, - "Date":"2019-01-05", - "LineItems":[ - { - "Description":"Foobar", - "Quantity":2.0, - "UnitAmount":20.0, - "AccountCode":"400" - } - ] - } - ] - } - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: updateOrCreateCreditNotes - summary: Updates or creates one or more credit notes - x-hasAccountingValidationError: true - x-example: - - currDate: - is_date: true - key: currDate - keyPascal: CurrDate - keySnake: curr_date - java_datatype: LocalDate - default: "LocalDate.now()" - java: "LocalDate.now()" - csharp: "DateTime.Now" - node: "'2020-12-10'" - php: "new DateTime('2020-12-10')" - python: "dateutil.parser.parse('2020-12-03T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - contact: - is_object: true - key: contact - keyPascal: Contact - - contactID: - is_last: true - is_uuid: true - key: contactID - keyPascal: ContactID - keySnake: contact_id - default: 00000000-0000-0000-0000-000000000000 - object: contact - - lineItem: - is_object: true - key: lineItem - keyPascal: LineItem - keySnake: line_item - - description: - key: description - keyPascal: Description - default: Foobar - object: lineItem - - quantity: - nonString: true - key: quantity - keyPascal: Quantity - default: 1.0 - is_money: true - object: lineItem - - unitAmount: - nonString: true - key: unitAmount - keyPascal: UnitAmount - keySnake: unit_amount - default: 20.0 - is_money: true - object: lineItem - - accountCode: - is_last: true - key: accountCode - keyPascal: AccountCode - keySnake: account_code - default: "000" - object: lineItem - - line_items: - is_list: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - csharp: LineItem - java: LineItem - - add_lineitems: - is_last: true - is_list_add: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - java: LineItems - python: line_item - ruby: line_item - csharp: LineItem - object: lineItem - - creditNote: - is_object: true - key: creditNote - keyPascal: CreditNote - keySnake: credit_note - - type: - nonString: true - key: type - keyPascal: Type - default: ACCPAYCREDIT - php: XeroAPI\XeroPHP\Models\Accounting\CreditNote::TYPE_ACCPAYCREDIT - node: CreditNote.TypeEnum.ACCPAYCREDIT - ruby: XeroRuby::Accounting::CreditNote::ACCPAYCREDIT - python_string: ACCPAYCREDIT - java: com.xero.models.accounting.CreditNote.TypeEnum.ACCPAYCREDIT - csharp: CreditNote.TypeEnum.ACCPAYCREDIT - object: creditNote - - set_contact: - is_variable: true - nonString: true - key: contact - keyPascal: Contact - default: contact - object: creditNote - - date: - is_variable: true - nonString: true - key: date - keyPascal: Date - default: currDate - python: curr_date - ruby: curr_date - object: creditNote - - set_lineitem: - is_last: true - is_variable: true - nonString: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - default: lineItems - python: line_items - ruby: line_items - object: creditNote - - creditNotes: - is_object: true - key: creditNotes - keyPascal: CreditNotes - - add_creditNote: - is_last: true - is_array_add: true - key: creditNotes - keyPascal: CreditNotes - keySnake: credit_notes - java: CreditNotes - python: credit_note - ruby: credit_note - csharp: CreditNote - object: creditNote - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/unitdp' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Credit Notes array of newly created CreditNote - content: - application/json: - schema: - $ref: '#/components/schemas/CreditNotes' - example: { - "Id": "5e57a661-42da-4a19-96a0-00405a0e946d", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1551812702713)/", - "CreditNotes": [ - { - "CreditNoteID": "f9256f04-5a99-4680-acb9-6b4639cc439a", - "CreditNoteNumber": "", - "Payments": [], - "ID": "f9256f04-5a99-4680-acb9-6b4639cc439a", - "CurrencyRate": 1.000000, - "Type": "ACCPAYCREDIT", - "Reference": "", - "SentToContact": true, - "RemainingCredit": 46.00, - "Allocations": [], - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "ContactStatus": "ACTIVE", - "Name": "Liam Gallagher", - "FirstName": "Liam", - "LastName": "Gallagher", - "EmailAddress": "liam@rockstar.com", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "", - "AttentionTo": "" - }, - { - "AddressType": "POBOX", - "City": "Anytown", - "Region": "NY", - "PostalCode": "10101", - "Country": "USA", - "AttentionTo": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "222-2222", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "333-2233", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "444-3433", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1551747281053+0000)/", - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2019-01-05T00:00:00", - "Date": "/Date(1546646400000+0000)/", - "Status": "DRAFT", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Foobar", - "UnitAmount": 20.00, - "TaxType": "INPUT2", - "TaxAmount": 6.00, - "LineAmount": 40.00, - "AccountCode": "400", - "Tracking": [], - "Quantity": 2.0000, - "ValidationErrors": [] - } - ], - "SubTotal": 40.00, - "TotalTax": 6.00, - "Total": 46.00, - "UpdatedDateUTC": "/Date(1551812702650+0000)/", - "CurrencyCode": "NZD", - "StatusAttributeString": "OK", - "ValidationErrors": [ - { - "Message": "An existing Credit Note with the specified CreditNoteID could not be found" - } - ] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - description: an array of Credit Notes with a single CreditNote object. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CreditNotes' - example: { - "CreditNotes":[ - { - "Type":"ACCPAYCREDIT", - "Contact":{ - "ContactID":"430fa14a-f945-44d3-9f97-5df5e28441b8" - }, - "Date":"2019-01-05", - "Status":"AUTHORISED", - "Reference": "HelloWorld", - "LineItems":[ - { - "Description":"Foobar", - "Quantity":2.0, - "UnitAmount":20.0, - "AccountCode":"400" - } - ] - } - ] - } - '/CreditNotes/{CreditNoteID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getCreditNote - summary: Retrieves a specific credit note using a unique credit note Id - parameters: - - $ref: '#/components/parameters/CreditNoteID' - - $ref: '#/components/parameters/unitdp' - responses: - '200': - description: Success - return response of type Credit Notes array with a unique CreditNote - content: - application/json: - schema: - $ref: '#/components/schemas/CreditNotes' - example: { - "Id": "dd5c5da7-08ab-486a-ac34-aea295f1614b", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1551812703811)/", - "CreditNotes": [ - { - "CreditNoteID": "249f15fa-f2a7-4acc-8769-0984103f2225", - "CreditNoteNumber": "CN-0005", - "Payments": [ - { - "PaymentID": "6b037c9b-2e5d-4905-84d3-eabfb3438242", - "Date": "/Date(1552521600000+0000)/", - "Amount": 2.00, - "Reference": "Too much", - "CurrencyRate": 1.000000, - "HasAccount": false, - "HasValidationErrors": false - } - ], - "ID": "249f15fa-f2a7-4acc-8769-0984103f2225", - "CurrencyRate": 1.000000, - "Type": "ACCRECCREDIT", - "Reference": "US Tour", - "RemainingCredit": 32.50, - "Allocations": [], - "HasAttachments": true, - "Attachments": [ - { - "AttachmentID": "9b9c9b62-069e-4f5a-a172-183195f084bb", - "FileName": "Screen Shot 2019-03-04 at 9.00.06 AM.png", - "Url": "https://api.xero.com/api.xro/2.0/creditnotes/249f15fa-f2a7-4acc-8769-0984103f2225/Attachments/Screen%20Shot%202019-03-04%20at%209.00.06%20AM.png", - "MimeType": "image/png", - "ContentLength": 82334 - } - ], - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "ContactStatus": "ACTIVE", - "Name": "Liam Gallagher", - "FirstName": "Liam", - "LastName": "Gallagher", - "EmailAddress": "liam@rockstar.com", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "", - "AttentionTo": "" - }, - { - "AddressType": "POBOX", - "City": "Anytown", - "Region": "NY", - "PostalCode": "10101", - "Country": "USA", - "AttentionTo": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "222-2222", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "333-2233", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "444-3433", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1551747281053+0000)/", - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2019-03-05T00:00:00", - "Date": "/Date(1551744000000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Mic Stand", - "UnitAmount": 30.00, - "TaxType": "OUTPUT2", - "TaxAmount": 4.50, - "LineAmount": 30.00, - "AccountCode": "200", - "Tracking": [], - "Quantity": 1.0000, - "ValidationErrors": [] - } - ], - "SubTotal": 30.00, - "TotalTax": 4.50, - "Total": 34.50, - "UpdatedDateUTC": "/Date(1551812346157+0000)/", - "CurrencyCode": "NZD" - } - ] - } - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: updateCreditNote - summary: Updates a specific credit note - x-hasAccountingValidationError: true - x-example: - - currDate: - is_date: true - key: currDate - keyPascal: CurrDate - keySnake: curr_date - java_datatype: LocalDate - default: "LocalDate.now()" - java: "LocalDate.now()" - csharp: "DateTime.Now" - node: "'2020-12-10'" - php: "new DateTime('2020-12-10')" - python: "dateutil.parser.parse('2020-12-03T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - contact: - is_object: true - key: contact - keyPascal: Contact - - contactID: - is_last: true - is_uuid: true - key: contactID - keyPascal: ContactID - keySnake: contact_id - default: 00000000-0000-0000-0000-000000000000 - object: contact - - lineItem: - is_object: true - key: lineItem - keyPascal: LineItem - keySnake: line_item - - description: - key: description - keyPascal: Description - default: Foobar - object: lineItem - - quantity: - nonString: true - key: quantity - keyPascal: Quantity - default: 1.0 - is_money: true - object: lineItem - - unitAmount: - nonString: true - key: unitAmount - keyPascal: UnitAmount - keySnake: unit_amount - default: 20.0 - is_money: true - object: lineItem - - accountCode: - is_last: true - key: accountCode - keyPascal: AccountCode - keySnake: account_code - default: "000" - object: lineItem - - line_items: - is_list: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - csharp: LineItem - java: LineItem - - add_lineitems: - is_last: true - is_list_add: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - java: LineItems - python: line_item - ruby: line_item - csharp: LineItem - object: lineItem - - creditNote: - is_object: true - key: creditNote - keyPascal: CreditNote - keySnake: credit_note - - type: - nonString: true - key: type - keyPascal: Type - default: ACCPAYCREDIT - php: XeroAPI\XeroPHP\Models\Accounting\CreditNote::TYPE_ACCPAYCREDIT - node: CreditNote.TypeEnum.ACCPAYCREDIT - ruby: XeroRuby::Accounting::CreditNote::ACCPAYCREDIT - python_string: ACCPAYCREDIT - java: com.xero.models.accounting.CreditNote.TypeEnum.ACCPAYCREDIT - csharp: CreditNote.TypeEnum.ACCPAYCREDIT - object: creditNote - - status: - nonString: true - key: status - keyPascal: Status - default: AUTHORISED - php: XeroAPI\XeroPHP\Models\Accounting\CreditNote::STATUS_AUTHORISED - node: CreditNote.StatusEnum.AUTHORISED - ruby: XeroRuby::Accounting::CreditNote::AUTHORISED - python_string: AUTHORISED - java: com.xero.models.accounting.CreditNote.StatusEnum.AUTHORISED - csharp: CreditNote.StatusEnum.AUTHORISED - object: creditNote - - reference: - key: reference - keyPascal: Reference - default: My ref. - object: creditNote - - set_contact: - is_variable: true - nonString: true - key: contact - keyPascal: Contact - default: contact - object: creditNote - - date: - is_variable: true - nonString: true - key: date - keyPascal: Date - default: currDate - python: curr_date - ruby: curr_date - object: creditNote - - set_lineitem: - is_last: true - is_variable: true - nonString: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - default: lineItems - python: line_items - ruby: line_items - object: creditNote - - creditNotes: - is_object: true - key: creditNotes - keyPascal: CreditNotes - - add_creditNote: - is_last: true - is_array_add: true - key: creditNotes - keyPascal: CreditNotes - keySnake: credit_notes - java: CreditNotes - python: credit_note - ruby: credit_note - csharp: CreditNote - object: creditNote - parameters: - - $ref: '#/components/parameters/CreditNoteID' - - $ref: '#/components/parameters/unitdp' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Credit Notes array with updated CreditNote - content: - application/json: - schema: - $ref: '#/components/schemas/CreditNotes' - example: { - "Id": "db2f7659-6044-418d-a4c6-d4b93eba4e1e", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1551812704253)/", - "CreditNotes": [ - { - "CreditNoteID": "f9256f04-5a99-4680-acb9-6b4639cc439a", - "CreditNoteNumber": "", - "Payments": [], - "ID": "f9256f04-5a99-4680-acb9-6b4639cc439a", - "CurrencyRate": 1.000000, - "Type": "ACCPAYCREDIT", - "Reference": "HelloWorld", - "RemainingCredit": 46.00, - "Allocations": [], - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "ContactStatus": "ACTIVE", - "Name": "Liam Gallagher", - "FirstName": "Liam", - "LastName": "Gallagher", - "EmailAddress": "liam@rockstar.com", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "", - "AttentionTo": "" - }, - { - "AddressType": "POBOX", - "City": "Anytown", - "Region": "NY", - "PostalCode": "10101", - "Country": "USA", - "AttentionTo": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "222-2222", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "333-2233", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "444-3433", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1551747281053+0000)/", - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2019-01-05T00:00:00", - "Date": "/Date(1546646400000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Foobar", - "UnitAmount": 20.00, - "TaxType": "INPUT2", - "TaxAmount": 6.00, - "LineAmount": 40.00, - "AccountCode": "400", - "Tracking": [], - "Quantity": 2.0000, - "ValidationErrors": [] - } - ], - "SubTotal": 40.00, - "TotalTax": 6.00, - "Total": 46.00, - "UpdatedDateUTC": "/Date(1551812704223+0000)/", - "CurrencyCode": "NZD" - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - description: an array of Credit Notes containing credit note details to update - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CreditNotes' - example: { - "CreditNotes": [ - { - "Type": "ACCPAYCREDIT", - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8" - }, - "Date": "2019-01-05", - "Status": "AUTHORISED", - "Reference": "HelloWorld", - "SentToContact": true, - "LineItems": [ - { - "Description": "Foobar", - "Quantity": 2, - "UnitAmount": 20, - "AccountCode": "400" - } - ] - } - ] - } - '/CreditNotes/{CreditNoteID}/Attachments': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getCreditNoteAttachments - summary: Retrieves attachments for a specific credit notes - parameters: - - $ref: '#/components/parameters/CreditNoteID' - responses: - '200': - description: Success - return response of type Attachments array with all Attachment for specific Credit Note - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "2bb15054-3868-4f85-a9c6-0402ec8c1201", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1551822670731)/", - "Attachments": [ - { - "AttachmentID": "b7eb1fc9-a0f9-4e8e-9373-6689f5350832", - "FileName": "HelloWorld.png", - "Url": "https://api.xero.com/api.xro/2.0/CreditNotes/249f15fa-f2a7-4acc-8769-0984103f2225/Attachments/HelloWorld.png", - "MimeType": "image/png", - "ContentLength": 76091 - } - ] - } - '/CreditNotes/{CreditNoteID}/Attachments/{AttachmentID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getCreditNoteAttachmentById - summary: Retrieves a specific attachment from a specific credit note using a unique attachment Id - parameters: - - $ref: '#/components/parameters/CreditNoteID' - - $ref: '#/components/parameters/AttachmentID' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of attachment for Credit Note as binary data - content: - application/octet-stream: - schema: - type: string - format: binary - '/CreditNotes/{CreditNoteID}/Attachments/{FileName}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getCreditNoteAttachmentByFileName - summary: Retrieves a specific attachment on a specific credit note by file name - parameters: - - $ref: '#/components/parameters/CreditNoteID' - - $ref: '#/components/parameters/FileName' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of attachment for Credit Note as binary data - content: - application/octet-stream: - schema: - type: string - format: binary - post: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: updateCreditNoteAttachmentByFileName - x-hasAccountingValidationError: true - summary: Updates attachments on a specific credit note by file name - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/CreditNoteID' - - $ref: '#/components/parameters/FileName' - responses: - '200': - description: Success - return response of type Attachments array with updated Attachment for specific Credit Note - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "27253066-8c4d-4e34-a251-7a749b72de40", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1551828247939)/", - "Attachments": [ - { - "AttachmentID": "103e49f1-e47c-4b4d-b5e8-77d9d00fa70a", - "FileName": "HelloWorld.jpg", - "Url": "https://api.xero.com/api.xro/2.0/CreditNotes/249f15fa-f2a7-4acc-8769-0984103f2225/Attachments/HelloWorld.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - put: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: createCreditNoteAttachmentByFileName - x-hasAccountingValidationError: true - summary: Creates an attachment for a specific credit note - parameters: - - $ref: '#/components/parameters/CreditNoteID' - - $ref: '#/components/parameters/FileName' - - $ref: '#/components/parameters/includeOnline' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Attachments array with newly created Attachment for specific Credit Note - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "22a8d402-5dea-40ed-9d01-26896429f649", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1551822953320)/", - "Attachments": [ - { - "AttachmentID": "91bbae3f-5de5-4e3d-875f-8662f25897bd", - "FileName": "sample5.jpg", - "Url": "https://api.xero.com/api.xro/2.0/CreditNotes/249f15fa-f2a7-4acc-8769-0984103f2225/Attachments/sample5.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - '/CreditNotes/{CreditNoteID}/pdf': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getCreditNoteAsPdf - x-path: '/CreditNotes/{CreditNoteID}' - summary: Retrieves credit notes as PDF files - parameters: - - $ref: '#/components/parameters/CreditNoteID' - responses: - '200': - description: Success - return response of binary data from the Attachment to a Credit Note - content: - application/pdf: - schema: - type: string - format: binary - '/CreditNotes/{CreditNoteID}/Allocations': - parameters: - - $ref: '#/components/parameters/requiredHeader' - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createCreditNoteAllocation - summary: Creates allocation for a specific credit note - x-hasAccountingValidationError: true - x-example: - - currDate: - is_date: true - key: currDate - keyPascal: CurrDate - keySnake: curr_date - java_datatype: LocalDate - default: "LocalDate.now()" - java: "LocalDate.now()" - csharp: "DateTime.Now" - node: "'2020-12-10'" - php: "new DateTime('2020-12-10')" - python: "dateutil.parser.parse('2020-12-03T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - invoice: - is_object: true - key: invoice - keyPascal: Invoice - - invoiceID: - is_last: true - is_uuid: true - key: invoiceID - keyPascal: InvoiceID - default: 00000000-0000-0000-0000-000000000000 - object: invoice - - allocation: - is_object: true - key: allocation - keyPascal: Allocation - - amount: - nonString: true - key: amount - keyPascal: Amount - default: 1.0 - is_money: true - csharp: new decimal(1.0) - object: allocation - - date: - is_variable: true - nonString: true - key: date - keyPascal: Date - default: currDate - python: curr_date - ruby: curr_date - object: allocation - - set_invoice: - is_last: true - is_variable: true - nonString: true - key: invoice - keyPascal: Invoice - default: invoice - object: allocation - - allocations: - is_object: true - key: allocations - keyPascal: Allocations - - add_allocation: - is_last: true - is_array_add: true - key: allocations - keyPascal: Allocations - java: Allocations - csharp: Allocation - object: allocation - parameters: - - $ref: '#/components/parameters/CreditNoteID' - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Allocations array with newly created Allocation for specific Credit Note - content: - application/json: - schema: - $ref: '#/components/schemas/Allocations' - example: { - "Id": "73452751-6eaa-4bcb-86f5-4c013316f4cf", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1551828543255)/", - "Allocations": [ - { - "Amount": 1.00, - "Date": "/Date(1551744000000+0000)/", - "Invoice": { - "InvoiceID": "c45720a1-ade3-4a38-a064-d15489be6841", - "Payments": [], - "CreditNotes": [], - "Prepayments": [], - "Overpayments": [], - "HasErrors": false, - "IsDiscounted": false, - "LineItems": [], - "ValidationErrors": [] - }, - "CreditNote": { - "CreditNoteID": "7be578f5-63af-45c8-9b00-dcc4732baf0b", - "ID": "7be578f5-63af-45c8-9b00-dcc4732baf0b", - "LineItems": [] - }, - "ValidationErrors": [] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - description: Allocations with array of Allocation object in body of request. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Allocations' - example: { - "Allocations": [ - { - "Invoice": { - "LineItems": [], - "InvoiceID": "c45720a1-ade3-4a38-a064-d15489be6841" - }, - "Amount": 1, - "Date": "2019-03-05" - } - ] - } - '/CreditNotes/{CreditNoteID}/Allocations/{AllocationID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - delete: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: deleteCreditNoteAllocations - summary: Deletes an Allocation from a Credit Note - parameters: - - $ref: '#/components/parameters/CreditNoteID' - - $ref: '#/components/parameters/AllocationID' - responses: - '200': - description: Success - return response of type Allocation with the isDeleted flag as true - content: - application/json: - schema: - $ref: '#/components/schemas/Allocation' - example: { - "AllocationId": "2bb15054-3868-4f85-a9c6-0402ec8c1201", - "Date": "/Date(1551822670731)/", - "Invoice": [ - { - "InvoiceID": "b7eb1fc9-a0f9-4e8e-9373-6689f5350832", - } - ], - "IsDeleted": true, - } - '/CreditNotes/{CreditNoteID}/History': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getCreditNoteHistory - summary: Retrieves history records of a specific credit note - parameters: - - $ref: '#/components/parameters/CreditNoteID' - responses: - '200': - $ref: '#/components/responses/HistoryRetrieved' - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createCreditNoteHistory - summary: Retrieves history records of a specific credit note - x-hasAccountingValidationError: true - x-example: - - historyRecord: - is_object: true - key: historyRecord - keyPascal: HistoryRecord - keySnake: history_record - - Details: - is_last: true - key: details - keyPascal: Details - default: Hello World - object: historyRecord - - historyRecords: - is_object: true - key: historyRecords - keyPascal: HistoryRecords - - add_historyRecord: - is_last: true - is_array_add: true - key: historyRecords - keyPascal: HistoryRecords - keySnake: history_records - java: HistoryRecords - python: history_record - ruby: history_record - csharp: HistoryRecord - object: historyRecord - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/CreditNoteID' - responses: - '200': - $ref: '#/components/responses/HistoryRecordCreated' - '400': - $ref: '#/components/responses/400Error' - requestBody: - $ref: '#/components/requestBodies/historyRecords' - /Currencies: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.settings, accounting.settings.read] - tags: - - Accounting - operationId: getCurrencies - summary: Retrieves currencies for your Xero organisation - parameters: - - in: query - name: where - description: Filter by an any element - example: Code=="USD" - x-example-csharp: Code==\"USD\" - x-example-php: Code=="' . \XeroAPI\XeroPHP\Models\Accounting\CurrencyCode::USD . '" - x-example-ruby: Code==#{XeroRuby::Accounting::CurrencyCode::USD} - schema: - type: string - - in: query - name: order - description: Order by an any element - example: "Code ASC" - schema: - type: string - responses: - '200': - description: Success - return response of type Currencies array with all Currencies - content: - application/json: - schema: - $ref: '#/components/schemas/Currencies' - example: { - "Id": "e6803fc8-8035-4251-b3e4-39d6b2de0f4a", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552322853043)/", - "Currencies": [ - { - "Code": "NZD", - "Description": "New Zealand Dollar" - } - ] - } - put: - security: - - OAuth2: [accounting.settings] - tags: - - Accounting - operationId: createCurrency - summary: Create a new currency for a Xero organisation - parameters: - - $ref: '#/components/parameters/idempotencyKey' - x-hasAccountingValidationError: true - x-example: - - currency: - is_object: true - key: currency - keyPascal: Currency - - code: - nonString: true - key: code - keyPascal: Code - default: USD - php: XeroAPI\XeroPHP\Models\Accounting\CurrencyCode::USD - node: CurrencyCode.USD - ruby: XeroRuby::Accounting::CurrencyCode::USD - python: CurrencyCode.USD - java: com.xero.models.accounting.CurrencyCode.USD - csharp: CurrencyCode.USD - object: currency - - description: - is_last: true - key: description - keyPascal: Description - default: United States Dollar - object: currency - responses: - '200': - description: Unsupported - return response incorrect exception, API is not able to create new Currency - content: - application/json: - schema: - $ref: '#/components/schemas/Currencies' - example: { - "Currencies": [ - { - "Code": "USD", - "Description": "United States Dollar" - } - ] - } - requestBody: - required: true - description: Currency object in the body of request - content: - application/json: - schema: - $ref: '#/components/schemas/Currency' - example: { - "Code": "USD", - "Description": "United States Dollar" - } - /Employees: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.settings, accounting.settings.read] - tags: - - Accounting - operationId: getEmployees - summary: Retrieves employees used in Xero payrun - parameters: - - $ref: '#/components/parameters/ifModifiedSince' - - in: query - name: where - description: Filter by an any element - example: Status=="ACTIVE" - x-example-csharp: Status==\"ACTIVE\" - x-example-java: Status=="' + Employee.StatusEnum.ACTIVE + '" - x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Employee::STATUS_ACTIVE . '" - x-example-ruby: Status==#{XeroRuby::Accounting::Employee::ACTIVE} - schema: - type: string - - in: query - name: order - description: Order by an any element - example: LastName ASC - schema: - type: string - responses: - '200': - description: Success - return response of type Employees array with all Employee - content: - application/json: - schema: - $ref: '#/components/schemas/Employees' - example: { - "Id": "593cbccc-5cd2-4cd2-be5e-150f0843709e", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552325082775)/", - "Employees": [ - { - "EmployeeID": "972615c5-ad3d-47a0-b579-20370d374578", - "Status": "ACTIVE", - "FirstName": "Tony", - "LastName": "Stark", - "ExternalLink": { - "Url": "http://twitter.com/#!/search/Stark+Industries", - "Description": "Go to external link" - }, - "UpdatedDateUTC": "/Date(1552324681593+0000)/" - }, - { - "EmployeeID": "ad3db144-6362-459c-8c36-5d31d196e629", - "Status": "ACTIVE", - "FirstName": "Bruce", - "LastName": "Banner", - "ExternalLink": { - "Url": "http://twitter.com/#!/search/Nick+Fury", - "Description": "Go to external link" - }, - "UpdatedDateUTC": "/Date(1552325081303+0000)/" - }, - { - "EmployeeID": "e1ada26b-a10e-4065-a941-af34b53740e3", - "Status": "ACTIVE", - "FirstName": "Nick", - "LastName": "Fury", - "ExternalLink": { - "Url": "http://twitter.com/#!/search/Nick+Fury", - "Description": "Go to external link" - }, - "UpdatedDateUTC": "/Date(1552324737990+0000)/" - } - ] - } - put: - security: - - OAuth2: [accounting.settings] - tags: - - Accounting - operationId: createEmployees - summary: Creates new employees used in Xero payrun - x-hasAccountingValidationError: true - x-example: - - employee: - is_object: true - key: employee - keyPascal: Employee - - firstName: - key: firstName - keyPascal: FirstName - keySnake: first_name - default: Nick - object: employee - - lastName: - is_last: true - key: lastName - keyPascal: LastName - keySnake: last_name - default: Fury - object: employee - - employees: - is_object: true - key: employees - keyPascal: Employees - - add_employee: - is_last: true - is_array_add: true - key: employees - keyPascal: Employees - java: Employees - csharp: Employee - object: employee - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Employees array with new Employee - content: - application/json: - schema: - $ref: '#/components/schemas/Employees' - example: { - "Id": "0d6a08e7-6936-4828-a1bc-e4595e0ef778", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552324736508)/", - "Employees": [ - { - "EmployeeID": "e1ada26b-a10e-4065-a941-af34b53740e3", - "Status": "ACTIVE", - "FirstName": "Nick", - "LastName": "Fury", - "ExternalLink": { - "Url": "http://twitter.com/#!/search/Nick+Fury", - "Description": "Go to external link" - }, - "UpdatedDateUTC": "/Date(1552324736463+0000)/" - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Employees with array of Employee object in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/Employees' - example: { - "Employees": [ - { - "FirstName": "Nick", - "LastName": "Fury", - "ExternalLink": { - "Url": "http://twitter.com/#!/search/Nick+Fury" - } - } - ] - } - post: - security: - - OAuth2: [accounting.settings] - tags: - - Accounting - operationId: updateOrCreateEmployees - summary: Creates a single new employees used in Xero payrun - x-hasAccountingValidationError: true - x-example: - - employee: - is_object: true - key: employee - keyPascal: Employee - - firstName: - key: firstName - keyPascal: FirstName - keySnake: first_name - default: Nick - object: employee - - lastName: - is_last: true - key: lastName - keyPascal: LastName - keySnake: last_name - default: Fury - object: employee - - employees: - is_object: true - key: employees - keyPascal: Employees - - add_employee: - is_last: true - is_array_add: true - key: employees - keyPascal: Employees - java: Employees - csharp: Employee - object: employee - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Employees array with new Employee - content: - application/json: - schema: - $ref: '#/components/schemas/Employees' - example: { - "Id": "0d6a08e7-6936-4828-a1bc-e4595e0ef778", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552324736508)/", - "Employees": [ - { - "EmployeeID": "e1ada26b-a10e-4065-a941-af34b53740e3", - "Status": "ACTIVE", - "FirstName": "Nick", - "LastName": "Fury", - "ExternalLink": { - "Url": "http://twitter.com/#!/search/Nick+Fury", - "Description": "Go to external link" - }, - "UpdatedDateUTC": "/Date(1552324736463+0000)/" - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Employees with array of Employee object in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/Employees' - example: { - "Employees": [ - { - "FirstName": "Nick", - "LastName": "Fury", - "ExternalLink": { - "Url": "http://twitter.com/#!/search/Nick+Fury" - } - } - ] - } - '/Employees/{EmployeeID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.settings, accounting.settings.read] - tags: - - Accounting - operationId: getEmployee - summary: Retrieves a specific employee used in Xero payrun using a unique employee Id - parameters: - - $ref: '#/components/parameters/EmployeeID' - responses: - '200': - description: Success - return response of type Employees array with specified Employee - content: - application/json: - schema: - $ref: '#/components/schemas/Employees' - example: { - "Id": "417a529e-4f8d-4b1a-8816-7100245cf8b2", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552325084085)/", - "Employees": [ - { - "EmployeeID": "972615c5-ad3d-47a0-b579-20370d374578", - "Status": "ACTIVE", - "FirstName": "Tony", - "LastName": "Stark", - "ExternalLink": { - "Url": "http://twitter.com/#!/search/Stark+Industries", - "Description": "Go to external link" - }, - "UpdatedDateUTC": "/Date(1552324681593+0000)/" - } - ] - } - /ExpenseClaims: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getExpenseClaims - summary: Retrieves expense claims - parameters: - - $ref: '#/components/parameters/ifModifiedSince' - - in: query - name: where - description: Filter by an any element - example: Status=="SUBMITTED" - x-example-csharp: Status==\"SUBMITTED\" - x-example-java: Status=="' + ExpenseClaim.StatusEnum.SUBMITTED + '" - x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\ExpenseClaim::STATUS_SUBMITTED . '" - x-example-ruby: Status==#{XeroRuby::Accounting::ExpenseClaim::SUBMITTED} - schema: - type: string - - in: query - name: order - description: Order by an any element - example: "Status ASC" - schema: - type: string - responses: - '200': - description: Success - return response of type ExpenseClaims array with all ExpenseClaims - content: - application/json: - schema: - $ref: '#/components/schemas/ExpenseClaims' - example: { - "Id": "f6a8867e-af29-41ee-8f77-855f5ff214fe", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552325853538)/", - "ExpenseClaims": [ - { - "ExpenseClaimID": "646b15ab-b874-4e13-82ae-f4385b2ac4b6", - "Status": "AUTHORISED", - "UpdatedDateUTC": "/Date(1552325851767+0000)/", - "User": { - "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273", - "EmailAddress": "api@xero.com", - "FirstName": "API ", - "LastName": "Team", - "UpdatedDateUTC": "/Date(1511957179217+0000)/", - "IsSubscriber": true, - "OrganisationRole": "FINANCIALADVISER" - }, - "Receipts": [], - "Payments": [], - "Total": 40.00, - "AmountDue": 40.00, - "AmountPaid": 0.00, - "ReportingDate": "/Date(1552262400000+0000)/" - } - ] - } - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createExpenseClaims - summary: Creates expense claims - parameters: - - $ref: '#/components/parameters/idempotencyKey' - x-hasAccountingValidationError: true - x-example: - - currDate: - is_date: true - key: currDate - keyPascal: CurrDate - keySnake: curr_date - java_datatype: LocalDate - default: "LocalDate.now()" - java: "LocalDate.now()" - csharp: "DateTime.Now" - node: "'2020-12-10'" - php: "new DateTime('2020-12-10')" - python: "dateutil.parser.parse('2020-12-03T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - user: - is_object: true - key: user - keyPascal: User - - userID: - is_last: true - is_uuid: true - key: userID - keyPascal: UserID - keySnake: user_id - default: 00000000-0000-0000-0000-000000000000 - object: user - - receipt: - is_object: true - key: receipt - keyPascal: Receipt - - receiptID: - is_uuid: true - key: receiptID - keyPascal: ReceiptID - keySnake: receipt_id - default: 00000000-0000-0000-0000-000000000000 - object: receipt - - date: - is_last: true - is_variable: true - nonString: true - key: date - keyPascal: Date - default: currDate - python: curr_date - ruby: curr_date - object: receipt - - receipts: - is_list: true - key: receipts - keyPascal: Receipt - - add_receipts: - is_last: true - is_list_add: true - key: receipts - keyPascal: Receipts - object: receipt - - expenseClaim: - is_object: true - key: expenseClaim - keyPascal: ExpenseClaim - keySnake: expense_claim - - status: - nonString: true - key: status - keyPascal: Status - default: SUBMITTED - php: XeroAPI\XeroPHP\Models\Accounting\ExpenseClaim::STATUS_SUBMITTED - node: ExpenseClaim.StatusEnum.SUBMITTED - ruby: XeroRuby::Accounting::ExpenseClaim::SUBMITTED - python_string: SUBMITTED - java: com.xero.models.accounting.ExpenseClaim.StatusEnum.SUBMITTED - csharp: ExpenseClaim.StatusEnum.SUBMITTED - object: expenseClaim - - set_user: - is_variable: true - nonString: true - key: user - keyPascal: User - default: user - object: expenseClaim - - set_receipt: - is_last: true - is_variable: true - nonString: true - key: receipts - keyPascal: Receipts - default: receipts - object: expenseClaim - - expenseClaims: - is_object: true - key: expenseClaims - keyPascal: ExpenseClaims - - add_expenseClaim: - is_array_add: true - is_last: true - key: expenseClaims - keyPascal: ExpenseClaims - keySnake: expense_claims - java: ExpenseClaims - python: expense_claim - ruby: expense_claim - csharp: ExpenseClaim - object: expenseClaim - requestBody: - required: true - description: ExpenseClaims with array of ExpenseClaim object in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/ExpenseClaims' - example: { - "ExpenseClaims": [ - { - "Status": "SUBMITTED", - "User": { - "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273" - }, - "Receipts": [ - { - "Lineitems": [], - "ReceiptID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816" - } - ] - } - ] - } - responses: - '200': - description: Success - return response of type ExpenseClaims array with newly created ExpenseClaim - content: - application/json: - schema: - $ref: '#/components/schemas/ExpenseClaims' - example: { - "Id": "4a0879a6-3860-4b73-adc6-f6a0e0f68fc8", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552325850201)/", - "ExpenseClaims": [ - { - "ExpenseClaimID": "646b15ab-b874-4e13-82ae-f4385b2ac4b6", - "Status": "SUBMITTED", - "UpdatedDateUTC": "/Date(1552325850107+0000)/", - "User": { - "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273", - "EmailAddress": "api@xero.com", - "FirstName": "API ", - "LastName": "Team", - "UpdatedDateUTC": "/Date(1511957179217+0000)/", - "IsSubscriber": true, - "OrganisationRole": "FINANCIALADVISER" - }, - "Receipts": [ - { - "ReceiptID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816", - "ReceiptNumber": 1, - "Status": "SUBMITTED", - "User": { - "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273", - "EmailAddress": "api@xero.com", - "FirstName": "API ", - "LastName": "Team", - "UpdatedDateUTC": "/Date(1511957179217+0000)/", - "IsSubscriber": true, - "OrganisationRole": "FINANCIALADVISER" - }, - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "Name": "Liam Gallagher", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "Date": "/Date(1552348800000+0000)/", - "UpdatedDateUTC": "/Date(1552325848457+0000)/", - "Reference": "", - "LineAmountTypes": "NoTax", - "LineItems": [ - { - "Description": "Foobar", - "UnitAmount": 20.00, - "TaxType": "NONE", - "TaxAmount": 0.00, - "LineAmount": 40.00, - "Tracking": [], - "Quantity": 2.0000 - } - ], - "SubTotal": 40.00, - "TotalTax": 0.00, - "Total": 40.00, - "ID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816", - "HasAttachments": false - } - ], - "Payments": [], - "Total": 40.00, - "AmountDue": 40.00, - "AmountPaid": 0.00, - "StatusAttributeString": "OK" - } - ] - } - '400': - $ref: '#/components/responses/400Error' - '/ExpenseClaims/{ExpenseClaimID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getExpenseClaim - summary: Retrieves a specific expense claim using a unique expense claim Id - parameters: - - $ref: '#/components/parameters/ExpenseClaimID' - responses: - '200': - description: Success - return response of type ExpenseClaims array with specified ExpenseClaim - content: - application/json: - schema: - $ref: '#/components/schemas/ExpenseClaims' - example: { - "Id": "b54bb45d-37da-4f53-9f1d-536302d6bad7", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552325854864)/", - "ExpenseClaims": [ - { - "ExpenseClaimID": "646b15ab-b874-4e13-82ae-f4385b2ac4b6", - "Status": "AUTHORISED", - "UpdatedDateUTC": "/Date(1552325851767+0000)/", - "User": { - "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273", - "EmailAddress": "api@xero.com", - "FirstName": "API ", - "LastName": "Team", - "UpdatedDateUTC": "/Date(1511957179217+0000)/", - "IsSubscriber": true, - "OrganisationRole": "FINANCIALADVISER" - }, - "Receipts": [ - { - "ReceiptID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816", - "ReceiptNumber": 1, - "Status": "AUTHORISED", - "User": { - "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273", - "EmailAddress": "api@xero.com", - "FirstName": "API ", - "LastName": "Team", - "UpdatedDateUTC": "/Date(1511957179217+0000)/", - "IsSubscriber": true, - "OrganisationRole": "FINANCIALADVISER" - }, - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "Name": "Liam Gallagher", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "Date": "/Date(1552348800000+0000)/", - "UpdatedDateUTC": "/Date(1552325848457+0000)/", - "Reference": "", - "LineAmountTypes": "NoTax", - "LineItems": [ - { - "Description": "Foobar", - "UnitAmount": 20.00, - "TaxType": "NONE", - "TaxAmount": 0.00, - "LineAmount": 40.00, - "AccountCode": "400", - "Tracking": [], - "Quantity": 2.0000 - } - ], - "SubTotal": 40.00, - "TotalTax": 0.00, - "Total": 40.00, - "ID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816", - "HasAttachments": false - } - ], - "Payments": [], - "Total": 40.00, - "AmountDue": 40.00, - "AmountPaid": 0.00, - "ReportingDate": "/Date(1552262400000+0000)/" - } - ] - } - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: updateExpenseClaim - summary: Updates a specific expense claims - x-hasAccountingValidationError: true - x-example: - - currDate: - is_date: true - key: currDate - keyPascal: CurrDate - keySnake: curr_date - java_datatype: LocalDate - default: "LocalDate.now()" - java: "LocalDate.now()" - csharp: "DateTime.Now" - node: "'2020-12-10'" - php: "new DateTime('2020-12-10')" - python: "dateutil.parser.parse('2020-12-03T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - user: - is_object: true - key: user - keyPascal: User - - userID: - is_last: true - is_uuid: true - key: userID - keyPascal: UserID - keySnake: user_id - default: 00000000-0000-0000-0000-000000000000 - object: user - - receipt: - is_object: true - key: receipt - keyPascal: Receipt - - receiptID: - is_uuid: true - key: receiptID - keyPascal: ReceiptID - keySnake: receipt_id - default: 00000000-0000-0000-0000-000000000000 - object: receipt - - date: - is_last: true - is_variable: true - nonString: true - key: date - keyPascal: Date - default: currDate - python: curr_date - ruby: curr_date - object: receipt - - receipts: - is_list: true - key: receipts - keyPascal: Receipt - - add_receipts: - is_last: true - is_list_add: true - key: receipts - keyPascal: Receipts - object: receipt - - expenseClaim: - is_object: true - key: expenseClaim - keyPascal: ExpenseClaim - keySnake: expense_claim - - status: - nonString: true - key: status - keyPascal: Status - default: SUBMITTED - php: XeroAPI\XeroPHP\Models\Accounting\ExpenseClaim::STATUS_SUBMITTED - node: ExpenseClaim.StatusEnum.SUBMITTED - ruby: XeroRuby::Accounting::ExpenseClaim::SUBMITTED - python_string: SUBMITTED - java: com.xero.models.accounting.ExpenseClaim.StatusEnum.SUBMITTED - csharp: ExpenseClaim.StatusEnum.SUBMITTED - object: expenseClaim - - set_user: - is_variable: true - nonString: true - key: user - keyPascal: User - default: user - object: expenseClaim - - set_receipt: - is_last: true - is_variable: true - nonString: true - key: receipts - keyPascal: Receipts - default: receipts - object: expenseClaim - - expenseClaims: - is_object: true - key: expenseClaims - keyPascal: ExpenseClaims - - add_expenseClaim: - is_array_add: true - is_last: true - key: expenseClaims - keyPascal: ExpenseClaims - keySnake: expense_claims - java: ExpenseClaims - python: expense_claim - ruby: expense_claim - csharp: ExpenseClaim - object: expenseClaim - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/ExpenseClaimID' - responses: - '200': - description: Success - return response of type ExpenseClaims array with updated ExpenseClaim - content: - application/json: - schema: - $ref: '#/components/schemas/ExpenseClaims' - example: { - "Id": "8ee87f9c-058b-4f1b-b5b2-29569bf055d7", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552325851907)/", - "ExpenseClaims": [ - { - "ExpenseClaimID": "646b15ab-b874-4e13-82ae-f4385b2ac4b6", - "Status": "AUTHORISED", - "UpdatedDateUTC": "/Date(1552325851767+0000)/", - "User": { - "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273", - "EmailAddress": "api@xero.com", - "FirstName": "API ", - "LastName": "Team", - "UpdatedDateUTC": "/Date(1511957179217+0000)/", - "IsSubscriber": true, - "OrganisationRole": "FINANCIALADVISER" - }, - "Receipts": [ - { - "ReceiptID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816", - "ReceiptNumber": 1, - "Status": "AUTHORISED", - "User": { - "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273", - "EmailAddress": "api@xero.com", - "FirstName": "API ", - "LastName": "Team", - "UpdatedDateUTC": "/Date(1511957179217+0000)/", - "IsSubscriber": true, - "OrganisationRole": "FINANCIALADVISER" - }, - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "Name": "Liam Gallagher", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "Date": "/Date(1552348800000+0000)/", - "UpdatedDateUTC": "/Date(1552325848457+0000)/", - "Reference": "", - "LineAmountTypes": "NoTax", - "LineItems": [ - { - "Description": "Foobar", - "UnitAmount": 20.00, - "TaxType": "NONE", - "TaxAmount": 0.00, - "LineAmount": 40.00, - "AccountCode": "400", - "Tracking": [], - "Quantity": 2.0000 - } - ], - "SubTotal": 40.00, - "TotalTax": 0.00, - "Total": 40.00, - "ID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816", - "HasAttachments": false - } - ], - "Payments": [], - "Total": 40.00, - "AmountDue": 40.00, - "AmountPaid": 0.00, - "ReportingDate": "/Date(1552262400000+0000)/" - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ExpenseClaims' - example: { - "ExpenseClaims": [ - { - "Status": "SUBMITTED", - "User": { - "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273" - }, - "Receipts": [ - { - "Lineitems": [], - "ReceiptID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816" - } - ] - } - ] - } - '/ExpenseClaims/{ExpenseClaimID}/History': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getExpenseClaimHistory - summary: Retrieves history records of a specific expense claim - parameters: - - $ref: '#/components/parameters/ExpenseClaimID' - responses: - '200': - $ref: '#/components/responses/HistoryRetrieved' - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createExpenseClaimHistory - summary: Creates a history record for a specific expense claim - x-hasAccountingValidationError: true - x-example: - - historyRecord: - is_object: true - key: historyRecord - keyPascal: HistoryRecord - keySnake: history_record - - Details: - is_last: true - key: details - keyPascal: Details - default: Hello World - object: historyRecord - - historyRecords: - is_object: true - key: historyRecords - keyPascal: HistoryRecords - - add_historyRecord: - is_last: true - is_array_add: true - key: historyRecords - keyPascal: HistoryRecords - keySnake: history_records - java: HistoryRecords - python: history_record - ruby: history_record - csharp: HistoryRecord - object: historyRecord - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/ExpenseClaimID' - responses: - '200': - $ref: '#/components/responses/HistoryRecordCreated' - requestBody: - $ref: '#/components/requestBodies/historyRecords' - /Invoices: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getInvoices - summary: Retrieves sales invoices or purchase bills - parameters: - - $ref: '#/components/parameters/ifModifiedSince' - - in: query - name: where - description: Filter by an any element - example: Status=="DRAFT" - x-example-java: Status=="' + Invoice.StatusEnum.DRAFT + '" - x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Invoice::STATUS_DRAFT . '" - x-example-ruby: Status==#{XeroRuby::Accounting::Invoice::DRAFT} - x-example-csharp: Status==\"DRAFT\" - schema: - type: string - - in: query - name: order - description: Order by an any element - example: "InvoiceNumber ASC" - schema: - type: string - - in: query - name: IDs - x-snake: ids - description: Filter by a comma-separated list of InvoicesIDs. - style: form - explode: false - example: '"00000000-0000-0000-0000-000000000000"' - x-example-java: Arrays.asList(UUID.fromString("00000000-0000-0000-0000-000000000000")) - x-example-php: '"00000000-0000-0000-0000-000000000000"' - x-example-csharp: new List<Guid>{Guid.Parse("00000000-0000-0000-0000-000000000000")}; - schema: - type: array - items: - type: string - format: uuid - - in: query - name: InvoiceNumbers - x-snake: invoice_numbers - description: Filter by a comma-separated list of InvoiceNumbers. - style: form - explode: false - example: '"INV-001", "INV-002"' - x-example-java: Arrays.asList("INV-001","INV-002") - x-example-php: '"INV-001", "INV-002"' - x-example-csharp: new List<string>{"INV-001","INV-002"}; - schema: - type: array - items: - type: string - - in: query - name: ContactIDs - x-snake: contact_ids - description: Filter by a comma-separated list of ContactIDs. - style: form - explode: false - example: '"00000000-0000-0000-0000-000000000000"' - x-example-java: Arrays.asList(UUID.fromString("00000000-0000-0000-0000-000000000000")) - x-example-php: '"00000000-0000-0000-0000-000000000000"' - x-example-csharp: new List<Guid>{Guid.Parse("00000000-0000-0000-0000-000000000000")}; - schema: - type: array - items: - type: string - format: uuid - - in: query - name: Statuses - x-snake: statuses - description: Filter by a comma-separated list Statuses. For faster response times we recommend using these explicit parameters instead of passing OR conditions into the Where filter. - explode: false - example: '"DRAFT", "SUBMITTED"' - x-example-java: Arrays.asList("DRAFT","SUBMITTED") - x-example-php: '"DRAFT", "SUBMITTED"' - x-example-csharp: new List<string>{"DRAFT","SUBMITTED"}; - schema: - type: array - items: - type: string - - in: query - name: page - description: e.g. page=1 – Up to 100 invoices will be returned in a single API call with line items shown for each invoice - example: 1 - schema: - type: integer - - in: query - name: includeArchived - x-snake: include_archived - description: e.g. includeArchived=true - Invoices with a status of ARCHIVED will be included in the response - example: true - x-example-python: "True" - schema: - type: boolean - - in: query - name: createdByMyApp - x-snake: created_by_my_app - description: When set to true you'll only retrieve Invoices created by your app - example: false - x-example-python: "False" - schema: - type: boolean - - $ref: '#/components/parameters/unitdp' - - $ref: '#/components/parameters/summaryOnly' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/searchTerm' - responses: - '200': - description: Success - return response of type Invoices array with all Invoices - content: - application/json: - schema: - $ref: '#/components/schemas/Invoices' - example: { - "Id": "900c500b-e83c-4ce2-902a-b8ba04751748", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552326816230)/", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 3 - }, - "Invoices": [ - { - "Type": "ACCREC", - "InvoiceID": "d4956132-ed94-4dd7-9eaa-aa22dfdf06f2", - "InvoiceNumber": "INV-0001", - "Reference": "Red Fish, Blue Fish", - "Payments": [], - "CreditNotes": [], - "Prepayments": [], - "Overpayments": [], - "AmountDue": 0.00, - "AmountPaid": 0.00, - "AmountCredited": 0.00, - "SentToContact": true, - "CurrencyRate": 1.000000, - "HasErrors": false, - "IsDiscounted": false, - "HasAttachments": false, - "RepeatingInvoiceID": "428c0d75-909f-4b04-8403-a48dc27283b0", - "Contact": { - "ContactID": "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7", - "Name": "Barney Rubble-83203", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2018-10-20T00:00:00", - "Date": "/Date(1539993600000+0000)/", - "DueDateString": "2018-12-30T00:00:00", - "DueDate": "/Date(1546128000000+0000)/", - "Status": "VOIDED", - "LineAmountTypes": "Exclusive", - "LineItems": [], - "SubTotal": 40.00, - "TotalTax": 0.00, - "Total": 40.00, - "UpdatedDateUTC": "/Date(1541176290160+0000)/", - "CurrencyCode": "NZD" - }, - { - "Type": "ACCREC", - "InvoiceID": "046d8a6d-1ae1-4b4d-9340-5601bdf41b87", - "InvoiceNumber": "INV-0002", - "Reference": "Red Fish, Blue Fish", - "Payments": [ - { - "PaymentID": "99ea7f6b-c513-4066-bc27-b7c65dcd76c2", - "Date": "/Date(1543449600000+0000)/", - "Amount": 46.00, - "CurrencyRate": 1.000000, - "HasAccount": false, - "HasValidationErrors": false - } - ], - "CreditNotes": [], - "Prepayments": [], - "Overpayments": [], - "AmountDue": 0.00, - "AmountPaid": 46.00, - "AmountCredited": 0.00, - "SentToContact": true, - "CurrencyRate": 1.000000, - "HasErrors": false, - "IsDiscounted": false, - "HasAttachments": false, - "Contact": { - "ContactID": "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7", - "Name": "Barney Rubble-83203", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2018-10-20T00:00:00", - "Date": "/Date(1539993600000+0000)/", - "DueDateString": "2018-12-30T00:00:00", - "DueDate": "/Date(1546128000000+0000)/", - "Status": "PAID", - "LineAmountTypes": "Exclusive", - "LineItems": [], - "SubTotal": 40.00, - "TotalTax": 6.00, - "Total": 46.00, - "UpdatedDateUTC": "/Date(1541176592690+0000)/", - "CurrencyCode": "NZD", - "FullyPaidOnDate": "/Date(1543449600000+0000)/" - }, - { - "Type": "ACCREC", - "InvoiceID": "7ef31b20-de17-4312-8382-412f869b1510", - "InvoiceNumber": "INV-0003", - "Reference": "", - "Payments": [], - "CreditNotes": [], - "Prepayments": [], - "Overpayments": [], - "AmountDue": 115.00, - "AmountPaid": 0.00, - "AmountCredited": 0.00, - "CurrencyRate": 1.000000, - "HasErrors": false, - "IsDiscounted": false, - "HasAttachments": false, - "Contact": { - "ContactID": "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7", - "Name": "Barney Rubble-83203", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2018-11-02T00:00:00", - "Date": "/Date(1541116800000+0000)/", - "DueDateString": "2018-11-07T00:00:00", - "DueDate": "/Date(1541548800000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "Exclusive", - "LineItems": [], - "SubTotal": 100.00, - "TotalTax": 15.00, - "Total": 115.00, - "UpdatedDateUTC": "/Date(1541176648927+0000)/", - "CurrencyCode": "NZD" - } - ] - } - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createInvoices - summary: Creates one or more sales invoices or purchase bills - x-hasAccountingValidationError: true - x-example: - - dateValue: - is_date: true - key: dateValue - keyPascal: Date - keySnake: date_value - java_datatype: LocalDate - default: "LocalDate.of(2020, Month.OCTOBER, 10)" - java: "LocalDate.of(2020, Month.OCTOBER, 10)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-10')" - node: "'2020-10-10'" - python: "dateutil.parser.parse('2020-10-10T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - dueDateValue: - is_date: true - key: dueDateValue - keyPascal: Date - keySnake: due_date_value - java_datatype: LocalDate - csharp_datatype: DateTime - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - contact: - is_object: true - key: contact - keyPascal: Contact - - contactID: - is_last: true - is_uuid: true - key: contactID - keyPascal: ContactID - keySnake: contact_id - default: 00000000-0000-0000-0000-000000000000 - object: contact - - lineItemTracking: - is_object: true - key: lineItemTracking - keyPascal: LineItemTracking - keySnake: line_item_tracking - - trackingCategoryId: - is_uuid: true - key: trackingCategoryID - keyPascal: TrackingCategoryID - keySnake: tracking_category_id - default: 00000000-0000-0000-0000-000000000000 - object: lineItemTracking - - trackingOptionID: - is_last: true - is_uuid: true - key: trackingOptionID - keyPascal: TrackingOptionID - keySnake: tracking_option_id - default: 00000000-0000-0000-0000-000000000000 - object: lineItemTracking - - lineItemTrackings: - is_list: true - key: lineItemTrackings - keyPascal: LineItemTracking - keySnake: line_item_trackings - - add_lineitemtrackings: - is_last: true - is_list_add: true - key: lineItemTrackings - keyPascal: LineItemTrackings - keySnake: line_item_trackings - python: line_item_tracking - ruby: line_item_tracking - object: lineItemTracking - - lineItem: - is_object: true - key: lineItem - keyPascal: LineItem - keySnake: line_item - - description: - key: description - keyPascal: Description - default: Foobar - object: lineItem - - quantity: - nonString: true - key: quantity - keyPascal: Quantity - default: 1.0 - is_money: true - object: lineItem - - unitAmount: - nonString: true - key: unitAmount - keyPascal: UnitAmount - keySnake: unit_amount - default: 20.0 - is_money: true - object: lineItem - - accountCode: - key: accountCode - keyPascal: AccountCode - keySnake: account_code - default: "000" - object: lineItem - - tracking: - is_last: true - nonString: true - key: tracking - keyPascal: Tracking - default: lineItemTrackings - object: lineItem - - line_items: - is_list: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - csharp: LineItem - java: LineItem - - add_lineitems: - is_last: true - is_list_add: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - java: LineItems - python: line_item - ruby: line_item - csharp: LineItem - object: lineItem - - invoice: - is_object: true - key: invoice - keyPascal: Invoice - - type: - nonString: true - key: type - keyPascal: Type - default: ACCREC - php: XeroAPI\XeroPHP\Models\Accounting\Invoice::TYPE_ACCREC - node: Invoice.TypeEnum.ACCREC - ruby: XeroRuby::Accounting::Invoice::ACCREC - python_string: ACCREC - java: com.xero.models.accounting.Invoice.TypeEnum.ACCREC - csharp: Invoice.TypeEnum.ACCREC - object: invoice - - set_contact: - is_variable: true - nonString: true - key: contact - keyPascal: Contact - default: contact - object: invoice - - date: - is_variable: true - nonString: true - key: date - keyPascal: Date - default: dateValue - python: date_value - ruby: date_value - object: invoice - - dueDate: - is_variable: true - nonString: true - key: dueDate - keyPascal: DueDate - keySnake: due_date - default: dueDateValue - python: due_date_value - ruby: due_date_value - object: invoice - - set_lineitem: - is_variable: true - nonString: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - default: lineItems - python: line_items - ruby: line_items - object: invoice - - reference: - key: reference - keyPascal: Reference - default: Website Design - object: invoice - - status: - is_last: true - nonString: true - key: status - keyPascal: Status - default: DRAFT - php: XeroAPI\XeroPHP\Models\Accounting\Invoice::STATUS_DRAFT - node: Invoice.StatusEnum.DRAFT - ruby: XeroRuby::Accounting::Invoice::DRAFT - python_string: DRAFT - java: com.xero.models.accounting.Invoice.StatusEnum.DRAFT - csharp: Invoice.StatusEnum.DRAFT - object: invoice - - invoices: - is_object: true - key: invoices - keyPascal: Invoices - - add_invoice: - is_last: true - is_array_add: true - key: invoices - keyPascal: Invoices - java: Invoices - csharp: Invoice - object: invoice - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/unitdp' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Invoices array with newly created Invoice - content: - application/json: - schema: - $ref: '#/components/schemas/Invoices' - example: { - "Id": "ccece84a-075c-4fcd-9073-149d4f7a91cf", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552327126164)/", - "Invoices": [ - { - "Type": "ACCREC", - "InvoiceID": "ed255415-e141-4150-aab7-89c3bbbb851c", - "InvoiceNumber": "INV-0007", - "Reference": "Website Design", - "Prepayments": [], - "Overpayments": [], - "AmountDue": 40.00, - "AmountPaid": 0.00, - "SentToContact": false, - "CurrencyRate": 1.000000, - "HasErrors": false, - "IsDiscounted": false, - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "ContactStatus": "ACTIVE", - "Name": "Liam Gallagher", - "FirstName": "Liam", - "LastName": "Gallagher", - "EmailAddress": "liam@rockstar.com", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "", - "AttentionTo": "" - }, - { - "AddressType": "POBOX", - "City": "Anytown", - "Region": "NY", - "PostalCode": "10101", - "Country": "USA", - "AttentionTo": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "222-2222", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "333-2233", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "444-3433", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1551747281053+0000)/", - "ContactGroups": [ - { - "ContactGroupID": "17b44ed7-4389-4162-91cb-3dd5766e4e22", - "Name": "Oasis", - "Status": "ACTIVE", - "Contacts": [], - "HasValidationErrors": false - } - ], - "IsSupplier": true, - "IsCustomer": true, - "SalesTrackingCategories": [], - "PurchasesTrackingCategories": [], - "ContactPersons": [ - { - "FirstName": "Debbie", - "LastName": "Gwyther", - "EmailAddress": "debbie@rockstar.com", - "IncludeInEmails": false - } - ], - "HasValidationErrors": false - }, - "DateString": "2019-03-11T00:00:00", - "Date": "/Date(1552262400000+0000)/", - "DueDateString": "2018-12-10T00:00:00", - "DueDate": "/Date(1544400000000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Acme Tires", - "UnitAmount": 20.00, - "TaxType": "NONE", - "TaxAmount": 0.00, - "LineAmount": 40.00, - "AccountCode": "200", - "Tracking": [], - "Quantity": 2.0000, - "LineItemID": "5f7a612b-fdcc-4d33-90fa-a9f6bc6db32f", - "ValidationErrors": [] - } - ], - "SubTotal": 40.00, - "TotalTax": 0.00, - "Total": 40.00, - "UpdatedDateUTC": "/Date(1552327126117+0000)/", - "CurrencyCode": "NZD", - "StatusAttributeString": "OK" - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Invoices with an array of invoice objects in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/Invoices' - example: { - "Invoices": [ - { - "Type": "ACCREC", - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8" - }, - "LineItems": [ - { - "Description": "Acme Tires", - "Quantity": 2, - "UnitAmount": 20, - "AccountCode": "200", - "TaxType": "NONE", - "LineAmount": 40 - } - ], - "Date": "2019-03-11", - "DueDate": "2018-12-10", - "Reference": "Website Design", - "Status": "AUTHORISED" - } - ] - } - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: updateOrCreateInvoices - summary: Updates or creates one or more sales invoices or purchase bills - x-hasAccountingValidationError: true - x-example: - - dateValue: - is_date: true - key: dateValue - keyPascal: Date - keySnake: date_value - java_datatype: LocalDate - default: "LocalDate.of(2020, Month.OCTOBER, 10)" - java: "LocalDate.of(2020, Month.OCTOBER, 10)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-10')" - node: "'2020-10-10'" - python: "dateutil.parser.parse('2020-10-10T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - dueDateValue: - is_date: true - key: dueDateValue - keyPascal: Date - keySnake: due_date_value - java_datatype: LocalDate - default: "LocalDate.of(2020, Month.OCTOBER, 28)" - java: "LocalDate.of(2020, Month.OCTOBER, 28)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-28')" - node: "'2020-10-28'" - python: "dateutil.parser.parse('2020-10-28T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - contact: - is_object: true - key: contact - keyPascal: Contact - - contactID: - is_last: true - is_uuid: true - key: contactID - keyPascal: ContactID - keySnake: contact_id - default: 00000000-0000-0000-0000-000000000000 - object: contact - - lineItem: - is_object: true - key: lineItem - keyPascal: LineItem - keySnake: line_item - - description: - key: description - keyPascal: Description - default: Foobar - object: lineItem - - quantity: - nonString: true - key: quantity - keyPascal: Quantity - default: 1.0 - is_money: true - object: lineItem - - unitAmount: - nonString: true - key: unitAmount - keyPascal: UnitAmount - keySnake: unit_amount - default: 20.0 - is_money: true - object: lineItem - - accountCode: - is_last: true - key: accountCode - keyPascal: AccountCode - keySnake: account_code - default: "000" - object: lineItem - - line_items: - is_list: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - csharp: LineItem - java: LineItem - - add_lineitems: - is_last: true - is_list_add: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - java: LineItems - python: line_item - ruby: line_item - csharp: LineItem - object: lineItem - - invoice: - is_object: true - key: invoice - keyPascal: Invoice - - type: - nonString: true - key: type - keyPascal: Type - default: ACCREC - php: XeroAPI\XeroPHP\Models\Accounting\Invoice::TYPE_ACCREC - node: Invoice.TypeEnum.ACCREC - ruby: XeroRuby::Accounting::Invoice::ACCREC - python_string: ACCREC - java: com.xero.models.accounting.Invoice.TypeEnum.ACCREC - csharp: Invoice.TypeEnum.ACCREC - object: invoice - - set_contact: - is_variable: true - nonString: true - key: contact - keyPascal: Contact - default: contact - object: invoice - - date: - is_variable: true - nonString: true - key: date - keyPascal: Date - default: dateValue - python: date_value - ruby: date_value - object: invoice - - dueDate: - is_variable: true - nonString: true - key: dueDate - keyPascal: Date - keySnake: due_date - default: dueDateValue - python: due_date_value - ruby: due_date_value - object: invoice - - set_lineitem: - is_variable: true - nonString: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - default: lineItems - python: line_items - ruby: line_items - object: invoice - - reference: - key: reference - keyPascal: Reference - default: Website Design - object: invoice - - status: - is_last: true - nonString: true - key: status - keyPascal: Status - default: DRAFT - php: XeroAPI\XeroPHP\Models\Accounting\Invoice::STATUS_DRAFT - node: Invoice.StatusEnum.DRAFT - ruby: XeroRuby::Accounting::Invoice::DRAFT - python_string: DRAFT - java: com.xero.models.accounting.Invoice.StatusEnum.DRAFT - csharp: Invoice.StatusEnum.DRAFT - object: invoice - - invoices: - is_object: true - key: invoices - keyPascal: Invoices - - add_invoice: - is_last: true - is_array_add: true - key: invoices - keyPascal: Invoices - java: Invoices - csharp: Invoice - object: invoice - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/unitdp' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Invoices array with newly created Invoice - content: - application/json: - schema: - $ref: '#/components/schemas/Invoices' - example: { - "Id": "ccece84a-075c-4fcd-9073-149d4f7a91cf", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552327126164)/", - "Invoices": [ - { - "Type": "ACCREC", - "InvoiceID": "ed255415-e141-4150-aab7-89c3bbbb851c", - "InvoiceNumber": "INV-0007", - "Reference": "Website Design", - "Prepayments": [], - "Overpayments": [], - "AmountDue": 40.00, - "AmountPaid": 0.00, - "SentToContact": false, - "CurrencyRate": 1.000000, - "HasErrors": false, - "IsDiscounted": false, - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "ContactStatus": "ACTIVE", - "Name": "Liam Gallagher", - "FirstName": "Liam", - "LastName": "Gallagher", - "EmailAddress": "liam@rockstar.com", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "", - "AttentionTo": "" - }, - { - "AddressType": "POBOX", - "City": "Anytown", - "Region": "NY", - "PostalCode": "10101", - "Country": "USA", - "AttentionTo": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "222-2222", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "333-2233", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "444-3433", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1551747281053+0000)/", - "ContactGroups": [ - { - "ContactGroupID": "17b44ed7-4389-4162-91cb-3dd5766e4e22", - "Name": "Oasis", - "Status": "ACTIVE", - "Contacts": [], - "HasValidationErrors": false - } - ], - "IsSupplier": true, - "IsCustomer": true, - "SalesTrackingCategories": [], - "PurchasesTrackingCategories": [], - "ContactPersons": [ - { - "FirstName": "Debbie", - "LastName": "Gwyther", - "EmailAddress": "debbie@rockstar.com", - "IncludeInEmails": false - } - ], - "HasValidationErrors": false - }, - "DateString": "2019-03-11T00:00:00", - "Date": "/Date(1552262400000+0000)/", - "DueDateString": "2018-12-10T00:00:00", - "DueDate": "/Date(1544400000000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Acme Tires", - "UnitAmount": 20.00, - "TaxType": "NONE", - "TaxAmount": 0.00, - "LineAmount": 40.00, - "AccountCode": "200", - "Tracking": [], - "Quantity": 2.0000, - "LineItemID": "5f7a612b-fdcc-4d33-90fa-a9f6bc6db32f", - "ValidationErrors": [] - } - ], - "SubTotal": 40.00, - "TotalTax": 0.00, - "Total": 40.00, - "UpdatedDateUTC": "/Date(1552327126117+0000)/", - "CurrencyCode": "NZD", - "StatusAttributeString": "OK" - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Invoices' - example: { - "Invoices": [ - { - "Type": "ACCREC", - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8" - }, - "LineItems": [ - { - "Description": "Acme Tires", - "Quantity": 2, - "UnitAmount": 20, - "AccountCode": "200", - "TaxType": "NONE", - "LineAmount": 40 - } - ], - "Date": "2019-03-11", - "DueDate": "2018-12-10", - "Reference": "Website Design", - "Status": "AUTHORISED" - } - ] - } - '/Invoices/{InvoiceID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getInvoice - summary: Retrieves a specific sales invoice or purchase bill using a unique invoice Id - parameters: - - $ref: '#/components/parameters/InvoiceID' - - $ref: '#/components/parameters/unitdp' - responses: - '200': - description: Success - return response of type Invoices array with specified Invoices - content: - application/json: - schema: - $ref: '#/components/schemas/Invoices' - example: { - "Id": "516f400a-b764-4c88-831b-12d2b210fa24", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1551981658323)/", - "Invoices": [ - { - "Type": "ACCREC", - "InvoiceID": "a03ffcd2-5d91-4c7e-b483-318584e9e439", - "InvoiceNumber": "INV-0006", - "Reference": "Tour", - "Payments": [ - { - "PaymentID": "38928000-e9a0-420c-8884-f624bab2a351", - "Date": "/Date(1552953600000+0000)/", - "Amount": 148062.76, - "Reference": "Yahoo", - "CurrencyRate": 1.000000, - "HasAccount": false, - "HasValidationErrors": false - } - ], - "Prepayments": [], - "Overpayments": [], - "AmountDue": 0.00, - "AmountPaid": 148062.76, - "SentToContact": false, - "CurrencyRate": 1.000000, - "HasErrors": false, - "IsDiscounted": false, - "HasAttachments": true, - "Attachments": [ - { - "AttachmentID": "3a2fe7e0-fac7-4ea2-afb2-31cedaabd294", - "FileName": "helo-heros.jpg", - "Url": "https://api.xero.com/api.xro/2.0/Invoices/a03ffcd2-5d91-4c7e-b483-318584e9e439/Attachments/helo-heros.jpg", - "MimeType": "image/jpeg", - "ContentLength": 2878711 - } - ], - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "ContactStatus": "ACTIVE", - "Name": "Liam Gallagher", - "FirstName": "Liam", - "LastName": "Gallagher", - "EmailAddress": "liam@rockstar.com", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "", - "AttentionTo": "" - }, - { - "AddressType": "POBOX", - "City": "Anytown", - "Region": "NY", - "PostalCode": "10101", - "Country": "USA", - "AttentionTo": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "222-2222", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "333-2233", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "444-3433", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1551747281053+0000)/", - "ContactGroups": [ - { - "ContactGroupID": "17b44ed7-4389-4162-91cb-3dd5766e4e22", - "Name": "Oasis", - "Status": "ACTIVE", - "Contacts": [], - "HasValidationErrors": false - } - ], - "IsSupplier": true, - "IsCustomer": true, - "SalesTrackingCategories": [], - "PurchasesTrackingCategories": [], - "ContactPersons": [ - { - "FirstName": "Debbie", - "LastName": "Gwyther", - "EmailAddress": "debbie@rockstar.com", - "IncludeInEmails": false - } - ], - "HasValidationErrors": false - }, - "DateString": "2019-03-07T00:00:00", - "Date": "/Date(1551916800000+0000)/", - "DueDateString": "2019-03-13T00:00:00", - "DueDate": "/Date(1552435200000+0000)/", - "Status": "PAID", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "ItemCode": "123", - "Description": "Guitars Fender Strat", - "UnitAmount": 148062.76, - "TaxType": "NONE", - "TaxAmount": 0.00, - "LineAmount": 148062.76, - "AccountCode": "200", - "Tracking": [], - "Quantity": 1.0000, - "LineItemID": "b18f39d9-7739-4246-9288-72afe939d2d5", - "ValidationErrors": [] - } - ], - "SubTotal": 148062.76, - "TotalTax": 0.00, - "Total": 148062.76, - "UpdatedDateUTC": "/Date(1551981568133+0000)/", - "CurrencyCode": "NZD", - "FullyPaidOnDate": "/Date(1552953600000+0000)/", - "StatusAttributeString": "ERROR", - "ValidationErrors": [ - { - "Message": "Invoice # must be unique." - } - ] - } - ] - } - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: updateInvoice - summary: Updates a specific sales invoices or purchase bills - x-hasAccountingValidationError: true - x-example: - - invoice: - is_object: true - key: invoice - keyPascal: Invoice - - reference: - is_last: true - key: reference - keyPascal: Reference - default: I am Iron man - object: invoice - - invoices: - is_object: true - key: invoices - keyPascal: Invoices - - add_invoice: - is_last: true - is_array_add: true - key: invoices - keyPascal: Invoices - java: Invoices - csharp: Invoice - object: invoice - parameters: - - $ref: '#/components/parameters/InvoiceID' - - $ref: '#/components/parameters/unitdp' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Invoices array with updated Invoice - content: - application/json: - schema: - $ref: '#/components/schemas/Invoices' - example: { - "Id": "bd83b60e-9d16-4a3b-9f59-0a2d0ccd35f2", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552329729002)/", - "Invoices": [ - { - "Type": "ACCREC", - "InvoiceID": "4074292c-09b3-456d-84e7-add864c6c39b", - "InvoiceNumber": "INV-0008", - "Reference": "My the Force be With You", - "Prepayments": [], - "Overpayments": [], - "AmountDue": 575.00, - "AmountPaid": 0.00, - "SentToContact": false, - "CurrencyRate": 1.000000, - "HasErrors": false, - "IsDiscounted": false, - "Contact": { - "ContactID": "be392c72-c121-4f83-9512-03ac71e54c20", - "ContactStatus": "ACTIVE", - "Name": "Luke Skywalker", - "EmailAddress": "", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "" - }, - { - "AddressType": "POBOX", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1552329691573+0000)/", - "ContactGroups": [], - "IsSupplier": false, - "IsCustomer": true, - "DefaultCurrency": "NZD", - "SalesTrackingCategories": [], - "PurchasesTrackingCategories": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2019-03-11T00:00:00", - "Date": "/Date(1552262400000+0000)/", - "DueDateString": "2019-03-12T00:00:00", - "DueDate": "/Date(1552348800000+0000)/", - "Status": "SUBMITTED", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Light Saber", - "UnitAmount": 500.00, - "TaxType": "OUTPUT2", - "TaxAmount": 75.00, - "LineAmount": 500.00, - "AccountCode": "200", - "Tracking": [], - "Quantity": 1.0000, - "LineItemID": "6de1bf9f-de95-4c47-9287-37305db758c9", - "ValidationErrors": [] - } - ], - "SubTotal": 500.00, - "TotalTax": 75.00, - "Total": 575.00, - "UpdatedDateUTC": "/Date(1552329728987+0000)/", - "CurrencyCode": "NZD" - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Invoices' - example: { "Invoices": [{ Reference: "May the force be with you", "InvoiceID": "00000000-0000-0000-0000-000000000000", "LineItems": [], "Contact": {}, "Type": "ACCPAY" }]} - '/Invoices/{InvoiceID}/pdf': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getInvoiceAsPdf - x-path: '/Invoices/{InvoiceID}' - summary: Retrieves invoices or purchase bills as PDF files - parameters: - - $ref: '#/components/parameters/InvoiceID' - responses: - '200': - description: Success - return response of byte array pdf version of specified Invoices - content: - application/pdf: - schema: - type: string - format: binary - '/Invoices/{InvoiceID}/Attachments': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getInvoiceAttachments - summary: Retrieves attachments for a specific invoice or purchase bill - parameters: - - $ref: '#/components/parameters/InvoiceID' - responses: - '200': - description: Success - return response of type Attachments array of Attachments for specified Invoices - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "7e357a45-69f5-4e8f-8d7b-15da8ef50aab", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552330258523)/", - "Attachments": [ - { - "AttachmentID": "9808ad7f-c8d4-41cf-995e-bc29cb76fd2c", - "FileName": "foobar.jpg", - "Url": "https://api.xero.com/api.xro/2.0/Invoices/4074292c-09b3-456d-84e7-add864c6c39b/Attachments/foobar.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - }, - { - "AttachmentID": "5a500c1a-5a02-48de-939e-1d234fd170d4", - "FileName": "sample5.jpg", - "Url": "https://api.xero.com/api.xro/2.0/Invoices/4074292c-09b3-456d-84e7-add864c6c39b/Attachments/sample5.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '/Invoices/{InvoiceID}/Attachments/{AttachmentID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getInvoiceAttachmentById - summary: Retrieves a specific attachment from a specific invoices or purchase bills by using a unique attachment Id - parameters: - - $ref: '#/components/parameters/InvoiceID' - - $ref: '#/components/parameters/AttachmentID' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of attachment for Invoice as binary data - content: - application/octet-stream: - schema: - type: string - format: binary - '/Invoices/{InvoiceID}/Attachments/{FileName}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getInvoiceAttachmentByFileName - summary: Retrieves an attachment from a specific invoice or purchase bill by filename - parameters: - - $ref: '#/components/parameters/InvoiceID' - - $ref: '#/components/parameters/FileName' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of attachment for Invoice as binary data - content: - application/octet-stream: - schema: - type: string - format: binary - post: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: updateInvoiceAttachmentByFileName - x-hasAccountingValidationError: true - summary: Updates an attachment from a specific invoices or purchase bill by filename - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/InvoiceID' - - $ref: '#/components/parameters/FileName' - responses: - '200': - description: Success - return response of type Attachments array with updated Attachment - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "acd7d618-5fef-4d45-849c-a339ea31a973", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552330524005)/", - "Attachments": [ - { - "AttachmentID": "08085449-fda3-45f4-a685-ff44c8a29ee3", - "FileName": "HelloWorld.jpg", - "Url": "https://api.xero.com/api.xro/2.0/Invoices/4074292c-09b3-456d-84e7-add864c6c39b/Attachments/HelloWorld.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - put: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: createInvoiceAttachmentByFileName - x-hasAccountingValidationError: true - summary: Creates an attachment for a specific invoice or purchase bill by filename - parameters: - - $ref: '#/components/parameters/InvoiceID' - - $ref: '#/components/parameters/FileName' - - $ref: '#/components/parameters/includeOnline' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Attachments array with newly created Attachment - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "971fbd18-c850-453a-825f-63f2fee096ee", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552330001318)/", - "Attachments": [ - { - "AttachmentID": "5a500c1a-5a02-48de-939e-1d234fd170d4", - "FileName": "sample5.jpg", - "Url": "https://api.xero.com/api.xro/2.0/Invoices/4074292c-09b3-456d-84e7-add864c6c39b/Attachments/sample5.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - '/Invoices/{InvoiceID}/OnlineInvoice': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getOnlineInvoice - summary: Retrieves a URL to an online invoice - parameters: - - $ref: '#/components/parameters/InvoiceID' - responses: - '200': - description: Success - return response of type OnlineInvoice array with one OnlineInvoice - content: - application/json: - schema: - $ref: '#/components/schemas/OnlineInvoices' - example: { - "Id": "d20705fb-fe1c-4366-835b-98de7474da3c", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552331100745)/", - "OnlineInvoices": [ - { - "OnlineInvoiceUrl": "https://in.xero.com/bCWCCfytGdTXoJam9HENWlQt07G6zcDaj4gQojHu" - } - ] - } - '/Invoices/{InvoiceID}/Email': - parameters: - - $ref: '#/components/parameters/requiredHeader' - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: emailInvoice - summary: Sends a copy of a specific invoice to related contact via email - x-hasAccountingValidationError: true - x-example: - - requestEmpty: - is_last: true - is_object: true - key: requestEmpty - keyPascal: RequestEmpty - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/InvoiceID' - responses: - '204': - description: Success - return response 204 no content - x-isEmpty: true - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/RequestEmpty' - example: {} - '/Invoices/{InvoiceID}/History': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getInvoiceHistory - summary: Retrieves history records for a specific invoice - parameters: - - $ref: '#/components/parameters/InvoiceID' - responses: - '200': - $ref: '#/components/responses/HistoryRetrieved' - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createInvoiceHistory - summary: Creates a history record for a specific invoice - x-hasAccountingValidationError: true - x-example: - - historyRecord: - is_object: true - key: historyRecord - keyPascal: HistoryRecord - keySnake: history_record - - Details: - is_last: true - key: details - keyPascal: Details - default: Hello World - object: historyRecord - - historyRecords: - is_object: true - key: historyRecords - keyPascal: HistoryRecords - - add_historyRecord: - is_last: true - is_array_add: true - key: historyRecords - keyPascal: HistoryRecords - keySnake: history_records - java: HistoryRecords - python: history_record - ruby: history_record - csharp: HistoryRecord - object: historyRecord - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/InvoiceID' - responses: - '200': - $ref: '#/components/responses/HistoryRecordCreated' - '400': - $ref: '#/components/responses/400Error' - requestBody: - $ref: '#/components/requestBodies/historyRecords' - '/InvoiceReminders/Settings': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.settings, accounting.settings.read] - tags: - - Accounting - operationId: getInvoiceReminders - summary: Retrieves invoice reminder settings - responses: - '200': - description: Success - return response of Invoice Reminders - content: - application/json: - schema: - $ref: '#/components/schemas/InvoiceReminders' - example: { - "Id": "c7cd0953-c012-4be8-b618-63ce4c2c3494", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552331430618)/", - "InvoiceReminders": [ - { - "Enabled": false - } - ] - } - /Items: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.settings, accounting.settings.read] - tags: - - Accounting - operationId: getItems - summary: Retrieves items - parameters: - - $ref: '#/components/parameters/ifModifiedSince' - - in: query - name: where - description: Filter by an any element - example: IsSold==true - schema: - type: string - - in: query - name: order - description: Order by an any element - example: "Code ASC" - schema: - type: string - - $ref: '#/components/parameters/unitdp' - responses: - '200': - description: Success - return response of type Items array with all Item - content: - application/json: - schema: - $ref: '#/components/schemas/Items' - example: { - "Id": "8487e8d7-5fb3-4f02-b949-dec8f1e38182", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552331874897)/", - "Items": [ - { - "ItemID": "c8c54d65-f3f2-452d-926e-bf450b12fb07", - "Code": "123", - "Description": "Guitars Fender Strat", - "UpdatedDateUTC": "/Date(1551981476267+0000)/", - "PurchaseDetails": {}, - "SalesDetails": { - "UnitPrice": 5000.0000, - "AccountCode": "200", - "TaxType": "OUTPUT2" - }, - "Name": "Guitars", - "IsTrackedAsInventory": false, - "IsSold": true, - "IsPurchased": false - }, - { - "ItemID": "a4544d51-48f6-441f-a623-99ecbced6ab7", - "Code": "abc65591", - "Description": "Barfoo", - "UpdatedDateUTC": "/Date(1552331873580+0000)/", - "PurchaseDetails": {}, - "SalesDetails": {}, - "Name": "Hello11350", - "IsTrackedAsInventory": false, - "IsSold": true, - "IsPurchased": true - } - ] - } - put: - security: - - OAuth2: [accounting.settings] - tags: - - Accounting - operationId: createItems - summary: Creates one or more items - x-hasAccountingValidationError: true - x-example: - - purchaseDetails: - is_object: true - key: purchaseDetails - keyPascal: Purchase - keySnake: purchase_details - - cOGSAccountCode: - is_last: true - key: cOGSAccountCode - keyPascal: CoGSAccountCode - keySnake: cogs_account_code - keyCsharp: COGSAccountCode - default: 500 - object: purchaseDetails - - item: - is_object: true - key: item - keyPascal: Item - - code: - key: code - keyPascal: Code - default: abcXYZ123 - object: item - - name: - key: name - keyPascal: Name - default: HelloWorld - object: item - - description: - key: description - keyPascal: Description - default: Foobar - object: item - - inventoryAssetAccountCode: - key: inventoryAssetAccountCode - keyPascal: InventoryAssetAccountCode - keySnake: inventory_asset_account_code - default: 140 - object: item - - set_purchaseDetails: - is_last: true - is_variable: true - nonString: true - key: purchaseDetails - keyPascal: PurchaseDetails - keySnake: purchase_details - default: purchaseDetails - python: purchase_details - ruby: purchase_details - object: item - - items: - is_object: true - key: items - keyPascal: Items - - add_item: - is_last: true - is_array_add: true - key: items - keyPascal: Items - java: Items - csharp: Item - object: item - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/unitdp' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Items array with newly created Item - content: - application/json: - schema: - $ref: '#/components/schemas/Items' - example: { - "Id": "ae7ef7c8-9024-4d42-8d59-5f26ed3f508b", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552331871904)/", - "Items": [ - { - "ItemID": "a4544d51-48f6-441f-a623-99ecbced6ab7", - "Code": "abc65591", - "Description": "foobar", - "UpdatedDateUTC": "/Date(1552331871707)/", - "PurchaseDetails": {}, - "SalesDetails": {}, - "Name": "Hello11350", - "IsTrackedAsInventory": false, - "IsSold": true, - "IsPurchased": true, - "ValidationErrors": [ - { - "Message": "Price List Item with Code ''abc'' already exists" - } - ] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Items with an array of Item objects in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/Items' - example: { - "Items": [ - { - "Code": "code123", - "Name": "Item Name XYZ", - "Description": "Foobar", - "InventoryAssetAccountCode": "140", - "PurchaseDetails": { - "COGSAccountCode": "500" - } - } - ] - } - post: - security: - - OAuth2: [accounting.settings] - tags: - - Accounting - operationId: updateOrCreateItems - summary: Updates or creates one or more items - x-hasAccountingValidationError: true - x-example: - - item: - is_object: true - key: item - keyPascal: Item - - code: - key: code - keyPascal: Code - default: abcXYZ123 - object: item - - name: - key: name - keyPascal: Name - default: HelloWorld - object: item - - description: - is_last: true - key: description - keyPascal: Description - default: Foobar - object: item - - items: - is_object: true - key: items - keyPascal: Items - - add_item: - is_last: true - is_array_add: true - key: items - keyPascal: Items - java: Items - csharp: Item - object: item - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/unitdp' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Items array with newly created Item - content: - application/json: - schema: - $ref: '#/components/schemas/Items' - example: { - "Id": "ae7ef7c8-9024-4d42-8d59-5f26ed3f508b", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552331871904)/", - "Items": [ - { - "ItemID": "a4544d51-48f6-441f-a623-99ecbced6ab7", - "Code": "abc65591", - "Description": "foobar", - "UpdatedDateUTC": "/Date(1552331871707)/", - "PurchaseDetails": {}, - "SalesDetails": {}, - "Name": "Hello11350", - "IsTrackedAsInventory": false, - "IsSold": true, - "IsPurchased": true, - "ValidationErrors": [ - { - "Message": "Price List Item with Code ''abc'' already exists" - } - ] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Items' - example: { - "Items": [ - { - "Code": "ItemCode123", - "Name": "ItemName XYZ", - "Description": "Item Description ABC" - } - ] - } - '/Items/{ItemID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.settings, accounting.settings.read] - tags: - - Accounting - operationId: getItem - summary: Retrieves a specific item using a unique item Id - parameters: - - $ref: '#/components/parameters/ItemID' - - $ref: '#/components/parameters/unitdp' - responses: - '200': - description: Success - return response of type Items array with specified Item - content: - application/json: - schema: - $ref: '#/components/schemas/Items' - example: { - "Id": "0bbd8a92-9ba7-4711-8040-8d6a609ca7e8", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552333420160)/", - "Items": [ - { - "ItemID": "c8c54d65-f3f2-452d-926e-bf450b12fb07", - "Code": "123", - "Description": "Guitars Fender Strat", - "PurchaseDescription": "Brand new Fender Strats", - "UpdatedDateUTC": "/Date(1552333309387+0000)/", - "PurchaseDetails": { - "UnitPrice": 2500.0000, - "COGSAccountCode": "310", - "TaxType": "INPUT2" - }, - "SalesDetails": { - "UnitPrice": 5000.0000, - "AccountCode": "200", - "TaxType": "OUTPUT2" - }, - "Name": "Guitars", - "IsTrackedAsInventory": true, - "InventoryAssetAccountCode": "630", - "TotalCostPool": 25000.00, - "QuantityOnHand": 10.0000, - "IsSold": true, - "IsPurchased": true, - "ValidationErrors": [] - } - ] - } - post: - security: - - OAuth2: [accounting.settings] - tags: - - Accounting - operationId: updateItem - summary: Updates a specific item - x-hasAccountingValidationError: true - x-example: - - item: - is_object: true - key: item - keyPascal: Item - - code: - key: code - keyPascal: Code - default: ItemCode123 - object: item - - description: - is_last: true - key: description - keyPascal: Description - default: Goodbye - object: item - - items: - is_object: true - key: items - keyPascal: Items - - add_item: - is_last: true - is_array_add: true - key: items - keyPascal: Items - java: Items - csharp: Item - object: item - parameters: - - $ref: '#/components/parameters/ItemID' - - $ref: '#/components/parameters/unitdp' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Items array with updated Item - content: - application/json: - schema: - $ref: '#/components/schemas/Items' - example: { - "Id": "24feb629-6b14-499e-9aa1-fc2c596c0280", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552332558975)/", - "Items": [ - { - "ItemID": "a7e87086-e0ae-4df2-83d7-e26e9a6b7786", - "Code": "abc38306", - "Description": "Hello Xero", - "UpdatedDateUTC": "/Date(1552332558924)/", - "PurchaseDetails": {}, - "SalesDetails": {}, - "Name": "Hello8746", - "IsTrackedAsInventory": false, - "IsSold": true, - "IsPurchased": true, - "ValidationErrors": [] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Items' - example: { - "Items": [ - { - "Code": "ItemCode123", - "Description": "Description 123" - } - ] - } - delete: - security: - - OAuth2: [accounting.settings] - tags: - - Accounting - operationId: deleteItem - summary: Deletes a specific item - parameters: - - $ref: '#/components/parameters/ItemID' - responses: - '204': - description: Success - return response 204 no content - x-isEmpty: true - '400': - $ref: '#/components/responses/400Error' - '/Items/{ItemID}/History': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.settings, accounting.settings.read] - tags: - - Accounting - operationId: getItemHistory - summary: Retrieves history for a specific item - parameters: - - $ref: '#/components/parameters/ItemID' - responses: - '200': - $ref: '#/components/responses/HistoryRetrieved' - put: - security: - - OAuth2: [accounting.settings] - tags: - - Accounting - operationId: createItemHistory - summary: Creates a history record for a specific item - x-hasAccountingValidationError: true - x-example: - - historyRecord: - is_object: true - key: historyRecord - keyPascal: HistoryRecord - keySnake: history_record - - Details: - is_last: true - key: details - keyPascal: Details - default: Hello World - object: historyRecord - - historyRecords: - is_object: true - key: historyRecords - keyPascal: HistoryRecords - - add_historyRecord: - is_last: true - is_array_add: true - key: historyRecords - keyPascal: HistoryRecords - keySnake: history_records - java: HistoryRecords - python: history_record - ruby: history_record - csharp: HistoryRecord - object: historyRecord - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/ItemID' - responses: - '200': - $ref: '#/components/responses/HistoryRecordCreated' - requestBody: - $ref: '#/components/requestBodies/historyRecords' - /Journals: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.journals.read] - tags: - - Accounting - operationId: getJournals - summary: Retrieves journals - parameters: - - $ref: '#/components/parameters/ifModifiedSince' - - in: query - name: offset - description: Offset by a specified journal number. e.g. journals with a JournalNumber greater than the offset will be returned - example: 10 - schema: - type: integer - - in: query - name: paymentsOnly - x-snake: payments_only - description: Filter to retrieve journals on a cash basis. Journals are returned on an accrual basis by default. - example: true - x-example-python: "True" - schema: - type: boolean - responses: - '200': - description: Success - return response of type Journals array with all Journals - content: - application/json: - schema: - $ref: '#/components/schemas/Journals' - example: { - "Id": "49a09a97-df50-4679-8043-02c86e0dcf5f", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552335214210)/", - "Journals": [ - { - "JournalID": "1b31feeb-aa23-404c-8c19-24c827c53661", - "JournalDate": "/Date(1539993600000+0000)/", - "JournalNumber": 1, - "CreatedDateUTC": "/Date(1541176243467+0000)/", - "Reference": "Red Fish, Blue Fish", - "SourceID": "d4956132-ed94-4dd7-9eaa-aa22dfdf06f2", - "SourceType": "ACCREC", - "JournalLines": [ - { - "JournalLineID": "81e6b1bf-d812-4f87-8dc4-698558ae043e", - "AccountID": "b94495d0-44ab-4199-a1d0-427a4877e100", - "AccountCode": "610", - "AccountType": "CURRENT", - "AccountName": "Accounts Receivable", - "Description": "", - "NetAmount": 40.00, - "GrossAmount": 40.00, - "TaxAmount": 0.00, - "TrackingCategories": [] - }, - { - "JournalLineID": "ad221a8c-ebee-4c1b-88ed-d574e27e8803", - "AccountID": "e0a5d892-9f9f-44f0-a153-5cb7db125170", - "AccountCode": "200", - "AccountType": "REVENUE", - "AccountName": "Sales", - "Description": "Acme Tires", - "NetAmount": -40.00, - "GrossAmount": -40.00, - "TaxAmount": 0.00, - "TaxType": "NONE", - "TaxName": "No GST", - "TrackingCategories": [] - } - ] - }, - { - "JournalID": "2be66e45-805b-46de-921d-c67e1d3dad2a", - "JournalDate": "/Date(1539993600000+0000)/", - "JournalNumber": 9, - "CreatedDateUTC": "/Date(1541176504083+0000)/", - "Reference": "Red Fish, Blue Fish", - "SourceID": "046d8a6d-1ae1-4b4d-9340-5601bdf41b87", - "SourceType": "ACCREC", - "JournalLines": [ - { - "JournalLineID": "ba8a5680-a753-4a35-b3dd-0bc72e5c26a1", - "AccountID": "b94495d0-44ab-4199-a1d0-427a4877e100", - "AccountCode": "610", - "AccountType": "CURRENT", - "AccountName": "Accounts Receivable", - "Description": "", - "NetAmount": 40.00, - "GrossAmount": 40.00, - "TaxAmount": 0.00, - "TrackingCategories": [] - }, - { - "JournalLineID": "09a0b9b9-0222-4e24-8c31-efef472e22f1", - "AccountID": "e0a5d892-9f9f-44f0-a153-5cb7db125170", - "AccountCode": "200", - "AccountType": "REVENUE", - "AccountName": "Sales", - "Description": "Acme Tires", - "NetAmount": -40.00, - "GrossAmount": -40.00, - "TaxAmount": 0.00, - "TaxType": "NONE", - "TaxName": "No GST", - "TrackingCategories": [] - } - ] - }, - { - "JournalID": "d0ed2957-ebba-4d3a-8367-ae9ccd574885", - "JournalDate": "/Date(1543449600000+0000)/", - "JournalNumber": 14, - "CreatedDateUTC": "/Date(1541176592673+0000)/", - "SourceID": "99ea7f6b-c513-4066-bc27-b7c65dcd76c2", - "SourceType": "ACCRECPAYMENT", - "JournalLines": [ - { - "JournalLineID": "1bdae2b7-3035-40ec-b344-b12b1c23adc4", - "AccountID": "b94495d0-44ab-4199-a1d0-427a4877e100", - "AccountCode": "610", - "AccountType": "CURRENT", - "AccountName": "Accounts Receivable", - "Description": "", - "NetAmount": -46.00, - "GrossAmount": -46.00, - "TaxAmount": 0.00, - "TrackingCategories": [] - }, - { - "JournalLineID": "353be85e-ae79-4bb3-9483-5ea7682fc0a3", - "AccountID": "5690f1e8-1d02-4893-90c2-ee1a69eff942", - "AccountCode": "970", - "AccountType": "EQUITY", - "AccountName": "Owner A Funds Introduced", - "Description": "", - "NetAmount": 46.00, - "GrossAmount": 46.00, - "TaxAmount": 0.00, - "TrackingCategories": [] - } - ] - }, - { - "JournalID": "772e8133-7f12-4edc-ab98-aa6dceb16c9d", - "JournalDate": "/Date(1552262400000+0000)/", - "JournalNumber": 30, - "CreatedDateUTC": "/Date(1552333389227+0000)/", - "Reference": "", - "SourceID": "5376633d-0456-43a3-8234-e457a3f50a12", - "SourceType": "ACCPAY", - "JournalLines": [ - { - "JournalLineID": "33469836-642f-4973-a708-0e99339dff4a", - "AccountID": "a2a4795b-a01f-40eb-afa6-a34b4514875d", - "AccountCode": "800", - "AccountType": "CURRLIAB", - "AccountName": "Accounts Payable", - "Description": "", - "NetAmount": -28750.00, - "GrossAmount": -28750.00, - "TaxAmount": 0.00, - "TrackingCategories": [] - }, - { - "JournalLineID": "4f3b6462-5cf6-4b55-a2ae-de4039878215", - "AccountID": "53a12a15-7e9b-4a31-85f4-a7cee6d04215", - "AccountCode": "630", - "AccountType": "CURRENT", - "AccountName": "Inventory", - "Description": "Brand new Fender Strats", - "NetAmount": 25000.00, - "GrossAmount": 28750.00, - "TaxAmount": 3750.00, - "TaxType": "INPUT2", - "TaxName": "15% GST on Expenses", - "TrackingCategories": [] - }, - { - "JournalLineID": "534e822e-d441-48a7-8e57-5ad54729e83e", - "AccountID": "17d9a4a0-3181-4803-a96b-f0dbe589091b", - "AccountCode": "820", - "AccountType": "CURRLIAB", - "AccountName": "GST", - "Description": "", - "NetAmount": 3750.00, - "GrossAmount": 3750.00, - "TaxAmount": 0.00, - "TrackingCategories": [] - } - ] - } - ] - } - '/Journals/{JournalID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.journals.read] - tags: - - Accounting - operationId: getJournal - summary: Retrieves a specific journal using a unique journal Id. - parameters: - - $ref: '#/components/parameters/JournalID' - responses: - '200': - description: Success - return response of type Journals array with specified Journal - content: - application/json: - schema: - $ref: '#/components/schemas/Journals' - example: { - "Id": "39ab8367-eb14-420d-83a9-e01ddddd21f8", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552335613002)/", - "Journals": [ - { - "JournalID": "1b31feeb-aa23-404c-8c19-24c827c53661", - "JournalDate": "/Date(1539993600000+0000)/", - "JournalNumber": 1, - "CreatedDateUTC": "/Date(1541176243467+0000)/", - "Reference": "Red Fish, Blue Fish", - "JournalLines": [ - { - "JournalLineID": "81e6b1bf-d812-4f87-8dc4-698558ae043e", - "AccountID": "b94495d0-44ab-4199-a1d0-427a4877e100", - "AccountCode": "610", - "AccountType": "CURRENT", - "AccountName": "Accounts Receivable", - "Description": "", - "NetAmount": 40.00, - "GrossAmount": 40.00, - "TaxAmount": 0.00, - "TaxType": "", - "TaxName": "", - "TrackingCategories": [] - }, - { - "JournalLineID": "ad221a8c-ebee-4c1b-88ed-d574e27e8803", - "AccountID": "e0a5d892-9f9f-44f0-a153-5cb7db125170", - "AccountCode": "200", - "AccountType": "REVENUE", - "AccountName": "Sales", - "Description": "Acme Tires", - "NetAmount": -40.00, - "GrossAmount": -40.00, - "TaxAmount": 0.00, - "TaxType": "NONE", - "TaxName": "No GST", - "TrackingCategories": [] - } - ] - } - ] - } - '/Journals/{JournalNumber}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.journals.read] - tags: - - Accounting - operationId: getJournalByNumber - summary: Retrieves a specific journal using a unique journal number. - parameters: - - $ref: '#/components/parameters/JournalNumber' - responses: - '200': - description: Success - return response of type Journals array with specified Journal - content: - application/json: - schema: - $ref: '#/components/schemas/Journals' - example: { - "Id": "39ab8367-eb14-420d-83a9-e01ddddd21f8", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552335613002)/", - "Journals": [ - { - "JournalID": "1b31feeb-aa23-404c-8c19-24c827c53661", - "JournalDate": "/Date(1539993600000+0000)/", - "JournalNumber": 1, - "CreatedDateUTC": "/Date(1541176243467+0000)/", - "Reference": "Red Fish, Blue Fish", - "JournalLines": [ - { - "JournalLineID": "81e6b1bf-d812-4f87-8dc4-698558ae043e", - "AccountID": "b94495d0-44ab-4199-a1d0-427a4877e100", - "AccountCode": "610", - "AccountType": "CURRENT", - "AccountName": "Accounts Receivable", - "Description": "", - "NetAmount": 40.00, - "GrossAmount": 40.00, - "TaxAmount": 0.00, - "TaxType": "", - "TaxName": "", - "TrackingCategories": [] - }, - { - "JournalLineID": "ad221a8c-ebee-4c1b-88ed-d574e27e8803", - "AccountID": "e0a5d892-9f9f-44f0-a153-5cb7db125170", - "AccountCode": "200", - "AccountType": "REVENUE", - "AccountName": "Sales", - "Description": "Acme Tires", - "NetAmount": -40.00, - "GrossAmount": -40.00, - "TaxAmount": 0.00, - "TaxType": "NONE", - "TaxName": "No GST", - "TrackingCategories": [] - } - ] - } - ] - } - /LinkedTransactions: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getLinkedTransactions - summary: Retrieves linked transactions (billable expenses) - parameters: - - in: query - name: page - description: Up to 100 linked transactions will be returned in a single API call. Use the page parameter to specify the page to be returned e.g. page=1. - example: 1 - schema: - type: integer - - in: query - name: LinkedTransactionID - x-snake: linked_transaction_id - description: The Xero identifier for an Linked Transaction - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - - in: query - name: SourceTransactionID - x-snake: source_transaction_id - description: Filter by the SourceTransactionID. Get the linked transactions created from a particular ACCPAY invoice - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - - in: query - name: ContactID - x-snake: contact_id - description: Filter by the ContactID. Get all the linked transactions that have been assigned to a particular customer. - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - - in: query - name: Status - x-snake: status - description: Filter by the combination of ContactID and Status. Get the linked transactions associated to a customer and with a status - example: "APPROVED" - schema: - type: string - - in: query - name: TargetTransactionID - x-snake: target_transaction_id - description: Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - responses: - '200': - description: Success - return response of type LinkedTransactions array with all LinkedTransaction - content: - application/json: - schema: - $ref: '#/components/schemas/LinkedTransactions' - example: { - "Id": "516aabd0-e670-48d5-b0eb-10dce4494dd8", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552348338096)/", - "LinkedTransactions": [ - { - "LinkedTransactionID": "5cf7d9c0-b9a7-4433-a2dc-ae3c11bba39b", - "SourceTransactionID": "aec416dd-38ea-40dc-9f0b-813c8c71f87f", - "SourceLineItemID": "77e0b23b-5b79-4f4b-ae20-c9031d41442f", - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "TargetTransactionID": "83693fc1-5b05-4807-b190-109d4a85dd5f", - "TargetLineItemID": "d5128ff1-0f39-4d2a-a6d5-46dfaf5f075c", - "Status": "ONDRAFT", - "Type": "BILLABLEEXPENSE", - "UpdatedDateUTC": "/Date(1552347991000+0000)/", - "SourceTransactionTypeCode": "ACCPAY" - } - ] - } - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createLinkedTransaction - summary: Creates linked transactions (billable expenses) - parameters: - - $ref: '#/components/parameters/idempotencyKey' - x-hasAccountingValidationError: true - x-example: - - linkedTransaction: - is_object: true - key: linkedTransaction - keyPascal: LinkedTransaction - keySnake: linked_transaction - - sourceTransactionID: - is_uuid: true - key: sourceTransactionID - keyPascal: SourceTransactionID - keySnake: source_transaction_id - default: 00000000-0000-0000-0000-000000000000 - object: linkedTransaction - - sourceLineItemID: - is_last: true - is_uuid: true - key: sourceLineItemID - keyPascal: SourceLineItemID - keySnake: source_line_item_id - default: 00000000-0000-0000-0000-000000000000 - object: linkedTransaction - responses: - '200': - description: Success - return response of type LinkedTransactions array with newly created LinkedTransaction - content: - application/json: - schema: - $ref: '#/components/schemas/LinkedTransactions' - example: { - "Id": "f32b30e5-32d1-42a8-bcc9-5b22828f725c", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552351054646)/", - "LinkedTransactions": [ - { - "LinkedTransactionID": "e9684b6c-4df9-45a0-917b-85cc29857008", - "SourceTransactionID": "a848644a-f20f-4630-98c3-386bd7505631", - "SourceLineItemID": "b0df260d-3cc8-4ced-9bd6-41924f624ed3", - "Status": "DRAFT", - "Type": "BILLABLEEXPENSE", - "UpdatedDateUTC": "/Date(1552351055000+0000)/", - "SourceTransactionTypeCode": "ACCPAY", - "ValidationErrors": [ - { - "Message": "The SourceLineItemID and SourceTransactionID do not match" - } - ] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: LinkedTransaction object in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/LinkedTransaction' - example: { - "LinkedTransactions": [ - { - "SourceTransactionID": "a848644a-f20f-4630-98c3-386bd7505631", - "SourceLineItemID": "b0df260d-3cc8-4ced-9bd6-41924f624ed3" - } - ] - } - '/LinkedTransactions/{LinkedTransactionID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getLinkedTransaction - summary: Retrieves a specific linked transaction (billable expenses) using a unique linked transaction Id - parameters: - - $ref: '#/components/parameters/LinkedTransactionID' - responses: - '200': - description: Success - return response of type LinkedTransactions array with a specified LinkedTransaction - content: - application/json: - schema: - $ref: '#/components/schemas/LinkedTransactions' - example: { - "Id": "171ca542-874d-44e2-8930-db9bccd7d88b", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552348339875)/", - "LinkedTransactions": [ - { - "LinkedTransactionID": "5cf7d9c0-b9a7-4433-a2dc-ae3c11bba39b", - "SourceTransactionID": "aec416dd-38ea-40dc-9f0b-813c8c71f87f", - "SourceLineItemID": "77e0b23b-5b79-4f4b-ae20-c9031d41442f", - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "TargetTransactionID": "83693fc1-5b05-4807-b190-109d4a85dd5f", - "TargetLineItemID": "d5128ff1-0f39-4d2a-a6d5-46dfaf5f075c", - "Status": "ONDRAFT", - "Type": "BILLABLEEXPENSE", - "UpdatedDateUTC": "/Date(1552347991000+0000)/", - "SourceTransactionTypeCode": "ACCPAY" - } - ] - } - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: updateLinkedTransaction - summary: Updates a specific linked transactions (billable expenses) - x-hasAccountingValidationError: true - x-example: - - linkedTransaction: - is_object: true - key: linkedTransaction - keyPascal: LinkedTransaction - keySnake: linked_transaction - - sourceLineItemID: - is_uuid: true - key: sourceLineItemID - keyPascal: SourceLineItemID - keySnake: source_line_item_id - default: 00000000-0000-0000-0000-000000000000 - object: linkedTransaction - - contactID: - is_last: true - is_uuid: true - key: contactID - keyPascal: ContactID - default: 00000000-0000-0000-0000-000000000000 - object: linkedTransaction - - linkedTransactions: - is_object: true - key: linkedTransactions - keyPascal: LinkedTransactions - - add_linkedTransaction: - is_last: true - is_array_add: true - key: linkedTransactions - keyPascal: LinkedTransactions - keySnake: linked_transactions - java: LinkedTransactions - python: linked_transaction - ruby: linked_transaction - csharp: LinkedTransaction - object: linkedTransaction - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/LinkedTransactionID' - responses: - '200': - description: Success - return response of type LinkedTransactions array with updated LinkedTransaction - content: - application/json: - schema: - $ref: '#/components/schemas/LinkedTransactions' - example: { - "Id": "bd364af7-08f0-432b-81db-c1e5ba05f3dd", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552351488159)/", - "LinkedTransactions": [ - { - "LinkedTransactionID": "e9684b6c-4df9-45a0-917b-85cc29857008", - "SourceTransactionID": "a848644a-f20f-4630-98c3-386bd7505631", - "SourceLineItemID": "b0df260d-3cc8-4ced-9bd6-41924f624ed3", - "ContactID": "4e1753b9-018a-4775-b6aa-1bc7871cfee3", - "Status": "DRAFT", - "Type": "BILLABLEEXPENSE", - "UpdatedDateUTC": "/Date(1552351055000+0000)/", - "SourceTransactionTypeCode": "ACCPAY" - } - ] - } - '400': - description: Success - return response of type LinkedTransactions array with updated LinkedTransaction - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: { - "ErrorNumber": 10, - "Type": "ValidationException", - "Message": "A validation exception occurred", - "Elements": [ - { - "LinkedTransactionID": "5a68b5b4-8cf0-4af5-8c3c-513cc19e1c73", - "SourceTransactionID": "aec416dd-38ea-40dc-9f0b-813c8c71f87f", - "SourceLineItemID": "77e0b23b-5b79-4f4b-ae20-c9031d41442f", - "ContactID": "4e1753b9-018a-4775-b6aa-1bc7871cfee3", - "TargetTransactionID": "83693fc1-5b05-4807-b190-109d4a85dd5f", - "TargetLineItemID": "d5128ff1-0f39-4d2a-a6d5-46dfaf5f075c", - "Status": "ONDRAFT", - "Type": "BILLABLEEXPENSE", - "UpdatedDateUTC": "/Date(1552349706000+0000)/", - "SourceTransactionTypeCode": "ACCPAY", - "ValidationErrors": [ - { - "Message": "The ContactID and the TargetTransaction ContactID do not match" - } - ] - } - ] - } - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/LinkedTransactions' - example: { - "LinkedTransactions": [ - { - "SourceTransactionID": "00000000-0000-0000-0000-000000000000", - "SourceLineItemID": "00000000-0000-0000-0000-000000000000" - } - ] - } - delete: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: deleteLinkedTransaction - summary: Deletes a specific linked transactions (billable expenses) - parameters: - - $ref: '#/components/parameters/LinkedTransactionID' - responses: - '204': - description: Success - return response 204 no content - x-isEmpty: true - '400': - $ref: '#/components/responses/400Error' - /ManualJournals: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getManualJournals - summary: Retrieves manual journals - parameters: - - $ref: '#/components/parameters/ifModifiedSince' - - in: query - name: where - description: Filter by an any element - example: Status=="DRAFT" - x-example-csharp: Status==\"DRAFT\" - x-example-java: Status=="' + ManualJournal.StatusEnum.DRAFT + '" - x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\ManualJournal::STATUS_DRAFT . '" - x-example-ruby: Status==#{XeroRuby::Accounting::ManualJournal::DRAFT} - schema: - type: string - - in: query - name: order - description: Order by an any element - example: "Date ASC" - schema: - type: string - - in: query - name: page - description: e.g. page=1 – Up to 100 manual journals will be returned in a single API call with line items shown for each overpayment - example: 1 - schema: - type: integer - - $ref: '#/components/parameters/pageSize' - responses: - '200': - description: Success - return response of type ManualJournals array with a all ManualJournals - content: - application/json: - schema: - $ref: '#/components/schemas/ManualJournals' - example: { - "Id": "8a508ec1-b578-48bf-97df-020c918fbf7d", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552357217359)/", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 3 - }, - "ManualJournals": [ - { - "Date": "/Date(1553126400000+0000)/", - "Status": "POSTED", - "LineAmountTypes": "NoTax", - "UpdatedDateUTC": "/Date(1552357188083+0000)/", - "ManualJournalID": "0b159335-606b-485f-b51b-97b3b32bad32", - "Narration": "Reversal: These aren''t the droids you are looking for", - "JournalLines": [], - "ShowOnCashBasisReports": true, - "HasAttachments": false - }, - { - "Date": "/Date(1552348800000+0000)/", - "Status": "POSTED", - "LineAmountTypes": "NoTax", - "UpdatedDateUTC": "/Date(1552357188147+0000)/", - "ManualJournalID": "99cb8353-ce73-4a5d-8e0d-8b0edf86cfc4", - "Narration": "These aren''t the droids you are looking for", - "JournalLines": [], - "ShowOnCashBasisReports": true, - "HasAttachments": true - }, - { - "Date": "/Date(1552262400000+0000)/", - "Status": "DRAFT", - "LineAmountTypes": "NoTax", - "UpdatedDateUTC": "/Date(1552357216843+0000)/", - "ManualJournalID": "ecb6b362-c78f-462a-a229-a66abf115e92", - "Narration": "Foo bar", - "JournalLines": [], - "ShowOnCashBasisReports": true, - "HasAttachments": false - } - ] - } - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createManualJournals - summary: Creates one or more manual journals - x-hasAccountingValidationError: true - x-example: - - dateValue: - is_date: true - key: dateValue - keyPascal: Date - keySnake: date_value - java_datatype: LocalDate - default: "LocalDate.of(2020, Month.OCTOBER, 10)" - java: "LocalDate.of(2020, Month.OCTOBER, 10)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2019-10-10')" - node: "'2020-10-10'" - python: "dateutil.parser.parse('2020-12-03T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - manualJournalLines: - is_list: true - key: manualJournalLines - keyPascal: ManualJournalLine - keySnake: manual_journal_lines - - credit: - is_object: true - key: credit - keyPascal: ManualJournalLine - - lineAmount: - nonString: true - key: lineAmount - keyPascal: LineAmount - keySnake: line_amount - default: -100.0 - is_money: true - object: credit - - accountCode: - key: accountCode - keyPascal: AccountCode - keySnake: account_code - default: 400 - object: credit - - description: - is_last: true - key: description - keyPascal: Description - default: "Hello there" - object: credit - - add_credit: - is_last: true - is_list_add: true - key: manualJournalLines - keyPascal: ManualJournalLine - keySnake: manual_journal_lines - object: credit - - debit: - is_object: true - key: debit - keyPascal: ManualJournalLine - - lineAmount: - nonString: true - key: lineAmount - keyPascal: LineAmount - keySnake: line_amount - default: 100.0 - is_money: true - object: debit - - accountCode: - key: accountCode - keyPascal: AccountCode - keySnake: account_code - default: 120 - object: debit - - description: - is_last: true - key: description - keyPascal: Description - default: "Hello there" - object: debit - - add_debit: - is_last: true - is_list_add: true - key: manualJournalLines - keyPascal: ManualJournalLine - keySnake: manual_journal_lines - object: debit - - manualJournal: - is_object: true - key: manualJournal - keyPascal: ManualJournal - keySnake: manual_journal - - narration: - key: narration - keyPascal: Narration - default: Foobar - object: manualJournal - - date: - is_variable: true - nonString: true - key: date - keyPascal: Date - default: dateValue - python: date_value - ruby: date_value - object: manualJournal - - set_manualJournalLines: - is_last: true - is_variable: true - nonString: true - key: journalLines - keyPascal: JournalLines - keySnake: journal_lines - default: manualJournalLines - python: manual_journal_lines - ruby: manual_journal_lines - object: manualJournal - - manualJournals: - is_object: true - key: manualJournals - keyPascal: ManualJournals - - add_manualJournal: - is_last: true - is_array_add: true - key: manualJournals - keyPascal: ManualJournals - keySnake: manual_journals - java: ManualJournals - php: manualJournals - python: manual_journal - ruby: manual_journal - csharp: ManualJournal - object: manualJournal - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type ManualJournals array with newly created ManualJournal - content: - application/json: - schema: - $ref: '#/components/schemas/ManualJournals' - example: { - "Id": "45dfa608-0fcb-4f30-a377-c82cd348569c", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552595972952)/", - "ManualJournals": [ - { - "Date": "/Date(1552521600000+0000)/", - "Status": "DRAFT", - "LineAmountTypes": "NoTax", - "UpdatedDateUTC": "/Date(1552595972920+0000)/", - "ManualJournalID": "d312dd5e-a53e-46d1-9d51-c569ef4570b7", - "Narration": "Foo bar", - "JournalLines": [ - { - "Description": "Hello there", - "TaxType": "NONE", - "LineAmount": 100.00, - "AccountCode": "400", - "Tracking": [], - "AccountID": "c4f29c22-28c2-4a13-9eab-ecbbd641ffdf", - "IsBlank": false - }, - { - "Description": "Goodbye", - "TaxType": "NONE", - "LineAmount": -100.00, - "AccountCode": "400", - "Tracking": [ - { - "Name": "Simpsons", - "Option": "Bart", - "TrackingCategoryID": "6a68adde-f210-4465-b0a9-0d8cc6f50762", - "TrackingOptionID": "dc54c220-0140-495a-b925-3246adc0075f" - } - ], - "AccountID": "c4f29c22-28c2-4a13-9eab-ecbbd641ffdf", - "IsBlank": false - } - ], - "ShowOnCashBasisReports": true, - "Warnings": [ - { - "Message": "Account code ''476'' has been removed as it does not match a recognised account." - } - ], - "ValidationErrors": [ - { - "Message": "The total debits (100.00) must equal total credits (-10.00)" - } - ] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: ManualJournals array with ManualJournal object in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/ManualJournals' - example: { - "ManualJournals": [ - { - "Narration": "Journal Desc", - "JournalLines": [ - { - "LineAmount": 100, - "AccountCode": "400", - "Description": "Money Movement" - }, - { - "LineAmount": -100, - "AccountCode": "400", - "Description": "Prepayment of things", - "Tracking": [ - { - "Name": "North", - "Option": "Region" - } - ] - } - ], - "Date": "2019-03-14" - } - ] - } - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: updateOrCreateManualJournals - summary: Updates or creates a single manual journal - x-hasAccountingValidationError: true - x-example: - - dateValue: - is_date: true - key: dateValue - keyPascal: Date - keySnake: date_value - java_datatype: LocalDate - default: "LocalDate.of(2020, Month.OCTOBER, 10)" - java: "LocalDate.of(2020, Month.OCTOBER, 10)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-10')" - node: "'2020-10-10'" - python: "dateutil.parser.parse('2020-12-03T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - manualJournalLines: - is_list: true - key: manualJournalLines - keyPascal: ManualJournalLine - keySnake: manual_journal_lines - - credit: - is_object: true - key: credit - keyPascal: ManualJournalLine - - lineAmount: - nonString: true - key: lineAmount - keyPascal: LineAmount - keySnake: line_amount - default: -100.0 - is_money: true - object: credit - - accountCode: - key: accountCode - keyPascal: AccountCode - keySnake: account_code - default: 400 - object: credit - - description: - is_last: true - key: description - keyPascal: Description - default: "Hello there" - object: credit - - add_credit: - is_last: true - is_list_add: true - key: manualJournalLines - keyPascal: ManualJournalLine - keySnake: manual_journal_lines - object: credit - - debit: - is_object: true - key: debit - keyPascal: ManualJournalLine - - lineAmount: - nonString: true - key: lineAmount - keyPascal: LineAmount - keySnake: line_amount - default: 100.0 - is_money: true - object: debit - - accountCode: - key: accountCode - keyPascal: AccountCode - keySnake: account_code - default: 120 - object: debit - - description: - is_last: true - key: description - keyPascal: Description - default: "Hello there" - object: debit - - add_debit: - is_last: true - is_list_add: true - key: manualJournalLines - keyPascal: ManualJournalLine - keySnake: manual_journal_lines - object: debit - - manualJournal: - is_object: true - key: manualJournal - keyPascal: ManualJournal - keySnake: manual_journal - - narration: - key: narration - keyPascal: Narration - default: Foobar - object: manualJournal - - date: - is_variable: true - nonString: true - key: date - keyPascal: Date - default: dateValue - python: date_value - ruby: date_value - object: manualJournal - - set_manualJournalLines: - is_last: true - is_variable: true - nonString: true - key: manualJournalLines - keyPascal: JournalLines - keySnake: journal_lines - default: manualJournalLines - python: manual_journal_lines - ruby: manual_journal_lines - object: manualJournal - - manualJournals: - is_object: true - key: manualJournals - keyPascal: ManualJournals - - add_manualJournal: - is_last: true - is_array_add: true - key: manualJournals - keyPascal: ManualJournals - keySnake: manual_journals - java: ManualJournals - php: manualJournals - python: manual_journal - ruby: manual_journal - csharp: ManualJournal - object: manualJournal - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type ManualJournals array with newly created ManualJournal - content: - application/json: - schema: - $ref: '#/components/schemas/ManualJournals' - example: { - "Id": "45dfa608-0fcb-4f30-a377-c82cd348569c", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552595972952)/", - "ManualJournals": [ - { - "Date": "/Date(1552521600000+0000)/", - "Status": "DRAFT", - "LineAmountTypes": "NoTax", - "UpdatedDateUTC": "/Date(1552595972920+0000)/", - "ManualJournalID": "d312dd5e-a53e-46d1-9d51-c569ef4570b7", - "Narration": "Foo bar", - "JournalLines": [ - { - "Description": "Hello there", - "TaxType": "NONE", - "LineAmount": 100.00, - "AccountCode": "400", - "Tracking": [], - "AccountID": "c4f29c22-28c2-4a13-9eab-ecbbd641ffdf", - "IsBlank": false - }, - { - "Description": "Goodbye", - "TaxType": "NONE", - "LineAmount": -100.00, - "AccountCode": "400", - "Tracking": [ - { - "Name": "Simpsons", - "Option": "Bart", - "TrackingCategoryID": "6a68adde-f210-4465-b0a9-0d8cc6f50762", - "TrackingOptionID": "dc54c220-0140-495a-b925-3246adc0075f" - } - ], - "AccountID": "c4f29c22-28c2-4a13-9eab-ecbbd641ffdf", - "IsBlank": false - } - ], - "ShowOnCashBasisReports": true, - "Warnings": [ - { - "Message": "Account code ''476'' has been removed as it does not match a recognised account." - } - ], - "ValidationErrors": [ - { - "Message": "The total debits (100.00) must equal total credits (-10.00)" - } - ] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: ManualJournals array with ManualJournal object in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/ManualJournals' - example: { - "ManualJournals": [ - { - "Narration": "Journal Desc", - "JournalLines": [ - { - "LineAmount": 100, - "AccountCode": "400", - "Description": "Money Movement" - }, - { - "LineAmount": -100, - "AccountCode": "400", - "Description": "Prepayment of things", - "Tracking": [ - { - "Name": "North", - "Option": "Region" - } - ] - } - ], - "Date": "2019-03-14" - } - ] - } - '/ManualJournals/{ManualJournalID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getManualJournal - summary: Retrieves a specific manual journal - parameters: - - $ref: '#/components/parameters/ManualJournalID' - responses: - '200': - description: Success - return response of type ManualJournals array with a specified ManualJournals - content: - application/json: - schema: - $ref: '#/components/schemas/ManualJournals' - example: { - "Id": "7321fc21-1a13-4f40-ae47-df59cff5676d", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552399859139)/", - "ManualJournals": [ - { - "Date": "/Date(1552348800000+0000)/", - "Status": "POSTED", - "LineAmountTypes": "NoTax", - "UpdatedDateUTC": "/Date(1552357188147+0000)/", - "ManualJournalID": "99cb8353-ce73-4a5d-8e0d-8b0edf86cfc4", - "Narration": "These aren''t the droids you are looking for", - "JournalLines": [ - { - "Description": "These aren''t the droids you are looking for", - "TaxType": "NONE", - "TaxAmount": 0.00, - "LineAmount": 100.00, - "AccountCode": "429", - "Tracking": [], - "AccountID": "160bad11-c1b7-4c7e-8903-dca925d78721", - "IsBlank": false - }, - { - "Description": "Yes the are", - "TaxType": "NONE", - "TaxAmount": 0.00, - "LineAmount": -100.00, - "AccountCode": "200", - "Tracking": [], - "AccountID": "e0a5d892-9f9f-44f0-a153-5cb7db125170", - "IsBlank": false - } - ], - "ShowOnCashBasisReports": true, - "HasAttachments": true, - "Attachments": [ - { - "AttachmentID": "166ca8f8-8bc6-4780-8466-a0e474d586ea", - "FileName": "giphy.gif", - "Url": "https://api.xero.com/api.xro/2.0/manualjournal/99cb8353-ce73-4a5d-8e0d-8b0edf86cfc4/Attachments/giphy.gif", - "MimeType": "image/gif", - "ContentLength": 495727 - }, - { - "AttachmentID": "5e5036f9-b1e0-4c5d-a93f-61900137e40b", - "FileName": "ridehistory.pdf", - "Url": "https://api.xero.com/api.xro/2.0/manualjournal/99cb8353-ce73-4a5d-8e0d-8b0edf86cfc4/Attachments/ridehistory.pdf", - "MimeType": "application/pdf", - "ContentLength": 4423 - } - ] - } - ] - } - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: updateManualJournal - summary: Updates a specific manual journal - x-hasAccountingValidationError: true - x-example: - - dateValue: - is_date: true - key: dateValue - keyPascal: Date - keySnake: date_value - java_datatype: LocalDate - default: "LocalDate.of(2020, Month.OCTOBER, 10)" - java: "LocalDate.of(2020, Month.OCTOBER, 10)" - csharp: "new DateTime(2020, 10, 10)" - php: "new DateTime('2020-10-10')" - node: "'2020-10-10'" - python: "dateutil.parser.parse('2020-12-03T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - manualJournalLines: - is_list: true - key: manualJournalLines - keyPascal: ManualJournalLine - keySnake: manual_journal_lines - - credit: - is_object: true - key: credit - keyPascal: ManualJournalLine - - lineAmount: - nonString: true - key: lineAmount - keyPascal: LineAmount - keySnake: line_amount - default: -100.0 - is_money: true - object: credit - - accountCode: - key: accountCode - keyPascal: AccountCode - keySnake: account_code - default: 400 - object: credit - - description: - is_last: true - key: description - keyPascal: Description - default: "Hello there" - object: credit - - add_credit: - is_last: true - is_list_add: true - key: manualJournalLines - keyPascal: ManualJournalLine - keySnake: manual_journal_lines - object: credit - - debit: - is_object: true - key: debit - keyPascal: ManualJournalLine - - lineAmount: - nonString: true - key: lineAmount - keyPascal: LineAmount - keySnake: line_amount - default: 100.0 - is_money: true - object: debit - - accountCode: - key: accountCode - keyPascal: AccountCode - keySnake: account_code - default: 120 - object: debit - - description: - is_last: true - key: description - keyPascal: Description - default: "Hello there" - object: debit - - add_debit: - is_last: true - is_list_add: true - key: manualJournalLines - keyPascal: ManualJournalLine - keySnake: manual_journal_lines - object: debit - - manualJournal: - is_object: true - key: manualJournal - keyPascal: ManualJournal - keySnake: manual_journal - - narration: - key: narration - keyPascal: Narration - default: Foobar - object: manualJournal - - date: - is_variable: true - nonString: true - key: date - keyPascal: Date - default: dateValue - python: date_value - ruby: date_value - object: manualJournal - - set_manualJournalLines: - is_last: true - is_variable: true - nonString: true - key: manualJournalLines - keyPascal: JournalLines - keySnake: journal_lines - default: manualJournalLines - python: manual_journal_lines - ruby: manual_journal_lines - object: manualJournal - - manualJournals: - is_object: true - key: manualJournals - keyPascal: ManualJournals - - add_manualJournal: - is_last: true - is_array_add: true - key: manualJournals - keyPascal: ManualJournals - keySnake: manual_journals - java: ManualJournals - php: manualJournals - python: manual_journal - ruby: manual_journal - csharp: ManualJournal - object: manualJournal - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/ManualJournalID' - responses: - '200': - description: Success - return response of type ManualJournals array with an updated ManualJournal - content: - application/json: - schema: - $ref: '#/components/schemas/ManualJournals' - example: { - "Id": "b694559c-686c-4047-b657-661ba6c0dd1f", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552357736850)/", - "ManualJournals": [ - { - "Date": "/Date(1552262400000+0000)/", - "Status": "DRAFT", - "LineAmountTypes": "NoTax", - "UpdatedDateUTC": "/Date(1552357736820+0000)/", - "ManualJournalID": "07eac261-78ef-47a0-a0eb-a57b74137877", - "Narration": "Hello Xero", - "JournalLines": [ - { - "Description": "Hello there", - "TaxType": "NONE", - "TaxAmount": 0.00, - "LineAmount": 100.00, - "AccountCode": "400", - "Tracking": [], - "AccountID": "c4f29c22-28c2-4a13-9eab-ecbbd641ffdf", - "IsBlank": false - }, - { - "Description": "Goodbye", - "TaxType": "NONE", - "TaxAmount": 0.00, - "LineAmount": -100.00, - "AccountCode": "400", - "Tracking": [], - "AccountID": "c4f29c22-28c2-4a13-9eab-ecbbd641ffdf", - "IsBlank": false - } - ], - "ShowOnCashBasisReports": true, - "HasAttachments": false, - "Attachments": [] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ManualJournals' - example: { - "ManualJournals": [ - { - "Narration": "Hello Xero", - "ManualJournalID": "00000000-0000-0000-0000-000000000000", - "JournalLines": [] - } - ] - } - '/ManualJournals/{ManualJournalID}/Attachments': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getManualJournalAttachments - summary: Retrieves attachment for a specific manual journal - parameters: - - $ref: '#/components/parameters/ManualJournalID' - responses: - '200': - description: Success - return response of type Attachments array with all Attachments for a ManualJournals - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "5fa4b3ef-7945-45a7-9bab-10e830673dfb", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552404121471)/", - "Attachments": [ - { - "AttachmentID": "16e86f32-3e25-4209-8662-c0dfd91b654c", - "FileName": "HelloWorld.jpg", - "Url": "https://api.xero.com/api.xro/2.0/ManualJournals/0b159335-606b-485f-b51b-97b3b32bad32/Attachments/HelloWorld.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - }, - { - "AttachmentID": "ff7c439e-a057-4807-ac2c-b558d7df7511", - "FileName": "foobar.jpg", - "Url": "https://api.xero.com/api.xro/2.0/ManualJournals/0b159335-606b-485f-b51b-97b3b32bad32/Attachments/foobar.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '/ManualJournals/{ManualJournalID}/Attachments/{AttachmentID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getManualJournalAttachmentById - summary: Allows you to retrieve a specific attachment from a specific manual journal using a unique attachment Id - parameters: - - $ref: '#/components/parameters/ManualJournalID' - - $ref: '#/components/parameters/AttachmentID' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of attachment for Manual Journal as binary data - content: - application/octet-stream: - schema: - type: string - format: binary - '/ManualJournals/{ManualJournalID}/Attachments/{FileName}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getManualJournalAttachmentByFileName - summary: Retrieves a specific attachment from a specific manual journal by file name - parameters: - - $ref: '#/components/parameters/ManualJournalID' - - $ref: '#/components/parameters/FileName' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of attachment for Manual Journal as binary data - content: - application/octet-stream: - schema: - type: string - format: binary - post: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: updateManualJournalAttachmentByFileName - x-hasAccountingValidationError: true - summary: Updates a specific attachment from a specific manual journal by file name - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/ManualJournalID' - - $ref: '#/components/parameters/FileName' - responses: - '200': - description: Success - return response of type Attachments array with an update Attachment for a ManualJournals - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "e1cb9deb-a8f0-477f-b4d1-cf0c6c39e080", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552401039306)/", - "Attachments": [ - { - "AttachmentID": "16e86f32-3e25-4209-8662-c0dfd91b654c", - "FileName": "HelloWorld.jpg", - "Url": "https://api.xero.com/api.xro/2.0/ManualJournals/0b159335-606b-485f-b51b-97b3b32bad32/Attachments/HelloWorld.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - put: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: createManualJournalAttachmentByFileName - x-hasAccountingValidationError: true - summary: Creates a specific attachment for a specific manual journal by file name - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/ManualJournalID' - - $ref: '#/components/parameters/FileName' - responses: - '200': - description: Success - return response of type Attachments array with a newly created Attachment for a ManualJournals - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "a864994c-e7d7-4dee-b5ca-0a729fde2f39", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552400898428)/", - "Attachments": [ - { - "AttachmentID": "47ac97ff-d4f9-48a0-8a8e-49fae29129e7", - "FileName": "foobar.jpg", - "Url": "https://api.xero.com/api.xro/2.0/ManualJournals/0b159335-606b-485f-b51b-97b3b32bad32/Attachments/foobar.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - '/ManualJournals/{ManualJournalID}/History': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getManualJournalsHistory - summary: Retrieves history for a specific manual journal - parameters: - - $ref: '#/components/parameters/ManualJournalID' - responses: - '200': - $ref: '#/components/responses/HistoryRetrieved' - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createManualJournalHistoryRecord - summary: Creates a history record for a specific manual journal - x-hasAccountingValidationError: true - x-example: - - historyRecord: - is_object: true - key: historyRecord - keyPascal: HistoryRecord - keySnake: history_record - - Details: - is_last: true - key: details - keyPascal: Details - default: Hello World - object: historyRecord - - historyRecords: - is_object: true - key: historyRecords - keyPascal: HistoryRecords - - add_historyRecord: - is_last: true - is_array_add: true - key: historyRecords - keyPascal: HistoryRecords - keySnake: history_records - java: HistoryRecords - python: history_record - ruby: history_record - csharp: HistoryRecord - object: historyRecord - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/ManualJournalID' - responses: - '200': - $ref: '#/components/responses/HistoryRecordCreated' - '400': - $ref: '#/components/responses/400Error' - requestBody: - $ref: '#/components/requestBodies/historyRecords' - /Organisation: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.settings, accounting.settings.read] - tags: - - Accounting - operationId: getOrganisations - summary: Retrieves Xero organisation details - responses: - '200': - description: Success - return response of type Organisation array with all Organisation - content: - application/json: - schema: - $ref: '#/components/schemas/Organisations' - example: { - "Id": "27b7a645-a3ee-43c8-b2c6-a2fa7b84c8c5", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552404447003)/", - "Organisations": [ - { - "APIKey": "CTJ60UH519MXQIXEJSDPDALS3EOZ5Y", - "Name": "Dev Evangelist - Sid Test 3 (NZ-2016-02)", - "LegalName": "Dev Evangelist - Sid Test 3 (NZ-2016-02)", - "PaysTax": true, - "Version": "NZ", - "OrganisationType": "COMPANY", - "BaseCurrency": "NZD", - "CountryCode": "NZ", - "IsDemoCompany": false, - "OrganisationStatus": "ACTIVE", - "TaxNumber": "071-138-054", - "FinancialYearEndDay": 31, - "FinancialYearEndMonth": 3, - "SalesTaxBasis": "PAYMENTS", - "SalesTaxPeriod": "TWOMONTHS", - "DefaultSalesTax": "Tax Exclusive", - "DefaultPurchasesTax": "Tax Exclusive", - "PeriodLockDate": "/Date(1546214400000+0000)/", - "EndOfYearLockDate": "/Date(1546214400000+0000)/", - "CreatedDateUTC": "/Date(1455827393000)/", - "OrganisationEntityType": "COMPANY", - "Timezone": "NEWZEALANDSTANDARDTIME", - "ShortCode": "!mBdtL", - "OrganisationID": "b2c885a9-4bb9-4a00-9b6e-6c2bf60b1a2b", - "Edition": "BUSINESS", - "Class": "PREMIUM", - "Addresses": [], - "Phones": [], - "ExternalLinks": [], - "PaymentTerms": {} - } - ] - } - '/Organisation/Actions': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.settings, accounting.settings.read] - tags: - - Accounting - operationId: getOrganisationActions - summary: Retrieves a list of the key actions your app has permission to perform in the connected Xero organisation. - responses: - '200': - description: Success - return response of type Actions array with all key actions - content: - application/json: - schema: - $ref: '#/components/schemas/Actions' - example: { - "Id": "f02c0dd1-1917-4d57-9853-997f6bcaf2bc", - "Status": "OK", - "ProviderName": "Java OA2 dev 01", - "DateTimeUTC": "/Date(1602883301013)/", - "Actions": [ - { - "Name": "CreateApprovedInvoice", - "Status": "ALLOWED" - }, - { - "Name": "CreateDraftPurchaseOrder", - "Status": "ALLOWED" - }, - { - "Name": "CreateApprovedBill", - "Status": "ALLOWED" - }, - { - "Name": "AttachFilesIntoInvoice", - "Status": "ALLOWED" - }, - { - "Name": "UseMulticurrency", - "Status": "ALLOWED" - }, - { - "Name": "CreateDraftInvoice", - "Status": "ALLOWED" - }, - { - "Name": "CreateRepeatingInvoice", - "Status": "ALLOWED" - }, - { - "Name": "CreateRepeatingBill", - "Status": "ALLOWED" - }, - { - "Name": "CreateSentQuote", - "Status": "ALLOWED" - }, - { - "Name": "CreateInvoicePayment", - "Status": "ALLOWED" - }, - { - "Name": "CreateApprovedPurchaseOrder", - "Status": "ALLOWED" - }, - { - "Name": "CreateDraftQuote", - "Status": "ALLOWED" - }, - { - "Name": "CreateDraftBill", - "Status": "ALLOWED" - } - ] - } - '/Organisation/{OrganisationID}/CISSettings': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.settings, accounting.settings.read] - tags: - - Accounting - operationId: getOrganisationCISSettings - summary: Retrieves the CIS settings for the Xero organistaion. - parameters: - - $ref: '#/components/parameters/OrganisationID' - responses: - '200': - description: Success - return response of type Organisation array with specified Organisation - content: - application/json: - schema: - $ref: '#/components/schemas/CISOrgSettings' - example: { - "CISSettings": [ - { - "CISEnambed": true, - "Rate": 10 - } - ] - } - /Overpayments: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getOverpayments - summary: Retrieves overpayments - parameters: - - $ref: '#/components/parameters/ifModifiedSince' - - in: query - name: where - description: Filter by an any element - example: Status=="AUTHORISED" - x-example-csharp: Status==\"AUTHORISED\" - x-example-java: Status=="' + Overpayment.StatusEnum.AUTHORISED + '" - x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Overpayment::STATUS_AUTHORISED . '" - x-example-ruby: Status==#{XeroRuby::Accounting::Overpayment::AUTHORISED} - schema: - type: string - - in: query - name: order - description: Order by an any element - example: "Status ASC" - schema: - type: string - - in: query - name: page - description: e.g. page=1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment - example: 1 - schema: - type: integer - - $ref: '#/components/parameters/unitdp' - - $ref: '#/components/parameters/pageSize' - responses: - '200': - description: Success - return response of type Overpayments array with all Overpayments - content: - application/json: - schema: - $ref: '#/components/schemas/Overpayments' - example: { - "Id": "c0ce675e-e5bc-4b2a-a20e-76a9eaedf89d", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552428951416)/", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 5 - }, - "Overpayments": [ - { - "OverpaymentID": "098b4dcb-5622-4699-87f8-9d40c4ccceb3", - "ID": "098b4dcb-5622-4699-87f8-9d40c4ccceb3", - "Type": "SPEND-OVERPAYMENT", - "RemainingCredit": 500.00, - "Allocations": [], - "Payments": [], - "HasAttachments": false, - "Contact": { - "ContactID": "af3ffcc1-c578-4658-82f3-5d8d458cc7af", - "Name": "Daddy Warbucks", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2019-03-12T00:00:00", - "Date": "/Date(1552348800000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "NoTax", - "LineItems": [], - "SubTotal": 500.00, - "TotalTax": 0.00, - "Total": 500.00, - "UpdatedDateUTC": "/Date(1552428535123+0000)/", - "CurrencyCode": "NZD" - }, - { - "OverpaymentID": "2a8bda49-8908-473b-8bcf-1f90990460eb", - "ID": "2a8bda49-8908-473b-8bcf-1f90990460eb", - "Type": "RECEIVE-OVERPAYMENT", - "RemainingCredit": 20.00, - "Allocations": [], - "Payments": [], - "HasAttachments": false, - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "Name": "Liam Gallagher", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2019-03-13T00:00:00", - "Date": "/Date(1552435200000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "NoTax", - "LineItems": [], - "SubTotal": 20.00, - "TotalTax": 0.00, - "Total": 20.00, - "UpdatedDateUTC": "/Date(1552428568250+0000)/", - "CurrencyCode": "NZD" - }, - { - "OverpaymentID": "ed7f6041-c915-4667-bd1d-54c48e92161e", - "ID": "ed7f6041-c915-4667-bd1d-54c48e92161e", - "Type": "SPEND-OVERPAYMENT", - "RemainingCredit": 3000.00, - "Allocations": [], - "Payments": [], - "HasAttachments": false, - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "Name": "Liam Gallagher", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2019-03-12T00:00:00", - "Date": "/Date(1552348800000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "NoTax", - "LineItems": [], - "SubTotal": 3000.00, - "TotalTax": 0.00, - "Total": 3000.00, - "UpdatedDateUTC": "/Date(1552428781527+0000)/", - "CurrencyCode": "NZD" - }, - { - "OverpaymentID": "0859adbc-ea00-40cd-a877-258cf8644975", - "ID": "0859adbc-ea00-40cd-a877-258cf8644975", - "Type": "RECEIVE-OVERPAYMENT", - "RemainingCredit": 20.00, - "Allocations": [], - "Payments": [], - "HasAttachments": false, - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "Name": "Liam Gallagher", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2019-03-13T00:00:00", - "Date": "/Date(1552435200000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "NoTax", - "LineItems": [], - "SubTotal": 20.00, - "TotalTax": 0.00, - "Total": 20.00, - "UpdatedDateUTC": "/Date(1552428842190+0000)/", - "CurrencyCode": "NZD" - }, - { - "OverpaymentID": "687b877f-634a-415d-92b2-74e62977de30", - "ID": "687b877f-634a-415d-92b2-74e62977de30", - "Type": "RECEIVE-OVERPAYMENT", - "RemainingCredit": 20.00, - "Allocations": [], - "Payments": [], - "HasAttachments": false, - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "Name": "Liam Gallagher", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2019-03-13T00:00:00", - "Date": "/Date(1552435200000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "NoTax", - "LineItems": [], - "SubTotal": 20.00, - "TotalTax": 0.00, - "Total": 20.00, - "UpdatedDateUTC": "/Date(1552428950730+0000)/", - "CurrencyCode": "NZD" - } - ] - } - '/Overpayments/{OverpaymentID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getOverpayment - summary: Retrieves a specific overpayment using a unique overpayment Id - parameters: - - $ref: '#/components/parameters/OverpaymentID' - responses: - '200': - description: Success - return response of type Overpayments array with specified Overpayments - content: - application/json: - schema: - $ref: '#/components/schemas/Overpayments' - example: { - "Id": "46c9e8e2-9410-4e75-9297-f0ca8fa76c32", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1553278835158)/", - "Overpayments": [ - { - "OverpaymentID": "ed7f6041-c915-4667-bd1d-54c48e92161e", - "ID": "ed7f6041-c915-4667-bd1d-54c48e92161e", - "CurrencyRate": 1.000000, - "Type": "SPEND-OVERPAYMENT", - "RemainingCredit": 2999.00, - "Allocations": [ - { - "Amount": 1.00, - "Date": "/Date(1552348800000+0000)/", - "Invoice": { - "InvoiceID": "c45720a1-ade3-4a38-a064-d15489be6841", - "InvoiceNumber": "", - "Payments": [], - "CreditNotes": [], - "Prepayments": [], - "Overpayments": [], - "HasErrors": false, - "IsDiscounted": false, - "LineItems": [] - } - } - ], - "Payments": [], - "HasAttachments": true, - "Attachments": [ - { - "AttachmentID": "247dd942-5245-47a7-adb1-4d9ea075b431", - "FileName": "giphy.gif", - "Url": "https://api.xero.com/api.xro/2.0/banktransaction/ed7f6041-c915-4667-bd1d-54c48e92161e/Attachments/giphy.gif", - "MimeType": "image/gif", - "ContentLength": 495727 - } - ], - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "ContactStatus": "ACTIVE", - "Name": "Liam Gallagher", - "FirstName": "Liam", - "LastName": "Gallagher", - "EmailAddress": "liam@rockstar.com", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "", - "AttentionTo": "" - }, - { - "AddressType": "POBOX", - "City": "Anytown", - "Region": "NY", - "PostalCode": "10101", - "Country": "USA", - "AttentionTo": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "222-2222", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "333-2233", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "444-3433", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1551747281053+0000)/", - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2019-03-12T00:00:00", - "Date": "/Date(1552348800000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "NoTax", - "LineItems": [ - { - "Description": "Broken TV deposit", - "UnitAmount": 3000.00, - "TaxType": "NONE", - "TaxAmount": 0.00, - "LineAmount": 3000.00, - "AccountCode": "800", - "Tracking": [], - "Quantity": 1.0000, - "DiscountEnteredAsPercent": true, - "ValidationErrors": [] - } - ], - "SubTotal": 3000.00, - "TotalTax": 0.00, - "Total": 3000.00, - "UpdatedDateUTC": "/Date(1552428952890+0000)/", - "CurrencyCode": "NZD" - } - ] - } - '/Overpayments/{OverpaymentID}/Allocations': - parameters: - - $ref: '#/components/parameters/requiredHeader' - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createOverpaymentAllocations - summary: Creates a single allocation for a specific overpayment - x-hasAccountingValidationError: true - x-example: - - currDate: - is_date: true - key: currDate - keyPascal: CurrDate - keySnake: curr_date - java_datatype: LocalDate - default: "LocalDate.now()" - java: "LocalDate.now()" - csharp: "DateTime.Now" - node: "'2020-12-10'" - php: "new DateTime('2020-12-10')" - python: "dateutil.parser.parse('2020-12-03T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - invoice: - is_object: true - key: invoice - keyPascal: Invoice - - invoiceID: - is_last: true - is_uuid: true - key: invoiceID - keyPascal: InvoiceID - keySnake: invoice_id - default: 00000000-0000-0000-0000-000000000000 - object: invoice - - allocation: - is_object: true - key: allocation - keyPascal: Allocation - - amount: - nonString: true - key: amount - keyPascal: Amount - default: 1.0 - is_money: true - object: allocation - - date: - is_variable: true - nonString: true - key: date - keyPascal: Date - default: currDate - python: curr_date - ruby: curr_date - object: allocation - - set_invoice: - is_last: true - is_variable: true - nonString: true - key: invoice - keyPascal: Invoice - default: invoice - object: allocation - - allocations: - is_object: true - key: allocations - keyPascal: Allocations - - add_allocation: - is_last: true - is_array_add: true - key: allocations - keyPascal: Allocations - java: Allocations - csharp: Allocation - object: allocation - parameters: - - $ref: '#/components/parameters/OverpaymentID' - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Allocations array with all Allocation for Overpayments - content: - application/json: - schema: - $ref: '#/components/schemas/Allocations' - example: { - "Id": "3b7f7be2-384a-4703-bcfb-c56e9116c914", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552428952968)/", - "Allocations": [ - { - "Amount": 1.00, - "Date": "/Date(1552348800000+0000)/", - "Invoice": { - "InvoiceID": "c45720a1-ade3-4a38-a064-d15489be6841", - "Payments": [], - "CreditNotes": [], - "Prepayments": [], - "Overpayments": [], - "HasErrors": false, - "IsDiscounted": false, - "LineItems": [], - "ValidationErrors": [] - }, - "Overpayment": { - "OverpaymentID": "ed7f6041-c915-4667-bd1d-54c48e92161e", - "ID": "ed7f6041-c915-4667-bd1d-54c48e92161e", - "LineItems": [] - }, - "ValidationErrors": [] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Allocations array with Allocation object in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/Allocations' - example: { - "Allocations": [ - { - "Invoice": { - "InvoiceID": "00000000-0000-0000-0000-000000000000", - "LineItems": [], - "Contact": {}, - "Type": "ACCPAY" - }, - "Amount": 10.00, - "Date": "2019-03-12" - } - ] - } - '/Overpayments/{OverpaymentID}/Allocations/{AllocationID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - delete: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: deleteOverpaymentAllocations - summary: Deletes an Allocation from an overpayment - parameters: - - $ref: '#/components/parameters/OverpaymentID' - - $ref: '#/components/parameters/AllocationID' - responses: - '200': - description: Success - return response of type Allocation with the isDeleted flag as true - content: - application/json: - schema: - $ref: '#/components/schemas/Allocation' - example: { - "AllocationId": "2bb15054-3868-4f85-a9c6-0402ec8c1201", - "Date": "/Date(1551822670731)/", - "Invoice": [ - { - "InvoiceID": "b7eb1fc9-a0f9-4e8e-9373-6689f5350832", - } - ], - "IsDeleted": true, - } - '/Overpayments/{OverpaymentID}/History': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getOverpaymentHistory - summary: Retrieves history records of a specific overpayment - parameters: - - $ref: '#/components/parameters/OverpaymentID' - responses: - '200': - $ref: '#/components/responses/HistoryRetrieved' - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createOverpaymentHistory - summary: Creates a history record for a specific overpayment - x-hasAccountingValidationError: true - x-example: - - historyRecord: - is_object: true - key: historyRecord - keyPascal: HistoryRecord - keySnake: history_record - - Details: - is_last: true - key: details - keyPascal: Details - default: Hello World - object: historyRecord - - historyRecords: - is_object: true - key: historyRecords - keyPascal: HistoryRecords - - add_historyRecord: - is_last: true - is_array_add: true - key: historyRecords - keyPascal: HistoryRecords - keySnake: history_records - java: HistoryRecords - python: history_record - ruby: history_record - csharp: HistoryRecord - object: historyRecord - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/OverpaymentID' - responses: - '200': - $ref: '#/components/responses/HistoryRecordCreated' - '400': - description: A failed request due to validation error - API is not able to create HistoryRecord for Overpayments - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: { - "ErrorNumber": 10, - "Type": "ValidationException", - "Message": "A validation exception occurred", - "Elements": [ - { - "DateUTCString": "2019-03-12T22:30:13", - "DateUTC": "/Date(1552429813667)/", - "Details": "Hello World", - "ValidationErrors": [ - { - "Message": "The document with the supplied id was not found for this endpoint." - } - ] - } - ] - } - requestBody: - $ref: '#/components/requestBodies/historyRecords' - /Payments: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getPayments - summary: Retrieves payments for invoices and credit notes - parameters: - - $ref: '#/components/parameters/ifModifiedSince' - - in: query - name: where - description: Filter by an any element - example: Status=="AUTHORISED" - x-example-csharp: Status==\"AUTHORISED\" - x-example-java: Status=="' + Payment.StatusEnum.AUTHORISED + '" - x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Payment::STATUS_AUTHORISED . '" - x-example-ruby: Status==#{XeroRuby::Accounting::Payment::AUTHORISED} - schema: - type: string - - in: query - name: order - description: Order by an any element - example: "Amount ASC" - schema: - type: string - - in: query - name: page - description: Up to 100 payments will be returned in a single API call - example: 1 - schema: - type: integer - - $ref: '#/components/parameters/pageSize' - responses: - '200': - description: Success - return response of type Payments array for all Payments - content: - application/json: - schema: - $ref: '#/components/schemas/Payments' - example: { - "Id": "9f310473-e1b5-4704-a25c-eec653deb596", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552431874205)/", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 2 - }, - "Payments": [ - { - "PaymentID": "99ea7f6b-c513-4066-bc27-b7c65dcd76c2", - "BatchPaymentID": "b54aa50c-794c-461b-89d1-846e1b84d9c0", - "BatchPayment": { - "Account": { - "AccountID": "5690f1e8-1d02-4893-90c2-ee1a69eff942" - }, - "BatchPaymentID": "b54aa50c-794c-461b-89d1-846e1b84d9c0", - "Date": "/Date(1552521600000+0000)/", - "Type": "RECBATCH", - "Status": "AUTHORISED", - "TotalAmount": "50.00", - "UpdatedDateUTC": "/Date(1541176592690+0000)/", - "IsReconciled": "false" - }, - "Date": "/Date(1543449600000+0000)/", - "BankAmount": 46.00, - "Amount": 46.00, - "Reference": "", - "CurrencyRate": 1.000000, - "PaymentType": "ACCRECPAYMENT", - "Status": "AUTHORISED", - "UpdatedDateUTC": "/Date(1541176592690+0000)/", - "HasAccount": true, - "IsReconciled": false, - "Account": { - "AccountID": "5690f1e8-1d02-4893-90c2-ee1a69eff942", - "Code": "970" - }, - "Invoice": { - "Type": "ACCREC", - "InvoiceID": "046d8a6d-1ae1-4b4d-9340-5601bdf41b87", - "InvoiceNumber": "INV-0002", - "Payments": [], - "CreditNotes": [], - "Prepayments": [], - "Overpayments": [], - "HasErrors": false, - "IsDiscounted": false, - "Contact": { - "ContactID": "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7", - "ContactNumber": "", - "Name": "Barney Rubble-83203", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "LineItems": [], - "CurrencyCode": "NZD" - }, - "HasValidationErrors": false - }, - { - "PaymentID": "6b037c9b-2e5d-4905-84d3-eabfb3438242", - "Date": "/Date(1552521600000+0000)/", - "BankAmount": 2.00, - "Amount": 2.00, - "Reference": "Too much", - "CurrencyRate": 1.000000, - "PaymentType": "ARCREDITPAYMENT", - "Status": "AUTHORISED", - "UpdatedDateUTC": "/Date(1551812346173+0000)/", - "HasAccount": true, - "IsReconciled": false, - "Account": { - "AccountID": "136ebd08-60ea-4592-8982-be92c153b53a", - "Code": "980" - }, - "Invoice": { - "Type": "ACCRECCREDIT", - "InvoiceID": "249f15fa-f2a7-4acc-8769-0984103f2225", - "InvoiceNumber": "CN-0005", - "Payments": [], - "CreditNotes": [], - "Prepayments": [], - "Overpayments": [], - "HasErrors": false, - "IsDiscounted": false, - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "ContactNumber": "", - "Name": "Liam Gallagher", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "LineItems": [], - "CurrencyCode": "NZD" - }, - "HasValidationErrors": false - } - ] - } - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createPayments - summary: Creates multiple payments for invoices or credit notes - x-hasAccountingValidationError: true - x-example: - - dateValue: - is_date: true - key: dateValue - keyPascal: Date - keySnake: date_value - java_datatype: LocalDate - default: "LocalDate.of(2020, Month.OCTOBER, 10)" - java: "LocalDate.now()" - csharp: "DateTime.Now" - php: "new DateTime('2020-10-10')" - node: "'2020-10-10'" - python: "dateutil.parser.parse('2020-10-10T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - invoice: - is_object: true - key: invoice - keyPascal: Invoice - - invoiceID: - is_last: true - is_uuid: true - key: invoiceID - keyPascal: InvoiceID - keySnake: invoice_id - default: 00000000-0000-0000-0000-000000000000 - object: invoice - - account: - is_object: true - key: account - keyPascal: Account - - accountID: - is_last: true - is_uuid: true - key: accountID - keyPascal: AccountID - keySnake: account_id - default: 00000000-0000-0000-0000-000000000000 - object: account - - payment: - is_object: true - key: payment - keyPascal: Payment - - set_invoice: - is_variable: true - nonString: true - key: invoice - keyPascal: Invoice - default: invoice - object: payment - - set_account: - is_variable: true - nonString: true - key: account - keyPascal: Account - default: account - object: payment - - amount: - nonString: true - key: amount - keyPascal: Amount - default: 1.0 - is_money: true - object: payment - - date: - is_last: true - is_variable: true - nonString: true - key: date - keyPascal: Date - default: dateValue - python: date_value - ruby: date_value - object: payment - - payments: - is_object: true - key: payments - keyPascal: Payments - - add_payment: - is_last: true - is_array_add: true - key: payments - keyPascal: Payments - java: Payments - csharp: Payment - object: payment - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Payments array for newly created Payment - content: - application/json: - schema: - $ref: '#/components/schemas/Payments' - example: { - "Id": "83b5715a-6a77-4c16-b5b8-2da08b5fde44", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552432238716)/", - "Payments": [ - { - "PaymentID": "61ed71fc-01bf-4eb8-8419-8a18789ff45f", - "Date": "/Date(1552348800000+0000)/", - "BankAmount": 1.00, - "Amount": 1.00, - "CurrencyRate": 1.000000, - "PaymentType": "ACCRECPAYMENT", - "Status": "AUTHORISED", - "UpdatedDateUTC": "/Date(1552432238623+0000)/", - "HasAccount": true, - "IsReconciled": false, - "Account": { - "AccountID": "5690f1e8-1d02-4893-90c2-ee1a69eff942", - "Code": "970", - "Name": "Owner A Funds Introduced" - }, - "Invoice": { - "Type": "ACCREC", - "InvoiceID": "c7c37b83-ac95-45ea-88ba-8ad83a5f22fe", - "InvoiceNumber": "INV-0004", - "Reference": "", - "Prepayments": [], - "Overpayments": [], - "AmountDue": 229.00, - "AmountPaid": 1.00, - "SentToContact": false, - "CurrencyRate": 1.000000, - "HasErrors": false, - "IsDiscounted": false, - "Contact": { - "ContactID": "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7", - "Name": "Barney Rubble-83203", - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2018-10-10T00:00:00", - "Date": "/Date(1539129600000+0000)/", - "DueDateString": "2018-10-18T00:00:00", - "DueDate": "/Date(1539820800000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "boo", - "UnitAmount": 200.00, - "TaxType": "OUTPUT2", - "TaxAmount": 30.00, - "LineAmount": 200.00, - "AccountCode": "200", - "Tracking": [], - "Quantity": 1.0000, - "LineItemID": "173dfdb9-43b5-4bd2-ae25-9419e662a3a7", - "ValidationErrors": [] - } - ], - "SubTotal": 200.00, - "TotalTax": 30.00, - "Total": 230.00, - "UpdatedDateUTC": "/Date(1552432238623+0000)/", - "CurrencyCode": "NZD" - }, - "HasValidationErrors": true, - "ValidationErrors": [ - { - "Message": "Payment amount exceeds the amount outstanding on this document" - } - ] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Payments array with Payment object in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/Payments' - example: { - "Payments": [ - { - "Invoice": { - "LineItems": [], - "InvoiceID": "00000000-0000-0000-0000-000000000000" - }, - "Account": { - "Code": "970" - }, - "Date": "2019-03-12", - "Amount": 1 - } - ] - } - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createPayment - summary: Creates a single payment for invoice or credit notes - parameters: - - $ref: '#/components/parameters/idempotencyKey' - x-hasAccountingValidationError: true - x-example: - - dateValue: - is_date: true - key: dateValue - keyPascal: Date - keySnake: date_value - java_datatype: LocalDate - default: "LocalDate.of(2020, Month.OCTOBER, 10)" - java: "LocalDate.now()" - csharp: "DateTime.Now" - php: "new DateTime('2020-10-10')" - node: "'2020-10-10'" - python: "dateutil.parser.parse('2020-10-10T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - invoice: - is_object: true - key: invoice - keyPascal: Invoice - - invoiceID: - is_last: true - is_uuid: true - key: invoiceID - keyPascal: InvoiceID - keySnake: invoice_id - default: 00000000-0000-0000-0000-000000000000 - object: invoice - - account: - is_object: true - key: account - keyPascal: Account - - accountID: - is_last: true - is_uuid: true - key: accountID - keyPascal: AccountID - keySnake: account_id - default: 00000000-0000-0000-0000-000000000000 - object: account - - payment: - is_object: true - key: payment - keyPascal: Payment - - set_invoice: - is_variable: true - nonString: true - key: invoice - keyPascal: Invoice - default: invoice - object: payment - - set_account: - is_variable: true - nonString: true - key: account - keyPascal: Account - default: account - object: payment - - amount: - nonString: true - key: amount - keyPascal: Amount - default: 1.0 - is_money: true - object: payment - - date: - is_last: true - is_variable: true - nonString: true - key: date - keyPascal: Date - default: dateValue - python: date_value - ruby: date_value - object: payment - - payments: - is_object: true - key: payments - keyPascal: Payments - - add_payment: - is_last: true - is_array_add: true - key: payments - keyPascal: Payments - java: Payments - csharp: Payment - object: payment - responses: - '200': - description: Success - return response of type Payments array for newly created Payment - content: - application/json: - schema: - $ref: '#/components/schemas/Payments' - example: { - "Id": "83b5715a-6a77-4c16-b5b8-2da08b5fde44", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552432238716)/", - "Payments": [ - { - "PaymentID": "61ed71fc-01bf-4eb8-8419-8a18789ff45f", - "Date": "/Date(1552348800000+0000)/", - "BankAmount": 1.00, - "Amount": 1.00, - "CurrencyRate": 1.000000, - "PaymentType": "ACCRECPAYMENT", - "Status": "AUTHORISED", - "UpdatedDateUTC": "/Date(1552432238623+0000)/", - "HasAccount": true, - "IsReconciled": false, - "Account": { - "AccountID": "5690f1e8-1d02-4893-90c2-ee1a69eff942", - "Code": "970", - "Name": "Owner A Funds Introduced" - }, - "Invoice": { - "Type": "ACCREC", - "InvoiceID": "c7c37b83-ac95-45ea-88ba-8ad83a5f22fe", - "InvoiceNumber": "INV-0004", - "Reference": "", - "Prepayments": [], - "Overpayments": [], - "AmountDue": 229.00, - "AmountPaid": 1.00, - "SentToContact": false, - "CurrencyRate": 1.000000, - "HasErrors": false, - "IsDiscounted": false, - "Contact": { - "ContactID": "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7", - "Name": "Barney Rubble-83203", - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2018-10-10T00:00:00", - "Date": "/Date(1539129600000+0000)/", - "DueDateString": "2018-10-18T00:00:00", - "DueDate": "/Date(1539820800000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "boo", - "UnitAmount": 200.00, - "TaxType": "OUTPUT2", - "TaxAmount": 30.00, - "LineAmount": 200.00, - "AccountCode": "200", - "Tracking": [], - "Quantity": 1.0000, - "LineItemID": "173dfdb9-43b5-4bd2-ae25-9419e662a3a7", - "ValidationErrors": [] - } - ], - "SubTotal": 200.00, - "TotalTax": 30.00, - "Total": 230.00, - "UpdatedDateUTC": "/Date(1552432238623+0000)/", - "CurrencyCode": "NZD" - }, - "HasValidationErrors": true, - "ValidationErrors": [ - { - "Message": "Payment amount exceeds the amount outstanding on this document" - } - ] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Request body with a single Payment object - content: - application/json: - schema: - $ref: '#/components/schemas/Payment' - example: { - "Payments": [ - { - "Invoice": { - "LineItems": [], - "InvoiceID": "00000000-0000-0000-0000-000000000000" - }, - "Account": { - "Code": "970" - }, - "Date": "2019-03-12", - "Amount": 1 - } - ] - } - '/Payments/{PaymentID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getPayment - summary: Retrieves a specific payment for invoices and credit notes using a unique payment Id - parameters: - - $ref: '#/components/parameters/PaymentID' - responses: - '200': - description: Success - return response of type Payments array for specified Payment - content: - application/json: - schema: - $ref: '#/components/schemas/Payments' - example: { - "Id": "4876f9ee-3a17-47d8-8c1b-84377c8f2998", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552431874852)/", - "Payments": [ - { - "PaymentID": "99ea7f6b-c513-4066-bc27-b7c65dcd76c2", - "BatchPaymentID": "b54aa50c-794c-461b-89d1-846e1b84d9c0", - "BatchPayment": { - "Account": { - "AccountID": "5690f1e8-1d02-4893-90c2-ee1a69eff942" - }, - "BatchPaymentID": "b54aa50c-794c-461b-89d1-846e1b84d9c0", - "Date": "/Date(1543449600000+0000)/", - "Type": "RECBATCH", - "Status": "AUTHORISED", - "TotalAmount": "50.00", - "UpdatedDateUTC": "/Date(1541176592690+0000)/", - "IsReconciled": "false" - }, - "Date": "/Date(1543449600000+0000)/", - "BankAmount": 46.00, - "Amount": 46.00, - "CurrencyRate": 1.000000, - "PaymentType": "ACCRECPAYMENT", - "Status": "AUTHORISED", - "UpdatedDateUTC": "/Date(1541176592690+0000)/", - "HasAccount": true, - "IsReconciled": false, - "Account": { - "AccountID": "5690f1e8-1d02-4893-90c2-ee1a69eff942", - "Code": "970", - "Name": "Owner A Funds Introduced" - }, - "Invoice": { - "Type": "ACCREC", - "InvoiceID": "046d8a6d-1ae1-4b4d-9340-5601bdf41b87", - "InvoiceNumber": "INV-0002", - "Reference": "Red Fish, Blue Fish", - "Payments": [ - { - "PaymentID": "99ea7f6b-c513-4066-bc27-b7c65dcd76c2", - "Date": "/Date(1543449600000+0000)/", - "Amount": 46.00, - "CurrencyRate": 1.000000, - "HasAccount": false, - "HasValidationErrors": false - } - ], - "Prepayments": [], - "Overpayments": [], - "AmountDue": 0.00, - "AmountPaid": 46.00, - "SentToContact": true, - "CurrencyRate": 1.000000, - "HasErrors": false, - "IsDiscounted": false, - "Contact": { - "ContactID": "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7", - "Name": "Barney Rubble-83203", - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2018-10-20T00:00:00", - "Date": "/Date(1539993600000+0000)/", - "DueDateString": "2018-12-30T00:00:00", - "DueDate": "/Date(1546128000000+0000)/", - "Status": "PAID", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Acme Tires", - "UnitAmount": 20.00, - "TaxType": "OUTPUT2", - "TaxAmount": 6.00, - "LineAmount": 40.00, - "AccountCode": "200", - "Tracking": [], - "Quantity": 2.0000, - "LineItemID": "878d1688-a905-4866-ae91-5a772c2540c7", - "ValidationErrors": [] - } - ], - "SubTotal": 40.00, - "TotalTax": 6.00, - "Total": 46.00, - "UpdatedDateUTC": "/Date(1541176592690+0000)/", - "CurrencyCode": "NZD", - "FullyPaidOnDate": "/Date(1543449600000+0000)/" - }, - "HasValidationErrors": false - } - ] - } - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: deletePayment - summary: Updates a specific payment for invoices and credit notes - x-hasAccountingValidationError: true - x-example: - - paymentDelete: - is_object: true - key: paymentDelete - keyPascal: PaymentDelete - - status: - is_last: true - key: status - keyPascal: Status - default: DELETED - object: paymentDelete - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/PaymentID' - responses: - '200': - description: Success - return response of type Payments array for updated Payment - content: - application/json: - schema: - $ref: '#/components/schemas/Payments' - example: { - "Id": "ee23328c-4a8b-4ee7-8fb6-9796ffab9cb0", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC": "/Date(1583945852489)/", - "Payments": [ - { - "PaymentID": "c94c996b-1ab3-4ff3-ad19-1cdc77f30817", - "Date": "/Date(1567382400000+0000)/", - "BankAmount": 2.00, - "Amount": 2.00, - "Reference": "foobar", - "CurrencyRate": 1.000000, - "PaymentType": "APCREDITPAYMENT", - "Status": "DELETED", - "UpdatedDateUTC": "/Date(1583945852373+0000)/", - "HasAccount": true, - "IsReconciled": false, - "Account": { - "AccountID": "57f261f0-e32d-4a7f-be82-22cd992c6367", - "Code": "033", - "Name": "Checking account" - }, - "Invoice": { - "Type": "ACCPAYCREDIT", - "InvoiceID": "dba68ebc-c05a-4e2d-b97d-964349e5b8d6", - "InvoiceNumber": "", - "Reference": "", - "Prepayments": [], - "Overpayments": [], - "AmountDue": 22.00, - "AmountPaid": 0.00, - "SentToContact": false, - "CurrencyRate": 1.000000, - "IsDiscounted": false, - "HasErrors": false, - "Contact": { - "ContactID": "216830cb-9a68-487e-928b-c1a7ccc4fc81", - "Name": "FooBar73005", - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2017-01-02T00:00:00", - "Date": "/Date(1483315200000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Sample Item72716", - "UnitAmount": 20.00, - "TaxType": "INPUT", - "TaxAmount": 2.00, - "LineAmount": 20.00, - "AccountCode": "400", - "Tracking": [], - "Quantity": 1.0000, - "ValidationErrors": [] - } - ], - "SubTotal": 20.00, - "TotalTax": 2.00, - "Total": 22.00, - "UpdatedDateUTC": "/Date(1583945852363+0000)/", - "CurrencyCode": "AUD" - }, - "HasValidationErrors": false - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentDelete' - example: { - "Payments":[ - { - "Status":"DELETED" - } - ] - } - '/Payments/{PaymentID}/History': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getPaymentHistory - summary: Retrieves history records of a specific payment - parameters: - - $ref: '#/components/parameters/PaymentID' - responses: - '200': - $ref: '#/components/responses/HistoryRetrieved' - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createPaymentHistory - summary: Creates a history record for a specific payment - x-hasAccountingValidationError: true - x-example: - - historyRecord: - is_object: true - key: historyRecord - keyPascal: HistoryRecord - keySnake: history_record - - Details: - is_last: true - key: details - keyPascal: Details - default: Hello World - object: historyRecord - - historyRecords: - is_object: true - key: historyRecords - keyPascal: HistoryRecords - - add_historyRecord: - is_last: true - is_array_add: true - key: historyRecords - keyPascal: HistoryRecords - keySnake: history_records - java: HistoryRecords - python: history_record - ruby: history_record - csharp: HistoryRecord - object: historyRecord - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/PaymentID' - responses: - '200': - $ref: '#/components/responses/HistoryRecordCreated' - '400': - description: A failed request due to validation error - API is not able to create HistoryRecord for Payments - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: { - "ErrorNumber": 10, - "Type": "ValidationException", - "Message": "A validation exception occurred", - "Elements": [ - { - "DateUTCString": "2019-03-12T22:30:13", - "DateUTC": "/Date(1552429813667)/", - "Details": "Hello World", - "ValidationErrors": [ - { - "Message": "The document with the supplied id was not found for this endpoint." - } - ] - } - ] - } - requestBody: - $ref: '#/components/requestBodies/historyRecords' - /PaymentServices: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [paymentservices] - tags: - - Accounting - operationId: getPaymentServices - summary: Retrieves payment services - x-excludeFromPreview: true - responses: - '200': - description: Success - return response of type PaymentServices array for all PaymentService - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentServices' - example: { - "Id": "ab82a7dd-5070-4e82-b841-0af52909fe04", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552488713171)/", - "PaymentServices": [ - { - "PaymentServiceID": "54b3b4f6-0443-4fba-bcd1-61ec0c35ca55", - "PaymentServiceName": "PayUpNow", - "PaymentServiceUrl": "https://www.payupnow.com/", - "PaymentServiceType": "Custom", - "PayNowText": "Time To Pay" - } - ] - } - put: - security: - - OAuth2: [paymentservices] - tags: - - Accounting - operationId: createPaymentService - summary: Creates a payment service - parameters: - - $ref: '#/components/parameters/idempotencyKey' - x-excludeFromPreview: true - x-hasAccountingValidationError: true - x-example: - - object: - is_object: true - key: paymentService - keyPascal: PaymentService - keySnake: payment_service - - paymentServiceName: - key: paymentServiceName - keyPascal: PaymentServiceName - keySnake: payment_service_name - default: ACME Payments - object: paymentService - - paymentServiceUrl: - key: paymentServiceUrl - keyPascal: PaymentServiceUrl - keySnake: payment_service_url - default: "https://www.payupnow.com/" - object: paymentService - - payNowText: - is_last: true - key: payNowText - keyPascal: PayNowText - keySnake: pay_now_text - default: Pay Now - object: paymentService - - paymentServices: - is_object: true - key: paymentServices - keyPascal: PaymentServices - - add_paymentService: - is_last: true - is_array_add: true - key: paymentServices - keyPascal: PaymentServices - java: PaymentServices - csharp: PaymentService - object: paymentService - responses: - '200': - description: Success - return response of type PaymentServices array for newly created PaymentService - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentServices' - example: { - "Id": "7ed8b3c0-2155-49ee-a583-f2dce6607dfb", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552488712813)/", - "PaymentServices": [ - { - "PaymentServiceID": "54b3b4f6-0443-4fba-bcd1-61ec0c35ca55", - "PaymentServiceName": "PayUpNow", - "PaymentServiceUrl": "https://www.payupnow.com/", - "PaymentServiceType": "Custom", - "PayNowText": "Time To Pay", - "ValidationErrors": [ - { - "Message": "Payment service could not be found" - } - ] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: PaymentServices array with PaymentService object in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentServices' - example: { - "PaymentServices": [ - { - "PaymentServiceName": "PayUpNow", - "PaymentServiceUrl": "https://www.payupnow.com/", - "PayNowText": "Time To Pay" - } - ] - } - /Prepayments: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getPrepayments - summary: Retrieves prepayments - parameters: - - $ref: '#/components/parameters/ifModifiedSince' - - in: query - name: where - description: Filter by an any element - example: Status=="AUTHORISED" - x-example-csharp: Status==\"AUTHORISED\" - x-example-java: Status=="' + Prepayment.StatusEnum.AUTHORISED + '" - x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Prepayment::STATUS_AUTHORISED . '" - x-example-ruby: Status==#{XeroRuby::Accounting::Prepayment::AUTHORISED} - schema: - type: string - - in: query - name: order - description: Order by an any element - example: "Reference ASC" - schema: - type: string - - in: query - name: page - description: e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment - example: 1 - schema: - type: integer - - $ref: '#/components/parameters/unitdp' - - $ref: '#/components/parameters/pageSize' - responses: - '200': - description: Success - return response of type Prepayments array for all Prepayment - content: - application/json: - schema: - $ref: '#/components/schemas/Prepayments' - example: { - "Id": "d7a9ca0c-6159-4c26-ad2e-715440c50b7d", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552489227595)/", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 1 - }, - "Prepayments": [ - { - "PrepaymentID": "ce0cddef-cf5a-4e59-b638-f225679115a7", - "ID": "ce0cddef-cf5a-4e59-b638-f225679115a7", - "Type": "RECEIVE-PREPAYMENT", - "Reference": "INV-0011", - "RemainingCredit": 3450.00, - "Allocations": [], - "Payments": [], - "HasAttachments": true, - "Contact": { - "ContactID": "be392c72-c121-4f83-9512-03ac71e54c20", - "Name": "Luke Skywalker", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2019-03-13T00:00:00", - "Date": "/Date(1552435200000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "Exclusive", - "LineItems": [], - "SubTotal": 3000.00, - "TotalTax": 450.00, - "Total": 3450.00, - "UpdatedDateUTC": "/Date(1552489187730+0000)/", - "CurrencyCode": "NZD" - } - ] - } - '/Prepayments/{PrepaymentID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getPrepayment - summary: Allows you to retrieve a specified prepayments - parameters: - - $ref: '#/components/parameters/PrepaymentID' - responses: - '200': - description: Success - return response of type Prepayments array for a specified Prepayment - content: - application/json: - schema: - $ref: '#/components/schemas/Prepayments' - example: { - "Id": "18e5f578-ef28-4096-a7aa-d06d65574b99", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1553540376847)/", - "Prepayments": [ - { - "PrepaymentID": "ce0cddef-cf5a-4e59-b638-f225679115a7", - "ID": "ce0cddef-cf5a-4e59-b638-f225679115a7", - "CurrencyRate": 1.000000, - "Type": "RECEIVE-PREPAYMENT", - "Reference": "INV-0011", - "RemainingCredit": 3449.00, - "Allocations": [ - { - "Amount": 1.00, - "Date": "/Date(1552435200000+0000)/", - "Invoice": { - "InvoiceID": "c7c37b83-ac95-45ea-88ba-8ad83a5f22fe", - "InvoiceNumber": "INV-0004", - "Payments": [], - "CreditNotes": [], - "Prepayments": [], - "Overpayments": [], - "HasErrors": false, - "IsDiscounted": false, - "LineItems": [] - } - } - ], - "Payments": [], - "HasAttachments": true, - "Attachments": [ - { - "AttachmentID": "2ca06aa0-3629-474a-9401-553d4b7fa9b0", - "FileName": "giphy.gif", - "Url": "https://api.xero.com/api.xro/2.0/banktransaction/ce0cddef-cf5a-4e59-b638-f225679115a7/Attachments/giphy.gif", - "MimeType": "image/gif", - "ContentLength": 495727 - } - ], - "Contact": { - "ContactID": "be392c72-c121-4f83-9512-03ac71e54c20", - "ContactStatus": "ACTIVE", - "Name": "Luke Skywalker", - "EmailAddress": "", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "" - }, - { - "AddressType": "POBOX", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1552329691573+0000)/", - "ContactGroups": [], - "DefaultCurrency": "NZD", - "ContactPersons": [], - "HasValidationErrors": false - }, - "DateString": "2019-03-13T00:00:00", - "Date": "/Date(1552435200000+0000)/", - "Status": "AUTHORISED", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Light Speeder", - "UnitAmount": 3000.00, - "TaxType": "OUTPUT2", - "TaxAmount": 450.00, - "LineAmount": 3000.00, - "AccountCode": "200", - "Tracking": [], - "Quantity": 1.0000, - "DiscountEnteredAsPercent": true, - "ValidationErrors": [] - } - ], - "SubTotal": 3000.00, - "TotalTax": 450.00, - "Total": 3450.00, - "UpdatedDateUTC": "/Date(1552522424850+0000)/", - "CurrencyCode": "NZD" - } - ] - } - '/Prepayments/{PrepaymentID}/Allocations': - parameters: - - $ref: '#/components/parameters/requiredHeader' - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createPrepaymentAllocations - summary: Allows you to create an Allocation for prepayments - x-hasAccountingValidationError: true - x-example: - - currDate: - is_date: true - key: currDate - keyPascal: CurrDate - keySnake: curr_date - java_datatype: LocalDate - default: "LocalDate.now()" - java: "LocalDate.now()" - csharp: "DateTime.Now" - node: "'2020-12-10'" - php: "new DateTime('2020-12-10')" - python: "dateutil.parser.parse('2020-12-03T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - invoice: - is_object: true - key: invoice - keyPascal: Invoice - - invoiceID: - is_last: true - is_uuid: true - key: invoiceID - keyPascal: InvoiceID - keySnake: invoice_id - default: 00000000-0000-0000-0000-000000000000 - object: invoice - - allocation: - is_object: true - key: allocation - keyPascal: Allocation - - set_invoice: - is_variable: true - nonString: true - key: invoice - keyPascal: Invoice - default: invoice - object: allocation - - amount: - nonString: true - key: amount - keyPascal: Amount - default: 1.0 - is_money: true - object: allocation - - date: - is_last: true - is_variable: true - nonString: true - key: date - keyPascal: Date - default: currDate - python: curr_date - ruby: curr_date - object: allocation - - allocations: - is_object: true - key: allocations - keyPascal: Allocations - - add_allocation: - is_last: true - is_array_add: true - key: allocations - keyPascal: Allocations - java: Allocations - csharp: Allocation - object: allocation - parameters: - - $ref: '#/components/parameters/PrepaymentID' - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Allocations array of Allocation for all Prepayment - content: - application/json: - schema: - $ref: '#/components/schemas/Allocations' - example: { - "Id": "d4758808-d14d-45d5-851a-52787ae5739a", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552522424927)/", - "Allocations": [ - { - "Amount": 1.00, - "Date": "/Date(1552435200000+0000)/", - "Invoice": { - "InvoiceID": "c7c37b83-ac95-45ea-88ba-8ad83a5f22fe", - "Payments": [], - "CreditNotes": [], - "Prepayments": [], - "Overpayments": [], - "HasErrors": false, - "IsDiscounted": false, - "LineItems": [], - "ValidationErrors": [] - }, - "Prepayment": { - "PrepaymentID": "ce0cddef-cf5a-4e59-b638-f225679115a7", - "ID": "ce0cddef-cf5a-4e59-b638-f225679115a7", - "LineItems": [] - }, - "ValidationErrors": [] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Allocations with an array of Allocation object in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/Allocations' - example: { - "Allocations": [ - { - "Invoice": { - "LineItems": [], - "InvoiceID": "00000000-0000-0000-0000-000000000000" - }, - "Amount": 1, - "Date": "2019-01-10" - } - ] - } - '/Prepayments/{PrepaymentID}/Allocations/{AllocationID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - delete: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: deletePrepaymentAllocations - summary: Deletes an Allocation from a Prepayment - parameters: - - $ref: '#/components/parameters/PrepaymentID' - - $ref: '#/components/parameters/AllocationID' - responses: - '200': - description: Success - return response of type Allocation with the isDeleted flag as true - content: - application/json: - schema: - $ref: '#/components/schemas/Allocation' - example: { - "AllocationId": "2bb15054-3868-4f85-a9c6-0402ec8c1201", - "Date": "/Date(1551822670731)/", - "Invoice": [ - { - "InvoiceID": "b7eb1fc9-a0f9-4e8e-9373-6689f5350832", - } - ], - "IsDeleted": true, - } - '/Prepayments/{PrepaymentID}/History': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getPrepaymentHistory - summary: Retrieves history record for a specific prepayment - parameters: - - $ref: '#/components/parameters/PrepaymentID' - responses: - '200': - $ref: '#/components/responses/HistoryRetrieved' - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createPrepaymentHistory - summary: Creates a history record for a specific prepayment - x-hasAccountingValidationError: true - x-example: - - historyRecord: - is_object: true - key: historyRecord - keyPascal: HistoryRecord - keySnake: history_record - - Details: - is_last: true - key: details - keyPascal: Details - default: Hello World - object: historyRecord - - historyRecords: - is_object: true - key: historyRecords - keyPascal: HistoryRecords - - add_historyRecord: - is_last: true - is_array_add: true - key: historyRecords - keyPascal: HistoryRecords - keySnake: history_records - java: HistoryRecords - python: history_record - ruby: history_record - csharp: HistoryRecord - object: historyRecord - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/PrepaymentID' - responses: - '200': - $ref: '#/components/responses/HistoryRecordCreated' - '400': - description: Unsupported - return response incorrect exception, API is not able to create HistoryRecord for Expense Claims - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: ' { - "ErrorNumber": 10, - "Type": "ValidationException", - "Message": "A validation exception occurred", - "Elements": [ - { - "DateUTCString": "2019-03-14T00:15:35", - "DateUTC": "/Date(1552522535440)/", - "Details": "Hello World", - "ValidationErrors": [ - { - "Message": "The document with the supplied id was not found for this endpoint." - } - ] - } - ] - }' - requestBody: - $ref: '#/components/requestBodies/historyRecords' - /PurchaseOrders: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getPurchaseOrders - summary: Retrieves purchase orders - parameters: - - $ref: '#/components/parameters/ifModifiedSince' - - in: query - name: Status - x-snake: status - description: Filter by purchase order status - example: "SUBMITTED" - schema: - type: string - enum: - - DRAFT - - SUBMITTED - - AUTHORISED - - BILLED - - DELETED - - in: query - name: DateFrom - x-snake: date_from - description: Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 - example: "2019-12-01" - schema: - type: string - - in: query - name: DateTo - x-snake: date_to - description: Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 - example: "2019-12-31" - schema: - type: string - - in: query - name: order - description: Order by an any element - example: "PurchaseOrderNumber ASC" - schema: - type: string - - in: query - name: page - description: To specify a page, append the page parameter to the URL e.g. ?page=1. If there are 100 records in the response you will need to check if there is any more data by fetching the next page e.g ?page=2 and continuing this process until no more results are returned. - example: 1 - schema: - type: integer - - $ref: '#/components/parameters/pageSize' - responses: - '200': - description: Success - return response of type PurchaseOrder array of all PurchaseOrder - content: - application/json: - schema: - $ref: '#/components/schemas/PurchaseOrders' - example: { - "Id": "66910bfc-15cc-4692-bd4c-cc8f671e653c", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552523977238)/", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 1, - "itemCount": 2 - }, - "PurchaseOrders": [ - { - "PurchaseOrderID": "f9627f0d-b715-4039-bb6a-96dc3eae5ec5", - "PurchaseOrderNumber": "PO-0001", - "DateString": "2019-03-12T00:00:00", - "Date": "/Date(1552348800000+0000)/", - "AttentionTo": "Jimmy", - "HasErrors": false, - "IsDiscounted": false, - "Type": "PURCHASEORDER", - "CurrencyRate": 1.000000, - "CurrencyCode": "NZD", - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "ContactStatus": "ACTIVE", - "Name": "Liam Gallagher", - "FirstName": "Liam", - "LastName": "Gallagher", - "Addresses": [ - { - "AddressType": "POBOX", - "City": "Anytown", - "Region": "NY", - "PostalCode": "10101", - "Country": "USA", - "AttentionTo": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "222-2222", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "333-2233", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "444-3433", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1551747281053+0000)/", - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "Status": "DELETED", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Foobar", - "UnitAmount": 20.0000, - "TaxAmount": 0.00, - "LineAmount": 20.00, - "Tracking": [], - "Quantity": 1.0000, - "LineItemID": "0f7b54b8-bfa4-4c5d-9c22-73dbd5796e54" - } - ], - "SubTotal": 20.00, - "TotalTax": 0.00, - "Total": 20.00, - "UpdatedDateUTC": "/Date(1552522703443+0000)/", - "HasAttachments": false - }, - { - "PurchaseOrderID": "6afa2e02-c514-4964-ab89-b5c0179b8c50", - "PurchaseOrderNumber": "PO-0002", - "DateString": "2019-03-12T00:00:00", - "Date": "/Date(1552348800000+0000)/", - "AttentionTo": "Jimmy", - "HasErrors": false, - "IsDiscounted": false, - "Type": "PURCHASEORDER", - "CurrencyRate": 1.000000, - "CurrencyCode": "NZD", - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "ContactStatus": "ACTIVE", - "Name": "Liam Gallagher", - "FirstName": "Liam", - "LastName": "Gallagher", - "Addresses": [ - { - "AddressType": "POBOX", - "City": "Anytown", - "Region": "NY", - "PostalCode": "10101", - "Country": "USA", - "AttentionTo": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "222-2222", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "333-2233", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "444-3433", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1551747281053+0000)/", - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "Status": "DELETED", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Foobar", - "UnitAmount": 20.0000, - "TaxAmount": 0.00, - "LineAmount": 20.00, - "Tracking": [], - "Quantity": 1.0000, - "LineItemID": "3e4ec232-32b9-491b-84dd-48fb9aa8916f" - } - ], - "SubTotal": 20.00, - "TotalTax": 0.00, - "Total": 20.00, - "UpdatedDateUTC": "/Date(1552522834733+0000)/", - "HasAttachments": false - } - ] - } - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createPurchaseOrders - summary: Creates one or more purchase orders - x-hasAccountingValidationError: true - x-example: - - dateValue: - is_date: true - key: dateValue - keyPascal: Date - keySnake: date_value - java_datatype: LocalDate - default: "LocalDate.of(2020, Month.OCTOBER, 10)" - java: "LocalDate.now()" - csharp: "DateTime.Now" - php: "new DateTime('2020-12-10')" - node: "'2020-10-10'" - python: "dateutil.parser.parse('2020-12-03T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - contact: - is_object: true - key: contact - keyPascal: Contact - - contactID: - is_last: true - is_uuid: true - key: contactID - keyPascal: ContactID - keySnake: contact_id - default: 00000000-0000-0000-0000-000000000000 - object: contact - - lineItem: - is_object: true - key: lineItem - keyPascal: LineItem - keySnake: line_item - - description: - key: description - keyPascal: Description - default: Foobar - object: lineItem - - quantity: - nonString: true - key: quantity - keyPascal: Quantity - default: 1.0 - is_money: true - object: lineItem - - unitAmount: - nonString: true - key: unitAmount - keyPascal: UnitAmount - keySnake: unit_amount - default: 20.0 - is_money: true - object: lineItem - - accountCode: - is_last: true - key: accountCode - keyPascal: AccountCode - keySnake: account_code - default: "000" - object: lineItem - - line_items: - is_list: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - csharp: LineItem - java: LineItem - - add_lineitems: - is_last: true - is_list_add: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - java: LineItems - python: line_item - ruby: line_item - csharp: LineItem - object: lineItem - - purchaseOrder: - is_object: true - key: purchaseOrder - keyPascal: PurchaseOrder - keySnake: purchase_order - - set_contact: - is_variable: true - nonString: true - key: contact - keyPascal: Contact - default: contact - object: purchaseOrder - - set_lineitem: - is_variable: true - nonString: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - default: lineItems - python: line_items - ruby: line_items - object: purchaseOrder - - date: - is_last: true - is_variable: true - nonString: true - key: date - keyPascal: Date - default: dateValue - python: date_value - ruby: date_value - object: purchaseOrder - - purchaseOrders: - is_object: true - key: purchaseOrders - keyPascal: PurchaseOrders - - add_purchaseOrder: - is_last: true - is_array_add: true - key: purchaseOrders - keyPascal: PurchaseOrders - keySnake: purchase_orders - java: PurchaseOrders - python: purchase_order - ruby: purchase_order - csharp: PurchaseOrder - object: purchaseOrder - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type PurchaseOrder array for specified PurchaseOrder - content: - application/json: - schema: - $ref: '#/components/schemas/PurchaseOrders' - example: { - "Id": "aa2f9d23-fd76-4bee-9600-30c0f0f34036", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552522946173)/", - "PurchaseOrders": [ - { - "PurchaseOrderID": "56204648-8fbe-46f8-b09c-2125f7939533", - "PurchaseOrderNumber": "PO-0004", - "DateString": "2019-03-13T00:00:00", - "Date": "/Date(1552435200000+0000)/", - "HasErrors": false, - "IsDiscounted": false, - "TotalDiscount": 0.00, - "SentToContact": false, - "Type": "PURCHASEORDER", - "CurrencyRate": 1.000000, - "CurrencyCode": "NZD", - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "ContactStatus": "ACTIVE", - "Name": "Liam Gallagher", - "FirstName": "Liam", - "LastName": "Gallagher", - "EmailAddress": "liam@rockstar.com", - "BankAccountDetails": "", - "Addresses": [ - null, - { - "AddressType": "POBOX", - "City": "Anytown", - "Region": "NY", - "PostalCode": "10101", - "Country": "USA", - "AttentionTo": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "222-2222", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - null, - { - "PhoneType": "FAX", - "PhoneNumber": "333-2233", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "444-3433", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1551747281053+0000)/", - "ContactGroups": [ - { - "ContactGroupID": "17b44ed7-4389-4162-91cb-3dd5766e4e22", - "Name": "Oasis", - "Status": "ACTIVE", - "Contacts": [], - "HasValidationErrors": false - } - ], - "IsSupplier": true, - "IsCustomer": true, - "SalesTrackingCategories": [], - "PurchasesTrackingCategories": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "Status": "DRAFT", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Foobar", - "UnitAmount": 20.0000, - "TaxType": "INPUT2", - "TaxAmount": 3.00, - "LineAmount": 20.00, - "AccountCode": "710", - "Tracking": [], - "Quantity": 1.0000, - "LineItemID": "792b7e40-b9f2-47f0-8624-b09f4b0166dd" - } - ], - "SubTotal": 20.00, - "TotalTax": 3.00, - "Total": 23.00, - "UpdatedDateUTC": "/Date(1552522946077+0000)/", - "StatusAttributeString": "ERROR", - "Warnings": [ - { - "Message": "Only AUTHORISED and BILLED purchase orders may have SentToContact updated." - } - ], - "ValidationErrors": [ - { - "Message": "Order number must be unique" - } - ] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: PurchaseOrders with an array of PurchaseOrder object in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/PurchaseOrders' - example: { - "PurchaseOrders": [ - { - "Contact": { - "ContactID": "00000000-0000-0000-0000-000000000000" - }, - "LineItems": [ - { - "Description": "Foobar", - "Quantity": 1, - "UnitAmount": 20, - "AccountCode": "710" - } - ], - "Date": "2019-03-13" - } - ] - } - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: updateOrCreatePurchaseOrders - summary: Updates or creates one or more purchase orders - x-hasAccountingValidationError: true - x-example: - - dateValue: - is_date: true - key: dateValue - keyPascal: Date - keySnake: date_value - java_datatype: LocalDate - default: "LocalDate.of(2020, Month.OCTOBER, 10)" - java: "LocalDate.now()" - csharp: "DateTime.Now" - php: "new DateTime('2020-12-10')" - node: "'2020-10-10'" - python: "dateutil.parser.parse('2020-12-03T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - contact: - is_object: true - key: contact - keyPascal: Contact - - contactID: - is_last: true - is_uuid: true - key: contactID - keyPascal: ContactID - keySnake: contact_id - default: 00000000-0000-0000-0000-000000000000 - object: contact - - lineItem: - is_object: true - key: lineItem - keyPascal: LineItem - keySnake: line_item - - description: - key: description - keyPascal: Description - default: Foobar - object: lineItem - - quantity: - nonString: true - key: quantity - keyPascal: Quantity - default: 1.0 - is_money: true - object: lineItem - - unitAmount: - nonString: true - key: unitAmount - keyPascal: UnitAmount - keySnake: unit_amount - default: 20.0 - is_money: true - object: lineItem - - accountCode: - is_last: true - key: accountCode - keyPascal: AccountCode - keySnake: account_code - default: "000" - object: lineItem - - line_items: - is_list: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - csharp: LineItem - java: LineItem - - add_lineitems: - is_last: true - is_list_add: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - java: LineItems - python: line_item - ruby: line_item - csharp: LineItem - object: lineItem - - purchaseOrder: - is_object: true - key: purchaseOrder - keyPascal: PurchaseOrder - keySnake: purchase_order - - set_contact: - is_variable: true - nonString: true - key: contact - keyPascal: Contact - default: contact - object: purchaseOrder - - set_lineitem: - is_variable: true - nonString: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - default: lineItems - python: line_items - ruby: line_items - object: purchaseOrder - - date: - is_last: true - is_variable: true - nonString: true - key: date - keyPascal: Date - default: dateValue - python: date_value - ruby: date_value - object: purchaseOrder - - purchaseOrders: - is_object: true - key: purchaseOrders - keyPascal: PurchaseOrders - - add_purchaseOrder: - is_last: true - is_array_add: true - key: purchaseOrders - keyPascal: PurchaseOrders - keySnake: purchase_orders - java: PurchaseOrders - python: purchase_order - ruby: purchase_order - csharp: PurchaseOrder - object: purchaseOrder - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type PurchaseOrder array for specified PurchaseOrder - content: - application/json: - schema: - $ref: '#/components/schemas/PurchaseOrders' - example: { - "Id": "aa2f9d23-fd76-4bee-9600-30c0f0f34036", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552522946173)/", - "PurchaseOrders": [ - { - "PurchaseOrderID": "56204648-8fbe-46f8-b09c-2125f7939533", - "PurchaseOrderNumber": "PO-0004", - "DateString": "2019-03-13T00:00:00", - "Date": "/Date(1552435200000+0000)/", - "HasErrors": false, - "IsDiscounted": false, - "TotalDiscount": 0.00, - "SentToContact": false, - "Type": "PURCHASEORDER", - "CurrencyRate": 1.000000, - "CurrencyCode": "NZD", - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "ContactStatus": "ACTIVE", - "Name": "Liam Gallagher", - "FirstName": "Liam", - "LastName": "Gallagher", - "EmailAddress": "liam@rockstar.com", - "BankAccountDetails": "", - "Addresses": [ - null, - { - "AddressType": "POBOX", - "City": "Anytown", - "Region": "NY", - "PostalCode": "10101", - "Country": "USA", - "AttentionTo": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "222-2222", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - null, - { - "PhoneType": "FAX", - "PhoneNumber": "333-2233", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "444-3433", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1551747281053+0000)/", - "ContactGroups": [ - { - "ContactGroupID": "17b44ed7-4389-4162-91cb-3dd5766e4e22", - "Name": "Oasis", - "Status": "ACTIVE", - "Contacts": [], - "HasValidationErrors": false - } - ], - "IsSupplier": true, - "IsCustomer": true, - "SalesTrackingCategories": [], - "PurchasesTrackingCategories": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "Status": "DRAFT", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Foobar", - "UnitAmount": 20.0000, - "TaxType": "INPUT2", - "TaxAmount": 3.00, - "LineAmount": 20.00, - "AccountCode": "710", - "Tracking": [], - "Quantity": 1.0000, - "LineItemID": "792b7e40-b9f2-47f0-8624-b09f4b0166dd" - } - ], - "SubTotal": 20.00, - "TotalTax": 3.00, - "Total": 23.00, - "UpdatedDateUTC": "/Date(1552522946077+0000)/", - "StatusAttributeString": "ERROR", - "Warnings": [ - { - "Message": "Only AUTHORISED and BILLED purchase orders may have SentToContact updated." - } - ], - "ValidationErrors": [ - { - "Message": "Order number must be unique" - } - ] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PurchaseOrders' - example: { - "PurchaseOrders": [ - { - "Contact": { - "ContactID": "00000000-0000-0000-0000-000000000000" - }, - "LineItems": [ - { - "Description": "Foobar", - "Quantity": 1, - "UnitAmount": 20, - "AccountCode": "710" - } - ], - "Date": "2019-03-13" - } - ] - } - '/PurchaseOrders/{PurchaseOrderID}/pdf': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getPurchaseOrderAsPdf - x-path: '/PurchaseOrders/{PurchaseOrderID}' - summary: Retrieves specific purchase order as PDF files using a unique purchase order Id - parameters: - - $ref: '#/components/parameters/PurchaseOrderID' - responses: - '200': - description: Success - return response of byte array pdf version of specified Purchase Orders - content: - application/pdf: - schema: - type: string - format: binary - '/PurchaseOrders/{PurchaseOrderID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getPurchaseOrder - summary: Retrieves a specific purchase order using a unique purchase order Id - parameters: - - $ref: '#/components/parameters/PurchaseOrderID' - responses: - '200': - description: Success - return response of type PurchaseOrder array for specified PurchaseOrder - content: - application/json: - schema: - $ref: '#/components/schemas/PurchaseOrders' - example: { - "Id": "53a8c7a5-92e8-475b-a037-acf7c55c3afd", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1553626110950)/", - "PurchaseOrders": [ - { - "PurchaseOrderID": "15369a9f-17b6-4235-83c4-0029256d1c37", - "PurchaseOrderNumber": "PO-0006", - "DateString": "2019-03-26T00:00:00", - "Date": "/Date(1553558400000+0000)/", - "DeliveryDateString": "2019-03-28T00:00:00", - "DeliveryDate": "/Date(1553731200000+0000)/", - "DeliveryAddress": "101 Grafton Road\nRoseneath\nWellington\n6011\nNew Zealand", - "AttentionTo": "CEO", - "Telephone": "64 123-2222", - "DeliveryInstructions": "Drop off at front door", - "HasErrors": false, - "IsDiscounted": true, - "TotalDiscount": 250.00, - "SentToContact": false, - "Reference": "foobar", - "Type": "PURCHASEORDER", - "CurrencyRate": 1.000000, - "CurrencyCode": "NZD", - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "ContactStatus": "ACTIVE", - "Name": "Liam Gallagher", - "FirstName": "Liam", - "LastName": "Gallagher", - "EmailAddress": "liam@rockstar.com", - "BankAccountDetails": "", - "Addresses": [ - null, - { - "AddressType": "POBOX", - "City": "Anytown", - "Region": "NY", - "PostalCode": "10101", - "Country": "USA", - "AttentionTo": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "222-2222", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - null, - { - "PhoneType": "FAX", - "PhoneNumber": "333-2233", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "444-3433", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1553672800957+0000)/", - "ContactGroups": [ - { - "ContactGroupID": "17b44ed7-4389-4162-91cb-3dd5766e4e22", - "Name": "Oasis", - "Status": "ACTIVE", - "Contacts": [], - "HasValidationErrors": false - } - ], - "IsSupplier": true, - "IsCustomer": true, - "DefaultCurrency": "NZD", - "SalesTrackingCategories": [], - "PurchasesTrackingCategories": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "BrandingThemeID": "414d4a87-46d6-4cfc-ab42-4e29d22e5076", - "Status": "DRAFT", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "ItemCode": "123", - "Description": "Brand new Fender Strats", - "UnitAmount": 2500.0000, - "TaxType": "INPUT2", - "TaxAmount": 337.50, - "LineAmount": 2250.00, - "AccountCode": "630", - "Tracking": [ - { - "Name": "Simpsons", - "Option": "Homer", - "TrackingCategoryID": "6a68adde-f210-4465-b0a9-0d8cc6f50762", - "TrackingOptionID": "94faf12f-f65c-4331-8004-b0b7c5a2da23" - } - ], - "Quantity": 1.0000, - "DiscountRate": 10.00, - "LineItemID": "8a9d3eca-e052-43bc-9b87-221d0648c045" - } - ], - "SubTotal": 2250.00, - "TotalTax": 337.50, - "Total": 2587.50, - "UpdatedDateUTC": "/Date(1553626029823+0000)/", - "HasAttachments": true, - "Attachments": [ - { - "AttachmentID": "7d94ccdc-ef7b-4806-87ac-8442f25e593b", - "FileName": "HelloWorld.png", - "Url": "https://api.xero.com/api.xro/2.0/PurchaseOrders/15369a9f-17b6-4235-83c4-0029256d1c37/Attachments/HelloWorld.png", - "MimeType": "image/png", - "ContentLength": 76091 - } - ] - } - ] - } - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: updatePurchaseOrder - summary: Updates a specific purchase order - x-hasAccountingValidationError: true - x-example: - - purchaseOrder: - is_object: true - key: purchaseOrder - keyPascal: PurchaseOrder - keySnake: purchase_order - - attentionTo: - is_last: true - key: attentionTo - keyPascal: AttentionTo - default: Peter Parker - object: purchaseOrder - - purchaseOrders: - is_object: true - key: purchaseOrders - keyPascal: PurchaseOrders - - add_purchaseOrder: - is_last: true - is_array_add: true - key: purchaseOrders - keyPascal: PurchaseOrders - keySnake: purchase_orders - java: PurchaseOrders - python: purchase_order - ruby: purchase_order - csharp: PurchaseOrder - object: purchaseOrder - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/PurchaseOrderID' - responses: - '200': - description: Success - return response of type PurchaseOrder array for updated PurchaseOrder - content: - application/json: - schema: - $ref: '#/components/schemas/PurchaseOrders' - example: { - "Id": "0e9bb3f8-d68b-4bb2-a54d-7da240a4f51a", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552523976885)/", - "PurchaseOrders": [ - { - "PurchaseOrderID": "f9fc1120-c937-489e-84bc-e822190cfe9c", - "PurchaseOrderNumber": "PO-0005", - "DateString": "2019-03-13T00:00:00", - "Date": "/Date(1552435200000+0000)/", - "AttentionTo": "Jimmy", - "HasErrors": false, - "IsDiscounted": false, - "TotalDiscount": 0.00, - "SentToContact": false, - "Type": "PURCHASEORDER", - "CurrencyRate": 1.000000, - "CurrencyCode": "NZD", - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "ContactStatus": "ACTIVE", - "Name": "Liam Gallagher", - "FirstName": "Liam", - "LastName": "Gallagher", - "EmailAddress": "liam@rockstar.com", - "BankAccountDetails": "", - "Addresses": [ - null, - { - "AddressType": "POBOX", - "City": "Anytown", - "Region": "NY", - "PostalCode": "10101", - "Country": "USA", - "AttentionTo": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "222-2222", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - null, - { - "PhoneType": "FAX", - "PhoneNumber": "333-2233", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "444-3433", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1551747281053+0000)/", - "ContactGroups": [ - { - "ContactGroupID": "17b44ed7-4389-4162-91cb-3dd5766e4e22", - "Name": "Oasis", - "Status": "ACTIVE", - "Contacts": [], - "HasValidationErrors": false - } - ], - "IsSupplier": true, - "IsCustomer": true, - "SalesTrackingCategories": [], - "PurchasesTrackingCategories": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "Status": "DRAFT", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Foobar", - "UnitAmount": 20.0000, - "TaxType": "INPUT2", - "TaxAmount": 3.00, - "LineAmount": 20.00, - "AccountCode": "710", - "Tracking": [], - "Quantity": 1.0000, - "LineItemID": "d1d9b2cd-c9f2-4445-8d98-0b8096cf4dae" - } - ], - "SubTotal": 20.00, - "TotalTax": 3.00, - "Total": 23.00, - "UpdatedDateUTC": "/Date(1552523976853+0000)/" - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PurchaseOrders' - example: { - "PurchaseOrders": [ - { - "AttentionTo": "Peter Parker", - "LineItems": [], - "Contact": {} - } - ] - } - '/PurchaseOrders/{PurchaseOrderNumber}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getPurchaseOrderByNumber - summary: Retrieves a specific purchase order using purchase order number - parameters: - - required: true - in: path - name: PurchaseOrderNumber - x-snake: purchase_order_number - description: Unique identifier for a PurchaseOrder - example: "PO1234" - schema: - type: string - responses: - '200': - description: Success - return response of type PurchaseOrder array for specified PurchaseOrder - content: - application/json: - schema: - $ref: '#/components/schemas/PurchaseOrders' - example: { - "Id": "53a8c7a5-92e8-475b-a037-acf7c55c3afd", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1553626110950)/", - "PurchaseOrders": [ - { - "PurchaseOrderID": "15369a9f-17b6-4235-83c4-0029256d1c37", - "PurchaseOrderNumber": "PO-0006", - "DateString": "2019-03-26T00:00:00", - "Date": "/Date(1553558400000+0000)/", - "DeliveryDateString": "2019-03-28T00:00:00", - "DeliveryDate": "/Date(1553731200000+0000)/", - "DeliveryAddress": "101 Grafton Road\nRoseneath\nWellington\n6011\nNew Zealand", - "AttentionTo": "CEO", - "Telephone": "64 123-2222", - "DeliveryInstructions": "Drop off at front door", - "HasErrors": false, - "IsDiscounted": true, - "TotalDiscount": 250.00, - "SentToContact": false, - "Reference": "foobar", - "Type": "PURCHASEORDER", - "CurrencyRate": 1.000000, - "CurrencyCode": "NZD", - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "ContactStatus": "ACTIVE", - "Name": "Liam Gallagher", - "FirstName": "Liam", - "LastName": "Gallagher", - "EmailAddress": "liam@rockstar.com", - "BankAccountDetails": "", - "Addresses": [ - null, - { - "AddressType": "POBOX", - "City": "Anytown", - "Region": "NY", - "PostalCode": "10101", - "Country": "USA", - "AttentionTo": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "222-2222", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - null, - { - "PhoneType": "FAX", - "PhoneNumber": "333-2233", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "444-3433", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1553672800957+0000)/", - "ContactGroups": [ - { - "ContactGroupID": "17b44ed7-4389-4162-91cb-3dd5766e4e22", - "Name": "Oasis", - "Status": "ACTIVE", - "Contacts": [], - "HasValidationErrors": false - } - ], - "IsSupplier": true, - "IsCustomer": true, - "DefaultCurrency": "NZD", - "SalesTrackingCategories": [], - "PurchasesTrackingCategories": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "BrandingThemeID": "414d4a87-46d6-4cfc-ab42-4e29d22e5076", - "Status": "DRAFT", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "ItemCode": "123", - "Description": "Brand new Fender Strats", - "UnitAmount": 2500.0000, - "TaxType": "INPUT2", - "TaxAmount": 337.50, - "LineAmount": 2250.00, - "AccountCode": "630", - "Tracking": [ - { - "Name": "Simpsons", - "Option": "Homer", - "TrackingCategoryID": "6a68adde-f210-4465-b0a9-0d8cc6f50762", - "TrackingOptionID": "94faf12f-f65c-4331-8004-b0b7c5a2da23" - } - ], - "Quantity": 1.0000, - "DiscountRate": 10.00, - "LineItemID": "8a9d3eca-e052-43bc-9b87-221d0648c045" - } - ], - "SubTotal": 2250.00, - "TotalTax": 337.50, - "Total": 2587.50, - "UpdatedDateUTC": "/Date(1553626029823+0000)/", - "HasAttachments": true, - "Attachments": [ - { - "AttachmentID": "7d94ccdc-ef7b-4806-87ac-8442f25e593b", - "FileName": "HelloWorld.png", - "Url": "https://api.xero.com/api.xro/2.0/PurchaseOrders/15369a9f-17b6-4235-83c4-0029256d1c37/Attachments/HelloWorld.png", - "MimeType": "image/png", - "ContentLength": 76091 - } - ] - } - ] - } - '/PurchaseOrders/{PurchaseOrderID}/History': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getPurchaseOrderHistory - summary: Retrieves history for a specific purchase order - parameters: - - $ref: '#/components/parameters/PurchaseOrderID' - responses: - '200': - $ref: '#/components/responses/HistoryRetrieved' - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createPurchaseOrderHistory - summary: Creates a history record for a specific purchase orders - x-hasAccountingValidationError: true - x-example: - - historyRecord: - is_object: true - key: historyRecord - keyPascal: HistoryRecord - keySnake: history_record - - Details: - is_last: true - key: details - keyPascal: Details - default: Hello World - object: historyRecord - - historyRecords: - is_object: true - key: historyRecords - keyPascal: HistoryRecords - - add_historyRecord: - is_last: true - is_array_add: true - key: historyRecords - keyPascal: HistoryRecords - keySnake: history_records - java: HistoryRecords - python: history_record - ruby: history_record - csharp: HistoryRecord - object: historyRecord - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/PurchaseOrderID' - responses: - '200': - $ref: '#/components/responses/HistoryRecordCreated' - '400': - $ref: '#/components/responses/400Error' - requestBody: - $ref: '#/components/requestBodies/historyRecords' - '/PurchaseOrders/{PurchaseOrderID}/Attachments': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getPurchaseOrderAttachments - summary: Retrieves attachments for a specific purchase order - parameters: - - $ref: '#/components/parameters/PurchaseOrderID' - responses: - '200': - description: Success - return response of type Attachments array of Purchase Orders - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "dfc29f55-8ddd-4921-a82c-bcc0798d207f", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1602100184437)/", - "Attachments": [ - { - "AttachmentID": "dce4eaa7-c8a9-4867-9434-95832b427d3b", - "FileName": "xero-dev1.png", - "Url": "https://api.xero.com/api.xro/2.0/PurchaseOrders/93369c9b-c481-4e21-aaab-bb19e9a26efe/Attachments/2D_2.png", - "MimeType": "image/png", - "ContentLength": 98715 - }, - { - "AttachmentID": "e58bd37b-e47f-451a-a42c-f946ef229c3e", - "FileName": "xero-dev2.png", - "Url": "https://api.xero.com/api.xro/2.0/PurchaseOrders/93369c9b-c481-4e21-aaab-bb19e9a26efe/Attachments/2D.png", - "MimeType": "image/png", - "ContentLength": 82529 - }, - { - "AttachmentID": "c8faa564-223f-45e4-a5a1-94430a5b52c1", - "FileName": "xero-dev3.png", - "Url": "https://api.xero.com/api.xro/2.0/PurchaseOrders/93369c9b-c481-4e21-aaab-bb19e9a26efe/Attachments/Screen%20Shot%202020-09-12%20at%204.31.14%20pm.png", - "MimeType": "image/png", - "ContentLength": 146384 - } - ] - } - '/PurchaseOrders/{PurchaseOrderID}/Attachments/{AttachmentID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getPurchaseOrderAttachmentById - summary: Retrieves specific attachment for a specific purchase order using a unique attachment Id - parameters: - - $ref: '#/components/parameters/PurchaseOrderID' - - $ref: '#/components/parameters/AttachmentID' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of attachment for Account as binary data - content: - application/octet-stream: - schema: - type: string - format: binary - '/PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getPurchaseOrderAttachmentByFileName - summary: Retrieves a specific attachment for a specific purchase order by filename - parameters: - - $ref: '#/components/parameters/PurchaseOrderID' - - $ref: '#/components/parameters/FileName' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of attachment for Purchase Order as binary data - content: - application/octet-stream: - schema: - type: string - format: binary - post: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: updatePurchaseOrderAttachmentByFileName - x-hasAccountingValidationError: true - summary: Updates a specific attachment for a specific purchase order by filename - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/PurchaseOrderID' - - $ref: '#/components/parameters/FileName' - responses: - '200': - description: Success - return response of type Attachments array of Attachment - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "aeff9be0-54c2-45dd-8e3d-aa4f8af0fbd7", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1602100086197)/", - "Attachments": [ - { - "AttachmentID": "dce4eaa7-c8a9-4867-9434-95832b427d3b", - "FileName": "xero-dev.png", - "Url": "https://api.xero.com/api.xro/2.0/PurchaseOrders/93369c9b-c481-4e21-aaab-bb19e9a26efe/Attachments/2D_2.png", - "MimeType": "image/png", - "ContentLength": 98715 - } - ] - } - '400': - description: Validation Error - some data was incorrect returns response of type Error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - put: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: createPurchaseOrderAttachmentByFileName - x-hasAccountingValidationError: true - summary: Creates attachment for a specific purchase order - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/PurchaseOrderID' - - $ref: '#/components/parameters/FileName' - responses: - '200': - description: Success - return response of type Attachments array of Attachment - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "c728a4a4-179e-4bbd-a2d5-63e7f9ceba92", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1602099934723)/", - "Attachments": [ - { - "AttachmentID": "e58bd37b-e47f-451a-a42c-f946ef229c3e", - "FileName": "xero-dev.png", - "Url": "https://api.xero.com/api.xro/2.0/PurchaseOrders/93369c9b-c481-4e21-aaab-bb19e9a26efe/Attachments/2D.png", - "MimeType": "image/png", - "ContentLength": 82529 - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - /Quotes: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getQuotes - summary: Retrieves sales quotes - parameters: - - $ref: '#/components/parameters/ifModifiedSince' - - in: query - name: DateFrom - x-snake: date_from - description: Filter for quotes after a particular date - example: "2019-10-31" - schema: - type: string - format: date - - in: query - name: DateTo - x-snake: date_to - description: Filter for quotes before a particular date - example: "2019-10-31" - schema: - type: string - format: date - - in: query - name: ExpiryDateFrom - x-snake: expiry_date_from - description: Filter for quotes expiring after a particular date - example: "2019-10-31" - schema: - type: string - format: date - - in: query - name: ExpiryDateTo - x-snake: expiry_date_to - description: Filter for quotes before a particular date - example: "2019-10-31" - schema: - type: string - format: date - - in: query - name: ContactID - x-snake: contact_id - description: Filter for quotes belonging to a particular contact - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - - in: query - name: Status - x-snake: status - description: Filter for quotes of a particular Status - example: "DRAFT" - schema: - type: string - - in: query - name: page - description: e.g. page=1 – Up to 100 Quotes will be returned in a single API call with line items shown for each quote - example: 1 - schema: - type: integer - - in: query - name: order - description: Order by an any element - example: Status ASC - schema: - type: string - - in: query - name: QuoteNumber - x-snake: quote_number - description: Filter by quote number (e.g. GET https://.../Quotes?QuoteNumber=QU-0001) - example: "QU-0001" - schema: - type: string - responses: - '200': - description: Success - return response of type quotes array with all quotes - content: - application/json: - schema: - $ref: '#/components/schemas/Quotes' - example: { - "Id": "bb583e7e-9b6b-471e-88da-4cbfcfad7a57", - "Status": "OK", - "ProviderName": "Adams OAuth2 App", - "DateTimeUTC": "/Date(1571876635477)/", - "Quotes": [ - { - "QuoteID": "be59294f-2a9c-4cee-8c64-0f0ddbc1883a", - "QuoteNumber": "QU-0001", - "Reference": "REF-123", - "Terms": "Not valid after the expiry date", - "Contact": { - "ContactID": "060816db-0ed7-44de-ab58-8fee9316fcd5", - "Name": "Adam" - }, - "LineItems": [ - { - "LineItemID": "ccf5e45c-73b6-4659-83e8-520f4c6126fd", - "AccountCode": "200", - "Description": "Fish out of Water", - "UnitAmount": 19.9500, - "DiscountRate": 10.00, - "LineAmount": 17.96, - "ItemCode": "BOOK", - "Quantity": 1.0000, - "TaxAmount": 2.69, - "TaxType": "OUTPUT2", - "Tracking": [ - { - "TrackingCategoryID": "351953c4-8127-4009-88c3-f9cd8c9cbe9f", - "TrackingOptionID": "ce205173-7387-4651-9726-2cf4c5405ba2", - "Name": "Region", - "Option": "Eastside" - } - ] - } - ], - "Date": "/Date(1571875200000)/", - "DateString": "2019-10-24T00:00:00", - "ExpiryDate": "/Date(1571961600000)/", - "ExpiryDateString": "2019-10-25T00:00:00", - "Status": "ACCEPTED", - "CurrencyRate": 0.937053, - "CurrencyCode": "AUD", - "SubTotal": 17.96, - "TotalTax": 2.69, - "Total": 20.65, - "TotalDiscount": 1.99, - "Title": "Your Quote", - "Summary": "Please buy this", - "BrandingThemeID": "4c82c365-35cb-467f-bb11-dce1f2f2f67c", - "UpdatedDateUTC": "/Date(1571869373890)/", - "LineAmountTypes": "EXCLUSIVE" - } - ] - } - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createQuotes - summary: Create one or more quotes - x-hasAccountingValidationError: true - x-example: - - dateValue: - is_date: true - key: dateValue - keyPascal: Date - keySnake: date_value - java_datatype: LocalDate - default: "LocalDate.of(2020, Month.OCTOBER, 10)" - java: "LocalDate.now()" - csharp: "DateTime.Now" - php: "new DateTime('2020-12-10')" - node: "'2020-10-10'" - python: "dateutil.parser.parse('2020-12-03T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - contact: - is_object: true - key: contact - keyPascal: Contact - - contactID: - is_last: true - is_uuid: true - key: contactID - keyPascal: ContactID - keySnake: contact_id - default: 00000000-0000-0000-0000-000000000000 - object: contact - - lineItem: - is_object: true - key: lineItem - keyPascal: LineItem - keySnake: line_item - - description: - key: description - keyPascal: Description - default: Foobar - object: lineItem - - quantity: - nonString: true - key: quantity - keyPascal: Quantity - default: 1.0 - is_money: true - object: lineItem - - unitAmount: - nonString: true - key: unitAmount - keyPascal: UnitAmount - keySnake: unit_amount - default: 20.0 - is_money: true - object: lineItem - - accountCode: - is_last: true - key: accountCode - keyPascal: AccountCode - keySnake: account_code - default: "000" - object: lineItem - - line_items: - is_list: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - csharp: LineItem - java: LineItem - - add_lineitems: - is_last: true - is_list_add: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - java: LineItems - python: line_item - ruby: line_item - csharp: LineItem - object: lineItem - - quote: - is_object: true - key: quote - keyPascal: Quote - - set_contact: - is_variable: true - nonString: true - key: contact - keyPascal: Contact - default: contact - object: quote - - set_lineitem: - is_variable: true - nonString: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - default: lineItems - python: line_items - ruby: line_items - object: quote - - date: - is_last: true - is_variable: true - nonString: true - key: date - keyPascal: Date - default: dateValue - python: date_value - ruby: date_value - object: quote - - quotes: - is_object: true - key: quotes - keyPascal: Quotes - - add_quote: - is_last: true - is_array_add: true - key: quotes - keyPascal: Quotes - java: Quotes - csharp: Quote - object: quote - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Quotes with array with newly created Quote - content: - application/json: - schema: - $ref: '#/components/schemas/Quotes' - example: { - "SummarizeErrors":false, - "Id":"29571f5a-bf73-4bb6-9de5-86be44e6bf2e", - "Status":"OK", - "ProviderName":"provider-name", - "DateTimeUTC":"/Date(1580607782916)/", - "Quotes":[ - { - "QuoteID":"60031d53-6488-4321-9cbd-c1db6dbf9ba4", - "QuoteNumber":"QU-0008", - "Terms":"", - "Contact":{ - "ContactID":"6a65f055-b0e0-471a-a933-d1ffdd89393f", - "Name":"John Smith-82160", - "EmailAddress":"" - }, - "LineItems":[ - { - "LineItemID":"26995857-0eea-45fb-b46c-f8ea896ec46e", - "AccountCode":"12775", - "Description":"Foobar", - "UnitAmount":20.0000, - "LineAmount":20.00, - "ItemCode":"", - "Quantity":1.0000, - "TaxAmount":0.00, - "Tracking":[ - - ] - } - ], - "Date":"/Date(1580515200000)/", - "DateString":"2020-02-01T00:00:00", - "Status":"DRAFT", - "CurrencyRate":1.000000, - "CurrencyCode":"USD", - "SubTotal":20.00, - "TotalTax":0.00, - "Total":20.00, - "UpdatedDateUTC":"/Date(1580607782913)/", - "LineAmountTypes":"EXCLUSIVE", - "StatusAttributeString":"OK" - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Quotes with an array of Quote object in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/Quotes' - example: { - "Quotes": [ - { - "Contact": { - "ContactID": "00000000-0000-0000-0000-000000000000" - }, - "LineItems": [ - { - "Description": "Foobar", - "Quantity": 1, - "UnitAmount": 20, - "AccountCode": "12775" - } - ], - "Date": "2020-02-01" - } - ] - } - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: updateOrCreateQuotes - summary: Updates or creates one or more quotes - x-hasAccountingValidationError: true - x-example: - - dateValue: - is_date: true - key: dateValue - keyPascal: Date - keySnake: date_value - java_datatype: LocalDate - default: "LocalDate.of(2020, Month.OCTOBER, 10)" - java: "LocalDate.now()" - csharp: "DateTime.Now" - php: "new DateTime('2020-12-10')" - node: "'2020-10-10'" - python: "dateutil.parser.parse('2020-12-03T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - contact: - is_object: true - key: contact - keyPascal: Contact - - contactID: - is_last: true - is_uuid: true - key: contactID - keyPascal: ContactID - keySnake: contact_id - default: 00000000-0000-0000-0000-000000000000 - object: contact - - lineItem: - is_object: true - key: lineItem - keyPascal: LineItem - keySnake: line_item - - description: - key: description - keyPascal: Description - default: Foobar - object: lineItem - - quantity: - nonString: true - key: quantity - keyPascal: Quantity - default: 1.0 - is_money: true - object: lineItem - - unitAmount: - nonString: true - key: unitAmount - keyPascal: UnitAmount - keySnake: unit_amount - default: 20.0 - is_money: true - object: lineItem - - accountCode: - is_last: true - key: accountCode - keyPascal: AccountCode - keySnake: account_code - default: "000" - object: lineItem - - line_items: - is_list: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - csharp: LineItem - java: LineItem - - add_lineitems: - is_last: true - is_list_add: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - java: LineItems - python: line_item - ruby: line_item - csharp: LineItem - object: lineItem - - quote: - is_object: true - key: quote - keyPascal: Quote - - set_contact: - is_variable: true - nonString: true - key: contact - keyPascal: Contact - default: contact - object: quote - - set_lineitem: - is_variable: true - nonString: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - default: lineItems - python: line_items - ruby: line_items - object: quote - - date: - is_last: true - is_variable: true - nonString: true - key: date - keyPascal: Date - default: dateValue - python: date_value - ruby: date_value - object: quote - - quotes: - is_object: true - key: quotes - keyPascal: Quotes - - add_quote: - is_last: true - is_array_add: true - key: quotes - keyPascal: Quotes - java: Quotes - csharp: Quote - object: quote - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Quotes array with updated or created Quote - content: - application/json: - schema: - $ref: '#/components/schemas/Quotes' - example: { - "SummarizeErrors":false, - "Id":"b425754f-0512-481d-827b-c8958db7667e", - "Status":"OK", - "ProviderName":"provider-name", - "DateTimeUTC":"/Date(1580607783833)/", - "Quotes":[ - { - "QuoteID":"fd53e0b7-4d24-4c20-be85-043a62ea5847", - "QuoteNumber":"QU-0009", - "Terms":"", - "Contact":{ - "ContactID":"6a65f055-b0e0-471a-a933-d1ffdd89393f", - "Name":"John Smith-82160", - "EmailAddress":"" - }, - "LineItems":[ - { - "LineItemID":"898c7fd6-0d94-4ac0-ace8-87e350a042de", - "AccountCode":"12775", - "Description":"Foobar", - "UnitAmount":20.0000, - "LineAmount":20.00, - "ItemCode":"", - "Quantity":1.0000, - "TaxAmount":0.00, - "Tracking":[ - - ] - } - ], - "Date":"/Date(1580515200000)/", - "DateString":"2020-02-01T00:00:00", - "Status":"DRAFT", - "CurrencyRate":1.000000, - "CurrencyCode":"USD", - "SubTotal":20.00, - "TotalTax":0.00, - "Total":20.00, - "UpdatedDateUTC":"/Date(1580607783467)/", - "LineAmountTypes":"EXCLUSIVE", - "StatusAttributeString":"OK" - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Quotes' - example: { - "Quotes": [ - { - "Contact": { - "ContactID": "00000000-0000-0000-0000-000000000000" - }, - "LineItems": [ - { - "Description": "Foobar", - "Quantity": 1, - "UnitAmount": 20, - "AccountCode": "12775" - } - ], - "Date": "2020-02-01" - } - ] - } - '/Quotes/{QuoteID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getQuote - summary: Retrieves a specific quote using a unique quote Id - parameters: - - $ref: '#/components/parameters/QuoteID' - responses: - '200': - description: Success - return response of type Quotes array with specified Quote - content: - application/json: - schema: - $ref: '#/components/schemas/Quotes' - example: { - "SummarizeErrors":true, - "Id":"e3626c45-77f1-4ab0-ba9b-3593c7bcd25c", - "Status":"OK", - "ProviderName":"provider-name", - "DateTimeUTC":"/Date(1580607864786)/", - "Quotes":[ - { - "QuoteID":"1f90e77a-7b88-4462-874f-1aa675be8fef", - "QuoteNumber":"QU-0007", - "Reference":"MyQuote", - "Terms":"These are my terms", - "Contact":{ - "ContactID":"4bc3ecb2-8e2a-4267-a171-0e0ce7e5ac2a", - "Name":"ABC Limited", - "EmailAddress":"john.smith@gmail.com", - "FirstName":"John", - "LastName":"Smith" - }, - "LineItems":[ - { - "LineItemID":"09b47d9f-f78d-4bab-b226-957f55bfb1b5", - "AccountCode":"400", - "Description":"Half day training - Microsoft Office", - "UnitAmount":500.0000, - "LineAmount":500.00, - "ItemCode":"Train-MS", - "Quantity":1.0000, - "TaxAmount":0.00, - "TaxType":"NONE", - "Tracking":[ - { - "TrackingCategoryID":"9bd3f506-6d91-4625-81f0-0f9147f099f4", - "TrackingOptionID":"d30e2a0d-ae6f-4806-88ca-d8ebdba2af73", - "Name":"Avengers", - "Option":"IronMan" - } - ] - } - ], - "Date":"/Date(1580515200000)/", - "DateString":"2020-02-01T00:00:00", - "ExpiryDate":"/Date(1581724800000)/", - "ExpiryDateString":"2020-02-15T00:00:00", - "Status":"DRAFT", - "CurrencyRate":1.547150, - "CurrencyCode":"NZD", - "SubTotal":500.00, - "TotalTax":0.00, - "Total":500.00, - "TotalDiscount":0.00, - "Title":"", - "Summary":"", - "BrandingThemeID":"324587a9-7eed-46c0-ad64-fa941a1b5b3e", - "UpdatedDateUTC":"/Date(1580607757040)/", - "LineAmountTypes":"EXCLUSIVE" - } - ] - } - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: updateQuote - summary: Updates a specific quote - x-hasAccountingValidationError: true - x-example: - - dateValue: - is_date: true - key: dateValue - keyPascal: Date - keySnake: date_value - java_datatype: LocalDate - default: "LocalDate.of(2020, Month.OCTOBER, 10)" - java: "LocalDate.now()" - csharp: "DateTime.Now" - php: "new DateTime('2020-12-10')" - node: "'2020-10-10'" - python: "dateutil.parser.parse('2020-12-03T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - contact: - is_object: true - key: contact - keyPascal: Contact - - contactID: - is_last: true - is_uuid: true - key: contactID - keyPascal: ContactID - keySnake: contact_id - default: 00000000-0000-0000-0000-000000000000 - object: contact - - quote: - is_object: true - key: quote - keyPascal: Quote - - reference: - key: reference - keyPascal: Reference - default: I am an update - object: quote - - set_contact: - is_variable: true - nonString: true - key: contact - keyPascal: Contact - default: contact - object: quote - - date: - is_last: true - is_variable: true - nonString: true - key: date - keyPascal: Date - default: dateValue - python: date_value - ruby: date_value - object: quote - - quotes: - is_object: true - key: quotes - keyPascal: Quotes - - add_quote: - is_last: true - is_array_add: true - key: quotes - keyPascal: Quotes - java: Quotes - csharp: Quote - object: quote - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/QuoteID' - responses: - '200': - description: Success - return response of type Quotes array with updated Quote - content: - application/json: - schema: - $ref: '#/components/schemas/Quotes' - example: { - "SummarizeErrors":true, - "Id":"be4f43a7-ef02-497a-96c2-fc0bc047a82a", - "Status":"OK", - "ProviderName":"provider-name", - "DateTimeUTC":"/Date(1580605644385)/", - "Quotes":[ - { - "QuoteID":"8ce6b14c-ef87-4f45-93f0-853137c6d0e1", - "QuoteNumber":"QU-0008", - "Reference":"I am an update", - "Terms":"", - "Contact":{ - "ContactID":"8ed7dd03-4e6a-4078-a807-c5309abfec52", - "Name":"Orlena Greenville 35", - "EmailAddress":"" - }, - "LineItems":[ - { - "LineItemID":"be69f44e-9c72-4fcd-9152-0174867cce49", - "AccountCode":"12775", - "Description":"Foobar", - "UnitAmount":20.0000, - "LineAmount":20.00, - "ItemCode":"", - "Quantity":1.0000, - "TaxAmount":0.00, - "Tracking":[] - } - ], - "Date":"/Date(1580515200000)/", - "DateString":"2020-02-01T00:00:00", - "Status":"DRAFT", - "CurrencyRate":1.000000, - "CurrencyCode":"USD", - "SubTotal":20.00, - "TotalTax":0.00, - "Total":20.00, - "UpdatedDateUTC":"/Date(1580605644360)/", - "LineAmountTypes":"EXCLUSIVE" - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Quotes' - example: { - "Quotes": [ - { - "Reference": "I am an update", - "Contact": { - "ContactID": "00000000-0000-0000-0000-000000000000" - }, - "Date": "2020-02-01" - } - ] - } - '/Quotes/{QuoteID}/History': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getQuoteHistory - summary: Retrieves history records of a specific quote - parameters: - - $ref: '#/components/parameters/QuoteID' - responses: - '200': - $ref: '#/components/responses/HistoryRetrieved' - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createQuoteHistory - summary: Creates a history record for a specific quote - x-hasAccountingValidationError: true - x-example: - - historyRecord: - is_object: true - key: historyRecord - keyPascal: HistoryRecord - keySnake: history_record - - Details: - is_last: true - key: details - keyPascal: Details - default: Hello World - object: historyRecord - - historyRecords: - is_object: true - key: historyRecords - keyPascal: HistoryRecords - - add_historyRecord: - is_last: true - is_array_add: true - key: historyRecords - keyPascal: HistoryRecords - keySnake: history_records - java: HistoryRecords - python: history_record - ruby: history_record - csharp: HistoryRecord - object: historyRecord - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/QuoteID' - responses: - '200': - $ref: '#/components/responses/HistoryRecordCreated' - '400': - $ref: '#/components/responses/400Error' - requestBody: - $ref: '#/components/requestBodies/historyRecords' - '/Quotes/{QuoteID}/pdf': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getQuoteAsPdf - x-path: '/Quotes/{QuoteID}' - summary: Retrieves a specific quote as a PDF file using a unique quote Id - parameters: - - $ref: '#/components/parameters/QuoteID' - responses: - '200': - description: Success - return response of byte array pdf version of specified Quotes - content: - application/pdf: - schema: - type: string - format: binary - '/Quotes/{QuoteID}/Attachments': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getQuoteAttachments - summary: Retrieves attachments for a specific quote - parameters: - - $ref: '#/components/parameters/QuoteID' - responses: - '200': - description: Success - return response of type Attachments array of Attachment - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "439c1573-3cd8-4697-a9f6-81fa651ee8f3", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1550852630329)/", - "Attachments": [ - { - "AttachmentID": "52a643be-cd5c-489f-9778-53a9fd337756", - "FileName": "sample5.jpg", - "Url": "https://api.xero.com/api.xro/2.0/Quotes/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '/Quotes/{QuoteID}/Attachments/{AttachmentID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getQuoteAttachmentById - summary: Retrieves a specific attachment from a specific quote using a unique attachment Id - parameters: - - $ref: '#/components/parameters/QuoteID' - - $ref: '#/components/parameters/AttachmentID' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of attachment for Quote as binary data - content: - application/octet-stream: - schema: - type: string - format: binary - '/Quotes/{QuoteID}/Attachments/{FileName}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getQuoteAttachmentByFileName - summary: Retrieves a specific attachment from a specific quote by filename - parameters: - - $ref: '#/components/parameters/QuoteID' - - $ref: '#/components/parameters/FileName' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of attachment for Quote as binary data - content: - application/octet-stream: - schema: - type: string - format: binary - post: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: updateQuoteAttachmentByFileName - x-hasAccountingValidationError: true - summary: Updates a specific attachment from a specific quote by filename - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/QuoteID' - - $ref: '#/components/parameters/FileName' - responses: - '200': - description: Success - return response of type Attachments array of Attachment - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "c8d6413a-1da2-4faa-9848-21f60443e906", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1550859714477)/", - "Attachments": [ - { - "AttachmentID": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "FileName": "sample5.jpg", - "Url": "https://api.xero.com/api.xro/2.0/Quotes/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '400': - description: Validation Error - some data was incorrect returns response of type Error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - put: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: createQuoteAttachmentByFileName - x-hasAccountingValidationError: true - summary: Creates attachment for a specific quote - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/QuoteID' - - $ref: '#/components/parameters/FileName' - responses: - '200': - description: Success - return response of type Attachments array of Attachment - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "724cdff5-bcd1-4c5c-977e-e864c24258e0", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1550856817769)/", - "Attachments": [ - { - "AttachmentID": "ab95b276-9dce-4925-9077-439818ba270f", - "FileName": "sample5.jpg", - "Url": "https://api.xero.com/api.xro/2.0/Quotes/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - /Receipts: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getReceipts - summary: Retrieves draft expense claim receipts for any user - parameters: - - $ref: '#/components/parameters/ifModifiedSince' - - in: query - name: where - description: Filter by an any element - example: Status=="DRAFT" - x-example-csharp: Status==\"DRAFT\" - x-example-java: Status=="' + Receipt.StatusEnum.DRAFT + '" - x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Receipt::STATUS_DRAFT . '" - x-example-ruby: Status==#{XeroRuby::Accounting::Receipt::DRAFT} - schema: - type: string - - in: query - name: order - description: Order by an any element - example: "ReceiptNumber ASC" - schema: - type: string - - $ref: '#/components/parameters/unitdp' - responses: - '200': - description: Success - return response of type Receipts array for all Receipt - content: - application/json: - schema: - $ref: '#/components/schemas/Receipts' - example: { - "Id": "078b2a2c-902f-4154-8739-357ece5982e5", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552524584695)/", - "Receipts": [ - { - "ReceiptID": "a44fd147-af4e-4fe8-a09a-55332df74162", - "ReceiptNumber": 1, - "Status": "DRAFT", - "User": { - "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273", - "FirstName": "API ", - "LastName": "Team", - "ValidationErrors": [], - "Warnings": [] - }, - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "Name": "Liam Gallagher", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "SalesTrackingCategories": [], - "PurchasesTrackingCategories": [], - "ContactPersons": [], - "Attachments": [], - "HasValidationErrors": false, - "ValidationErrors": [], - "Warnings": [] - }, - "Date": "/Date(1552435200000+0000)/", - "UpdatedDateUTC": "/Date(1552524583983+0000)/", - "Reference": "", - "LineAmountTypes": "NoTax", - "LineItems": [], - "SubTotal": 40.00, - "TotalTax": 0.00, - "Total": 40.00, - "ID": "a44fd147-af4e-4fe8-a09a-55332df74162", - "HasAttachments": false, - "Attachments": [], - "ValidationErrors": [], - "Warnings": [] - } - ] - } - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createReceipt - summary: Creates draft expense claim receipts for any user - x-hasAccountingValidationError: true - x-example: - - contact: - is_object: true - key: contact - keyPascal: Contact - - contactID: - is_last: true - is_uuid: true - key: contactID - keyPascal: ContactID - keySnake: contact_id - default: 00000000-0000-0000-0000-000000000000 - object: contact - - user: - is_object: true - key: user - keyPascal: User - - userID: - is_last: true - is_uuid: true - key: userID - keyPascal: UserID - keySnake: user_id - default: 00000000-0000-0000-0000-000000000000 - object: user - - lineItem: - is_object: true - key: lineItem - keyPascal: LineItem - keySnake: line_item - - description: - key: description - keyPascal: Description - default: Foobar - object: lineItem - - quantity: - nonString: true - key: quantity - keyPascal: Quantity - default: 1.0 - is_money: true - object: lineItem - - unitAmount: - nonString: true - key: unitAmount - keyPascal: UnitAmount - keySnake: unit_amount - default: 20.0 - is_money: true - object: lineItem - - accountCode: - is_last: true - key: accountCode - keyPascal: AccountCode - keySnake: account_code - default: "000" - object: lineItem - - line_items: - is_list: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - csharp: LineItem - java: LineItem - - add_lineitems: - is_last: true - is_list_add: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - java: LineItems - python: line_item - ruby: line_item - csharp: LineItem - object: lineItem - - receipt: - is_object: true - key: receipt - keyPascal: Receipt - - set_contact: - is_variable: true - nonString: true - key: contact - keyPascal: Contact - default: contact - object: receipt - - set_user: - is_variable: true - nonString: true - key: user - keyPascal: User - default: user - object: receipt - - set_lineitem: - is_variable: true - nonString: true - key: lineItems - keyPascal: LineItems - keySnake: line_items - default: lineItems - python: line_items - ruby: line_items - object: receipt - - lineAmountTypes: - nonString: true - key: lineAmountTypes - keyPascal: LineAmountTypes - keySnake: line_amount_types - default: INCLUSIVE - php: XeroAPI\XeroPHP\Models\Accounting\LineAmountTypes::INCLUSIVE - node: LineAmountTypes.Inclusive - ruby: XeroRuby::Accounting::INCLUSIVE - python: LineAmountTypes.INCLUSIVE - java: com.xero.models.accounting.LineAmountTypes.INCLUSIVE - csharp: LineAmountTypes.Exclusive - object: receipt - - status: - is_last: true - nonString: true - key: status - keyPascal: Status - default: DRAFT - php: XeroAPI\XeroPHP\Models\Accounting\Receipt::STATUS_DRAFT - node: Receipt.StatusEnum.DRAFT - ruby: XeroRuby::Accounting::Receipt::DRAFT - python_string: DRAFT - java: com.xero.models.accounting.Receipt.StatusEnum.DRAFT - csharp: Receipt.StatusEnum.DRAFT - object: receipt - - receipts: - is_object: true - key: receipts - keyPascal: Receipts - - add_receipt: - is_last: true - is_array_add: true - key: receipts - keyPascal: Receipts - java: Receipts - csharp: Receipt - object: receipt - parameters: - - $ref: '#/components/parameters/unitdp' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Receipts array for newly created Receipt - content: - application/json: - schema: - $ref: '#/components/schemas/Receipts' - example: { - "Id": "35898898-5361-4b42-b6ca-9d2c584fc53d", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552524583429)/", - "Receipts": [ - { - "ReceiptID": "a44fd147-af4e-4fe8-a09a-55332df74162", - "ReceiptNumber": 1, - "Status": "DRAFT", - "User": { - "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273", - "EmailAddress": "api@xero.com", - "FirstName": "API ", - "LastName": "Team", - "UpdatedDateUTC": "/Date(1511957179217+0000)/", - "IsSubscriber": true, - "OrganisationRole": "FINANCIALADVISER" - }, - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "ContactStatus": "ACTIVE", - "Name": "Liam Gallagher", - "FirstName": "Liam", - "LastName": "Gallagher", - "EmailAddress": "liam@rockstar.com", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "", - "AttentionTo": "" - }, - { - "AddressType": "POBOX", - "City": "Anytown", - "Region": "NY", - "PostalCode": "10101", - "Country": "USA", - "AttentionTo": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "222-2222", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "333-2233", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "444-3433", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1551747281053+0000)/", - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "Date": "/Date(1552521600000+0000)/", - "UpdatedDateUTC": "/Date(1552524583367+0000)/", - "Reference": "", - "LineAmountTypes": "NoTax", - "LineItems": [ - { - "Description": "Foobar", - "UnitAmount": 20.00, - "TaxType": "NONE", - "TaxAmount": 0.00, - "LineAmount": 40.00, - "AccountCode": "400", - "Tracking": [], - "Quantity": 2.0000 - } - ], - "SubTotal": 40.00, - "TotalTax": 0.00, - "Total": 40.00, - "ID": "a44fd147-af4e-4fe8-a09a-55332df74162", - "HasAttachments": false, - "ValidationErrors": [ - { - "Message": "A valid user should be identified using the UserID." - } - ] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Receipts with an array of Receipt object in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/Receipts' - example: { - "Receipts": [ - { - "Contact": { - "ContactID": "00000000-0000-0000-0000-000000000000" - }, - "Lineitems": [ - { - "Description": "Foobar", - "Quantity": 2, - "UnitAmount": 20, - "AccountCode": "400", - "TaxType": "NONE", - "LineAmount": 40 - } - ], - "User": { - "UserID": "00000000-0000-0000-0000-000000000000" - }, - "LineAmountTypes": "NoTax", - "Status": "DRAFT" - } - ] - } - '/Receipts/{ReceiptID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getReceipt - summary: Retrieves a specific draft expense claim receipt by using a unique receipt Id - parameters: - - $ref: '#/components/parameters/ReceiptID' - - $ref: '#/components/parameters/unitdp' - responses: - '200': - description: Success - return response of type Receipts array for a specified Receipt - content: - application/json: - schema: - $ref: '#/components/schemas/Receipts' - example: { - "Id": "2c99af06-d278-4580-8c8c-463c806af5b6", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1553800357225)/", - "Receipts": [ - { - "ReceiptID": "a44fd147-af4e-4fe8-a09a-55332df74162", - "ReceiptNumber": 1, - "Status": "DRAFT", - "User": { - "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273", - "EmailAddress": "api@xero.com", - "FirstName": "API ", - "LastName": "Team", - "UpdatedDateUTC": "/Date(1511957179217+0000)/", - "IsSubscriber": true, - "OrganisationRole": "FINANCIALADVISER" - }, - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "ContactStatus": "ACTIVE", - "Name": "Liam Gallagher", - "FirstName": "Liam", - "LastName": "Gallagher", - "EmailAddress": "liam@rockstar.com", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "", - "AttentionTo": "" - }, - { - "AddressType": "POBOX", - "City": "Anytown", - "Region": "NY", - "PostalCode": "10101", - "Country": "USA", - "AttentionTo": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "222-2222", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "333-2233", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "444-3433", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1553672800957+0000)/", - "ContactGroups": [], - "DefaultCurrency": "NZD", - "ContactPersons": [], - "HasValidationErrors": false - }, - "Date": "/Date(1552435200000+0000)/", - "UpdatedDateUTC": "/Date(1552524583983+0000)/", - "Reference": "Foobar", - "LineAmountTypes": "NoTax", - "LineItems": [ - { - "Description": "Foobar", - "UnitAmount": 20.00, - "TaxType": "NONE", - "TaxAmount": 0.00, - "LineAmount": 40.00, - "AccountCode": "400", - "Tracking": [], - "Quantity": 2.0000, - "DiscountEnteredAsPercent": true - } - ], - "SubTotal": 40.00, - "TotalTax": 0.00, - "Total": 40.00, - "ID": "a44fd147-af4e-4fe8-a09a-55332df74162", - "HasAttachments": true, - "Attachments": [ - { - "AttachmentID": "e02a84f6-b83a-4983-b3b9-35cd8880c7bc", - "FileName": "HelloWorld.jpg", - "Url": "https://api.xero.com/api.xro/2.0/receipts/a44fd147-af4e-4fe8-a09a-55332df74162/Attachments/HelloWorld.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - }, - { - "AttachmentID": "3451e34c-66a6-42b0-91e2-88618bdc169b", - "FileName": "foobar.jpg", - "Url": "https://api.xero.com/api.xro/2.0/receipts/a44fd147-af4e-4fe8-a09a-55332df74162/Attachments/foobar.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - ] - } - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: updateReceipt - summary: Updates a specific draft expense claim receipts - x-hasAccountingValidationError: true - x-example: - - dateValue: - is_date: true - key: dateValue - keyPascal: Date - java_datatype: LocalDate - default: "LocalDate.of(2020, Month.OCTOBER, 10)" - java: "LocalDate.now()" - csharp: "DateTime.Now" - php: "new DateTime('2020-12-10')" - node: "'2020-10-10'" - python: "dateutil.parser.parse('2020-10-10T00:00:00Z')" - ruby: "'YYYY-MM-DD'" - - user: - is_object: true - key: user - keyPascal: User - - userID: - is_last: true - is_uuid: true - key: userID - keyPascal: UserID - keySnake: user_id - default: 00000000-0000-0000-0000-000000000000 - object: user - - receipt: - is_object: true - key: receipt - keyPascal: Receipt - - set_user: - is_variable: true - nonString: true - key: user - keyPascal: User - default: user - object: receipt - - reference: - key: reference - keyPascal: Reference - default: Foobar - object: receipt - - date: - is_last: true - is_variable: true - nonString: true - key: date - keyPascal: Date - default: dateValue - object: receipt - - receipts: - is_object: true - key: receipts - keyPascal: Receipts - - add_receipt: - is_last: true - is_array_add: true - key: receipts - keyPascal: Receipts - java: Receipts - csharp: Receipt - object: receipt - parameters: - - $ref: '#/components/parameters/ReceiptID' - - $ref: '#/components/parameters/unitdp' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type Receipts array for updated Receipt - content: - application/json: - schema: - $ref: '#/components/schemas/Receipts' - example: { - "Id": "05b76bf7-4734-4633-a399-7d569a6a25c6", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552675557052)/", - "Receipts": [ - { - "ReceiptID": "e3686fdc-c661-4581-b9df-cbb20782ea66", - "ReceiptNumber": 2, - "Status": "DRAFT", - "User": { - "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273", - "EmailAddress": "api@xero.com", - "FirstName": "API ", - "LastName": "Team", - "UpdatedDateUTC": "/Date(1511957179217+0000)/", - "IsSubscriber": true, - "OrganisationRole": "FINANCIALADVISER" - }, - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "ContactStatus": "ACTIVE", - "Name": "Liam Gallagher", - "FirstName": "Liam", - "LastName": "Gallagher", - "EmailAddress": "liam@rockstar.com", - "BankAccountDetails": "", - "Addresses": [ - { - "AddressType": "STREET", - "City": "", - "Region": "", - "PostalCode": "", - "Country": "", - "AttentionTo": "" - }, - { - "AddressType": "POBOX", - "City": "Anytown", - "Region": "NY", - "PostalCode": "10101", - "Country": "USA", - "AttentionTo": "" - } - ], - "Phones": [ - { - "PhoneType": "DEFAULT", - "PhoneNumber": "222-2222", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "DDI", - "PhoneNumber": "", - "PhoneAreaCode": "", - "PhoneCountryCode": "" - }, - { - "PhoneType": "FAX", - "PhoneNumber": "333-2233", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - }, - { - "PhoneType": "MOBILE", - "PhoneNumber": "444-3433", - "PhoneAreaCode": "212", - "PhoneCountryCode": "" - } - ], - "UpdatedDateUTC": "/Date(1551747281053+0000)/", - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "Date": "/Date(1552694400000+0000)/", - "UpdatedDateUTC": "/Date(1552675556927+0000)/", - "Reference": "Foobar", - "LineAmountTypes": "NoTax", - "LineItems": [ - { - "Description": "Foobar", - "UnitAmount": 20.00, - "TaxType": "NONE", - "TaxAmount": 0.00, - "LineAmount": 40.00, - "AccountCode": "400", - "Tracking": [], - "Quantity": 2.0000 - } - ], - "SubTotal": 40.00, - "TotalTax": 0.00, - "Total": 40.00, - "ID": "e3686fdc-c661-4581-b9df-cbb20782ea66", - "HasAttachments": false, - "ValidationErrors": [] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Receipts' - example: { - "Receipts": [ - { - "Lineitems": [], - "User": { - "UserID": "00000000-0000-0000-0000-000000000000" - }, - "Reference": "Foobar" - } - ] - } - '/Receipts/{ReceiptID}/Attachments': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getReceiptAttachments - summary: Retrieves attachments for a specific expense claim receipt - parameters: - - $ref: '#/components/parameters/ReceiptID' - responses: - '200': - description: Success - return response of type Attachments array of Attachments for a specified Receipt - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "d379c04d-d3aa-4034-95b8-af69a449bd78", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552686430436)/", - "Attachments": [ - { - "AttachmentID": "11e5ca6b-d38c-42ab-a29f-c1710d171aa1", - "FileName": "giphy.gif", - "Url": "https://api.xero.com/api.xro/2.0/Receipts/7923c00d-163d-404c-a608-af3de333db29/Attachments/giphy.gif", - "MimeType": "image/gif", - "ContentLength": 495727 - } - ] - } - '/Receipts/{ReceiptID}/Attachments/{AttachmentID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getReceiptAttachmentById - summary: Retrieves a specific attachments from a specific expense claim receipts by using a unique attachment Id - parameters: - - $ref: '#/components/parameters/ReceiptID' - - $ref: '#/components/parameters/AttachmentID' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of attachment for Receipt as binary data - content: - application/octet-stream: - schema: - type: string - format: binary - '/Receipts/{ReceiptID}/Attachments/{FileName}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getReceiptAttachmentByFileName - summary: Retrieves a specific attachment from a specific expense claim receipts by file name - parameters: - - $ref: '#/components/parameters/ReceiptID' - - $ref: '#/components/parameters/FileName' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of attachment for Receipt as binary data - content: - application/octet-stream: - schema: - type: string - format: binary - post: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: updateReceiptAttachmentByFileName - x-hasAccountingValidationError: true - summary: Updates a specific attachment on a specific expense claim receipts by file name - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/ReceiptID' - - $ref: '#/components/parameters/FileName' - responses: - '200': - description: Success - return response of type Attachments array with updated Attachment for a specified Receipt - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "aeca1ea8-8fd9-4757-96a6-397dc4957a69", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552686602761)/", - "Attachments": [ - { - "AttachmentID": "e02a84f6-b83a-4983-b3b9-35cd8880c7bc", - "FileName": "HelloWorld.jpg", - "Url": "https://api.xero.com/api.xro/2.0/Receipts/a44fd147-af4e-4fe8-a09a-55332df74162/Attachments/HelloWorld.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - put: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: createReceiptAttachmentByFileName - x-hasAccountingValidationError: true - summary: Creates an attachment on a specific expense claim receipts by file name - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/ReceiptID' - - $ref: '#/components/parameters/FileName' - responses: - '200': - description: Success - return response of type Attachments array with newly created Attachment for a specified Receipt - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "01c9a720-b1f1-4477-8de8-ff46d945fd1d", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1552686599884)/", - "Attachments": [ - { - "AttachmentID": "3451e34c-66a6-42b0-91e2-88618bdc169b", - "FileName": "foobar.jpg", - "Url": "https://api.xero.com/api.xro/2.0/Receipts/a44fd147-af4e-4fe8-a09a-55332df74162/Attachments/foobar.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - '/Receipts/{ReceiptID}/History': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getReceiptHistory - summary: Retrieves a history record for a specific receipt - parameters: - - $ref: '#/components/parameters/ReceiptID' - responses: - '200': - $ref: '#/components/responses/HistoryRetrieved' - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createReceiptHistory - summary: Creates a history record for a specific receipt - x-hasAccountingValidationError: true - x-example: - - historyRecord: - is_object: true - key: historyRecord - keyPascal: HistoryRecord - keySnake: history_record - - Details: - is_last: true - key: details - keyPascal: Details - default: Hello World - object: historyRecord - - historyRecords: - is_object: true - key: historyRecords - keyPascal: HistoryRecords - - add_historyRecord: - is_last: true - is_array_add: true - key: historyRecords - keyPascal: HistoryRecords - keySnake: history_records - java: HistoryRecords - python: history_record - ruby: history_record - csharp: HistoryRecord - object: historyRecord - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/ReceiptID' - responses: - '200': - $ref: '#/components/responses/HistoryRecordCreated' - '400': - description: Unsupported - return response incorrect exception, API is not able to create HistoryRecord for Receipts - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - example: { - "ErrorNumber": 10, - "Type": "ValidationException", - "Message": "A validation exception occurred", - "Elements": [ - { - "DateUTCString": "2019-03-15T21:51:50", - "DateUTC": "/Date(1552686710791)/", - "Details": "Hello World", - "ValidationErrors": [ - { - "Message": "The document with the supplied id was not found for this endpoint." - } - ] - } - ] - } - requestBody: - $ref: '#/components/requestBodies/historyRecords' - /RepeatingInvoices: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getRepeatingInvoices - summary: Retrieves repeating invoices - parameters: - - in: query - name: where - description: Filter by an any element - example: Status=="DRAFT" - x-example-csharp: Status==\"DRAFT\" - x-example-java: Status=="' + RepeatingInvoice.StatusEnum.DRAFT + '" - x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\RepeatingInvoice::STATUS_DRAFT . '" - x-example-ruby: Status==#{XeroRuby::Accounting::RepeatingInvoice::DRAFT} - schema: - type: string - - in: query - name: order - description: Order by an any element - example: "Total ASC" - schema: - type: string - responses: - '200': - description: Success - return response of type Repeating Invoices array for all Repeating Invoice - content: - application/json: - schema: - $ref: '#/components/schemas/RepeatingInvoices' - example: { - "Id": "b336833d-a3a8-4a67-ab4c-6280b3ad87b0", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1553805183228)/", - "RepeatingInvoices": [ - { - "Schedule": { - "Period": 1, - "Unit": "MONTHLY", - "DueDate": 10, - "DueDateType": "OFFOLLOWINGMONTH", - "StartDate": "/Date(1555286400000+0000)/", - "EndDate": "/Date(1569801600000+0000)/", - "NextScheduledDate": "/Date(1555286400000+0000)/" - }, - "RepeatingInvoiceID": "428c0d75-909f-4b04-8403-a48dc27283b0", - "Type": "ACCREC", - "Reference": "[Week]", - "HasAttachments": true, - "ApprovedForSending": false, - "SendCopy": false, - "MarkAsSent": false, - "IncludePDF": false, - "ID": "428c0d75-909f-4b04-8403-a48dc27283b0", - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "Name": "Liam Gallagher", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "Status": "AUTHORISED", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Guitars Fender Strat", - "UnitAmount": 5000.00, - "TaxType": "OUTPUT2", - "TaxAmount": 750.00, - "LineAmount": 5000.00, - "AccountCode": "200", - "Tracking": [], - "Quantity": 1.0000, - "LineItemID": "13a8353c-d2af-4d5b-920c-438449f08900", - "DiscountEnteredAsPercent": true - } - ], - "SubTotal": 5000.00, - "TotalTax": 750.00, - "Total": 5750.00, - "CurrencyCode": "NZD" - } - ] - } - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createRepeatingInvoices - summary: Creates one or more repeating invoice templates - x-hasAccountingValidationError: true - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type RepeatingInvoices array with newly created RepeatingInvoice - content: - application/json: - schema: - $ref: '#/components/schemas/RepeatingInvoices' - example: { - "Id": "b336833d-a3a8-4a67-ab4c-6280b3ad87b0", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1553805183228)/", - "RepeatingInvoices": [ - { - "Schedule": { - "Period": 1, - "Unit": "MONTHLY", - "DueDate": 10, - "DueDateType": "OFFOLLOWINGMONTH", - "StartDate": "/Date(1555286400000+0000)/", - "EndDate": "/Date(1569801600000+0000)/", - "NextScheduledDate": "/Date(1555286400000+0000)/" - }, - "RepeatingInvoiceID": "428c0d75-909f-4b04-8403-a48dc27283b0", - "Type": "ACCREC", - "Reference": "[Week]", - "HasAttachments": true, - "ApprovedForSending": false, - "SendCopy": false, - "MarkAsSent": false, - "IncludePDF": false, - "ID": "428c0d75-909f-4b04-8403-a48dc27283b0", - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "Name": "Liam Gallagher", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "Status": "AUTHORISED", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Guitars Fender Strat", - "UnitAmount": 5000.00, - "TaxType": "OUTPUT2", - "TaxAmount": 750.00, - "LineAmount": 5000.00, - "AccountCode": "200", - "Tracking": [], - "Quantity": 1.0000, - "LineItemID": "13a8353c-d2af-4d5b-920c-438449f08900", - "DiscountEnteredAsPercent": true - } - ], - "SubTotal": 5000.00, - "TotalTax": 750.00, - "Total": 5750.00, - "CurrencyCode": "NZD" - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: RepeatingInvoices with an array of repeating invoice objects in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/RepeatingInvoices' - example: { - "RepeatingInvoices": [ - { - "Schedule": { - "Period": 1, - "Unit": "MONTHLY", - "DueDate": 10, - "DueDateType": "OFFOLLOWINGMONTH", - "StartDate": "/Date(1555286400000+0000)/" - }, - "Type": "ACCREC", - "Reference": "[Week]", - "ApprovedForSending": false, - "SendCopy": false, - "MarkAsSent": false, - "IncludePDF": false, - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "Name": "Liam Gallagher" - }, - "Status": "AUTHORISED", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Guitars Fender Strat", - "UnitAmount": 5000.00, - "TaxType": "OUTPUT2", - "TaxAmount": 750.00, - "LineAmount": 5000.00, - "AccountCode": "200", - "Tracking": [], - "Quantity": 1.0000, - "LineItemID": "13a8353c-d2af-4d5b-920c-438449f08900", - "DiscountEnteredAsPercent": true - } - ], - "CurrencyCode": "NZD" - } - ] - } - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: updateOrCreateRepeatingInvoices - summary: Creates or deletes one or more repeating invoice templates - x-hasAccountingValidationError: true - parameters: - - $ref: '#/components/parameters/summarizeErrors' - - $ref: '#/components/parameters/idempotencyKey' - responses: - '200': - description: Success - return response of type RepeatingInvoices array with newly created RepeatingInvoice - content: - application/json: - schema: - $ref: '#/components/schemas/RepeatingInvoices' - example: { - "Id": "b336833d-a3a8-4a67-ab4c-6280b3ad87b0", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1553805183228)/", - "RepeatingInvoices": [ - { - "Schedule": { - "Period": 1, - "Unit": "MONTHLY", - "DueDate": 10, - "DueDateType": "OFFOLLOWINGMONTH", - "StartDate": "/Date(1555286400000+0000)/", - "EndDate": "/Date(1569801600000+0000)/", - "NextScheduledDate": "/Date(1555286400000+0000)/" - }, - "RepeatingInvoiceID": "428c0d75-909f-4b04-8403-a48dc27283b0", - "Type": "ACCREC", - "Reference": "[Week]", - "HasAttachments": true, - "ApprovedForSending": false, - "SendCopy": false, - "MarkAsSent": false, - "IncludePDF": false, - "ID": "428c0d75-909f-4b04-8403-a48dc27283b0", - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "Name": "Liam Gallagher", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "Status": "AUTHORISED", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Guitars Fender Strat", - "UnitAmount": 5000.00, - "TaxType": "OUTPUT2", - "TaxAmount": 750.00, - "LineAmount": 5000.00, - "AccountCode": "200", - "Tracking": [], - "Quantity": 1.0000, - "LineItemID": "13a8353c-d2af-4d5b-920c-438449f08900", - "DiscountEnteredAsPercent": true - } - ], - "SubTotal": 5000.00, - "TotalTax": 750.00, - "Total": 5750.00, - "CurrencyCode": "NZD" - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: RepeatingInvoices with an array of repeating invoice objects in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/RepeatingInvoices' - example: { - "RepeatingInvoices": [ - { - "Schedule": { - "Period": 1, - "Unit": "MONTHLY", - "DueDate": 10, - "DueDateType": "OFFOLLOWINGMONTH", - "StartDate": "/Date(1555286400000+0000)/" - }, - "Type": "ACCREC", - "Reference": "[Week]", - "ApprovedForSending": false, - "SendCopy": false, - "MarkAsSent": false, - "IncludePDF": false, - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "Name": "Liam Gallagher" - }, - "Status": "AUTHORISED", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Guitars Fender Strat", - "UnitAmount": 5000.00, - "TaxType": "OUTPUT2", - "TaxAmount": 750.00, - "LineAmount": 5000.00, - "AccountCode": "200", - "Tracking": [], - "Quantity": 1.0000, - "LineItemID": "13a8353c-d2af-4d5b-920c-438449f08900", - "DiscountEnteredAsPercent": true - } - ], - "CurrencyCode": "NZD" - } - ] - } - '/RepeatingInvoices/{RepeatingInvoiceID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getRepeatingInvoice - summary: Retrieves a specific repeating invoice by using a unique repeating invoice Id - parameters: - - $ref: '#/components/parameters/RepeatingInvoiceID' - responses: - '200': - description: Success - return response of type Repeating Invoices array with a specified Repeating Invoice - content: - application/json: - schema: - $ref: '#/components/schemas/RepeatingInvoices' - example: { - "Id": "d9ac3755-7b81-4e3a-bef0-fa8a4f171442", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1553805184820)/", - "RepeatingInvoices": [ - { - "Schedule": { - "Period": 1, - "Unit": "MONTHLY", - "DueDate": 10, - "DueDateType": "OFFOLLOWINGMONTH", - "StartDate": "/Date(1555286400000+0000)/", - "EndDate": "/Date(1569801600000+0000)/", - "NextScheduledDate": "/Date(1555286400000+0000)/" - }, - "RepeatingInvoiceID": "428c0d75-909f-4b04-8403-a48dc27283b0", - "Type": "ACCREC", - "Reference": "[Week]", - "HasAttachments": true, - "Attachments": [ - { - "AttachmentID": "2a488b0f-3966-4b6e-a7e1-b6d3286351f2", - "FileName": "HelloWorld.jpg", - "Url": "https://api.xero.com/api.xro/2.0/Invoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/HelloWorld.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - }, - { - "AttachmentID": "48294e40-bfd2-4027-a365-f034383cb7aa", - "FileName": "foobar.jpg", - "Url": "https://api.xero.com/api.xro/2.0/Invoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/foobar.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - }, - { - "AttachmentID": "528e978a-87b8-44c4-9465-9456ec2f7ee6", - "FileName": "helo-heros.jpg", - "Url": "https://api.xero.com/api.xro/2.0/Invoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/helo-heros.jpg", - "MimeType": "image/jpeg", - "ContentLength": 2878711 - } - ], - "ID": "428c0d75-909f-4b04-8403-a48dc27283b0", - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "Name": "Liam Gallagher", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "Status": "AUTHORISED", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Guitars Fender Strat", - "UnitAmount": 5000.00, - "TaxType": "OUTPUT2", - "TaxAmount": 750.00, - "LineAmount": 5000.00, - "AccountCode": "200", - "Tracking": [], - "Quantity": 1.0000, - "LineItemID": "13a8353c-d2af-4d5b-920c-438449f08900", - "DiscountEnteredAsPercent": true - } - ], - "SubTotal": 5000.00, - "TotalTax": 750.00, - "Total": 5750.00, - "CurrencyCode": "NZD" - } - ] - } - post: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: updateRepeatingInvoice - summary: Deletes a specific repeating invoice template - x-hasAccountingValidationError: true - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/RepeatingInvoiceID' - responses: - '200': - description: Success - return response of type RepeatingInvoices array with deleted Invoice - content: - application/json: - schema: - $ref: '#/components/schemas/RepeatingInvoices' - example: { - "Id": "b336833d-a3a8-4a67-ab4c-6280b3ad87b0", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1553805183228)/", - "RepeatingInvoices": [ - { - "Schedule": { - "Period": 1, - "Unit": "MONTHLY", - "DueDate": 10, - "DueDateType": "OFFOLLOWINGMONTH", - "StartDate": "/Date(1555286400000+0000)/", - "EndDate": "/Date(1569801600000+0000)/", - "NextScheduledDate": "/Date(1555286400000+0000)/" - }, - "RepeatingInvoiceID": "428c0d75-909f-4b04-8403-a48dc27283b0", - "Type": "ACCREC", - "Reference": "[Week]", - "HasAttachments": true, - "ApprovedForSending": false, - "SendCopy": false, - "MarkAsSent": false, - "IncludePDF": false, - "ID": "428c0d75-909f-4b04-8403-a48dc27283b0", - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "Name": "Liam Gallagher", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "Status": "DELETED", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Guitars Fender Strat", - "UnitAmount": 5000.00, - "TaxType": "OUTPUT2", - "TaxAmount": 750.00, - "LineAmount": 5000.00, - "AccountCode": "200", - "Tracking": [], - "Quantity": 1.0000, - "LineItemID": "13a8353c-d2af-4d5b-920c-438449f08900", - "DiscountEnteredAsPercent": true - } - ], - "SubTotal": 5000.00, - "TotalTax": 750.00, - "Total": 5750.00, - "CurrencyCode": "NZD" - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/RepeatingInvoices' - example: { - "Schedule": { - "Period": 1, - "Unit": "MONTHLY", - "DueDate": 10, - "DueDateType": "OFFOLLOWINGMONTH", - "StartDate": "/Date(1555286400000+0000)/", - "EndDate": "/Date(1569801600000+0000)/", - "NextScheduledDate": "/Date(1555286400000+0000)/" - }, - "RepeatingInvoiceID": "428c0d75-909f-4b04-8403-a48dc27283b0", - "Type": "ACCREC", - "Reference": "[Week]", - "HasAttachments": true, - "ApprovedForSending": false, - "SendCopy": false, - "MarkAsSent": false, - "IncludePDF": false, - "ID": "428c0d75-909f-4b04-8403-a48dc27283b0", - "Contact": { - "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8", - "Name": "Liam Gallagher", - "Addresses": [], - "Phones": [], - "ContactGroups": [], - "ContactPersons": [], - "HasValidationErrors": false - }, - "Status": "DELETED", - "LineAmountTypes": "Exclusive", - "LineItems": [ - { - "Description": "Guitars Fender Strat", - "UnitAmount": 5000.00, - "TaxType": "OUTPUT2", - "TaxAmount": 750.00, - "LineAmount": 5000.00, - "AccountCode": "200", - "Tracking": [], - "Quantity": 1.0000, - "LineItemID": "13a8353c-d2af-4d5b-920c-438449f08900", - "DiscountEnteredAsPercent": true - } - ], - "SubTotal": 5000.00, - "TotalTax": 750.00, - "Total": 5750.00, - "CurrencyCode": "NZD" - } - '/RepeatingInvoices/{RepeatingInvoiceID}/Attachments': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getRepeatingInvoiceAttachments - summary: Retrieves attachments from a specific repeating invoice - parameters: - - $ref: '#/components/parameters/RepeatingInvoiceID' - responses: - '200': - description: Success - return response of type Attachments array with all Attachments for a specified Repeating Invoice - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "b88b807b-3087-474b-a4f9-d8f1b4f5a899", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1553805762049)/", - "Attachments": [ - { - "AttachmentID": "2a488b0f-3966-4b6e-a7e1-b6d3286351f2", - "FileName": "HelloWorld.jpg", - "Url": "https://api.xero.com/api.xro/2.0/RepeatingInvoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/HelloWorld.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - }, - { - "AttachmentID": "48294e40-bfd2-4027-a365-f034383cb7aa", - "FileName": "foobar.jpg", - "Url": "https://api.xero.com/api.xro/2.0/RepeatingInvoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/foobar.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - }, - { - "AttachmentID": "528e978a-87b8-44c4-9465-9456ec2f7ee6", - "FileName": "helo-heros.jpg", - "Url": "https://api.xero.com/api.xro/2.0/RepeatingInvoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/helo-heros.jpg", - "MimeType": "image/jpeg", - "ContentLength": 2878711 - } - ] - } - '/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{AttachmentID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getRepeatingInvoiceAttachmentById - summary: Retrieves a specific attachment from a specific repeating invoice - parameters: - - $ref: '#/components/parameters/RepeatingInvoiceID' - - $ref: '#/components/parameters/AttachmentID' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of attachment for Repeating Invoice as binary data - content: - application/octet-stream: - schema: - type: string - format: binary - '/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.attachments, accounting.attachments.read] - tags: - - Accounting - operationId: getRepeatingInvoiceAttachmentByFileName - summary: Retrieves a specific attachment from a specific repeating invoices by file name - parameters: - - $ref: '#/components/parameters/RepeatingInvoiceID' - - $ref: '#/components/parameters/FileName' - - $ref: '#/components/parameters/ContentType' - responses: - '200': - description: Success - return response of attachment for Repeating Invoice as binary data - content: - application/octet-stream: - schema: - type: string - format: binary - post: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: updateRepeatingInvoiceAttachmentByFileName - x-hasAccountingValidationError: true - summary: Updates a specific attachment from a specific repeating invoices by file name - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/RepeatingInvoiceID' - - $ref: '#/components/parameters/FileName' - responses: - '200': - description: Success - return response of type Attachments array with specified Attachment for a specified Repeating Invoice - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "61b24d5c-4d6e-468f-9de1-abbc234b239a", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1553805873362)/", - "Attachments": [ - { - "AttachmentID": "d086d5f4-9c3d-4edc-a87e-906248eeb652", - "FileName": "HelloWorld.jpg", - "Url": "https://api.xero.com/api.xro/2.0/RepeatingInvoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/HelloWorld.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - put: - security: - - OAuth2: [accounting.attachments] - tags: - - Accounting - operationId: createRepeatingInvoiceAttachmentByFileName - x-hasAccountingValidationError: true - summary: Creates an attachment from a specific repeating invoices by file name - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/RepeatingInvoiceID' - - $ref: '#/components/parameters/FileName' - responses: - '200': - description: Success - return response of type Attachments array with updated Attachment for a specified Repeating Invoice - x-isAttachment: true - content: - application/json: - schema: - $ref: '#/components/schemas/Attachments' - example: { - "Id": "219de8c0-ee70-48af-a000-594eba14b417", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1553805866696)/", - "Attachments": [ - { - "AttachmentID": "e078e56c-9a2b-4f6c-a1fa-5d19b0dab611", - "FileName": "foobar.jpg", - "Url": "https://api.xero.com/api.xro/2.0/RepeatingInvoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/foobar.jpg", - "MimeType": "image/jpg", - "ContentLength": 2878711 - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: Byte array of file in body of request - content: - application/octet-stream: - schema: - type: string - format: byte - '/RepeatingInvoices/{RepeatingInvoiceID}/History': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.transactions, accounting.transactions.read] - tags: - - Accounting - operationId: getRepeatingInvoiceHistory - summary: Retrieves history record for a specific repeating invoice - parameters: - - $ref: '#/components/parameters/RepeatingInvoiceID' - responses: - '200': - $ref: '#/components/responses/HistoryRetrieved' - put: - security: - - OAuth2: [accounting.transactions] - tags: - - Accounting - operationId: createRepeatingInvoiceHistory - summary: Creates a history record for a specific repeating invoice - x-hasAccountingValidationError: true - x-example: - - historyRecord: - is_object: true - key: historyRecord - keyPascal: HistoryRecord - keySnake: history_record - - Details: - is_last: true - key: details - keyPascal: Details - default: Hello World - object: historyRecord - - historyRecords: - is_object: true - key: historyRecords - keyPascal: HistoryRecords - - add_historyRecord: - is_last: true - is_array_add: true - key: historyRecords - keyPascal: HistoryRecords - keySnake: history_records - java: HistoryRecords - python: history_record - ruby: history_record - csharp: HistoryRecord - object: historyRecord - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/RepeatingInvoiceID' - responses: - '200': - $ref: '#/components/responses/HistoryRecordCreated' - '400': - $ref: '#/components/responses/400Error' - requestBody: - $ref: '#/components/requestBodies/historyRecords' - '/Reports/TenNinetyNine': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.reports.read, accounting.reports.tenninetynine.read] - tags: - - Accounting - operationId: getReportTenNinetyNine - summary: Retrieve reports for 1099 - parameters: - - in: query - name: reportYear - x-snake: report_year - description: The year of the 1099 report - example: "2019" - schema: - type: string - responses: - '200': - description: Success - return response of type Reports - content: - application/json: - schema: - $ref: '#/components/schemas/Reports' - example: { - "Id": "8b474ddb-9ef4-457c-8640-1c0e3670ea0e", - "Status": "OK", - "ProviderName": "Java Public Example", - "DateTimeUTC": "/Date(1691540171754)/", - "Reports": [ - { - "ReportName": "1099-NEC report", - "ReportDate": "1 Jan 2023 to 31 Dec 2023", - "Fields": [], - "Contacts": [ - { - "Box1": 0.00, - "Box2": 0.00, - "Box4": 1150.00, - "Name": "Bank West", - "FederalTaxIDType": "SSN", - "City": "Pinehaven", - "Zip": "12345", - "State": "CA", - "Email": "jack@bowest.com", - "StreetAddress": "Procurement Services\r\nGPO 1234\r\n\r\n\r\n", - "TaxID": "234-22-2223", - "ContactId": "81d5706a-8057-4338-8511-747cd85f4c68", - "LegalName": "Jack Sparrow", - "BusinessName": "Bank West", - "FederalTaxClassification": "PARTNERSHIP" - } - ] - }, - { - "ReportName": "1099-MISC report", - "ReportDate": "1 Jan 2023 to 31 Dec 2023", - "Fields": [], - "Contacts": [ - { - "Box1": 0.00, - "Box2": 0.00, - "Box3": 1000.00, - "Box4": 0.00, - "Box5": 0.00, - "Box6": 0.00, - "Box7": 0.00, - "Box8": 0.00, - "Box9": 0.00, - "Box10": 0.00, - "Box11": 0.00, - "Box14": 0.00, - "Name": "Bank West", - "FederalTaxIDType": "SSN", - "City": "Pinehaven", - "Zip": "12345", - "State": "CA", - "Email": "jack@bowest.com", - "StreetAddress": "Procurement Services\r\nGPO 1234\r\n\r\n\r\n", - "TaxID": "234-22-2223", - "ContactId": "81d5706a-8057-4338-8511-747cd85f4c68", - "LegalName": "Jack Sparrow", - "BusinessName": "Bank West", - "FederalTaxClassification": "PARTNERSHIP" - }, - { - "Box1": 0.00, - "Box2": 0.00, - "Box3": 1000.00, - "Box4": 0.00, - "Box5": 0.00, - "Box6": 0.00, - "Box7": 0.00, - "Box8": 0.00, - "Box9": 0.00, - "Box10": 0.00, - "Box11": 0.00, - "Box14": 0.00, - "Name": "Hoyt Productions", - "FederalTaxIDType": "SSN", - "City": "Oaktown", - "Zip": "45123", - "State": "NY", - "Email": "accounts@hoytmadeupdemo.com", - "StreetAddress": "100 Rusty Ridge Road\r\nSuite 100\r\n\r\n\r\n", - "TaxID": "123-45-6780", - "ContactId": "19732b6a-9a5c-4651-b33c-3f8f682e2a2b", - "LegalName": "Raymond Holt", - "BusinessName": "Hoyt productions", - "FederalTaxClassification": "S_CORP" - }, - { - "Box1": 5543.75, - "Box2": 0.00, - "Box3": 0.00, - "Box4": 0.00, - "Box5": 0.00, - "Box6": 0.00, - "Box7": 0.00, - "Box8": 0.00, - "Box9": 0.00, - "Box10": 0.00, - "Box11": 0.00, - "Box14": 0.00, - "Name": "Truxton Property Management", - "FederalTaxIDType": "EIN", - "City": "Coppertown", - "Zip": "21321", - "State": "FL", - "Email": "accounts@truxtonmadeupdemo.com", - "StreetAddress": "1000 Copper Avenue\r\nSuite 1000\r\n\r\n\r\n", - "TaxID": "33-3332233", - "ContactId": "018355fc-c67e-4352-b443-ef3873031983", - "LegalName": "Jake Peralta", - "BusinessName": "Truxton Property Management", - "FederalTaxClassification": "C_CORP" - } - ] - } - ] - } - '/Reports/AgedPayablesByContact': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.reports.read] - tags: - - Accounting - operationId: getReportAgedPayablesByContact - summary: Retrieves report for aged payables by contact - parameters: - - in: query - required: true - name: contactId - x-snake: contact_id - description: Unique identifier for a Contact - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - - in: query - name: date - description: The date of the Aged Payables By Contact report - example: "2019-10-31" - schema: - type: string - format: date - - $ref: '#/components/parameters/FromDate' - - $ref: '#/components/parameters/ToDate' - responses: - '200': - description: Success - return response of type ReportWithRows - content: - application/json: - schema: - $ref: '#/components/schemas/ReportWithRows' - example: { - "Id": "5a33f9d4-44a6-4467-a812-4f025506ee35", - "Status": "OK", - "ProviderName": "Java Public Example", - "DateTimeUTC": "/Date(1555971088085)/", - "Reports": [ - { - "ReportName": "Aged Payables By Contact", - "ReportType": "AgedPayablesByContact", - "ReportTitles": [ - "Invoices", - "ABC", - "From 10 October 2017 to 22 April 2019", - "Showing payments to 22 April 2019" - ], - "ReportDate": "22 April 2019", - "UpdatedDateUTC": "/Date(1555971088085)/", - "Fields": [], - "Rows": [ - { - "RowType": "Header", - "Cells": [ - { - "Value": "Date" - }, - { - "Value": "Reference" - }, - { - "Value": "Due Date" - }, - { - "Value": "" - }, - { - "Value": "Total" - }, - { - "Value": "Paid" - }, - { - "Value": "Credited" - }, - { - "Value": "Due" - } - ] - }, - { - "RowType": "Section", - "Title": "", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "2017-10-10T00:00:00" - }, - { - "Value": "Opening Balance" - }, - { - "Value": "" - }, - { - "Value": "" - }, - { - "Value": "" - }, - { - "Value": "" - }, - { - "Value": "" - }, - { - "Value": "0.00" - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "2018-10-09T00:00:00", - "Attributes": [ - { - "Value": "1f3960ae-0537-4438-a4dd-76d785e6d7d8", - "Id": "invoiceID" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "1f3960ae-0537-4438-a4dd-76d785e6d7d8", - "Id": "invoiceID" - } - ] - }, - { - "Value": "2018-10-23T00:00:00", - "Attributes": [ - { - "Value": "1f3960ae-0537-4438-a4dd-76d785e6d7d8", - "Id": "invoiceID" - } - ] - }, - { - "Value": "181 days overdue", - "Attributes": [ - { - "Value": "1f3960ae-0537-4438-a4dd-76d785e6d7d8", - "Id": "invoiceID" - } - ] - }, - { - "Value": "250.00", - "Attributes": [ - { - "Value": "1f3960ae-0537-4438-a4dd-76d785e6d7d8", - "Id": "invoiceID" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "1f3960ae-0537-4438-a4dd-76d785e6d7d8", - "Id": "invoiceID" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "1f3960ae-0537-4438-a4dd-76d785e6d7d8", - "Id": "invoiceID" - } - ] - }, - { - "Value": "250.00", - "Attributes": [ - { - "Value": "1f3960ae-0537-4438-a4dd-76d785e6d7d8", - "Id": "invoiceID" - } - ] - } - ] - }, - { - "RowType": "SummaryRow", - "Cells": [ - { - "Value": "Total" - }, - { - "Value": "" - }, - { - "Value": "" - }, - { - "Value": "" - }, - { - "Value": "250.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "250.00" - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "", - "Rows": [ - { - "RowType": "SummaryRow", - "Cells": [ - { - "Value": "Closing Balance" - }, - { - "Value": "" - }, - { - "Value": "" - }, - { - "Value": "" - }, - { - "Value": "250.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "250.00" - } - ] - } - ] - } - ] - } - ] - } - '/Reports/AgedReceivablesByContact': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.reports.read] - tags: - - Accounting - operationId: getReportAgedReceivablesByContact - summary: Retrieves report for aged receivables by contact - parameters: - - in: query - required: true - name: contactId - x-snake: contact_id - description: Unique identifier for a Contact - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - - in: query - name: date - description: The date of the Aged Receivables By Contact report - example: "2019-10-31" - schema: - type: string - format: date - - $ref: '#/components/parameters/FromDate' - - $ref: '#/components/parameters/ToDate' - responses: - '200': - description: Success - return response of type ReportWithRows - content: - application/json: - schema: - $ref: '#/components/schemas/ReportWithRows' - example: { - "Id": "b977b607-955d-47cb-92fd-7c29b3dd755c", - "Status": "OK", - "ProviderName": "Java Public Example", - "DateTimeUTC": "/Date(1556032862815)/", - "Reports": [ - { - "ReportName": "Aged Receivables By Contact", - "ReportType": "AgedReceivablesByContact", - "ReportTitles": [ - "Invoices", - "ABC", - "From 10 October 2017 to 23 April 2019", - "Showing payments to 23 April 2019" - ], - "ReportDate": "23 April 2019", - "UpdatedDateUTC": "/Date(1556032862815)/", - "Fields": [], - "Rows": [ - { - "RowType": "Header", - "Cells": [ - { - "Value": "Date" - }, - { - "Value": "Number" - }, - { - "Value": "Due Date" - }, - { - "Value": "" - }, - { - "Value": "Total" - }, - { - "Value": "Paid" - }, - { - "Value": "Credited" - }, - { - "Value": "Due" - } - ] - }, - { - "RowType": "Section", - "Title": "", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "2017-10-10T00:00:00" - }, - { - "Value": "Opening Balance" - }, - { - "Value": "" - }, - { - "Value": "" - }, - { - "Value": "" - }, - { - "Value": "" - }, - { - "Value": "" - }, - { - "Value": "0.00" - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "2018-05-13T00:00:00", - "Attributes": [ - { - "Value": "40ebad47-24e2-4dc9-a5f5-579df427671b", - "Id": "invoiceID" - } - ] - }, - { - "Value": "IV1242016", - "Attributes": [ - { - "Value": "40ebad47-24e2-4dc9-a5f5-579df427671b", - "Id": "invoiceID" - } - ] - }, - { - "Value": "2018-06-22T00:00:00", - "Attributes": [ - { - "Value": "40ebad47-24e2-4dc9-a5f5-579df427671b", - "Id": "invoiceID" - } - ] - }, - { - "Value": "305 days overdue", - "Attributes": [ - { - "Value": "40ebad47-24e2-4dc9-a5f5-579df427671b", - "Id": "invoiceID" - } - ] - }, - { - "Value": "100.00", - "Attributes": [ - { - "Value": "40ebad47-24e2-4dc9-a5f5-579df427671b", - "Id": "invoiceID" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "40ebad47-24e2-4dc9-a5f5-579df427671b", - "Id": "invoiceID" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "40ebad47-24e2-4dc9-a5f5-579df427671b", - "Id": "invoiceID" - } - ] - }, - { - "Value": "100.00", - "Attributes": [ - { - "Value": "40ebad47-24e2-4dc9-a5f5-579df427671b", - "Id": "invoiceID" - } - ] - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "2019-04-23T00:00:00", - "Attributes": [ - { - "Value": "ca0483ce-fa43-4335-8512-751e655337b8", - "Id": "invoiceID" - } - ] - }, - { - "Value": "INV-0086", - "Attributes": [ - { - "Value": "ca0483ce-fa43-4335-8512-751e655337b8", - "Id": "invoiceID" - } - ] - }, - { - "Value": "2019-05-07T00:00:00", - "Attributes": [ - { - "Value": "ca0483ce-fa43-4335-8512-751e655337b8", - "Id": "invoiceID" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "ca0483ce-fa43-4335-8512-751e655337b8", - "Id": "invoiceID" - } - ] - }, - { - "Value": "50.00", - "Attributes": [ - { - "Value": "ca0483ce-fa43-4335-8512-751e655337b8", - "Id": "invoiceID" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "ca0483ce-fa43-4335-8512-751e655337b8", - "Id": "invoiceID" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "ca0483ce-fa43-4335-8512-751e655337b8", - "Id": "invoiceID" - } - ] - }, - { - "Value": "50.00", - "Attributes": [ - { - "Value": "ca0483ce-fa43-4335-8512-751e655337b8", - "Id": "invoiceID" - } - ] - } - ] - }, - { - "RowType": "SummaryRow", - "Cells": [ - { - "Value": "Total" - }, - { - "Value": "" - }, - { - "Value": "" - }, - { - "Value": "" - }, - { - "Value": "150.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "150.00" - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "", - "Rows": [ - { - "RowType": "SummaryRow", - "Cells": [ - { - "Value": "Closing Balance" - }, - { - "Value": "" - }, - { - "Value": "" - }, - { - "Value": "" - }, - { - "Value": "150.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "150.00" - } - ] - } - ] - } - ] - } - ] - } - '/Reports/BalanceSheet': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.reports.read] - tags: - - Accounting - operationId: getReportBalanceSheet - summary: Retrieves report for balancesheet - parameters: - - in: query - name: date - description: The date of the Balance Sheet report - example: "2019-11-01" - schema: - type: string - format: date - - in: query - name: periods - description: The number of periods for the Balance Sheet report - example: 3 - schema: - type: integer - - in: query - name: timeframe - description: The period size to compare to (MONTH, QUARTER, YEAR) - example: "MONTH" - schema: - type: string - enum: - - MONTH - - QUARTER - - YEAR - - in: query - name: trackingOptionID1 - x-snake: tracking_option_id_1 - description: The tracking option 1 for the Balance Sheet report - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - - in: query - name: trackingOptionID2 - x-snake: tracking_option_id_2 - description: The tracking option 2 for the Balance Sheet report - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - - in: query - name: standardLayout - x-snake: standard_layout - description: The standard layout boolean for the Balance Sheet report - example: true - x-example-python: "True" - schema: - type: boolean - - in: query - name: paymentsOnly - x-snake: payments_only - description: return a cash basis for the Balance Sheet report - example: false - x-example-python: "False" - schema: - type: boolean - responses: - '200': - description: Success - return response of type ReportWithRows - content: - application/json: - schema: - $ref: '#/components/schemas/ReportWithRows' - example: { - "Id": "2ddba304-6ed3-4da4-b185-3b6289699653", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1555099412778)/", - "Reports": [ - { - "ReportName": "Balance Sheet", - "ReportType": "BalanceSheet", - "ReportTitles": [ - "Balance Sheet", - "Dev Evangelist - Sid Test 3 (NZ-2016-02)", - "As at 30 April 2019" - ], - "ReportDate": "12 April 2019", - "UpdatedDateUTC": "/Date(1555099412778)/", - "Fields": [], - "Rows": [ - { - "RowType": "Header", - "Cells": [ - { - "Value": "" - }, - { - "Value": "30 Apr 2019" - }, - { - "Value": "31 Mar 2019" - }, - { - "Value": "28 Feb 2019" - } - ] - }, - { - "RowType": "Section", - "Title": "Assets", - "Rows": [] - }, - { - "RowType": "Section", - "Title": "Bank", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "Country Savings", - "Attributes": [ - { - "Value": "041207d2-3d61-4e5d-8c1a-b9236955a71c", - "Id": "account" - } - ] - }, - { - "Value": "-1850.00", - "Attributes": [ - { - "Value": "041207d2-3d61-4e5d-8c1a-b9236955a71c", - "Id": "account" - } - ] - }, - { - "Value": "-1850.00", - "Attributes": [ - { - "Value": "041207d2-3d61-4e5d-8c1a-b9236955a71c", - "Id": "account" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "041207d2-3d61-4e5d-8c1a-b9236955a71c", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "My Big Bank", - "Attributes": [ - { - "Value": "300f3bde-3a5c-4035-9ec5-45b09777679a", - "Id": "account" - } - ] - }, - { - "Value": "2146.37", - "Attributes": [ - { - "Value": "300f3bde-3a5c-4035-9ec5-45b09777679a", - "Id": "account" - } - ] - }, - { - "Value": "2020.00", - "Attributes": [ - { - "Value": "300f3bde-3a5c-4035-9ec5-45b09777679a", - "Id": "account" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "300f3bde-3a5c-4035-9ec5-45b09777679a", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "SummaryRow", - "Cells": [ - { - "Value": "Total Bank" - }, - { - "Value": "296.37" - }, - { - "Value": "170.00" - }, - { - "Value": "0.00" - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "Current Assets", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "Accounts Receivable", - "Attributes": [ - { - "Value": "b94495d0-44ab-4199-a1d0-427a4877e100", - "Id": "account" - } - ] - }, - { - "Value": "154355.72", - "Attributes": [ - { - "Value": "b94495d0-44ab-4199-a1d0-427a4877e100", - "Id": "account" - } - ] - }, - { - "Value": "154351.78", - "Attributes": [ - { - "Value": "b94495d0-44ab-4199-a1d0-427a4877e100", - "Id": "account" - } - ] - }, - { - "Value": "356.50", - "Attributes": [ - { - "Value": "b94495d0-44ab-4199-a1d0-427a4877e100", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Inventory", - "Attributes": [ - { - "Value": "53a12a15-7e9b-4a31-85f4-a7cee6d04215", - "Id": "account" - } - ] - }, - { - "Value": "25000.00", - "Attributes": [ - { - "Value": "53a12a15-7e9b-4a31-85f4-a7cee6d04215", - "Id": "account" - } - ] - }, - { - "Value": "25000.00", - "Attributes": [ - { - "Value": "53a12a15-7e9b-4a31-85f4-a7cee6d04215", - "Id": "account" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "53a12a15-7e9b-4a31-85f4-a7cee6d04215", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "SummaryRow", - "Cells": [ - { - "Value": "Total Current Assets" - }, - { - "Value": "179355.72" - }, - { - "Value": "179351.78" - }, - { - "Value": "356.50" - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "Fixed Assets", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "Office Equipment", - "Attributes": [ - { - "Value": "7132cab3-ce56-4389-8e47-8f60d4c137f8", - "Id": "account" - } - ] - }, - { - "Value": "-119.00", - "Attributes": [ - { - "Value": "7132cab3-ce56-4389-8e47-8f60d4c137f8", - "Id": "account" - } - ] - }, - { - "Value": "-119.00", - "Attributes": [ - { - "Value": "7132cab3-ce56-4389-8e47-8f60d4c137f8", - "Id": "account" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "7132cab3-ce56-4389-8e47-8f60d4c137f8", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "SummaryRow", - "Cells": [ - { - "Value": "Total Fixed Assets" - }, - { - "Value": "-119.00" - }, - { - "Value": "-119.00" - }, - { - "Value": "0.00" - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "", - "Rows": [ - { - "RowType": "SummaryRow", - "Cells": [ - { - "Value": "Total Assets" - }, - { - "Value": "179533.09" - }, - { - "Value": "179402.78" - }, - { - "Value": "356.50" - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "Liabilities", - "Rows": [] - }, - { - "RowType": "Section", - "Title": "Current Liabilities", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "Accounts Payable", - "Attributes": [ - { - "Value": "a2a4795b-a01f-40eb-afa6-a34b4514875d", - "Id": "account" - } - ] - }, - { - "Value": "-3469.00", - "Attributes": [ - { - "Value": "a2a4795b-a01f-40eb-afa6-a34b4514875d", - "Id": "account" - } - ] - }, - { - "Value": "-3469.00", - "Attributes": [ - { - "Value": "a2a4795b-a01f-40eb-afa6-a34b4514875d", - "Id": "account" - } - ] - }, - { - "Value": "-184.00", - "Attributes": [ - { - "Value": "a2a4795b-a01f-40eb-afa6-a34b4514875d", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "GST", - "Attributes": [ - { - "Value": "17d9a4a0-3181-4803-a96b-f0dbe589091b", - "Id": "account" - } - ] - }, - { - "Value": "-2446.21", - "Attributes": [ - { - "Value": "17d9a4a0-3181-4803-a96b-f0dbe589091b", - "Id": "account" - } - ] - }, - { - "Value": "-2461.89", - "Attributes": [ - { - "Value": "17d9a4a0-3181-4803-a96b-f0dbe589091b", - "Id": "account" - } - ] - }, - { - "Value": "76.50", - "Attributes": [ - { - "Value": "17d9a4a0-3181-4803-a96b-f0dbe589091b", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "SummaryRow", - "Cells": [ - { - "Value": "Total Current Liabilities" - }, - { - "Value": "-5915.21" - }, - { - "Value": "-5930.89" - }, - { - "Value": "-107.50" - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "", - "Rows": [ - { - "RowType": "SummaryRow", - "Cells": [ - { - "Value": "Total Liabilities" - }, - { - "Value": "-5915.21" - }, - { - "Value": "-5930.89" - }, - { - "Value": "-107.50" - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "Net Assets" - }, - { - "Value": "185448.30" - }, - { - "Value": "185333.67" - }, - { - "Value": "464.00" - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "Equity", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "Current Year Earnings", - "Attributes": [ - { - "Value": "00000000-0000-0000-0000-000000000000", - "Id": "account" - } - ] - }, - { - "Value": "114.62", - "Attributes": [ - { - "Value": "00000000-0000-0000-0000-000000000000", - "Id": "account" - }, - { - "Value": "4/1/2019", - "Id": "fromDate" - }, - { - "Value": "4/30/2019", - "Id": "toDate" - } - ] - }, - { - "Value": "156621.67", - "Attributes": [ - { - "Value": "00000000-0000-0000-0000-000000000000", - "Id": "account" - }, - { - "Value": "4/1/2018", - "Id": "fromDate" - }, - { - "Value": "3/31/2019", - "Id": "toDate" - } - ] - }, - { - "Value": "500.00", - "Attributes": [ - { - "Value": "00000000-0000-0000-0000-000000000000", - "Id": "account" - }, - { - "Value": "4/1/2018", - "Id": "fromDate" - }, - { - "Value": "2/28/2019", - "Id": "toDate" - } - ] - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Owner A Drawings", - "Attributes": [ - { - "Value": "136ebd08-60ea-4592-8982-be92c153b53a", - "Id": "account" - } - ] - }, - { - "Value": "28752.00", - "Attributes": [ - { - "Value": "136ebd08-60ea-4592-8982-be92c153b53a", - "Id": "account" - } - ] - }, - { - "Value": "28752.00", - "Attributes": [ - { - "Value": "136ebd08-60ea-4592-8982-be92c153b53a", - "Id": "account" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "136ebd08-60ea-4592-8982-be92c153b53a", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Owner A Funds Introduced", - "Attributes": [ - { - "Value": "5690f1e8-1d02-4893-90c2-ee1a69eff942", - "Id": "account" - } - ] - }, - { - "Value": "-50.00", - "Attributes": [ - { - "Value": "5690f1e8-1d02-4893-90c2-ee1a69eff942", - "Id": "account" - } - ] - }, - { - "Value": "-50.00", - "Attributes": [ - { - "Value": "5690f1e8-1d02-4893-90c2-ee1a69eff942", - "Id": "account" - } - ] - }, - { - "Value": "-46.00", - "Attributes": [ - { - "Value": "5690f1e8-1d02-4893-90c2-ee1a69eff942", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Retained Earnings", - "Attributes": [ - { - "Value": "7fc16c06-c342-4f32-995f-889b5f9996fd", - "Id": "account" - } - ] - }, - { - "Value": "156631.67", - "Attributes": [ - { - "Value": "7fc16c06-c342-4f32-995f-889b5f9996fd", - "Id": "account" - }, - { - "Value": "", - "Id": "fromDate" - }, - { - "Value": "4/30/2019", - "Id": "toDate" - } - ] - }, - { - "Value": "10.00", - "Attributes": [ - { - "Value": "7fc16c06-c342-4f32-995f-889b5f9996fd", - "Id": "account" - }, - { - "Value": "", - "Id": "fromDate" - }, - { - "Value": "3/31/2019", - "Id": "toDate" - } - ] - }, - { - "Value": "10.00", - "Attributes": [ - { - "Value": "7fc16c06-c342-4f32-995f-889b5f9996fd", - "Id": "account" - }, - { - "Value": "", - "Id": "fromDate" - }, - { - "Value": "2/28/2019", - "Id": "toDate" - } - ] - } - ] - }, - { - "RowType": "SummaryRow", - "Cells": [ - { - "Value": "Total Equity" - }, - { - "Value": "185448.29" - }, - { - "Value": "185333.67" - }, - { - "Value": "464.00" - } - ] - } - ] - } - ] - } - ] - } - '/Reports/BankSummary': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.reports.read] - tags: - - Accounting - operationId: getReportBankSummary - summary: Retrieves report for bank summary - parameters: - - $ref: '#/components/parameters/FromDate' - - $ref: '#/components/parameters/ToDate' - responses: - '200': - description: Success - return response of type ReportWithRows - content: - application/json: - schema: - $ref: '#/components/schemas/ReportWithRows' - example: { - "Id": "ae58d0ec-9c5c-455f-b96e-690107579257", - "Status": "OK", - "ProviderName": "Java Public Example", - "DateTimeUTC": "/Date(1556035526223)/", - "Reports": [ - { - "ReportName": "Bank Summary", - "ReportType": "BankSummary", - "ReportTitles": [ - "Bank Summary", - "MindBody Test 10 (AU-2016-02)", - "From 1 April 2019 to 30 April 2019" - ], - "ReportDate": "23 April 2019", - "UpdatedDateUTC": "/Date(1556035526223)/", - "Fields": [], - "Rows": [ - { - "RowType": "Header", - "Cells": [ - { - "Value": "Bank Accounts" - }, - { - "Value": "Opening Balance" - }, - { - "Value": "Cash Received" - }, - { - "Value": "Cash Spent" - }, - { - "Value": "Closing Balance" - } - ] - }, - { - "RowType": "Section", - "Title": "", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "Big City Bank", - "Attributes": [ - { - "Value": "03f9cf1e-2deb-4bf1-b0a8-b57f08672eb8", - "Id": "accountID" - } - ] - }, - { - "Value": "0.00" - }, - { - "Value": "110.00", - "Attributes": [ - { - "Value": "03f9cf1e-2deb-4bf1-b0a8-b57f08672eb8", - "Id": "account" - } - ] - }, - { - "Value": "100.00", - "Attributes": [ - { - "Value": "03f9cf1e-2deb-4bf1-b0a8-b57f08672eb8", - "Id": "account" - } - ] - }, - { - "Value": "10.00" - } - ] - }, - { - "RowType": "SummaryRow", - "Cells": [ - { - "Value": "Total" - }, - { - "Value": "0.00" - }, - { - "Value": "110.00" - }, - { - "Value": "100.00" - }, - { - "Value": "10.00" - } - ] - } - ] - } - ] - } - ] - } - '/Reports/{ReportID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.reports.read] - tags: - - Accounting - operationId: getReportFromId - summary: Retrieves a specific report using a unique ReportID - parameters: - - in: path - required: true - name: ReportID - x-snake: report_id - description: Unique identifier for a Report - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - responses: - '200': - description: Success - return response of type ReportWithRows - content: - application/json: - schema: - $ref: '#/components/schemas/ReportWithRows' - '/Reports/BudgetSummary': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.reports.read] - tags: - - Accounting - operationId: getReportBudgetSummary - summary: Retrieves report for budget summary - parameters: - - in: query - name: date - description: The date for the Bank Summary report e.g. 2018-03-31 - example: "2019-03-31" - schema: - type: string - format: date - - in: query - name: periods - description: The number of periods to compare (integer between 1 and 12) - example: 2 - schema: - type: integer - - in: query - name: timeframe - description: The period size to compare to (1=month, 3=quarter, 12=year) - example: 3 - schema: - type: integer - responses: - '200': - description: success- return a Report with Rows object - content: - application/json: - schema: - $ref: '#/components/schemas/ReportWithRows' - example: { - "Id": "9f1e2722-0d98-4669-890f-f8f4217c968b", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC": "/Date(1573755037865)/", - "Reports": [ - { - "ReportName": "Budget Summary", - "ReportType": "BudgetSummary", - "ReportTitles": [ - "Overall Budget", - "Budget Summary", - "Online Test 11", - "November 2019 to October 2022" - ], - "ReportDate": "14 November 2019", - "UpdatedDateUTC": "/Date(1573755037865)/", - "Fields": [], - "Rows": [ - { - "RowType": "Header", - "Cells": [ - { - "Value": "Account" - }, - { - "Value": "Jan-20" - }, - { - "Value": "Apr-20" - }, - { - "Value": "Jul-20" - }, - { - "Value": "Oct-20" - }, - { - "Value": "Jan-21" - }, - { - "Value": "Apr-21" - }, - { - "Value": "Jul-21" - }, - { - "Value": "Oct-21" - }, - { - "Value": "Jan-22" - }, - { - "Value": "Apr-22" - }, - { - "Value": "Jul-22" - }, - { - "Value": "Oct-22" - } - ] - }, - { - "RowType": "Section", - "Title": "", - "Rows": [ - { - "RowType": "SummaryRow", - "Cells": [ - { - "Value": "Gross Profit" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "", - "Rows": [ - { - "RowType": "SummaryRow", - "Cells": [ - { - "Value": "Total Expenses" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "", - "Rows": [ - { - "RowType": "SummaryRow", - "Cells": [ - { - "Value": "Net Profit" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - } - ] - } - ] - } - ] - } - ] - } - '/Reports/ExecutiveSummary': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.reports.read] - tags: - - Accounting - operationId: getReportExecutiveSummary - summary: Retrieves report for executive summary - parameters: - - in: query - name: date - description: The date for the Bank Summary report e.g. 2018-03-31 - example: "2019-03-31" - schema: - type: string - format: date - responses: - '200': - description: Success - return response of type ReportWithRows - content: - application/json: - schema: - $ref: '#/components/schemas/ReportWithRows' - example: { - "Id": "068d3505-ac37-43f3-8135-f912a5963d8a", - "Status": "OK", - "ProviderName": "provider-name", - "DateTimeUTC": "/Date(1573755038314)/", - "Reports": [ - { - "ReportName": "Executive Summary", - "ReportType": "ExecutiveSummary", - "ReportTitles": [ - "Executive Summary", - "Online Test 11", - "For the month of November 2019" - ], - "ReportDate": "14 November 2019", - "UpdatedDateUTC": "/Date(1573755038314)/", - "Fields": [], - "Rows": [ - { - "RowType": "Header", - "Cells": [ - { - "Value": "" - }, - { - "Value": "Nov 2019" - }, - { - "Value": "Oct 2019" - }, - { - "Value": "Variance" - } - ] - }, - { - "RowType": "Section", - "Title": "Cash", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "Cash received" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.0%" - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Cash spent" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.0%" - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Cash surplus (deficit)" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.0%" - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Closing bank balance" - }, - { - "Value": "79.01" - }, - { - "Value": "79.01" - }, - { - "Value": "0.0%" - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "Profitability", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "Income" - }, - { - "Value": "40.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.0%" - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Direct costs" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.0%" - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Gross profit (loss)" - }, - { - "Value": "40.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.0%" - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Other Income" - }, - { - "Value": "0.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.0%" - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Expenses" - }, - { - "Value": "205.40" - }, - { - "Value": "0.00" - }, - { - "Value": "0.0%" - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Profit (loss)" - }, - { - "Value": "-165.40" - }, - { - "Value": "0.00" - }, - { - "Value": "0.0%" - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "Balance Sheet", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "Debtors" - }, - { - "Value": "590.00" - }, - { - "Value": "550.00" - }, - { - "Value": "7.3%" - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Creditors" - }, - { - "Value": "-44.00" - }, - { - "Value": "-44.00" - }, - { - "Value": "0.0%" - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Net assets" - }, - { - "Value": "594.16" - }, - { - "Value": "759.56" - }, - { - "Value": "-21.8%" - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "Income", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "Number of invoices issued" - }, - { - "Value": "1" - }, - { - "Value": "0" - }, - { - "Value": "0.0%" - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Average value of invoices" - }, - { - "Value": "40.00" - }, - { - "Value": "0.00" - }, - { - "Value": "0.0%" - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "Performance", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "Gross profit margin" - }, - { - "Value": "100.0%" - }, - { - "Value": "" - }, - { - "Value": "0.0%" - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Net profit margin" - }, - { - "Value": "-413.5%" - }, - { - "Value": "" - }, - { - "Value": "0.0%" - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Return on investment (p.a.)" - }, - { - "Value": "-334.1%" - }, - { - "Value": "0.0%" - }, - { - "Value": "0.0%" - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "Position", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "Average debtors days" - }, - { - "Value": "442.50" - }, - { - "Value": "0" - }, - { - "Value": "0.0%" - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Average creditors days" - }, - { - "Value": "-6.426484907497565725413826680" - }, - { - "Value": "0" - }, - { - "Value": "0.0%" - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Short term cash forecast" - }, - { - "Value": "634.00" - }, - { - "Value": "594.00" - }, - { - "Value": "6.7%" - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Current assets to liabilities" - }, - { - "Value": "4.0729764675459012154124644427" - }, - { - "Value": "-62.034024896265560165975103734" - }, - { - "Value": "106.6%" - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Term assets to liabilities" - }, - { - "Value": "" - }, - { - "Value": "" - }, - { - "Value": "0.0%" - } - ] - } - ] - } - ] - } - ] - } - '/Reports': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.reports.read] - tags: - - Accounting - operationId: getReportsList - summary: Retrieves a list of the organistaions unique reports that require a uuid to fetch - responses: - '200': - description: Success - return response of type ReportWithRows - content: - application/json: - schema: - $ref: '#/components/schemas/ReportWithRows' - '/Reports/ProfitAndLoss': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.reports.read] - tags: - - Accounting - operationId: getReportProfitAndLoss - summary: Retrieves report for profit and loss - parameters: - - $ref: '#/components/parameters/FromDate' - - $ref: '#/components/parameters/ToDate' - - in: query - name: periods - description: The number of periods to compare (integer between 1 and 12) - example: 3 - schema: - type: integer - - in: query - name: timeframe - description: The period size to compare to (MONTH, QUARTER, YEAR) - example: "MONTH" - schema: - type: string - enum: - - MONTH - - QUARTER - - YEAR - - in: query - name: trackingCategoryID - x-snake: tracking_category_id - description: The trackingCategory 1 for the ProfitAndLoss report - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - - in: query - name: trackingCategoryID2 - x-snake: tracking_category_id_2 - description: The trackingCategory 2 for the ProfitAndLoss report - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - - in: query - name: trackingOptionID - x-snake: tracking_option_id - description: The tracking option 1 for the ProfitAndLoss report - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - - in: query - name: trackingOptionID2 - x-snake: tracking_option_id_2 - description: The tracking option 2 for the ProfitAndLoss report - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - - in: query - name: standardLayout - x-snake: standard_layout - description: Return the standard layout for the ProfitAndLoss report - example: "true" - x-example-python: "True" - schema: - type: boolean - - in: query - name: paymentsOnly - x-snake: payments_only - description: Return cash only basis for the ProfitAndLoss report - example: "false" - x-example-python: "False" - schema: - type: boolean - responses: - '200': - description: Success - return response of type ReportWithRows - content: - application/json: - schema: - $ref: '#/components/schemas/ReportWithRows' - '/Reports/TrialBalance': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.reports.read] - tags: - - Accounting - operationId: getReportTrialBalance - summary: Retrieves report for trial balance - parameters: - - in: query - name: date - description: The date for the Trial Balance report e.g. 2018-03-31 - example: "2019-10-31" - schema: - type: string - format: date - - in: query - name: paymentsOnly - x-snake: payments_only - description: Return cash only basis for the Trial Balance report - example: "true" - x-example-python: "True" - schema: - type: boolean - responses: - '200': - description: Success - return response of type ReportWithRows - content: - application/json: - schema: - $ref: '#/components/schemas/ReportWithRows' - example: { - "Id": "0b3ee35e-b97c-4b3c-b7e2-9a465233e329", - "Status": "OK", - "ProviderName": "Java Public Example", - "DateTimeUTC": "/Date(1556129558740)/", - "Reports": [ - { - "ReportName": "Trial Balance", - "ReportType": "TrialBalance", - "ReportTitles": [ - "Trial Balance", - "Dev Evangelist - Sid Test 1 (US-2016-06)", - "As at 24 April 2019" - ], - "ReportDate": "24 April 2019", - "UpdatedDateUTC": "/Date(1556129558724)/", - "Fields": [], - "Rows": [ - { - "RowType": "Header", - "Cells": [ - { - "Value": "Account" - }, - { - "Value": "Debit" - }, - { - "Value": "Credit" - }, - { - "Value": "YTD Debit" - }, - { - "Value": "YTD Credit" - } - ] - }, - { - "RowType": "Section", - "Title": "Revenue", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "Big Expense (002)", - "Attributes": [ - { - "Value": "da962997-a8bd-4dff-9616-01cdc199283f", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "da962997-a8bd-4dff-9616-01cdc199283f", - "Id": "account" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "da962997-a8bd-4dff-9616-01cdc199283f", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "da962997-a8bd-4dff-9616-01cdc199283f", - "Id": "account" - } - ] - }, - { - "Value": "80.00", - "Attributes": [ - { - "Value": "da962997-a8bd-4dff-9616-01cdc199283f", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Sales (400)", - "Attributes": [ - { - "Value": "02439bca-5fdc-4b62-b281-0bdf9f16fd5b", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "02439bca-5fdc-4b62-b281-0bdf9f16fd5b", - "Id": "account" - } - ] - }, - { - "Value": "200.00", - "Attributes": [ - { - "Value": "02439bca-5fdc-4b62-b281-0bdf9f16fd5b", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "02439bca-5fdc-4b62-b281-0bdf9f16fd5b", - "Id": "account" - } - ] - }, - { - "Value": "1020.22", - "Attributes": [ - { - "Value": "02439bca-5fdc-4b62-b281-0bdf9f16fd5b", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Sales-35325 (1302)", - "Attributes": [ - { - "Value": "3f50db14-1fe6-450b-bfe8-b2d894f18c62", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "3f50db14-1fe6-450b-bfe8-b2d894f18c62", - "Id": "account" - } - ] - }, - { - "Value": "1000.00", - "Attributes": [ - { - "Value": "3f50db14-1fe6-450b-bfe8-b2d894f18c62", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "3f50db14-1fe6-450b-bfe8-b2d894f18c62", - "Id": "account" - } - ] - }, - { - "Value": "1000.00", - "Attributes": [ - { - "Value": "3f50db14-1fe6-450b-bfe8-b2d894f18c62", - "Id": "account" - } - ] - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "Expenses", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "Foobar14043 (123)", - "Attributes": [ - { - "Value": "d1602f69-f900-4616-8d34-90af393fa368", - "Id": "account" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "d1602f69-f900-4616-8d34-90af393fa368", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "d1602f69-f900-4616-8d34-90af393fa368", - "Id": "account" - } - ] - }, - { - "Value": "40.00", - "Attributes": [ - { - "Value": "d1602f69-f900-4616-8d34-90af393fa368", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "d1602f69-f900-4616-8d34-90af393fa368", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "MyExp51937 (1231239)", - "Attributes": [ - { - "Value": "90f10e0a-a043-46fe-b87e-630e9a951dae", - "Id": "account" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "90f10e0a-a043-46fe-b87e-630e9a951dae", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "90f10e0a-a043-46fe-b87e-630e9a951dae", - "Id": "account" - } - ] - }, - { - "Value": "80.00", - "Attributes": [ - { - "Value": "90f10e0a-a043-46fe-b87e-630e9a951dae", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "90f10e0a-a043-46fe-b87e-630e9a951dae", - "Id": "account" - } - ] - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "Assets", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "Accounts Receivable (120)", - "Attributes": [ - { - "Value": "31ae5bb4-611c-4f89-a369-86e4d56e90b6", - "Id": "account" - } - ] - }, - { - "Value": "1190.00", - "Attributes": [ - { - "Value": "31ae5bb4-611c-4f89-a369-86e4d56e90b6", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "31ae5bb4-611c-4f89-a369-86e4d56e90b6", - "Id": "account" - } - ] - }, - { - "Value": "36555.04", - "Attributes": [ - { - "Value": "31ae5bb4-611c-4f89-a369-86e4d56e90b6", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "31ae5bb4-611c-4f89-a369-86e4d56e90b6", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Business Wells Fargo (088)", - "Attributes": [ - { - "Value": "6f7594f2-f059-4d56-9e67-47ac9733bfe9", - "Id": "account" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "6f7594f2-f059-4d56-9e67-47ac9733bfe9", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "6f7594f2-f059-4d56-9e67-47ac9733bfe9", - "Id": "account" - } - ] - }, - { - "Value": "7639.04", - "Attributes": [ - { - "Value": "6f7594f2-f059-4d56-9e67-47ac9733bfe9", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "6f7594f2-f059-4d56-9e67-47ac9733bfe9", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Generic Cash Clearing (8003)", - "Attributes": [ - { - "Value": "f4be973a-25fc-48d0-a7df-7f719f239729", - "Id": "account" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "f4be973a-25fc-48d0-a7df-7f719f239729", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "f4be973a-25fc-48d0-a7df-7f719f239729", - "Id": "account" - } - ] - }, - { - "Value": "1443.00", - "Attributes": [ - { - "Value": "f4be973a-25fc-48d0-a7df-7f719f239729", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "f4be973a-25fc-48d0-a7df-7f719f239729", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Generic Credit Card Clearing (8002)", - "Attributes": [ - { - "Value": "a10867ac-0bc4-4aa5-af00-b9e5b207c6c3", - "Id": "account" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "a10867ac-0bc4-4aa5-af00-b9e5b207c6c3", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "a10867ac-0bc4-4aa5-af00-b9e5b207c6c3", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "a10867ac-0bc4-4aa5-af00-b9e5b207c6c3", - "Id": "account" - } - ] - }, - { - "Value": "96.49", - "Attributes": [ - { - "Value": "a10867ac-0bc4-4aa5-af00-b9e5b207c6c3", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Generic Inventory (1400)", - "Attributes": [ - { - "Value": "7422f1b6-619f-488c-89e1-91bdde20216c", - "Id": "account" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "7422f1b6-619f-488c-89e1-91bdde20216c", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "7422f1b6-619f-488c-89e1-91bdde20216c", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "7422f1b6-619f-488c-89e1-91bdde20216c", - "Id": "account" - } - ] - }, - { - "Value": "160.00", - "Attributes": [ - { - "Value": "7422f1b6-619f-488c-89e1-91bdde20216c", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "My Savings (090)", - "Attributes": [ - { - "Value": "7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa", - "Id": "account" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa", - "Id": "account" - } - ] - }, - { - "Value": "219.92", - "Attributes": [ - { - "Value": "7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Payment Wall Clearing Account (8001)", - "Attributes": [ - { - "Value": "bc06840c-12c5-4e22-bb57-fef4d64bac10", - "Id": "account" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "bc06840c-12c5-4e22-bb57-fef4d64bac10", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "bc06840c-12c5-4e22-bb57-fef4d64bac10", - "Id": "account" - } - ] - }, - { - "Value": "1.00", - "Attributes": [ - { - "Value": "bc06840c-12c5-4e22-bb57-fef4d64bac10", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "bc06840c-12c5-4e22-bb57-fef4d64bac10", - "Id": "account" - } - ] - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "Liabilities", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "Accounts Payable (200)", - "Attributes": [ - { - "Value": "e9132ee7-4dcf-4fad-b76c-86e212af645a", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "e9132ee7-4dcf-4fad-b76c-86e212af645a", - "Id": "account" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "e9132ee7-4dcf-4fad-b76c-86e212af645a", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "e9132ee7-4dcf-4fad-b76c-86e212af645a", - "Id": "account" - } - ] - }, - { - "Value": "9223.00", - "Attributes": [ - { - "Value": "e9132ee7-4dcf-4fad-b76c-86e212af645a", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Deferred Revenue (2300)", - "Attributes": [ - { - "Value": "f22cd74e-f59d-4f38-a08d-07e14df28c24", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "f22cd74e-f59d-4f38-a08d-07e14df28c24", - "Id": "account" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "f22cd74e-f59d-4f38-a08d-07e14df28c24", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "f22cd74e-f59d-4f38-a08d-07e14df28c24", - "Id": "account" - } - ] - }, - { - "Value": "1854.24", - "Attributes": [ - { - "Value": "f22cd74e-f59d-4f38-a08d-07e14df28c24", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Rounding (260)", - "Attributes": [ - { - "Value": "f0072999-8f7c-4b01-bce9-bd9352f98e02", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "f0072999-8f7c-4b01-bce9-bd9352f98e02", - "Id": "account" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "f0072999-8f7c-4b01-bce9-bd9352f98e02", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "f0072999-8f7c-4b01-bce9-bd9352f98e02", - "Id": "account" - } - ] - }, - { - "Value": "0.01", - "Attributes": [ - { - "Value": "f0072999-8f7c-4b01-bce9-bd9352f98e02", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Sales Tax (220)", - "Attributes": [ - { - "Value": "af0be362-45fe-4730-a8af-634c2fb93f4d", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "af0be362-45fe-4730-a8af-634c2fb93f4d", - "Id": "account" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "af0be362-45fe-4730-a8af-634c2fb93f4d", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "af0be362-45fe-4730-a8af-634c2fb93f4d", - "Id": "account" - } - ] - }, - { - "Value": "1578.35", - "Attributes": [ - { - "Value": "af0be362-45fe-4730-a8af-634c2fb93f4d", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Suspense (250)", - "Attributes": [ - { - "Value": "5ec2f302-cd60-4f8b-a915-9229dd45e6fa", - "Id": "account" - } - ] - }, - { - "Value": "10.00", - "Attributes": [ - { - "Value": "5ec2f302-cd60-4f8b-a915-9229dd45e6fa", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "5ec2f302-cd60-4f8b-a915-9229dd45e6fa", - "Id": "account" - } - ] - }, - { - "Value": "41.00", - "Attributes": [ - { - "Value": "5ec2f302-cd60-4f8b-a915-9229dd45e6fa", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "5ec2f302-cd60-4f8b-a915-9229dd45e6fa", - "Id": "account" - } - ] - } - ] - }, - { - "RowType": "Row", - "Cells": [ - { - "Value": "Unpaid Expense Claims (210)", - "Attributes": [ - { - "Value": "38e6967d-4da1-4a93-85f1-ea3c93b61041", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "38e6967d-4da1-4a93-85f1-ea3c93b61041", - "Id": "account" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "38e6967d-4da1-4a93-85f1-ea3c93b61041", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "38e6967d-4da1-4a93-85f1-ea3c93b61041", - "Id": "account" - } - ] - }, - { - "Value": "135.00", - "Attributes": [ - { - "Value": "38e6967d-4da1-4a93-85f1-ea3c93b61041", - "Id": "account" - } - ] - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "Equity", - "Rows": [ - { - "RowType": "Row", - "Cells": [ - { - "Value": "Retained Earnings (320)", - "Attributes": [ - { - "Value": "6ef53919-b47d-4341-b11a-735a3f8a6515", - "Id": "account" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "6ef53919-b47d-4341-b11a-735a3f8a6515", - "Id": "account" - }, - { - "Value": "", - "Id": "fromDate" - }, - { - "Value": "12/31/2018", - "Id": "toDate" - } - ] - }, - { - "Value": "0.00", - "Attributes": [ - { - "Value": "6ef53919-b47d-4341-b11a-735a3f8a6515", - "Id": "account" - }, - { - "Value": "", - "Id": "fromDate" - }, - { - "Value": "12/31/2018", - "Id": "toDate" - } - ] - }, - { - "Value": "", - "Attributes": [ - { - "Value": "6ef53919-b47d-4341-b11a-735a3f8a6515", - "Id": "account" - }, - { - "Value": "", - "Id": "fromDate" - }, - { - "Value": "12/31/2018", - "Id": "toDate" - } - ] - }, - { - "Value": "30871.69", - "Attributes": [ - { - "Value": "6ef53919-b47d-4341-b11a-735a3f8a6515", - "Id": "account" - }, - { - "Value": "", - "Id": "fromDate" - }, - { - "Value": "12/31/2018", - "Id": "toDate" - } - ] - } - ] - } - ] - }, - { - "RowType": "Section", - "Title": "", - "Rows": [ - { - "RowType": "SummaryRow", - "Cells": [ - { - "Value": "Total" - }, - { - "Value": "1200.00" - }, - { - "Value": "1200.00" - }, - { - "Value": "46019.00" - }, - { - "Value": "46019.00" - } - ] - } - ] - } - ] - } - ] - } - /Setup: - parameters: - - $ref: '#/components/parameters/requiredHeader' - post: - security: - - OAuth2: [accounting.settings] - tags: - - Accounting - operationId: postSetup - summary: Sets the chart of accounts, the conversion date and conversion balances - parameters: - - $ref: '#/components/parameters/idempotencyKey' - x-example: - - account: - is_object: true - key: account - keyPascal: Account - - code: - key: code - keyPascal: Code - default: 123 - object: account - - name: - key: name - keyPascal: Name - default: Business supplies - object: account - - type: - is_last: true - key: type - keyPascal: Type - default: EXPENSE - nonString: true - php: XeroAPI\XeroPHP\Models\Accounting\AccountType::EXPENSE - node: AccountType.EXPENSE - ruby: XeroRuby::Accounting::AccountType::EXPENSE - python: AccountType.EXPENSE - java: com.xero.models.accounting.AccountType.EXPENSE - csharp: AccountType.EXPENSE - object: account - - accounts: - is_list: true - key: accounts - keyPascal: Account - - add_accounts: - is_last: true - is_list_add: true - key: accounts - keyPascal: Accounts - object: account - - conversionDate: - is_object: true - key: conversionDate - keyPascal: ConversionDate - keySnake: conversion_date - - month: - nonString: true - key: month - keyPascal: Month - default: 10 - object: conversionDate - - year: - is_last: true - nonString: true - key: year - keyPascal: Year - default: 2020 - object: conversionDate - - conversionBalances: - is_list: true - key: conversionBalances - keyPascal: ConversionBalances - keySnake: conversion_balances - - Setup: - is_object: true - key: setup - keyPascal: Setup - - set_accounts: - is_variable: true - nonString: true - key: accounts - keyPascal: Accounts - default: accounts - object: setup - - set_conversionDate: - is_variable: true - nonString: true - key: conversionDate - keyPascal: ConversionDate - keySnake: conversion_date - default: conversionDate - python: conversion_date - ruby: conversion_date - object: setup - - set_conversionBalances: - is_last: true - is_variable: true - nonString: true - key: conversionBalances - keyPascal: ConversionBalances - keySnake: conversion_balances - default: conversionBalances - python: conversion_balances - ruby: conversion_balances - object: setup - responses: - '200': - description: Success - returns a summary of the chart of accounts updates - content: - application/json: - schema: - $ref: '#/components/schemas/ImportSummaryObject' - example: { - "Id": "80dcb65b-4d14-4350-84e6-1438a809244a", - "Status": "OK", - "ProviderName": "Java Public Example", - "DateTimeUTC": "/Date(1604457589645)/", - "ImportSummary": { - "Accounts": { - "Total": 17, - "New": 0, - "Updated": 8, - "Deleted": 0, - "Locked": 0, - "System": 9, - "Errored": 0, - "Present": true, - "NewOrUpdated": 8 - }, - "Organisation": { - "Present": false - } - } - } - requestBody: - required: true - description: Object including an accounts array, a conversion balances array and a conversion date object in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/Setup' - example: { - "ConversionDate": {}, - "ConversionBalances": [], - "Accounts": [ - { - "Code": "200", - "Name": "Sales", - "Type": "SALES", - "ReportingCode": "REV.TRA.GOO" - }, - { - "Code": "400", - "Name": "Advertising", - "Type": "OVERHEADS", - "ReportingCode": "EXP" - }, - { - "Code": "610", - "Name": "Accounts Receivable", - "Type": "CURRENT", - "SystemAccount": "DEBTORS", - "ReportingCode": "ASS.CUR.REC.TRA" - }, - { - "Code": "800", - "Name": "Accounts Payable", - "Type": "CURRLIAB", - "SystemAccount": "CREDITORS", - "ReportingCode": "LIA.CUR.PAY" - } - ] - } - /TaxRates: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.settings, accounting.settings.read] - tags: - - Accounting - operationId: getTaxRates - summary: Retrieves tax rates - parameters: - - in: query - name: where - description: Filter by an any element - example: Status=="ACTIVE" - x-example-csharp: Status==\"ACTIVE\" - x-example-java: Status=="' + TaxRate.StatusEnum.ACTIVE + '" - x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\TaxRate::STATUS_ACTIVE . '" - x-example-ruby: Status==#{XeroRuby::Accounting::TaxRate::ACTIVE} - schema: - type: string - - in: query - name: order - description: Order by an any element - example: "Name ASC" - schema: - type: string - responses: - '200': - description: Success - return response of type TaxRates array with TaxRates - content: - application/json: - schema: - $ref: '#/components/schemas/TaxRates' - example: { - "Id": "455d494d-9706-465b-b584-7086ca406b27", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1555086839841)/", - "TaxRates": [ - { - "Name": "15% GST on Expenses", - "TaxType": "INPUT2", - "ReportTaxType": "INPUT", - "CanApplyToAssets": true, - "CanApplyToEquity": true, - "CanApplyToExpenses": true, - "CanApplyToLiabilities": true, - "CanApplyToRevenue": false, - "DisplayTaxRate": 15.0000, - "EffectiveRate": 15.0000, - "Status": "ACTIVE", - "TaxComponents": [ - { - "Name": "GST", - "Rate": 15.0000, - "IsCompound": false, - "IsNonRecoverable": false - } - ] - }, - { - "Name": "15% GST on Income", - "TaxType": "OUTPUT2", - "ReportTaxType": "OUTPUT", - "CanApplyToAssets": true, - "CanApplyToEquity": true, - "CanApplyToExpenses": false, - "CanApplyToLiabilities": true, - "CanApplyToRevenue": true, - "DisplayTaxRate": 15.0000, - "EffectiveRate": 15.0000, - "Status": "ACTIVE", - "TaxComponents": [ - { - "Name": "GST", - "Rate": 15.0000, - "IsCompound": false, - "IsNonRecoverable": false - } - ] - }, - { - "Name": "GST on Imports", - "TaxType": "GSTONIMPORTS", - "ReportTaxType": "GSTONIMPORTS", - "CanApplyToAssets": false, - "CanApplyToEquity": false, - "CanApplyToExpenses": false, - "CanApplyToLiabilities": true, - "CanApplyToRevenue": false, - "DisplayTaxRate": 0.0000, - "EffectiveRate": 0.0000, - "Status": "ACTIVE", - "TaxComponents": [ - { - "Name": "GST", - "Rate": 0.0000, - "IsCompound": false, - "IsNonRecoverable": false - } - ] - }, - { - "Name": "No GST", - "TaxType": "NONE", - "ReportTaxType": "NONE", - "CanApplyToAssets": true, - "CanApplyToEquity": true, - "CanApplyToExpenses": true, - "CanApplyToLiabilities": true, - "CanApplyToRevenue": true, - "DisplayTaxRate": 0.0000, - "EffectiveRate": 0.0000, - "Status": "ACTIVE", - "TaxComponents": [ - { - "Name": "GST", - "Rate": 0.0000, - "IsCompound": false, - "IsNonRecoverable": false - } - ] - }, - { - "Name": "Zero Rated", - "TaxType": "ZERORATED", - "ReportTaxType": "OUTPUT", - "CanApplyToAssets": false, - "CanApplyToEquity": false, - "CanApplyToExpenses": false, - "CanApplyToLiabilities": true, - "CanApplyToRevenue": true, - "DisplayTaxRate": 0.0000, - "EffectiveRate": 0.0000, - "Status": "ACTIVE", - "TaxComponents": [ - { - "Name": "GST", - "Rate": 0.0000, - "IsCompound": false, - "IsNonRecoverable": false - } - ] - } - ] - } - put: - security: - - OAuth2: [accounting.settings] - tags: - - Accounting - operationId: createTaxRates - summary: Creates one or more tax rates - parameters: - - $ref: '#/components/parameters/idempotencyKey' - x-hasAccountingValidationError: true - x-example: - - taxComponent: - is_object: true - key: taxComponent - keyPascal: TaxComponent - keySnake: tax_component - - name: - key: name - keyPascal: Name - default: State Tax - object: taxComponent - - rate: - is_last: true - nonString: true - key: rate - keyPascal: Rate - default: 2.25 - is_money: true - object: taxComponent - - taxComponents: - is_list: true - key: taxComponent - keyPascal: TaxComponent - csharp: TaxComponent - - add_taxComponent: - is_last: true - is_list_add: true - key: taxComponents - keyPascal: TaxComponents - keySnake: tax_components - java: TaxComponents - python: tax_component - ruby: tax_component - csharp: TaxComponent - object: taxComponent - - taxRate: - is_object: true - key: taxRate - keyPascal: TaxRate - keySnake: tax_rate - - name: - key: name - keyPascal: Name - default: CA State Tax - object: taxRate - - set_taxComponents: - is_variable: true - nonString: true - key: taxComponents - keyPascal: TaxComponents - object: taxRate - default: taxComponents - - taxRates: - is_object: true - key: taxRates - keyPascal: TaxRates - - add_taxRate: - is_last: true - is_array_add: true - key: taxRates - keyPascal: TaxRates - keySnake: tax_rates - java: TaxRates - python: tax_rate - ruby: tax_rate - csharp: TaxRate - object: taxRate - responses: - '200': - description: Success - return response of type TaxRates array newly created TaxRate - content: - application/json: - schema: - $ref: '#/components/schemas/TaxRates' - example: { - "Id": "9d2c5e56-fab4-450b-a5ff-d47409508eab", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1555086839080)/", - "TaxRates": [ - { - "Name": "SDKTax29067", - "TaxType": "TAX002", - "ReportTaxType": "INPUT", - "CanApplyToAssets": true, - "CanApplyToEquity": true, - "CanApplyToExpenses": true, - "CanApplyToLiabilities": true, - "CanApplyToRevenue": false, - "DisplayTaxRate": 2.2500, - "EffectiveRate": 2.2500, - "Status": "ACTIVE", - "TaxComponents": [ - { - "Name": "State Tax", - "Rate": 2.2500, - "IsCompound": false, - "IsNonRecoverable": false - } - ] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: TaxRates array with TaxRate object in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/TaxRates' - example: { - "TaxRates": [ - { - "Name": "CA State Tax", - "TaxComponents": [ - { - "Name": "State Tax", - "Rate": 2.25 - } - ] - } - ] - } - post: - security: - - OAuth2: [accounting.settings] - tags: - - Accounting - operationId: updateTaxRate - summary: Updates tax rates - parameters: - - $ref: '#/components/parameters/idempotencyKey' - x-hasAccountingValidationError: true - x-example: - - taxComponent: - is_object: true - key: taxComponent - keyPascal: TaxComponent - keySnake: tax_component - - name: - key: name - keyPascal: Name - default: State Tax - object: taxComponent - - rate: - is_last: true - nonString: true - key: rate - keyPascal: Rate - default: 2.25 - is_money: true - object: taxComponent - - taxComponents: - is_list: true - key: taxComponents - keyPascal: TaxComponents - csharp: TaxComponent - - add_taxComponent: - is_last: true - is_list_add: true - key: taxComponents - keyPascal: TaxComponents - keySnake: tax_components - java: TaxComponents - python: tax_component - ruby: tax_component - csharp: TaxComponent - object: taxComponent - - taxRate: - is_object: true - key: taxRate - keyPascal: TaxRate - keySnake: tax_rate - - name: - key: name - keyPascal: Name - default: CA State Tax - object: taxRate - - set_taxComponents: - is_variable: true - nonString: true - key: taxComponents - keyPascal: TaxComponents - object: taxRate - default: taxComponents - - taxRates: - is_object: true - key: taxRates - keyPascal: TaxRates - - add_taxRate: - is_last: true - is_array_add: true - key: taxRates - keyPascal: TaxRates - keySnake: tax_rates - java: TaxRates - python: tax_rate - ruby: tax_rate - csharp: TaxRate - object: taxRate - responses: - '200': - description: Success - return response of type TaxRates array updated TaxRate - content: - application/json: - schema: - $ref: '#/components/schemas/TaxRates' - example: { - "Id": "12f4c453-2e25-41aa-a52f-6faaf6c05832", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1555086839658)/", - "TaxRates": [ - { - "Name": "SDKTax29067", - "TaxType": "TAX002", - "ReportTaxType": "INPUT", - "CanApplyToAssets": true, - "CanApplyToEquity": true, - "CanApplyToExpenses": true, - "CanApplyToLiabilities": true, - "CanApplyToRevenue": false, - "DisplayTaxRate": 2.2500, - "EffectiveRate": 2.2500, - "Status": "DELETED", - "TaxComponents": [ - { - "Name": "State Tax", - "Rate": 2.2500, - "IsCompound": false, - "IsNonRecoverable": false - } - ] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TaxRates' - example: { - "TaxRates": [ - { - "Name": "State Tax NY", - "TaxComponents": [ - { - "Name": "State Tax", - "Rate": 2.25 - } - ], - "Status": "DELETED", - "ReportTaxType": "INPUT" - } - ] - } - "/TaxRates/{TaxType}": - parameters: - - $ref: "#/components/parameters/requiredHeader" - get: - security: - - OAuth2: [accounting.settings, accounting.settings.read] - tags: - - Accounting - operationId: getTaxRateByTaxType - summary: Retrieves a specific tax rate according to given TaxType code - parameters: - - $ref: "#/components/parameters/TaxType" - responses: - "200": - description: Success - return response of type TaxRates array with one TaxRate - content: - application/json: - schema: - $ref: "#/components/schemas/TaxRates" - example: { - "Id": "455d494d-9706-465b-b584-7086ca406b27", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1550797359081)/", - "TaxRates": [ - { - "Name": "15% GST on Expenses", - "TaxType": "INPUT2", - "ReportTaxType": "INPUT", - "CanApplyToAssets": true, - "CanApplyToEquity": true, - "CanApplyToExpenses": true, - "CanApplyToLiabilities": true, - "CanApplyToRevenue": false, - "DisplayTaxRate": 15.0000, - "EffectiveRate": 15.0000, - "Status": "ACTIVE", - "TaxComponents": [ - { - "Name": "GST", - "Rate": 15.0000, - "IsCompound": false, - "IsNonRecoverable": false - } - ] - } - ] - } - /TrackingCategories: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.settings, accounting.settings.read] - tags: - - Accounting - operationId: getTrackingCategories - summary: Retrieves tracking categories and options - parameters: - - in: query - name: where - description: Filter by an any element - example: Status=="ACTIVE" - x-example-csharp: Status==\"ACTIVE\" - x-example-java: Status=="' + TrackingCategory.StatusEnum.ACTIVE + '" - x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\TrackingCategory::STATUS_ACTIVE . '" - x-example-ruby: Status==#{XeroRuby::Accounting::TrackingCategory::ACTIVE} - schema: - type: string - - in: query - name: order - description: Order by an any element - example: "Name ASC" - schema: - type: string - - in: query - name: includeArchived - x-snake: include_archived - description: e.g. includeArchived=true - Categories and options with a status of ARCHIVED will be included in the response - example: true - x-example-python: "True" - schema: - type: boolean - responses: - '200': - description: Success - return response of type TrackingCategories array of TrackingCategory - content: - application/json: - schema: - $ref: '#/components/schemas/TrackingCategories' - example: { - "Id": "cec55068-8061-48e5-ac83-c77e7c54cf3d", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1555085855047)/", - "TrackingCategories": [ - { - "Name": "BarFoo", - "Status": "ACTIVE", - "TrackingCategoryID": "22f10184-0deb-44ae-a312-b1f6ea70e51f", - "Options": [] - }, - { - "Name": "HelloWorld", - "Status": "ACTIVE", - "TrackingCategoryID": "0c9fce3e-a111-4d99-803a-62cf3f40e633", - "Options": [] - } - ] - } - put: - security: - - OAuth2: [accounting.settings] - tags: - - Accounting - operationId: createTrackingCategory - summary: Create tracking categories - parameters: - - $ref: '#/components/parameters/idempotencyKey' - x-hasAccountingValidationError: true - x-example: - - trackingCategory: - is_object: true - key: trackingCategory - keyPascal: TrackingCategory - - name: - is_last: true - key: name - keyPascal: Name - default: Foobar - object: trackingCategory - responses: - '200': - description: Success - return response of type TrackingCategories array of newly created TrackingCategory - content: - application/json: - schema: - $ref: '#/components/schemas/TrackingCategories' - example: { - "Id": "1a9f8e03-9916-4a42-93a9-e8fa4902d49c", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1555085855988)/", - "TrackingCategories": [ - { - "Name": "FooBar", - "Status": "ACTIVE", - "TrackingCategoryID": "b1df776b-b093-4730-b6ea-590cca40e723", - "Options": [] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: TrackingCategory object in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/TrackingCategory' - example: { name: "FooBar" } - '/TrackingCategories/{TrackingCategoryID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.settings, accounting.settings.read] - tags: - - Accounting - operationId: getTrackingCategory - summary: Retrieves specific tracking categories and options using a unique tracking category Id - parameters: - - $ref: '#/components/parameters/TrackingCategoryID' - responses: - '200': - description: Success - return response of type TrackingCategories array of specified TrackingCategory - content: - application/json: - schema: - $ref: '#/components/schemas/TrackingCategories' - example: { - "Id": "b75b8862-39c0-45a8-82b8-30ab4831996b", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1555085855442)/", - "TrackingCategories": [ - { - "Name": "Foo41157", - "Status": "DELETED", - "TrackingCategoryID": "22f10184-0deb-44ae-a312-b1f6ea70e51f", - "Options": [] - } - ] - } - post: - security: - - OAuth2: [accounting.settings] - tags: - - Accounting - operationId: updateTrackingCategory - summary: Updates a specific tracking category - x-hasAccountingValidationError: true - x-example: - - trackingCategory: - is_object: true - key: trackingCategory - keyPascal: TrackingCategory - - name: - is_last: true - key: name - keyPascal: Name - default: Foobar - object: trackingCategory - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/TrackingCategoryID' - responses: - '200': - description: Success - return response of type TrackingCategories array of updated TrackingCategory - content: - application/json: - schema: - $ref: '#/components/schemas/TrackingCategories' - example: { - "Id": "55438774-f87d-4731-b586-799cf0f914ed", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1555085856275)/", - "TrackingCategories": [ - { - "Name": "BarFoo", - "Status": "ACTIVE", - "TrackingCategoryID": "b1df776b-b093-4730-b6ea-590cca40e723", - "Options": [] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TrackingCategory' - example: { "Name": "Avengers" } - delete: - security: - - OAuth2: [accounting.settings] - tags: - - Accounting - operationId: deleteTrackingCategory - summary: Deletes a specific tracking category - parameters: - - $ref: '#/components/parameters/TrackingCategoryID' - responses: - '200': - description: Success - return response of type TrackingCategories array of deleted TrackingCategory - content: - application/json: - schema: - $ref: '#/components/schemas/TrackingCategories' - example: { - "Id": "ca7f8145-c8a5-4366-a2fb-784edc0cfbb7", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1555086457922)/", - "TrackingCategories": [ - { - "Name": "Foo46189", - "Status": "DELETED", - "TrackingCategoryID": "0390bdfd-94f2-49d6-b7a0-4a38c46ebf03", - "Options": [] - } - ] - } - '400': - $ref: '#/components/responses/400Error' - '/TrackingCategories/{TrackingCategoryID}/Options': - parameters: - - $ref: '#/components/parameters/requiredHeader' - put: - security: - - OAuth2: [accounting.settings] - tags: - - Accounting - operationId: createTrackingOptions - summary: Creates options for a specific tracking category - x-hasAccountingValidationError: true - x-example: - - trackingOption: - is_object: true - key: trackingOption - keyPascal: TrackingOption - - name: - is_last: true - key: name - keyPascal: Name - default: Foobar - object: trackingOption - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/TrackingCategoryID' - responses: - '200': - description: Success - return response of type TrackingOptions array of options for a specified category - content: - application/json: - schema: - $ref: '#/components/schemas/TrackingOptions' - example: { - "Id": "923be702-d124-4f5c-a568-760906538d8e", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1555085857061)/", - "Options": [ - { - "TrackingOptionID": "34669548-b989-487a-979f-0787d04568a2", - "Name": "Bar40423", - "Status": "ACTIVE", - "HasValidationErrors": false, - "IsDeleted": false, - "IsArchived": false, - "IsActive": true - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - description: TrackingOption object in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/TrackingOption' - example: { name: " Bar" } - '/TrackingCategories/{TrackingCategoryID}/Options/{TrackingOptionID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - post: - security: - - OAuth2: [accounting.settings] - tags: - - Accounting - operationId: updateTrackingOptions - summary: Updates a specific option for a specific tracking category - x-hasAccountingValidationError: true - x-example: - - trackingOption: - is_object: true - key: trackingOption - keyPascal: TrackingOption - - name: - is_last: true - key: name - keyPascal: Name - default: Foobar - object: trackingOption - parameters: - - $ref: '#/components/parameters/idempotencyKey' - - $ref: '#/components/parameters/TrackingCategoryID' - - $ref: '#/components/parameters/TrackingOptionID' - responses: - '200': - description: Success - return response of type TrackingOptions array of options for a specified category - content: - application/json: - schema: - $ref: '#/components/schemas/TrackingOptions' - example: { - "Id": "923be702-d124-4f5c-a568-760906538d8e", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1555085857061)/", - "Options": [ - { - "TrackingOptionID": "34669548-b989-487a-979f-0787d04568a2", - "Name": "Bar40423", - "Status": "ACTIVE", - "HasValidationErrors": false, - "IsDeleted": false, - "IsArchived": false, - "IsActive": true - } - ] - } - '400': - $ref: '#/components/responses/400Error' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TrackingOption' - example: { name: "Vision" } - delete: - security: - - OAuth2: [accounting.settings] - tags: - - Accounting - operationId: deleteTrackingOptions - summary: Deletes a specific option for a specific tracking category - parameters: - - $ref: '#/components/parameters/TrackingCategoryID' - - $ref: '#/components/parameters/TrackingOptionID' - responses: - '200': - description: Success - return response of type TrackingOptions array of remaining options for a specified category - content: - application/json: - schema: - $ref: '#/components/schemas/TrackingOptions' - example: { - "Id": "d985866e-0831-418f-a07c-4d843ff66d25", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1555085857338)/", - "Options": [ - { - "TrackingOptionID": "34669548-b989-487a-979f-0787d04568a2", - "Name": "Bar40423", - "Status": "DELETED", - "HasValidationErrors": false, - "IsDeleted": true, - "IsArchived": false, - "IsActive": false - } - ] - } - '400': - $ref: '#/components/responses/400Error' - /Users: - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.settings, accounting.settings.read] - tags: - - Accounting - operationId: getUsers - summary: Retrieves users - parameters: - - $ref: '#/components/parameters/ifModifiedSince' - - in: query - name: where - description: Filter by an any element - example: IsSubscriber==true - schema: - type: string - - in: query - name: order - description: Order by an any element - example: "LastName ASC" - schema: - type: string - responses: - '200': - description: Success - return response of type Users array of all User - content: - application/json: - schema: - $ref: '#/components/schemas/Users' - example: { - "Id": "17932a4e-4948-4d50-8672-4ef0e1dd90c5", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1553880796393)/", - "Users": [ - { - "UserID": "3c37ef1d-cd49-4589-9787-3c418ed8b6ac", - "EmailAddress": "test@email.com", - "FirstName": "Test", - "LastName": "Xero", - "UpdatedDateUTC": "/Date(1508523261613+0000)/", - "IsSubscriber": false, - "OrganisationRole": "FINANCIALADVISER" - }, - { - "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273", - "EmailAddress": "api@xero.com", - "FirstName": "API ", - "LastName": "Team", - "UpdatedDateUTC": "/Date(1511957179217+0000)/", - "IsSubscriber": true, - "OrganisationRole": "FINANCIALADVISER" - } - ] - } - '/Users/{UserID}': - parameters: - - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [accounting.settings, accounting.settings.read] - tags: - - Accounting - operationId: getUser - summary: Retrieves a specific user - parameters: - - $ref: '#/components/parameters/UserID' - responses: - '200': - description: Success - return response of type Users array of specified User - content: - application/json: - schema: - $ref: '#/components/schemas/Users' - example: { - "Id": "51250ce8-1b35-4ba4-b404-dc94ff75bd87", - "Status": "OK", - "ProviderName": "Provider Name Example", - "DateTimeUTC": "/Date(1553880796732)/", - "Users": [ - { - "UserID": "3c37ef1d-cd49-4589-9787-3c418ed8b6ac", - "EmailAddress": "test@email.com", - "FirstName": "Test", - "LastName": "Xero", - "UpdatedDateUTC": "/Date(1508523261613+0000)/", - "IsSubscriber": false, - "OrganisationRole": "FINANCIALADVISER" - } - ] - } -components: - securitySchemes: - OAuth2: - type: oauth2 - description: For more information - flows: - authorizationCode: - authorizationUrl: 'https://login.xero.com/identity/connect/authorize' - tokenUrl: 'https://identity.xero.com/connect/token' - scopes: - email: Grant read-only access to your email - openid: Grant read-only access to your open id - profile: your profile information - accounting.attachments: Grant read-write access to attachments - accounting.attachments.read: Grant read-only access to attachments - accounting.contacts: Grant read-write access to contacts and contact groups - accounting.contacts.read: Grant read-only access to contacts and contact groups - accounting.journals.read: Grant read-only access to journals - accounting.reports.read: Grant read-only access to accounting reports - accounting.reports.tenninetynine.read: Grant read-only access to 1099 reports - accounting.settings: Grant read-write access to organisation and account settings - accounting.settings.read: Grant read-only access to organisation and account settings - accounting.transactions: Grant read-write access to bank transactions, credit notes, invoices, repeating invoices - accounting.transactions.read: Grant read-only access to invoices - paymentservices: Grant read-write access to payment services - requestBodies: - historyRecords: - required: true - description: HistoryRecords containing an array of HistoryRecord objects in body of request - content: - application/json: - schema: - $ref: '#/components/schemas/HistoryRecords' - example: { - "HistoryRecords": [ - { - "Details": "Hello World" - } - ] - } - parameters: - requiredHeader: - in: header - name: xero-tenant-id - x-snake: xero_tenant_id - description: Xero identifier for Tenant - example: YOUR_XERO_TENANT_ID - schema: - type: string - required: true - summarizeErrors: - in: query - name: summarizeErrors - x-snake: summarize_errors - description: If false return 200 OK and mix of successfully created objects and any with validation errors - example: true - x-example-python: "True" - schema: - type: boolean - default: false - unitdp: - in: query - name: unitdp - description: e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts - example: 4 - schema: - type: integer - ifModifiedSince: - in: header - name: If-Modified-Since - x-snake: if_modified_since - description: Only records created or modified since this timestamp will be returned - example: "2020-02-06T12:17:43.202-08:00" - schema: - type: string - format: date-time - idempotencyKey: - in: header - name: Idempotency-Key - x-snake: idempotency_key - description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. - example: "KEY_VALUE" - schema: - type: string - includeOnline: - in: query - name: IncludeOnline - x-snake: include_online - description: Allows an attachment to be seen by the end customer within their online invoice - example: true - x-example-python: "True" - schema: - type: boolean - default: false - summaryOnly: - in: query - name: summaryOnly - x-snake: summary_only - description: Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. - example: true - x-example-python: "True" - schema: - type: boolean - default: false - searchTerm: - in: query - name: searchTerm - x-snake: search_term - description: Search parameter that performs a case-insensitive text search across the fields e.g. InvoiceNumber, Reference. - example: "SearchTerm=REF12" - x-example-python: "True" - schema: - type: string - FromDate: - in: query - name: fromDate - x-snake: from_date - description: filter by the from date of the report e.g. 2021-02-01 - example: "2019-10-31" - schema: - type: string - format: date - ToDate: - in: query - name: toDate - x-snake: to_date - description: filter by the to date of the report e.g. 2021-02-28 - example: "2019-10-31" - schema: - type: string - format: date - pageSize: - in: query - name: pageSize - description: Number of records to retrieve per page - example: 100 - schema: - type: integer - AccountID: - required: true - in: path - name: AccountID - x-snake: account_id - description: Unique identifier for Account object - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - AllocationID: - required: true - in: path - name: AllocationID - x-snake: allocation_id - description: Unique identifier for Allocation object - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - AttachmentID: - required: true - in: path - name: AttachmentID - x-snake: attachment_id - description: Unique identifier for Attachment object - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - ContentType: - required: true - in: header - name: contentType - x-snake: content_type - description: The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf - example: image/jpg - schema: - type: string - FileName: - required: true - in: path - name: FileName - x-snake: file_name - description: Name of the attachment - example: "xero-dev.jpg" - schema: - type: string - BatchPaymentID: - required: true - in: path - name: BatchPaymentID - x-snake: batch_payment_id - description: Unique identifier for BatchPayment - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - BankTransactionID: - required: true - in: path - name: BankTransactionID - x-snake: bank_transaction_id - description: Xero generated unique identifier for a bank transaction - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - BankTransferID: - required: true - in: path - name: BankTransferID - x-snake: bank_transfer_id - description: Xero generated unique identifier for a bank transfer - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - BrandingThemeID: - required: true - in: path - name: BrandingThemeID - x-snake: branding_theme_id - description: Unique identifier for a Branding Theme - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - BudgetID: - required: true - in: path - name: BudgetID - x-snake: budget_id - description: Unique identifier for Budgets - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - ContactID: - required: true - in: path - name: ContactID - x-snake: contact_id - description: Unique identifier for a Contact - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - ContactGroupID: - required: true - in: path - name: ContactGroupID - x-snake: contact_group_id - description: Unique identifier for a Contact Group - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - CreditNoteID: - required: true - in: path - name: CreditNoteID - x-snake: credit_note_id - description: Unique identifier for a Credit Note - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - EmployeeID: - required: true - in: path - name: EmployeeID - x-snake: employee_id - description: Unique identifier for a Employee - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - ExpenseClaimID: - required: true - in: path - name: ExpenseClaimID - x-snake: expense_claim_id - description: Unique identifier for a ExpenseClaim - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - InvoiceID: - required: true - in: path - name: InvoiceID - x-snake: invoice_id - description: Unique identifier for an Invoice - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - ItemID: - required: true - in: path - name: ItemID - x-snake: item_id - description: Unique identifier for an Item - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - JournalID: - required: true - in: path - name: JournalID - x-snake: journal_id - description: Unique identifier for a Journal - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - JournalNumber: - required: true - in: path - name: JournalNumber - x-snake: journal_number - description: Number of a Journal - example: 1000 - schema: - type: integer - LinkedTransactionID: - required: true - in: path - name: LinkedTransactionID - x-snake: linked_transaction_id - description: Unique identifier for a LinkedTransaction - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - ManualJournalID: - required: true - in: path - name: ManualJournalID - x-snake: manual_journal_id - description: Unique identifier for a ManualJournal - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - OrganisationID: - required: true - in: path - name: OrganisationID - x-snake: organisation_id - description: The unique Xero identifier for an organisation - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - OverpaymentID: - required: true - in: path - name: OverpaymentID - x-snake: overpayment_id - description: Unique identifier for a Overpayment - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - PaymentID: - required: true - in: path - name: PaymentID - x-snake: payment_id - description: Unique identifier for a Payment - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - PrepaymentID: - required: true - in: path - name: PrepaymentID - x-snake: prepayment_id - description: Unique identifier for a PrePayment - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - PurchaseOrderID: - required: true - in: path - name: PurchaseOrderID - x-snake: purchase_order_id - description: Unique identifier for an Purchase Order - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - QuoteID: - required: true - in: path - name: QuoteID - x-snake: quote_id - description: Unique identifier for an Quote - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - ReceiptID: - required: true - in: path - name: ReceiptID - x-snake: receipt_id - description: Unique identifier for a Receipt - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - RepeatingInvoiceID: - required: true - in: path - name: RepeatingInvoiceID - x-snake: repeating_invoice_id - description: Unique identifier for a Repeating Invoice - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - TrackingCategoryID: - required: true - in: path - name: TrackingCategoryID - x-snake: tracking_category_id - description: Unique identifier for a TrackingCategory - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - TrackingOptionID: - required: true - in: path - name: TrackingOptionID - x-snake: tracking_option_id - description: Unique identifier for a Tracking Option - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - UserID: - required: true - in: path - name: UserID - x-snake: user_id - description: Unique identifier for a User - example: "00000000-0000-0000-0000-000000000000" - schema: - type: string - format: uuid - TaxType: - required: true - in: path - name: TaxType - description: A valid TaxType code - example: "INPUT2" - schema: - type: string - responses: - 400Error: - description: A failed request due to validation error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - HistoryRecordCreated: - description: Success - return response of type HistoryRecords array of HistoryRecord objects - content: - application/json: - schema: - $ref: '#/components/schemas/HistoryRecords' - example: { - "Id": "d7525479-3392-44c0-bb37-ff4a0b5df5bd", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1550899400362)/", - "HistoryRecords": [ - { - "DateUTCString": "2019-02-23T05:23:20", - "DateUTC": "/Date(1550899400362)/", - "Details": "Hello World", - "ValidationErrors": [] - } - ] - } - HistoryRetrieved: - description: Success - return response of HistoryRecords array of 0 to N HistoryRecord - content: - application/json: - schema: - $ref: '#/components/schemas/HistoryRecords' - example: { - "Id": "cd54cc7b-b721-4207-b11d-7d13c7902f91", - "Status": "OK", - "ProviderName": "Xero API Partner", - "DateTimeUTC": "/Date(1551311321819)/", - "HistoryRecords": [ - { - "Changes": "Attached a file", - "DateUTCString": "2018-11-08T15:01:21", - "DateUTC": "/Date(1541689281470+0000)/", - "User": "System Generated", - "Details": "Attached the file sample2.jpg through the Xero API using Xero API Partner" - }, - { - "Changes": "Credit Applied", - "DateUTCString": "2016-10-17T20:46:01", - "DateUTC": "/Date(1476737161173+0000)/", - "User": "System Generated", - "Details": "Bank transfer from Business Wells Fargo to My Savings on November 12, 2016 for 20.00." - } - ] - } - schemas: - AddressForOrganisation: - externalDocs: - url: 'http://developer.xero.com/documentation/api/types' - properties: - AddressType: - description: define the type of address - type: string - enum: - - POBOX - - STREET - - DELIVERY - AddressLine1: - description: max length = 500 - maxLength: 500 - type: string - AddressLine2: - description: max length = 500 - maxLength: 500 - type: string - AddressLine3: - description: max length = 500 - maxLength: 500 - type: string - AddressLine4: - description: max length = 500 - maxLength: 500 - type: string - City: - description: max length = 255 - maxLength: 255 - type: string - Region: - description: max length = 255 - maxLength: 255 - type: string - PostalCode: - description: max length = 50 - maxLength: 50 - type: string - Country: - description: 'max length = 50, [A-Z], [a-z] only' - maxLength: 50 - type: string - AttentionTo: - description: max length = 255 - maxLength: 255 - type: string - type: object - Address: - externalDocs: - url: 'http://developer.xero.com/documentation/api/types' - properties: - AddressType: - description: define the type of address - type: string - enum: - - POBOX - - STREET - AddressLine1: - description: max length = 500 - maxLength: 500 - type: string - AddressLine2: - description: max length = 500 - maxLength: 500 - type: string - AddressLine3: - description: max length = 500 - maxLength: 500 - type: string - AddressLine4: - description: max length = 500 - maxLength: 500 - type: string - City: - description: max length = 255 - maxLength: 255 - type: string - Region: - description: max length = 255 - maxLength: 255 - type: string - PostalCode: - description: max length = 50 - maxLength: 50 - type: string - Country: - description: 'max length = 50, [A-Z], [a-z] only' - maxLength: 50 - type: string - AttentionTo: - description: max length = 255 - maxLength: 255 - type: string - type: object - Phone: - externalDocs: - url: 'http://developer.xero.com/documentation/api/types' - properties: - PhoneType: - type: string - enum: - - DEFAULT - - DDI - - MOBILE - - FAX - - OFFICE - PhoneNumber: - description: max length = 50 - maxLength: 50 - type: string - PhoneAreaCode: - description: max length = 10 - maxLength: 10 - type: string - PhoneCountryCode: - description: max length = 20 - maxLength: 20 - type: string - type: object - Accounts: - type: object - x-objectArrayKey: accounts - properties: - Accounts: - type: array - items: - $ref: '#/components/schemas/Account' - Account: - type: object - externalDocs: - url: 'http://developer.xero.com/documentation/api/accounts/' - properties: - Code: - description: - Customer defined alpha numeric account code e.g 200 or SALES (max - length = 10) - type: string - example: 4400 - Name: - description: Name of account (max length = 150) - maxLength: 150 - type: string - example: Food Sales - AccountID: - description: The Xero identifier for an account – specified as a string following the endpoint name e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9 - type: string - format: uuid - example: 00000000-0000-0000-0000-000000000000 - Type: - $ref: '#/components/schemas/AccountType' - type: string - BankAccountNumber: - description: For bank accounts only (Account Type BANK) - type: string - Status: - description: - Accounts with a status of ACTIVE can be updated to ARCHIVED. See - Account Status Codes - type: string - enum: - - ACTIVE - - ARCHIVED - - DELETED - Description: - description: Description of the Account. Valid for all types of accounts except bank accounts (max length = 4000) - type: string - BankAccountType: - description: For bank accounts only. See Bank Account types - type: string - enum: - - BANK - - CREDITCARD - - PAYPAL - - NONE - - '' - CurrencyCode: - $ref: '#/components/schemas/CurrencyCode' - type: string - TaxType: - description: The tax type from taxRates - type: string - EnablePaymentsToAccount: - description: Boolean – describes whether account can have payments applied to it - type: boolean - ShowInExpenseClaims: - description: Boolean – describes whether account code is available for use with - expense claims - type: boolean - Class: - description: See Account Class Types - readOnly: true - type: string - enum: - - ASSET - - EQUITY - - EXPENSE - - LIABILITY - - REVENUE - SystemAccount: - description: - If this is a system account then this element is returned. See - System Account types. Note that non-system accounts may have this - element set as either “” or null. - readOnly: true - type: string - enum: - - DEBTORS - - CREDITORS - - BANKCURRENCYGAIN - - GST - - GSTONIMPORTS - - HISTORICAL - - REALISEDCURRENCYGAIN - - RETAINEDEARNINGS - - ROUNDING - - TRACKINGTRANSFERS - - UNPAIDEXPCLM - - UNREALISEDCURRENCYGAIN - - WAGEPAYABLES - - CISASSETS - - CISASSET - - CISLABOUR - - CISLABOUREXPENSE - - CISLABOURINCOME - - CISLIABILITY - - CISMATERIALS - - '' - ReportingCode: - description: Shown if set - type: string - ReportingCodeName: - description: Shown if set - readOnly: true - type: string - HasAttachments: - description: boolean to indicate if an account has an attachment (read only) - readOnly: true - type: boolean - default: "false" - example: "false" - UpdatedDateUTC: - description: Last modified date UTC format - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - AddToWatchlist: - description: Boolean – describes whether the account is shown in the watchlist widget on the dashboard - type: boolean - ValidationErrors: - description: Displays array of validation error messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - AccountType: - description: See Account Types - type: string - enum: - - BANK - - CURRENT - - CURRLIAB - - DEPRECIATN - - DIRECTCOSTS - - EQUITY - - EXPENSE - - FIXED - - INVENTORY - - LIABILITY - - NONCURRENT - - OTHERINCOME - - OVERHEADS - - PREPAYMENT - - REVENUE - - SALES - - TERMLIAB - - PAYG - Attachments: - type: object - x-objectArrayKey: attachments - properties: - Attachments: - type: array - items: - $ref: '#/components/schemas/Attachment' - Attachment: - type: object - externalDocs: - url: 'http://developer.xero.com/documentation/api/attachments/' - properties: - AttachmentID: - description: Unique ID for the file - type: string - format: uuid - example: "00000000-0000-0000-0000-000000000000" - FileName: - description: Name of the file - type: string - example: xero-dev.jpg - Url: - description: URL to the file on xero.com - type: string - example: "https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg" - MimeType: - description: Type of file - type: string - example: "image/jpg" - ContentLength: - description: Length of the file content - type: integer - IncludeOnline: - description: Include the file with the online invoice - type: boolean - BankTransactions: - type: object - x-objectArrayKey: bank_transactions - properties: - pagination: - $ref: '#/components/schemas/Pagination' - Warnings: - description: Displays array of warning messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - BankTransactions: - type: array - items: - $ref: '#/components/schemas/BankTransaction' - BankTransaction: - externalDocs: - url: 'http://developer.xero.com/documentation/api/banktransactions/' - properties: - Type: - description: See Bank Transaction Types - type: string - enum: - - RECEIVE - - RECEIVE-OVERPAYMENT - - RECEIVE-PREPAYMENT - - SPEND - - SPEND-OVERPAYMENT - - SPEND-PREPAYMENT - - RECEIVE-TRANSFER - - SPEND-TRANSFER - Contact: - $ref: '#/components/schemas/Contact' - LineItems: - description: See LineItems - type: array - items: - $ref: '#/components/schemas/LineItem' - BankAccount: - $ref: '#/components/schemas/Account' - IsReconciled: - description: Boolean to show if transaction is reconciled - type: boolean - Date: - description: Date of transaction – YYYY-MM-DD - type: string - x-is-msdate: true - Reference: - description: - Reference for the transaction. Only supported for SPEND and RECEIVE - transactions. - type: string - CurrencyCode: - $ref: '#/components/schemas/CurrencyCode' - type: string - CurrencyRate: - description: Exchange rate to base currency when money is spent or received. e.g.0.7500 Only used for bank transactions in non base currency. If this - isn’t specified for non base currency accounts then either the - user-defined rate (preference) or the XE.com day rate will be used. - Setting currency is only supported on overpayments. - type: number - format: double - x-is-money: true - Url: - description: URL link to a source document – shown as “Go to App Name” - type: string - Status: - description: See Bank Transaction Status Codes - type: string - enum: - - AUTHORISED - - DELETED - - VOIDED - LineAmountTypes: - $ref: '#/components/schemas/LineAmountTypes' - type: string - SubTotal: - description: Total of bank transaction excluding taxes - type: number - format: double - x-is-money: true - TotalTax: - description: Total tax on bank transaction - type: number - format: double - x-is-money: true - Total: - description: Total of bank transaction tax inclusive - type: number - format: double - x-is-money: true - BankTransactionID: - description: Xero generated unique identifier for bank transaction - type: string - format: uuid - example: "00000000-0000-0000-0000-000000000000" - PrepaymentID: - description: Xero generated unique identifier for a Prepayment. This will be returned on BankTransactions with a Type of SPEND-PREPAYMENT or RECEIVE-PREPAYMENT - readOnly: true - type: string - format: uuid - example: "00000000-0000-0000-0000-000000000000" - OverpaymentID: - description: Xero generated unique identifier for an Overpayment. This will be returned on BankTransactions with a Type of SPEND-OVERPAYMENT or RECEIVE-OVERPAYMENT - readOnly: true - type: string - format: uuid - example: "00000000-0000-0000-0000-000000000000" - UpdatedDateUTC: - description: Last modified date UTC format - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - HasAttachments: - description: Boolean to indicate if a bank transaction has an attachment - readOnly: true - type: boolean - default: "false" - example: "false" - StatusAttributeString: - description: A string to indicate if a invoice status - type: string - ValidationErrors: - description: Displays array of validation error messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - required: - - Type - - LineItems - - BankAccount - type: object - LineAmountTypes: - description: Line amounts are exclusive of tax by default if you don’t specify this element. See Line Amount Types - type: string - enum: - - Exclusive - - Inclusive - - NoTax - LineItem: - externalDocs: - url: 'https://developer.xero.com/documentation/api/invoices#post' - properties: - LineItemID: - description: LineItem unique ID - type: string - format: uuid - example: "00000000-0000-0000-0000-000000000000" - Description: - description: Description needs to be at least 1 char long. A line item with just - a description (i.e no unit amount or quantity) can be created by - specifying just a element that contains at least 1 - character - type: string - Quantity: - description: LineItem Quantity - type: number - format: double - x-is-money: true - UnitAmount: - description: LineItem Unit Amount - type: number - format: double - x-is-money: true - ItemCode: - description: See Items - type: string - AccountCode: - description: See Accounts - type: string - AccountID: - description: The associated account ID related to this line item - type: string - format: uuid - example: "00000000-0000-0000-0000-000000000000" - TaxType: - description: The tax type from TaxRates - type: string - TaxAmount: - description: The tax amount is auto calculated as a percentage of the line amount (see below) based on the tax rate. This value can be overriden if - the calculated is not correct. - type: number - format: double - x-is-money: true - Item: - $ref: '#/components/schemas/LineItemItem' - LineAmount: - description: If you wish to omit either the Quantity or UnitAmount you can provide a LineAmount and Xero will calculate the missing amount for - you. The line amount reflects the discounted price if either a DiscountRate or DiscountAmount has been used i.e. LineAmount = Quantity * Unit Amount * ((100 - DiscountRate)/100) or LineAmount = (Quantity * UnitAmount) - DiscountAmount - type: number - format: double - x-is-money: true - Tracking: - description: Optional Tracking Category – see Tracking. Any LineItem can have a maximum of 2 elements. - type: array - items: - $ref: '#/components/schemas/LineItemTracking' - DiscountRate: - description: Percentage discount being applied to a line item (only supported on ACCREC invoices – ACC PAY invoices and credit notes in Xero do not - support discounts - type: number - format: double - x-is-money: true - DiscountAmount: - description: Discount amount being applied to a line item. Only supported on ACCREC invoices and quotes. ACCPAY invoices and credit notes in Xero do not support discounts. - type: number - format: double - x-is-money: true - RepeatingInvoiceID: - description: The Xero identifier for a Repeating Invoice - example: "00000000-0000-0000-0000-000000000000" - type: string - format: uuid - Taxability: - description: The type of taxability - type: string - enum: - - TAXABLE - - NON_TAXABLE - - EXEMPT - - PART_TAXABLE - - NOT_APPLICABLE - SalesTaxCodeId: - description: The ID of the sales tax code - type: number - TaxBreakdown: - description: An array of tax components defined for this line item - type: array - items: - $ref: '#/components/schemas/TaxBreakdownComponent' - type: object - LineItemItem: - properties: - Code: - description: User defined item code (max length = 30) - maxLength: 30 - type: string - Name: - description: The name of the item (max length = 50) - maxLength: 50 - type: string - ItemID: - description: The Xero identifier for an Item - type: string - format: uuid - LineItemTracking: - externalDocs: - url: 'https://developer.xero.com/documentation/api/invoices#post' - properties: - TrackingCategoryID: - description: The Xero identifier for a tracking category - type: string - format: uuid - example: "00000000-0000-0000-0000-000000000000" - TrackingOptionID: - description: The Xero identifier for a tracking category option - type: string - format: uuid - example: "00000000-0000-0000-0000-000000000000" - Name: - description: The name of the tracking category - maxLength: 100 - type: string - example: Region - Option: - description: See Tracking Options - type: string - example: North - type: object - BankTransfers: - type: object - x-objectArrayKey: bank_transfers - properties: - BankTransfers: - type: array - items: - $ref: '#/components/schemas/BankTransfer' - BankTransfer: - externalDocs: - url: 'http://developer.xero.com/documentation/api/bank-transfers/' - properties: - FromBankAccount: - $ref: '#/components/schemas/Account' - ToBankAccount: - $ref: '#/components/schemas/Account' - Amount: - description: 'amount of the transaction' - type: number - format: double - x-is-money: true - Date: - description: The date of the Transfer YYYY-MM-DD - type: string - x-is-msdate: true - BankTransferID: - description: The identifier of the Bank Transfer - readOnly: true - type: string - format: uuid - CurrencyRate: - description: The currency rate - readOnly: true - type: number - format: double - x-is-money: true - FromBankTransactionID: - description: The Bank Transaction ID for the source account - readOnly: true - type: string - format: uuid - ToBankTransactionID: - description: The Bank Transaction ID for the destination account - readOnly: true - type: string - format: uuid - FromIsReconciled: - description: The Bank Transaction boolean to show if it is reconciled for the source account - type: boolean - default: "false" - example: "false" - ToIsReconciled: - description: The Bank Transaction boolean to show if it is reconciled for the destination account - type: boolean - default: "false" - example: "false" - Reference: - description: Reference for the transactions. - type: string - HasAttachments: - description: Boolean to indicate if a Bank Transfer has an attachment - readOnly: true - type: boolean - default: "false" - example: "false" - CreatedDateUTC: - description: UTC timestamp of creation date of bank transfer - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - ValidationErrors: - description: Displays array of validation error messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - required: - - FromBankAccount - - ToBankAccount - - Amount - type: object - BatchPayments: - type: object - x-objectArrayKey: batch_payments - properties: - BatchPayments: - type: array - items: - $ref: '#/components/schemas/BatchPayment' - BatchPayment: - externalDocs: - url: 'http://developer.xero.com/documentation/api/BatchPayments/' - properties: - Account: - $ref: '#/components/schemas/Account' - Reference: - description: (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero. - type: string - maxLength: 255 - Particulars: - description: (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero. - type: string - maxLength: 12 - Code: - description: (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero. - type: string - maxLength: 12 - Details: - description: (Non-NZ Only) These details are sent to the org’s bank as a reference for the batch payment transaction. They will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement imported into Xero. Maximum field length = 18 - type: string - Narrative: - description: (UK Only) Only shows on the statement line in Xero. Max length =18 - type: string - maxLength: 18 - BatchPaymentID: - description: The Xero generated unique identifier for the bank transaction (read-only) - readOnly: true - type: string - format: uuid - DateString: - description: Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06 - type: string - Date: - description: Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06 - type: string - x-is-msdate: true - Amount: - description: The amount of the payment. Must be less than or equal to the - outstanding amount owing on the invoice e.g. 200.00 - type: number - format: double - x-is-money: true - Payments: - description: An array of payments - type: array - items: - $ref: '#/components/schemas/Payment' - Type: - description: PAYBATCH for bill payments or RECBATCH for sales invoice payments (read-only) - readOnly: true - type: string - enum: - - PAYBATCH - - RECBATCH - Status: - description: AUTHORISED or DELETED (read-only). New batch payments will have a status of AUTHORISED. It is not possible to delete batch payments via the API. - readOnly: true - type: string - enum: - - AUTHORISED - - DELETED - TotalAmount: - description: The total of the payments that make up the batch (read-only) - type: number - format: double - x-is-money: true - readOnly: true - UpdatedDateUTC: - description: UTC timestamp of last update to the payment - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - IsReconciled: - description: Booelan that tells you if the batch payment has been reconciled (read-only) - readOnly: true - type: boolean - ValidationErrors: - description: Displays array of validation error messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - type: object - BatchPaymentDetails: - description: Bank details for use on a batch payment stored with each contact - externalDocs: - url: 'http://developer.xero.com/documentation/api/Contact/' - properties: - BankAccountNumber: - description: Bank account number for use with Batch Payments - type: string - example: 123-456-1111111 - BankAccountName: - description: Name of bank for use with Batch Payments - type: string - example: "ACME Bank" - Details: - description: (Non-NZ Only) These details are sent to the org’s bank as a reference for the batch payment transaction. They will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement imported into Xero. Maximum field length = 18 - type: string - example: Hello World - Code: - description: (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero. - type: string - maxLength: 12 - example: "ABC" - Reference: - description: (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero. - type: string - maxLength: 12 - example: "Foobar" - BatchPaymentDelete: - externalDocs: - url: 'http://developer.xero.com/documentation/api/accounting/batchpayments' - properties: - BatchPaymentID: - description: The Xero generated unique identifier for the bank transaction (read-only) - type: string - format: uuid - Status: - description: The status of the batch payment. - type: string - default: "DELETED" - required: - - Status - - BatchPaymentID - type: object - BatchPaymentDeleteByUrlParam: - externalDocs: - url: 'http://developer.xero.com/documentation/api/accounting/batchpayments' - properties: - Status: - description: The status of the batch payment. - type: string - default: "DELETED" - required: - - Status - type: object - BrandingThemes: - type: object - x-objectArrayKey: branding_themes - properties: - BrandingThemes: - type: array - items: - $ref: '#/components/schemas/BrandingTheme' - BrandingTheme: - externalDocs: - url: 'http://developer.xero.com/documentation/api/branding-themes/' - properties: - BrandingThemeID: - description: Xero identifier - type: string - format: uuid - Name: - description: Name of branding theme - type: string - LogoUrl: - description: The location of the image file used as the logo on this branding theme - type: string - Type: - description: Always INVOICE - type: string - enum: - - INVOICE - SortOrder: - description: Integer – ranked order of branding theme. The default branding theme has a value of 0 - type: integer - CreatedDateUTC: - description: UTC timestamp of creation date of branding theme - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - type: object - PaymentServices: - type: object - x-objectArrayKey: payment_services - properties: - PaymentServices: - type: array - items: - $ref: '#/components/schemas/PaymentService' - PaymentService: - externalDocs: - url: 'http://developer.xero.com/documentation/api/branding-themes/' - properties: - PaymentServiceID: - description: Xero identifier - type: string - format: uuid - PaymentServiceName: - description: Name of payment service - type: string - PaymentServiceUrl: - description: The custom payment URL - type: string - PayNowText: - description: The text displayed on the Pay Now button in Xero Online Invoicing. If this is not set it will default to Pay by credit card - type: string - PaymentServiceType: - description: This will always be CUSTOM for payment services created via the API. - type: string - ValidationErrors: - description: Displays array of validation error messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - Contacts: - type: object - x-objectArrayKey: contacts - properties: - pagination: - $ref: '#/components/schemas/Pagination' - Warnings: - description: Displays array of warning messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - Contacts: - type: array - items: - $ref: '#/components/schemas/Contact' - Contact: - externalDocs: - url: 'http://developer.xero.com/documentation/api/contacts/' - properties: - ContactID: - description: Xero identifier - type: string - format: uuid - MergedToContactID: - description: ID for the destination of a merged contact. - Only returned when using paging or when fetching a contact by ContactId or ContactNumber. - type: string - format: uuid - ContactNumber: - description: This can be updated via the API only i.e. This field is read only on the Xero contact screen, used to identify contacts in external - systems (max length = 50). If the Contact Number is used, this is - displayed as Contact Code in the Contacts UI in Xero. - maxLength: 50 - type: string - AccountNumber: - description: A user defined account number. This can be updated via the API and - the Xero UI (max length = 50) - maxLength: 50 - type: string - ContactStatus: - description: Current status of a contact – see contact status types - type: string - enum: - - ACTIVE - - ARCHIVED - - GDPRREQUEST - Name: - description: Full name of contact/organisation (max length = 255) - maxLength: 255 - type: string - FirstName: - description: First name of contact person (max length = 255) - maxLength: 255 - type: string - LastName: - description: Last name of contact person (max length = 255) - maxLength: 255 - type: string - CompanyNumber: - description: Company registration number (max length = 50) - maxLength: 50 - type: string - EmailAddress: - description: Email address of contact person (umlauts not supported) (max length = 255) - maxLength: 255 - type: string - ContactPersons: - description: See contact persons - type: array - items: - $ref: '#/components/schemas/ContactPerson' - BankAccountDetails: - description: Bank account number of contact - type: string - TaxNumber: - description: Tax number of contact – this is also known as the ABN (Australia), - GST Number (New Zealand), VAT Number (UK) or Tax ID Number (US and - global) in the Xero UI depending on which regionalized version of - Xero you are using (max length = 50) - maxLength: 50 - type: string - AccountsReceivableTaxType: - description: The tax type from TaxRates - type: string - AccountsPayableTaxType: - description: The tax type from TaxRates - type: string - Addresses: - description: Store certain address types for a contact – see address types - type: array - items: - $ref: '#/components/schemas/Address' - Phones: - description: Store certain phone types for a contact – see phone types - type: array - items: - $ref: '#/components/schemas/Phone' - IsSupplier: - description: true or false – Boolean that describes if a contact that has any AP invoices entered against them. Cannot be set via PUT or POST – it is - automatically set when an accounts payable invoice is generated - against this contact. - type: boolean - IsCustomer: - description: true or false – Boolean that describes if a contact has any AR - invoices entered against them. Cannot be set via PUT or POST – it is - automatically set when an accounts receivable invoice is generated - against this contact. - type: boolean - SalesDefaultLineAmountType: - description: The default sales line amount type for a contact. - Only available when summaryOnly parameter or paging is used, or when fetch by ContactId or ContactNumber. - type: string - enum: - - INCLUSIVE - - EXCLUSIVE - - NONE - PurchasesDefaultLineAmountType: - description: The default purchases line amount type for a contact - Only available when summaryOnly parameter or paging is used, or when fetch by ContactId or ContactNumber. - type: string - enum: - - INCLUSIVE - - EXCLUSIVE - - NONE - DefaultCurrency: - $ref: '#/components/schemas/CurrencyCode' - type: string - XeroNetworkKey: - description: Store XeroNetworkKey for contacts. - type: string - SalesDefaultAccountCode: - description: The default sales account code for contacts - type: string - PurchasesDefaultAccountCode: - description: The default purchases account code for contacts - type: string - SalesTrackingCategories: - description: The default sales tracking categories for contacts - type: array - items: - $ref: '#/components/schemas/SalesTrackingCategory' - PurchasesTrackingCategories: - description: The default purchases tracking categories for contacts - type: array - items: - $ref: '#/components/schemas/SalesTrackingCategory' - TrackingCategoryName: - description: The name of the Tracking Category assigned to the contact under - SalesTrackingCategories and PurchasesTrackingCategories - type: string - TrackingCategoryOption: - description: The name of the Tracking Option assigned to the contact under - SalesTrackingCategories and PurchasesTrackingCategories - type: string - PaymentTerms: - $ref: '#/components/schemas/PaymentTerm' - UpdatedDateUTC: - description: UTC timestamp of last update to contact - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - ContactGroups: - description: Displays which contact groups a contact is included in - type: array - items: - $ref: '#/components/schemas/ContactGroup' - Website: - description: Website address for contact (read only) - readOnly: true - type: string - BrandingTheme: - $ref: '#/components/schemas/BrandingTheme' - BatchPayments: - $ref: '#/components/schemas/BatchPaymentDetails' - Discount: - description: The default discount rate for the contact (read only) - readOnly: true - type: number - format: double - x-is-money: true - Balances: - $ref: '#/components/schemas/Balances' - Attachments: - description: Displays array of attachments from the API - type: array - items: - $ref: '#/components/schemas/Attachment' - HasAttachments: - description: A boolean to indicate if a contact has an attachment - type: boolean - default: "false" - example: "false" - ValidationErrors: - description: Displays validation errors returned from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - HasValidationErrors: - description: A boolean to indicate if a contact has an validation errors - type: boolean - default: "false" - example: "false" - StatusAttributeString: - description: Status of object - type: string - type: object - Budgets: - type: object - x-objectArrayKey: budgets - properties: - Budgets: - type: array - items: - $ref: '#/components/schemas/Budget' - Budget: - type: object - externalDocs: - url: 'http://developer.xero.com/documentation/api/budgets/' - properties: - BudgetID: - description: Xero identifier - type: string - format: uuid - Type: - description: Type of Budget. OVERALL or TRACKING - type: string - enum: - - OVERALL - - TRACKING - Description: - description: The Budget description - maxLength: 255 - type: string - UpdatedDateUTC: - description: UTC timestamp of last update to budget - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - BudgetLines: - type: array - items: - $ref: '#/components/schemas/BudgetLine' - Tracking: - type: array - items: - $ref: '#/components/schemas/TrackingCategory' - BudgetLine: - type: object - externalDocs: - url: 'http://developer.xero.com/documentation/api/budgets/' - properties: - AccountID: - description: See Accounts - type: string - format: uuid - AccountCode: - description: See Accounts - type: string - example: 090 - BudgetBalances: - type: array - items: - $ref: '#/components/schemas/BudgetBalance' - BudgetBalance: - type: object - properties: - Period: - description: Period the amount applies to (e.g. “2019-08”) - type: string - x-is-msdate: true - Amount: - description: LineItem Quantity - type: number - format: double - x-is-money: true - UnitAmount: - description: Budgeted amount - type: number - format: double - x-is-money: true - Notes: - description: Any footnotes associated with this balance - maxLength: 255 - type: string - Balances: - type: object - description: The raw AccountsReceivable(sales invoices) and - AccountsPayable(bills) outstanding and overdue amounts, not - converted to base currency (read only) - properties: - AccountsReceivable: - $ref: '#/components/schemas/AccountsReceivable' - AccountsPayable: - $ref: '#/components/schemas/AccountsPayable' - AccountsReceivable: - type: object - properties: - Outstanding: - type: number - format: double - x-is-money: true - Overdue: - type: number - format: double - x-is-money: true - AccountsPayable: - type: object - properties: - Outstanding: - type: number - format: double - x-is-money: true - Overdue: - type: number - format: double - x-is-money: true - CISSettings: - type: object - x-objectArrayKey: cis_settings - properties: - CISSettings: - type: array - items: - $ref: '#/components/schemas/CISSetting' - CISSetting: - externalDocs: - url: 'http://developer.xero.com/documentation/api/contacts/' - properties: - CISEnabled: - description: Boolean that describes if the contact is a CIS Subcontractor - type: boolean - Rate: - description: CIS Deduction rate for the contact if he is a subcontractor. If the contact is not CISEnabled, then the rate is not returned - type: number - format: double - readOnly: true - x-is-money: true - CISOrgSettings: - type: object - x-objectArrayKey: cis_settings - properties: - CISSettings: - type: array - items: - $ref: '#/components/schemas/CISOrgSetting' - CISOrgSetting: - externalDocs: - url: 'https://developer.xero.com/documentation/api/organisation' - properties: - CISContractorEnabled: - description: true or false - Boolean that describes if the organisation is a CIS Contractor - type: boolean - CISSubContractorEnabled: - description: true or false - Boolean that describes if the organisation is a CIS SubContractor - type: boolean - Rate: - description: CIS Deduction rate for the organisation - type: number - format: double - readOnly: true - x-is-money: true - ContactPerson: - externalDocs: - url: 'http://developer.xero.com/documentation/api/contacts/' - properties: - FirstName: - description: First name of person - type: string - LastName: - description: Last name of person - type: string - EmailAddress: - description: Email address of person - type: string - IncludeInEmails: - description: boolean to indicate whether contact should be included on emails - with invoices etc. - type: boolean - type: object - ContactGroups: - type: object - - x-objectArrayKey: contact_groups - properties: - ContactGroups: - type: array - items: - $ref: '#/components/schemas/ContactGroup' - ContactGroup: - externalDocs: - url: 'http://developer.xero.com/documentation/api/contactgroups/' - properties: - Name: - description: The Name of the contact group. Required when creating a new contact group - type: string - Status: - description: The Status of a contact group. To delete a contact group update the status to DELETED. Only contact groups with a status of ACTIVE are - returned on GETs. - type: string - enum: - - ACTIVE - - DELETED - ContactGroupID: - description: The Xero identifier for an contact group – specified as a string - following the endpoint name. e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9 - type: string - format: uuid - Contacts: - description: The ContactID and Name of Contacts in a contact group. Returned on - GETs when the ContactGroupID is supplied in the URL. - type: array - items: - $ref: '#/components/schemas/Contact' - type: object - RequestEmpty: - externalDocs: - url: 'http://developer.xero.com/documentation/api/invoice/' - properties: - Status: - description: Need at least one field to create an empty JSON payload - type: string - type: object - CreditNotes: - type: object - x-objectArrayKey: credit_notes - properties: - pagination: - $ref: '#/components/schemas/Pagination' - Warnings: - description: Displays array of warning messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - CreditNotes: - type: array - items: - $ref: '#/components/schemas/CreditNote' - CreditNote: - externalDocs: - url: 'http://developer.xero.com/documentation/api/credit-notes/' - properties: - Type: - description: See Credit Note Types - type: string - enum: - - ACCPAYCREDIT - - ACCRECCREDIT - Contact: - $ref: '#/components/schemas/Contact' - Date: - description: The date the credit note is issued YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on - the timezone setting of the organisation - type: string - x-is-msdate: true - DueDate: - description: Date invoice is due – YYYY-MM-DD - type: string - x-is-msdate: true - Status: - description: See Credit Note Status Codes - type: string - enum: - - DRAFT - - SUBMITTED - - DELETED - - AUTHORISED - - PAID - - VOIDED - LineAmountTypes: - $ref: '#/components/schemas/LineAmountTypes' - type: string - LineItems: - description: See Invoice Line Items - type: array - items: - $ref: '#/components/schemas/LineItem' - SubTotal: - description: The subtotal of the credit note excluding taxes - type: number - format: double - x-is-money: true - TotalTax: - description: The total tax on the credit note - type: number - format: double - x-is-money: true - Total: - description: The total of the Credit Note(subtotal + total tax) - type: number - format: double - x-is-money: true - CISDeduction: - description: CIS deduction for UK contractors - readOnly: true - type: number - format: double - x-is-money: true - CISRate: - description: CIS Deduction rate for the organisation - type: number - format: double - readOnly: true - x-is-money: true - UpdatedDateUTC: - description: UTC timestamp of last update to the credit note - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - CurrencyCode: - description: The specified currency code - $ref: '#/components/schemas/CurrencyCode' - type: string - FullyPaidOnDate: - description: Date when credit note was fully paid(UTC format) - type: string - x-is-msdate: true - CreditNoteID: - description: Xero generated unique identifier - type: string - format: uuid - CreditNoteNumber: - description: ACCRECCREDIT – Unique alpha numeric code identifying credit note - (when missing will auto-generate from your Organisation Invoice - Settings) - type: string - Reference: - description: ACCRECCREDIT only – additional reference number - type: string - SentToContact: - description: Boolean to set whether the credit note in the Xero app should be marked - as “sent”. This can be set only on credit notes that have been approved - readOnly: true - type: boolean - CurrencyRate: - description: The currency rate for a multicurrency invoice. If no rate is - specified, the XE.com day rate is used - type: number - format: double - x-is-money: true - RemainingCredit: - description: The remaining credit balance on the Credit Note - type: number - format: double - x-is-money: true - Allocations: - description: See Allocations - type: array - items: - $ref: '#/components/schemas/Allocation' - AppliedAmount: - description: The amount of applied to an invoice - type: number - format: double - example: 2.00 - x-is-money: true - Payments: - description: See Payments - type: array - items: - $ref: '#/components/schemas/Payment' - BrandingThemeID: - description: See BrandingThemes - type: string - format: uuid - StatusAttributeString: - description: A string to indicate if a invoice status - type: string - HasAttachments: - description: boolean to indicate if a credit note has an attachment - type: boolean - default: "false" - example: "false" - HasErrors: - description: A boolean to indicate if a credit note has an validation errors - type: boolean - default: "false" - example: "false" - ValidationErrors: - description: Displays array of validation error messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - Warnings: - description: Displays array of warning messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - InvoiceAddresses: - description: An array of addresses used to auto calculate sales tax - type: array - items: - $ref: '#/components/schemas/InvoiceAddress' - type: object - Allocations: - type: object - x-objectArrayKey: allocations - properties: - Allocations: - type: array - items: - $ref: '#/components/schemas/Allocation' - Allocation: - externalDocs: - url: 'http://developer.xero.com/documentation/api/prepayments/' - properties: - AllocationID: - description: Xero generated unique identifier - type: string - format: uuid - Invoice: - $ref: '#/components/schemas/Invoice' - Overpayment: - $ref: '#/components/schemas/Overpayment' - Prepayment: - $ref: '#/components/schemas/Prepayment' - CreditNote: - $ref: '#/components/schemas/CreditNote' - Amount: - description: the amount being applied to the invoice - type: number - format: double - x-is-money: true - Date: - description: the date the allocation is applied YYYY-MM-DD. - type: string - x-is-msdate: true - IsDeleted: - description: A flag that returns true when the allocation is succesfully deleted - type: boolean - readOnly: true - StatusAttributeString: - description: A string to indicate if a invoice status - type: string - ValidationErrors: - description: Displays array of validation error messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - required: - - Amount - - Invoice - - Date - type: object - Currencies: - type: object - x-objectArrayKey: currencies - properties: - Currencies: - type: array - items: - $ref: '#/components/schemas/Currency' - Currency: - externalDocs: - url: 'http://developer.xero.com/documentation/api/currencies/' - properties: - Code: - $ref: '#/components/schemas/CurrencyCode' - type: string - Description: - description: Name of Currency - type: string - type: object - CurrencyCode: - description: 3 letter alpha code for the currency – see list of currency codes - type: string - x-enum-varnames: - - AED - - AFN - - ALL - - AMD - - ANG - - AOA - - ARS - - AUD - - AWG - - AZN - - BAM - - BBD - - BDT - - BGN - - BHD - - BIF - - BMD - - BND - - BOB - - BRL - - BSD - - BTN - - BWP - - BYN - - BYR - - BZD - - CAD - - CDF - - CHF - - CLF - - CLP - - CNY - - COP - - CRC - - CUC - - CUP - - CVE - - CZK - - DJF - - DKK - - DOP - - DZD - - EEK - - EGP - - ERN - - ETB - - EUR - - FJD - - FKP - - GBP - - GEL - - GHS - - GIP - - GMD - - GNF - - GTQ - - GYD - - HKD - - HNL - - HRK - - HTG - - HUF - - IDR - - ILS - - INR - - IQD - - IRR - - ISK - - JMD - - JOD - - JPY - - KES - - KGS - - KHR - - KMF - - KPW - - KRW - - KWD - - KYD - - KZT - - LAK - - LBP - - LKR - - LRD - - LSL - - LTL - - LVL - - LYD - - MAD - - MDL - - MGA - - MKD - - MMK - - MNT - - MOP - - MRO - - MRU - - MUR - - MVR - - MWK - - MXN - - MXV - - MYR - - MZN - - NAD - - NGN - - NIO - - NOK - - NPR - - NZD - - OMR - - PAB - - PEN - - PGK - - PHP - - PKR - - PLN - - PYG - - QAR - - RON - - RSD - - RUB - - RWF - - SAR - - SBD - - SCR - - SDG - - SEK - - SGD - - SHP - - SKK - - SLE - - SLL - - SOS - - SRD - - STN - - STD - - SVC - - SYP - - SZL - - THB - - TJS - - TMT - - TND - - TOP - - TRY_LIRA - - TTD - - TWD - - TZS - - UAH - - UGX - - USD - - UYU - - UZS - - VEF - - VES - - VND - - VUV - - WST - - XAF - - XCD - - XOF - - XPF - - YER - - ZAR - - ZMW - - ZMK - - ZWD - - EMPTY_CURRENCY - enum: - - AED - - AFN - - ALL - - AMD - - ANG - - AOA - - ARS - - AUD - - AWG - - AZN - - BAM - - BBD - - BDT - - BGN - - BHD - - BIF - - BMD - - BND - - BOB - - BRL - - BSD - - BTN - - BWP - - BYN - - BYR - - BZD - - CAD - - CDF - - CHF - - CLF - - CLP - - CNY - - COP - - CRC - - CUC - - CUP - - CVE - - CZK - - DJF - - DKK - - DOP - - DZD - - EEK - - EGP - - ERN - - ETB - - EUR - - FJD - - FKP - - GBP - - GEL - - GHS - - GIP - - GMD - - GNF - - GTQ - - GYD - - HKD - - HNL - - HRK - - HTG - - HUF - - IDR - - ILS - - INR - - IQD - - IRR - - ISK - - JMD - - JOD - - JPY - - KES - - KGS - - KHR - - KMF - - KPW - - KRW - - KWD - - KYD - - KZT - - LAK - - LBP - - LKR - - LRD - - LSL - - LTL - - LVL - - LYD - - MAD - - MDL - - MGA - - MKD - - MMK - - MNT - - MOP - - MRO - - MRU - - MUR - - MVR - - MWK - - MXN - - MXV - - MYR - - MZN - - NAD - - NGN - - NIO - - NOK - - NPR - - NZD - - OMR - - PAB - - PEN - - PGK - - PHP - - PKR - - PLN - - PYG - - QAR - - RON - - RSD - - RUB - - RWF - - SAR - - SBD - - SCR - - SDG - - SEK - - SGD - - SHP - - SKK - - SLE - - SLL - - SOS - - SRD - - STD - - STN - - SVC - - SYP - - SZL - - THB - - TJS - - TMT - - TND - - TOP - - TRY - - TTD - - TWD - - TZS - - UAH - - UGX - - USD - - UYU - - UZS - - VEF - - VES - - VND - - VUV - - WST - - XAF - - XCD - - XOF - - XPF - - YER - - ZAR - - ZMW - - ZMK - - ZWD - Employees: - type: object - x-objectArrayKey: employees - properties: - Employees: - type: array - items: - $ref: '#/components/schemas/Employee' - Employee: - externalDocs: - url: 'http://developer.xero.com/documentation/api/employees/' - properties: - EmployeeID: - description: The Xero identifier for an employee e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9 - type: string - format: uuid - Status: - description: Current status of an employee – see contact status types - type: string - enum: - - ACTIVE - - ARCHIVED - - GDPRREQUEST - - DELETED - FirstName: - description: First name of an employee (max length = 255) - maxLength: 255 - type: string - LastName: - description: Last name of an employee (max length = 255) - maxLength: 255 - type: string - ExternalLink: - $ref: '#/components/schemas/ExternalLink' - UpdatedDateUTC: - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - StatusAttributeString: - description: A string to indicate if a invoice status - type: string - example: ERROR - ValidationErrors: - description: Displays array of validation error messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - type: object - ExpenseClaims: - type: object - x-objectArrayKey: expense_claims - properties: - ExpenseClaims: - type: array - items: - $ref: '#/components/schemas/ExpenseClaim' - ExpenseClaim: - externalDocs: - url: 'http://developer.xero.com/documentation/api/expense-claims/' - properties: - ExpenseClaimID: - description: Xero generated unique identifier for an expense claim - type: string - format: uuid - Status: - description: Current status of an expense claim – see status types - type: string - enum: - - SUBMITTED - - AUTHORISED - - PAID - - VOIDED - - DELETED - Payments: - description: See Payments - type: array - items: - $ref: '#/components/schemas/Payment' - User: - $ref: '#/components/schemas/User' - Receipts: - type: array - items: - $ref: '#/components/schemas/Receipt' - UpdatedDateUTC: - description: Last modified date UTC format - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - Total: - description: The total of an expense claim being paid - readOnly: true - type: number - format: double - x-is-money: true - AmountDue: - description: The amount due to be paid for an expense claim - readOnly: true - type: number - format: double - x-is-money: true - AmountPaid: - description: The amount still to pay for an expense claim - readOnly: true - type: number - format: double - x-is-money: true - PaymentDueDate: - description: The date when the expense claim is due to be paid YYYY-MM-DD - readOnly: true - type: string - x-is-msdate: true - ReportingDate: - description: The date the expense claim will be reported in Xero YYYY-MM-DD - readOnly: true - type: string - x-is-msdate: true - ReceiptID: - description: The Xero identifier for the Receipt e.g. e59a2c7f-1306-4078-a0f3-73537afcbba9 - type: string - format: uuid - type: object - HistoryRecords: - type: object - x-objectArrayKey: history_records - properties: - HistoryRecords: - type: array - items: - $ref: '#/components/schemas/HistoryRecord' - HistoryRecord: - externalDocs: - url: 'https://developer.xero.com/documentation/api/history-and-notes' - properties: - Details: - description: details - type: string - Changes: - description: Name of branding theme - type: string - User: - description: has a value of 0 - type: string - DateUTC: - description: UTC timestamp of creation date of branding theme - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - type: object - Invoices: - type: object - x-objectArrayKey: invoices - properties: - pagination: - $ref: '#/components/schemas/Pagination' - Warnings: - description: Displays array of warning messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - Invoices: - type: array - items: - $ref: '#/components/schemas/Invoice' - Invoice: - externalDocs: - url: 'http://developer.xero.com/documentation/api/invoices/' - properties: - Type: - description: See Invoice Types - type: string - enum: - - ACCPAY - - ACCPAYCREDIT - - APOVERPAYMENT - - APPREPAYMENT - - ACCREC - - ACCRECCREDIT - - AROVERPAYMENT - - ARPREPAYMENT - Contact: - $ref: '#/components/schemas/Contact' - LineItems: - description: See LineItems - type: array - items: - $ref: '#/components/schemas/LineItem' - Date: - description: Date invoice was issued – YYYY-MM-DD. If the Date element is not - specified it will default to the current date based on the timezone - setting of the organisation - type: string - x-is-msdate: true - DueDate: - description: Date invoice is due – YYYY-MM-DD - type: string - x-is-msdate: true - LineAmountTypes: - $ref: '#/components/schemas/LineAmountTypes' - type: string - InvoiceNumber: - description: ACCREC – Unique alpha numeric code identifying invoice (when missing will auto-generate from your Organisation Invoice Settings) (max - length = 255) - maxLength: 255 - type: string - Reference: - description: ACCREC only – additional reference number - type: string - BrandingThemeID: - description: See BrandingThemes - type: string - format: uuid - Url: - description: URL link to a source document – shown as “Go to [appName]” in the - Xero app - type: string - CurrencyCode: - $ref: '#/components/schemas/CurrencyCode' - type: string - CurrencyRate: - description: The currency rate for a multicurrency invoice. If no rate is - specified, the XE.com day rate is used. (max length = [18].[6]) - type: number - format: double - x-is-money: true - Status: - description: See Invoice Status Codes - type: string - enum: - - DRAFT - - SUBMITTED - - DELETED - - AUTHORISED - - PAID - - VOIDED - SentToContact: - description: Boolean to set whether the invoice in the Xero app should be marked as “sent”. This can be set only on invoices that have been approved - type: boolean - ExpectedPaymentDate: - description: Shown on sales invoices (Accounts Receivable) when this has been set - type: string - x-is-msdate: true - PlannedPaymentDate: - description: Shown on bills (Accounts Payable) when this has been set - type: string - x-is-msdate: true - CISDeduction: - description: CIS deduction for UK contractors - readOnly: true - type: number - format: double - x-is-money: true - CISRate: - description: CIS Deduction rate for the organisation - type: number - format: double - readOnly: true - x-is-money: true - SubTotal: - description: Total of invoice excluding taxes - readOnly: true - type: number - format: double - x-is-money: true - TotalTax: - description: Total tax on invoice - readOnly: true - type: number - format: double - x-is-money: true - Total: - description: Total of Invoice tax inclusive (i.e. SubTotal + TotalTax). This will be ignored if it doesn’t equal the sum of the LineAmounts - readOnly: true - type: number - format: double - x-is-money: true - TotalDiscount: - description: Total of discounts applied on the invoice line items - readOnly: true - type: number - format: double - x-is-money: true - InvoiceID: - description: Xero generated unique identifier for invoice - type: string - format: uuid - RepeatingInvoiceID: - description: Xero generated unique identifier for repeating invoices - type: string - format: uuid - HasAttachments: - description: boolean to indicate if an invoice has an attachment - readOnly: true - type: boolean - default: "false" - example: "false" - IsDiscounted: - description: boolean to indicate if an invoice has a discount - readOnly: true - type: boolean - Payments: - description: See Payments - readOnly: true - type: array - items: - $ref: '#/components/schemas/Payment' - Prepayments: - description: See Prepayments - readOnly: true - type: array - items: - $ref: '#/components/schemas/Prepayment' - Overpayments: - description: See Overpayments - readOnly: true - type: array - items: - $ref: '#/components/schemas/Overpayment' - AmountDue: - description: Amount remaining to be paid on invoice - readOnly: true - type: number - format: double - x-is-money: true - AmountPaid: - description: Sum of payments received for invoice - readOnly: true - type: number - format: double - x-is-money: true - FullyPaidOnDate: - description: The date the invoice was fully paid. Only returned on fully paid invoices - readOnly: true - type: string - x-is-msdate: true - AmountCredited: - description: Sum of all credit notes, over-payments and pre-payments applied to - invoice - readOnly: true - type: number - format: double - x-is-money: true - UpdatedDateUTC: - description: Last modified date UTC format - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - CreditNotes: - description: Details of credit notes that have been applied to an invoice - readOnly: true - type: array - items: - $ref: '#/components/schemas/CreditNote' - Attachments: - description: Displays array of attachments from the API - type: array - items: - $ref: '#/components/schemas/Attachment' - HasErrors: - description: A boolean to indicate if a invoice has an validation errors - type: boolean - default: "false" - example: "false" - StatusAttributeString: - description: A string to indicate if a invoice status - type: string - ValidationErrors: - description: Displays array of validation error messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - Warnings: - description: Displays array of warning messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - InvoiceAddresses: - description: An array of addresses used to auto calculate sales tax - type: array - items: - $ref: '#/components/schemas/InvoiceAddress' - type: object - OnlineInvoices: - type: object - x-objectArrayKey: online_invoices - properties: - OnlineInvoices: - type: array - items: - $ref: '#/components/schemas/OnlineInvoice' - OnlineInvoice: - externalDocs: - url: 'http://developer.xero.com/documentation/api/invoices/' - properties: - OnlineInvoiceUrl: - description: the URL to an online invoice - type: string - type: object - InvoiceReminders: - type: object - x-objectArrayKey: invoice_reminders - properties: - InvoiceReminders: - type: array - items: - $ref: '#/components/schemas/InvoiceReminder' - InvoiceReminder: - externalDocs: - url: 'http://developer.xero.com/documentation/api/invoice-reminders/' - properties: - Enabled: - description: setting for on or off - type: boolean - type: object - Items: - type: object - x-objectArrayKey: items - properties: - Items: - type: array - items: - $ref: '#/components/schemas/Item' - Item: - externalDocs: - url: 'http://developer.xero.com/documentation/api/items/' - properties: - Code: - description: User defined item code (max length = 30) - maxLength: 30 - type: string - InventoryAssetAccountCode: - description: The inventory asset account for the item. The account must be of - type INVENTORY. The COGSAccountCode in PurchaseDetails is also - required to create a tracked item - type: string - Name: - description: The name of the item (max length = 50) - maxLength: 50 - type: string - IsSold: - description: Boolean value, defaults to true. When IsSold is true the item will - be available on sales transactions in the Xero UI. If IsSold is - updated to false then Description and SalesDetails values will be - nulled. - type: boolean - IsPurchased: - description: Boolean value, defaults to true. When IsPurchased is true the item - is available for purchase transactions in the Xero UI. If - IsPurchased is updated to false then PurchaseDescription and - PurchaseDetails values will be nulled. - type: boolean - Description: - description: The sales description of the item (max length = 4000) - maxLength: 4000 - type: string - PurchaseDescription: - description: The purchase description of the item (max length = 4000) - maxLength: 4000 - type: string - PurchaseDetails: - $ref: '#/components/schemas/Purchase' - SalesDetails: - $ref: '#/components/schemas/Purchase' - IsTrackedAsInventory: - description: True for items that are tracked as inventory. An item will be - tracked as inventory if the InventoryAssetAccountCode and - COGSAccountCode are set. - type: boolean - TotalCostPool: - description: The value of the item on hand. Calculated using average cost - accounting. - type: number - format: double - x-is-money: true - QuantityOnHand: - description: The quantity of the item on hand - type: number - format: double - x-is-money: true - UpdatedDateUTC: - description: Last modified date in UTC format - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - ItemID: - description: The Xero identifier for an Item - type: string - format: uuid - StatusAttributeString: - description: Status of object - type: string - ValidationErrors: - description: Displays array of validation error messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - required: - - Code - type: object - Purchase: - externalDocs: - url: 'http://developer.xero.com/documentation/api/items/' - properties: - UnitPrice: - description: Unit Price of the item. By default UnitPrice is rounded to two - decimal places. You can use 4 decimal places by adding the unitdp=4 - querystring parameter to your request. - type: number - format: double - x-is-money: true - AccountCode: - description: Default account code to be used for purchased/sale. Not applicable to the purchase details of tracked items - type: string - COGSAccountCode: - description: Cost of goods sold account. Only applicable to the purchase details of tracked items. - type: string - TaxType: - description: The tax type from TaxRates - type: string - type: object - Journals: - type: object - x-objectArrayKey: journals - properties: - Warnings: - description: Displays array of warning messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - Journals: - type: array - items: - $ref: '#/components/schemas/Journal' - Journal: - externalDocs: - url: 'http://developer.xero.com/documentation/api/journals/' - properties: - JournalID: - description: Xero identifier - type: string - format: uuid - JournalDate: - description: Date the journal was posted - type: string - x-is-msdate: true - JournalNumber: - description: Xero generated journal number - type: integer - CreatedDateUTC: - description: Created date UTC format - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - Reference: - description: reference field for additional indetifying information - type: string - SourceID: - description: The identifier for the source transaction (e.g. InvoiceID) - type: string - format: uuid - SourceType: - description: The journal source type. The type of transaction that created the - journal - type: string - enum: - - ACCREC - - ACCPAY - - ACCRECCREDIT - - ACCPAYCREDIT - - ACCRECPAYMENT - - ACCPAYPAYMENT - - ARCREDITPAYMENT - - APCREDITPAYMENT - - CASHREC - - CASHPAID - - TRANSFER - - ARPREPAYMENT - - APPREPAYMENT - - AROVERPAYMENT - - APOVERPAYMENT - - EXPCLAIM - - EXPPAYMENT - - MANJOURNAL - - PAYSLIP - - WAGEPAYABLE - - INTEGRATEDPAYROLLPE - - INTEGRATEDPAYROLLPT - - EXTERNALSPENDMONEY - - INTEGRATEDPAYROLLPTPAYMENT - - INTEGRATEDPAYROLLCN - JournalLines: - description: See JournalLines - type: array - items: - $ref: '#/components/schemas/JournalLine' - type: object - JournalLine: - externalDocs: - url: 'https://developer.xero.com/documentation/api/journals#JournalLines' - properties: - JournalLineID: - description: Xero identifier for Journal - type: string - format: uuid - example: 7be9db36-3598-4755-ba5c-c2dbc8c4a7a2 - AccountID: - description: See Accounts - type: string - format: uuid - example: ceef66a5-a545-413b-9312-78a53caadbc4 - AccountCode: - description: See Accounts - type: string - example: 090 - AccountType: - $ref: '#/components/schemas/AccountType' - type: string - AccountName: - description: See AccountCodes - type: string - example: Checking Account - Description: - description: The description from the source transaction line item. Only returned if populated. - type: string - example: My business checking account - NetAmount: - description: Net amount of journal line. This will be a positive value for a debit and negative for a credit - type: number - format: double - x-is-money: true - example: 4130.98 - GrossAmount: - description: Gross amount of journal line (NetAmount + TaxAmount). - type: number - format: double - x-is-money: true - example: 4130.98 - TaxAmount: - description: Total tax on a journal line - type: number - format: double - x-is-money: true - readOnly: true - example: 0.00 - TaxType: - description: The tax type from taxRates - type: string - TaxName: - description: see TaxRates - type: string - example: Tax Exempt - TrackingCategories: - description: Optional Tracking Category – see Tracking. Any JournalLine can have a maximum of 2 elements. - type: array - items: - $ref: '#/components/schemas/TrackingCategory' - type: object - LinkedTransactions: - type: object - x-objectArrayKey: linked_transactions - properties: - LinkedTransactions: - type: array - items: - $ref: '#/components/schemas/LinkedTransaction' - LinkedTransaction: - externalDocs: - url: 'http://developer.xero.com/documentation/api/linked-transactions/' - properties: - SourceTransactionID: - description: Filter by the SourceTransactionID. Get all the linked transactions created from a particular ACCPAY invoice - type: string - format: uuid - SourceLineItemID: - description: The line item identifier from the source transaction. - type: string - format: uuid - ContactID: - description: Filter by the combination of ContactID and Status. Get all the - linked transactions that have been assigned to a particular customer - and have a particular status e.g. GET - /LinkedTransactions?ContactID=4bb34b03-3378-4bb2-a0ed-6345abf3224e&Status=APPROVED. - type: string - format: uuid - TargetTransactionID: - description: Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice - type: string - format: uuid - TargetLineItemID: - description: The line item identifier from the target transaction. It is possible to link multiple billable expenses to the same TargetLineItemID. - type: string - format: uuid - LinkedTransactionID: - description: The Xero identifier for an Linked Transaction e.g./LinkedTransactions/297c2dc5-cc47-4afd-8ec8-74990b8761e9 - type: string - format: uuid - Status: - description: Filter by the combination of ContactID and Status. Get all the - linked transactions that have been assigned to a particular customer - and have a particular status e.g. GET - /LinkedTransactions?ContactID=4bb34b03-3378-4bb2-a0ed-6345abf3224e&Status=APPROVED. - type: string - enum: - - APPROVED - - DRAFT - - ONDRAFT - - BILLED - - VOIDED - Type: - description: This will always be BILLABLEEXPENSE. More types may be added in - future. - type: string - enum: - - BILLABLEEXPENSE - UpdatedDateUTC: - description: The last modified date in UTC format - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - SourceTransactionTypeCode: - description: The Type of the source tranasction. This will be ACCPAY if the - linked transaction was created from an invoice and SPEND if it was - created from a bank transaction. - type: string - enum: - - ACCPAY - - SPEND - ValidationErrors: - description: Displays array of validation error messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - type: object - ManualJournals: - type: object - x-objectArrayKey: manual_journals - properties: - pagination: - $ref: '#/components/schemas/Pagination' - Warnings: - description: Displays array of warning messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - ManualJournals: - type: array - items: - $ref: '#/components/schemas/ManualJournal' - ManualJournal: - externalDocs: - url: 'http://developer.xero.com/documentation/api/manual-journals/' - properties: - Narration: - description: Description of journal being posted - type: string - JournalLines: - description: See JournalLines - type: array - items: - $ref: '#/components/schemas/ManualJournalLine' - Date: - description: Date journal was posted – YYYY-MM-DD - type: string - x-is-msdate: true - LineAmountTypes: - $ref: '#/components/schemas/LineAmountTypes' - type: string - Status: - description: See Manual Journal Status Codes - type: string - enum: - - DRAFT - - POSTED - - DELETED - - VOIDED - - ARCHIVED - Url: - description: Url link to a source document – shown as “Go to [appName]” in the - Xero app - type: string - ShowOnCashBasisReports: - description: Boolean – default is true if not specified - type: boolean - HasAttachments: - description: Boolean to indicate if a manual journal has an attachment - readOnly: true - type: boolean - default: "false" - example: "false" - UpdatedDateUTC: - description: Last modified date UTC format - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - ManualJournalID: - description: The Xero identifier for a Manual Journal - type: string - format: uuid - StatusAttributeString: - description: A string to indicate if a invoice status - type: string - example: ERROR - Warnings: - description: Displays array of warning messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - ValidationErrors: - description: Displays array of validation error messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - Attachments: - description: Displays array of attachments from the API - type: array - items: - $ref: '#/components/schemas/Attachment' - required: - - Narration - type: object - ManualJournalLine: - externalDocs: - url: 'http://developer.xero.com/documentation/api/manual-journals/' - properties: - LineAmount: - description: 'total for line. Debits are positive, credits are negative value' - type: number - format: double - x-is-money: true - example: -2569.00 - AccountCode: - description: See Accounts - type: string - example: 720 - AccountID: - description: See Accounts - type: string - format: uuid - Description: - description: Description for journal line - type: string - example: Coded incorrectly Office Equipment should be Computer Equipment - TaxType: - description: The tax type from TaxRates - type: string - Tracking: - description: Optional Tracking Category – see Tracking. Any JournalLine can have a maximum of 2 elements. - type: array - items: - $ref: '#/components/schemas/TrackingCategory' - TaxAmount: - description: The calculated tax amount based on the TaxType and LineAmount - type: number - format: double - x-is-money: true - example: 0.00 - IsBlank: - description: is the line blank - type: boolean - example: false - type: object - Actions: - type: object - x-objectArrayKey: actions - properties: - Actions: - type: array - items: - $ref: '#/components/schemas/Action' - Action: - externalDocs: - url: 'http://developer.xero.com/documentation/api/organisation/' - properties: - Name: - description: Name of the actions for this organisation - type: string - example: UseMulticurrency - Status: - description: Status of the action for this organisation - type: string - enum: - - ALLOWED - - NOT-ALLOWED - Organisations: - type: object - x-objectArrayKey: organisations - properties: - Organisations: - type: array - items: - $ref: '#/components/schemas/Organisation' - Organisation: - externalDocs: - url: 'http://developer.xero.com/documentation/api/organisation/' - properties: - OrganisationID: - description: Unique Xero identifier - type: string - format: uuid - example: 8be9db36-3598-4755-ba5c-c2dbc8c4a7a2 - APIKey: - description: Display a unique key used for Xero-to-Xero transactions - type: string - Name: - description: Display name of organisation shown in Xero - type: string - LegalName: - description: Organisation name shown on Reports - type: string - PaysTax: - description: Boolean to describe if organisation is registered with a local tax - authority i.e. true, false - type: boolean - Version: - description: See Version Types - type: string - enum: - - AU - - NZ - - GLOBAL - - UK - - US - - AUONRAMP - - NZONRAMP - - GLOBALONRAMP - - UKONRAMP - - USONRAMP - OrganisationType: - description: Organisation Type - type: string - enum: - - ACCOUNTING_PRACTICE - - COMPANY - - CHARITY - - CLUB_OR_SOCIETY - - INDIVIDUAL - - LOOK_THROUGH_COMPANY - - NOT_FOR_PROFIT - - PARTNERSHIP - - S_CORPORATION - - SELF_MANAGED_SUPERANNUATION_FUND - - SOLE_TRADER - - SUPERANNUATION_FUND - - TRUST - BaseCurrency: - $ref: '#/components/schemas/CurrencyCode' - type: string - CountryCode: - $ref: '#/components/schemas/CountryCode' - type: string - IsDemoCompany: - description: Boolean to describe if organisation is a demo company. - type: boolean - OrganisationStatus: - description: Will be set to ACTIVE if you can connect to organisation via the - Xero API - type: string - RegistrationNumber: - description: Shows for New Zealand, Australian and UK organisations - type: string - EmployerIdentificationNumber: - description: Shown if set. US Only. - type: string - TaxNumber: - description: Shown if set. Displays in the Xero UI as Tax File Number (AU), GST - Number (NZ), VAT Number (UK) and Tax ID Number (US & Global). - type: string - FinancialYearEndDay: - description: Calendar day e.g. 0-31 - type: integer - FinancialYearEndMonth: - description: Calendar Month e.g. 1-12 - type: integer - SalesTaxBasis: - description: The accounting basis used for tax returns. See Sales Tax Basis - type: string - enum: - - PAYMENTS - - INVOICE - - NONE - - CASH - - ACCRUAL - - FLATRATECASH - - FLATRATEACCRUAL - - ACCRUALS - SalesTaxPeriod: - description: The frequency with which tax returns are processed. See Sales Tax - Period - type: string - enum: - - MONTHLY - - QUARTERLY1 - - QUARTERLY2 - - QUARTERLY3 - - ANNUALLY - - ONEMONTHS - - TWOMONTHS - - SIXMONTHS - - 1MONTHLY - - 2MONTHLY - - 3MONTHLY - - 6MONTHLY - - QUARTERLY - - YEARLY - - NONE - DefaultSalesTax: - description: The default for LineAmountTypes on sales transactions - type: string - DefaultPurchasesTax: - description: The default for LineAmountTypes on purchase transactions - type: string - PeriodLockDate: - description: Shown if set. See lock dates - type: string - x-is-msdate: true - EndOfYearLockDate: - description: Shown if set. See lock dates - type: string - x-is-msdate: true - CreatedDateUTC: - description: Timestamp when the organisation was created in Xero - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - Timezone: - $ref: '#/components/schemas/TimeZone' - type: string - OrganisationEntityType: - description: Organisation Entity Type - type: string - enum: - - ACCOUNTING_PRACTICE - - COMPANY - - CHARITY - - CLUB_OR_SOCIETY - - INDIVIDUAL - - LOOK_THROUGH_COMPANY - - NOT_FOR_PROFIT - - PARTNERSHIP - - S_CORPORATION - - SELF_MANAGED_SUPERANNUATION_FUND - - SOLE_TRADER - - SUPERANNUATION_FUND - - TRUST - ShortCode: - description: A unique identifier for the organisation. Potential uses. - type: string - Class: - description: Organisation Classes describe which plan the Xero organisation is on (e.g. DEMO, TRIAL, PREMIUM) - type: string - enum: - - DEMO - - TRIAL - - STARTER - - STANDARD - - PREMIUM - - PREMIUM_20 - - PREMIUM_50 - - PREMIUM_100 - - LEDGER - - GST_CASHBOOK - - NON_GST_CASHBOOK - - ULTIMATE - - LITE - - ULTIMATE_10 - - ULTIMATE_20 - - ULTIMATE_50 - - ULTIMATE_100 - - IGNITE - - GROW - - COMPREHENSIVE - Edition: - description: BUSINESS or PARTNER. Partner edition organisations are sold exclusively through accounting partners and have restricted functionality (e.g. no access to invoicing) - type: string - enum: - - BUSINESS - - PARTNER - LineOfBusiness: - description: Description of business type as defined in Organisation settings - type: string - Addresses: - description: Address details for organisation – see Addresses - type: array - items: - $ref: '#/components/schemas/AddressForOrganisation' - Phones: - description: Phones details for organisation – see Phones - type: array - items: - $ref: '#/components/schemas/Phone' - ExternalLinks: - description: Organisation profile links for popular services such as Facebook,Twitter, GooglePlus and LinkedIn. You can also add link to your - website here. Shown if Organisation settings is updated in Xero. - See ExternalLinks below - type: array - items: - $ref: '#/components/schemas/ExternalLink' - PaymentTerms: - $ref: '#/components/schemas/PaymentTerm' - type: object - CountryCode: - type: string - enum: - - AD - - AE - - AF - - AG - - AI - - AL - - AM - - AN - - AO - - AQ - - AR - - AS - - AT - - AU - - AW - - AZ - - BA - - BB - - BD - - BE - - BF - - BG - - BH - - BI - - BJ - - BL - - BM - - BN - - BO - - BR - - BS - - BT - - BW - - BY - - BZ - - CA - - CC - - CD - - CF - - CG - - CH - - CI - - CK - - CL - - CM - - CN - - CO - - CR - - CU - - CV - - CW - - CX - - CY - - CZ - - DE - - DJ - - DK - - DM - - DO - - DZ - - EC - - EE - - EG - - EH - - ER - - ES - - ET - - FI - - FJ - - FK - - FM - - FO - - FR - - GA - - GB - - GD - - GE - - GG - - GH - - GI - - GL - - GM - - GN - - GQ - - GR - - GT - - GU - - GW - - GY - - HK - - HN - - HR - - HT - - HU - - ID - - IE - - IL - - IM - - IN - - IO - - IQ - - IR - - IS - - IT - - JE - - JM - - JO - - JP - - KE - - KG - - KH - - KI - - KM - - KN - - KP - - KR - - KW - - KY - - KZ - - LA - - LB - - LC - - LI - - LK - - LR - - LS - - LT - - LU - - LV - - LY - - MA - - MC - - MD - - ME - - MF - - MG - - MH - - MK - - ML - - MM - - MN - - MO - - MP - - 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 - - PW - - PY - - QA - - RE - - RO - - RS - - RU - - RW - - SA - - SB - - SC - - SD - - SE - - SG - - SH - - SI - - SJ - - SK - - SL - - SM - - SN - - SO - - SR - - SS - - ST - - SV - - SX - - SY - - SZ - - TC - - TD - - TG - - TH - - TJ - - TK - - TL - - TM - - TN - - TO - - TR - - TT - - TV - - TW - - TZ - - UA - - UG - - US - - UY - - UZ - - VA - - VC - - VE - - VG - - VI - - VN - - VU - - WF - - WS - - XK - - YE - - YT - - ZA - - ZM - - ZW - TimeZone: - description: Timezone specifications - type: string - enum: - - AFGHANISTANSTANDARDTIME - - ALASKANSTANDARDTIME - - ALEUTIANSTANDARDTIME - - ALTAISTANDARDTIME - - ARABIANSTANDARDTIME - - ARABICSTANDARDTIME - - ARABSTANDARDTIME - - ARGENTINASTANDARDTIME - - ASTRAKHANSTANDARDTIME - - ATLANTICSTANDARDTIME - - AUSCENTRALSTANDARDTIME - - AUSCENTRALWSTANDARDTIME - - AUSEASTERNSTANDARDTIME - - AZERBAIJANSTANDARDTIME - - AZORESSTANDARDTIME - - BAHIASTANDARDTIME - - BANGLADESHSTANDARDTIME - - BELARUSSTANDARDTIME - - BOUGAINVILLESTANDARDTIME - - CANADACENTRALSTANDARDTIME - - CAPEVERDESTANDARDTIME - - CAUCASUSSTANDARDTIME - - CENAUSTRALIASTANDARDTIME - - CENTRALAMERICASTANDARDTIME - - CENTRALASIASTANDARDTIME - - CENTRALBRAZILIANSTANDARDTIME - - CENTRALEUROPEANSTANDARDTIME - - CENTRALEUROPESTANDARDTIME - - CENTRALPACIFICSTANDARDTIME - - CENTRALSTANDARDTIME - - CENTRALSTANDARDTIME(MEXICO) - - CHATHAMISLANDSSTANDARDTIME - - CHINASTANDARDTIME - - CUBASTANDARDTIME - - DATELINESTANDARDTIME - - EAFRICASTANDARDTIME - - EASTERISLANDSTANDARDTIME - - EASTERNSTANDARDTIME - - EASTERNSTANDARDTIME(MEXICO) - - EAUSTRALIASTANDARDTIME - - EEUROPESTANDARDTIME - - EGYPTSTANDARDTIME - - EKATERINBURGSTANDARDTIME - - ESOUTHAMERICASTANDARDTIME - - FIJISTANDARDTIME - - FLESTANDARDTIME - - GEORGIANSTANDARDTIME - - GMTSTANDARDTIME - - GREENLANDSTANDARDTIME - - GREENWICHSTANDARDTIME - - GTBSTANDARDTIME - - HAITISTANDARDTIME - - HAWAIIANSTANDARDTIME - - INDIASTANDARDTIME - - IRANSTANDARDTIME - - ISRAELSTANDARDTIME - - JORDANSTANDARDTIME - - KALININGRADSTANDARDTIME - - KAMCHATKASTANDARDTIME - - KOREASTANDARDTIME - - LIBYASTANDARDTIME - - LINEISLANDSSTANDARDTIME - - LORDHOWESTANDARDTIME - - MAGADANSTANDARDTIME - - MAGALLANESSTANDARDTIME - - MARQUESASSTANDARDTIME - - MAURITIUSSTANDARDTIME - - MIDATLANTICSTANDARDTIME - - MIDDLEEASTSTANDARDTIME - - MONTEVIDEOSTANDARDTIME - - MOROCCOSTANDARDTIME - - MOUNTAINSTANDARDTIME - - MOUNTAINSTANDARDTIME(MEXICO) - - MYANMARSTANDARDTIME - - NAMIBIASTANDARDTIME - - NCENTRALASIASTANDARDTIME - - NEPALSTANDARDTIME - - NEWFOUNDLANDSTANDARDTIME - - NEWZEALANDSTANDARDTIME - - NORFOLKSTANDARDTIME - - NORTHASIAEASTSTANDARDTIME - - NORTHASIASTANDARDTIME - - NORTHKOREASTANDARDTIME - - OMSKSTANDARDTIME - - PACIFICSASTANDARDTIME - - PACIFICSTANDARDTIME - - PACIFICSTANDARDTIME(MEXICO) - - PAKISTANSTANDARDTIME - - PARAGUAYSTANDARDTIME - - QYZYLORDASTANDARDTIME - - ROMANCESTANDARDTIME - - RUSSIANSTANDARDTIME - - RUSSIATIMEZONE10 - - RUSSIATIMEZONE11 - - RUSSIATIMEZONE3 - - SAEASTERNSTANDARDTIME - - SAINTPIERRESTANDARDTIME - - SAKHALINSTANDARDTIME - - SAMOASTANDARDTIME - - SAOTOMESTANDARDTIME - - SAPACIFICSTANDARDTIME - - SARATOVSTANDARDTIME - - SAWESTERNSTANDARDTIME - - SEASIASTANDARDTIME - - SINGAPORESTANDARDTIME - - SOUTHAFRICASTANDARDTIME - - SOUTHSUDANSTANDARDTIME - - SRILANKASTANDARDTIME - - SUDANSTANDARDTIME - - SYRIASTANDARDTIME - - TAIPEISTANDARDTIME - - TASMANIASTANDARDTIME - - TOCANTINSSTANDARDTIME - - TOKYOSTANDARDTIME - - TOMSKSTANDARDTIME - - TONGASTANDARDTIME - - TRANSBAIKALSTANDARDTIME - - TURKEYSTANDARDTIME - - TURKSANDCAICOSSTANDARDTIME - - ULAANBAATARSTANDARDTIME - - USEASTERNSTANDARDTIME - - USMOUNTAINSTANDARDTIME - - UTC - - UTC+12 - - UTC+13 - - UTC02 - - UTC08 - - UTC09 - - UTC11 - - VENEZUELASTANDARDTIME - - VLADIVOSTOKSTANDARDTIME - - VOLGOGRADSTANDARDTIME - - WAUSTRALIASTANDARDTIME - - WCENTRALAFRICASTANDARDTIME - - WESTASIASTANDARDTIME - - WESTBANKSTANDARDTIME - - WESTPACIFICSTANDARDTIME - - WEUROPESTANDARDTIME - - WMONGOLIASTANDARDTIME - - YAKUTSKSTANDARDTIME - - YUKONSTANDARDTIME - PaymentTerm: - externalDocs: - url: 'http://developer.xero.com/documentation/api/organisation/' - properties: - Bills: - $ref: '#/components/schemas/Bill' - Sales: - $ref: '#/components/schemas/Bill' - type: object - PaymentTermType: - type: string - enum: - - DAYSAFTERBILLDATE - - DAYSAFTERBILLMONTH - - OFCURRENTMONTH - - OFFOLLOWINGMONTH - ExternalLink: - externalDocs: - url: 'http://developer.xero.com/documentation/api/organisation/' - properties: - LinkType: - description: See External link types - type: string - enum: - - Facebook - - GooglePlus - - LinkedIn - - Twitter - - Website - Url: - description: 'URL for service e.g. http://twitter.com/xeroapi' - type: string - Description: - type: string - type: object - Bill: - externalDocs: - url: 'http://developer.xero.com/documentation/api/organisation/' - properties: - Day: - description: Day of Month (0-31) - type: integer - Type: - $ref: '#/components/schemas/PaymentTermType' - type: object - Overpayments: - type: object - x-objectArrayKey: overpayments - properties: - pagination: - $ref: '#/components/schemas/Pagination' - Warnings: - description: Displays array of warning messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - Overpayments: - type: array - items: - $ref: '#/components/schemas/Overpayment' - Overpayment: - externalDocs: - url: 'http://developer.xero.com/documentation/api/overpayments/' - properties: - Type: - description: See Overpayment Types - type: string - enum: - - RECEIVE-OVERPAYMENT - - SPEND-OVERPAYMENT - - AROVERPAYMENT - Contact: - $ref: '#/components/schemas/Contact' - Date: - description: The date the overpayment is created YYYY-MM-DD - type: string - x-is-msdate: true - Status: - description: See Overpayment Status Codes - type: string - enum: - - AUTHORISED - - PAID - - VOIDED - LineAmountTypes: - $ref: '#/components/schemas/LineAmountTypes' - type: string - LineItems: - description: See Overpayment Line Items - type: array - items: - $ref: '#/components/schemas/LineItem' - SubTotal: - description: The subtotal of the overpayment excluding taxes - type: number - format: double - x-is-money: true - TotalTax: - description: The total tax on the overpayment - type: number - format: double - x-is-money: true - Total: - description: The total of the overpayment (subtotal + total tax) - type: number - format: double - x-is-money: true - UpdatedDateUTC: - description: UTC timestamp of last update to the overpayment - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - CurrencyCode: - $ref: '#/components/schemas/CurrencyCode' - type: string - OverpaymentID: - description: Xero generated unique identifier - type: string - format: uuid - CurrencyRate: - description: The currency rate for a multicurrency overpayment. If no rate is - specified, the XE.com day rate is used - type: number - format: double - x-is-money: true - RemainingCredit: - description: The remaining credit balance on the overpayment - type: number - format: double - x-is-money: true - Allocations: - description: See Allocations - type: array - items: - $ref: '#/components/schemas/Allocation' - AppliedAmount: - description: The amount of applied to an invoice - type: number - format: double - example: 2.00 - Payments: - description: See Payments - type: array - items: - $ref: '#/components/schemas/Payment' - HasAttachments: - description: boolean to indicate if a overpayment has an attachment - readOnly: true - type: boolean - default: "false" - example: "false" - Attachments: - description: See Attachments - type: array - items: - $ref: '#/components/schemas/Attachment' - type: object - Payments: - type: object - x-objectArrayKey: payments - properties: - pagination: - $ref: '#/components/schemas/Pagination' - Warnings: - description: Displays array of warning messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - Payments: - type: array - items: - $ref: '#/components/schemas/Payment' - PaymentDelete: - externalDocs: - url: 'http://developer.xero.com/documentation/api/payments/' - properties: - Status: - description: The status of the payment. - type: string - default: "DELETED" - required: - - Status - type: object - Payment: - externalDocs: - url: 'http://developer.xero.com/documentation/api/payments/' - properties: - Invoice: - $ref: '#/components/schemas/Invoice' - CreditNote: - $ref: '#/components/schemas/CreditNote' - Prepayment: - $ref: '#/components/schemas/Prepayment' - Overpayment: - $ref: '#/components/schemas/Overpayment' - InvoiceNumber: - description: Number of invoice or credit note you are applying payment to e.g.INV-4003 - type: string - CreditNoteNumber: - description: Number of invoice or credit note you are applying payment to e.g. INV-4003 - type: string - BatchPayment: - $ref: '#/components/schemas/BatchPayment' - Account: - $ref: '#/components/schemas/Account' - Code: - description: Code of account you are using to make the payment e.g. 001 (note- not all accounts have a code value) - type: string - Date: - description: Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06 - type: string - x-is-msdate: true - CurrencyRate: - description: Exchange rate when payment is received. Only used for non base currency invoices and credit notes e.g. 0.7500 - type: number - format: double - x-is-money: true - Amount: - description: The amount of the payment. Must be less than or equal to the - outstanding amount owing on the invoice e.g. 200.00 - type: number - format: double - x-is-money: true - BankAmount: - description: The amount of the payment in the currency of the bank account. - type: number - format: double - x-is-money: true - Reference: - description: An optional description for the payment e.g. Direct Debit - type: string - IsReconciled: - description: An optional parameter for the payment. A boolean indicating whether you would like the payment to be created as reconciled when using - PUT, or whether a payment has been reconciled when using GET - type: boolean - Status: - description: The status of the payment. - type: string - enum: - - AUTHORISED - - DELETED - PaymentType: - description: See Payment Types. - readOnly: true - type: string - enum: - - ACCRECPAYMENT - - ACCPAYPAYMENT - - ARCREDITPAYMENT - - APCREDITPAYMENT - - AROVERPAYMENTPAYMENT - - ARPREPAYMENTPAYMENT - - APPREPAYMENTPAYMENT - - APOVERPAYMENTPAYMENT - UpdatedDateUTC: - description: UTC timestamp of last update to the payment - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - PaymentID: - description: The Xero identifier for an Payment e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9 - type: string - format: uuid - example: 00000000-0000-0000-0000-000000000000 - BatchPaymentID: - description: Present if the payment was created as part of a batch. - type: string - format: uuid - example: 00000000-0000-0000-0000-000000000000 - BankAccountNumber: - description: The suppliers bank account number the payment is being made to - type: string - Particulars: - description: The suppliers bank account number the payment is being made to - type: string - Details: - description: The information to appear on the supplier's bank account - type: string - HasAccount: - description: A boolean to indicate if a contact has an validation errors - type: boolean - default: "false" - example: "false" - HasValidationErrors: - description: A boolean to indicate if a contact has an validation errors - type: boolean - default: "false" - example: "false" - StatusAttributeString: - description: A string to indicate if a invoice status - type: string - ValidationErrors: - description: Displays array of validation error messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - Warnings: - description: Displays array of warning messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - type: object - Prepayments: - type: object - x-objectArrayKey: prepayments - properties: - pagination: - $ref: '#/components/schemas/Pagination' - Warnings: - description: Displays array of warning messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - Prepayments: - type: array - items: - $ref: '#/components/schemas/Prepayment' - Prepayment: - externalDocs: - url: 'http://developer.xero.com/documentation/api/prepayments/' - properties: - Type: - description: See Prepayment Types - type: string - enum: - - RECEIVE-PREPAYMENT - - SPEND-PREPAYMENT - - ARPREPAYMENT - - APPREPAYMENT - Contact: - $ref: '#/components/schemas/Contact' - Date: - description: The date the prepayment is created YYYY-MM-DD - type: string - x-is-msdate: true - Status: - description: See Prepayment Status Codes - type: string - enum: - - AUTHORISED - - PAID - - VOIDED - LineAmountTypes: - $ref: '#/components/schemas/LineAmountTypes' - type: string - LineItems: - description: See Prepayment Line Items - type: array - items: - $ref: '#/components/schemas/LineItem' - SubTotal: - description: The subtotal of the prepayment excluding taxes - type: number - format: double - x-is-money: true - TotalTax: - description: The total tax on the prepayment - type: number - format: double - x-is-money: true - Total: - description: The total of the prepayment(subtotal + total tax) - type: number - format: double - x-is-money: true - Reference: - description: Returns Invoice number field. Reference field isn't available. - type: string - readOnly: true - UpdatedDateUTC: - description: UTC timestamp of last update to the prepayment - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - CurrencyCode: - $ref: '#/components/schemas/CurrencyCode' - type: string - PrepaymentID: - description: Xero generated unique identifier - type: string - format: uuid - CurrencyRate: - description: The currency rate for a multicurrency prepayment. If no rate is - specified, the XE.com day rate is used - type: number - format: double - x-is-money: true - RemainingCredit: - description: The remaining credit balance on the prepayment - type: number - format: double - x-is-money: true - Allocations: - description: See Allocations - type: array - items: - $ref: '#/components/schemas/Allocation' - Payments: - description: See Payments - type: array - items: - $ref: '#/components/schemas/Payment' - AppliedAmount: - description: The amount of applied to an invoice - type: number - format: double - example: 2.00 - HasAttachments: - description: boolean to indicate if a prepayment has an attachment - readOnly: true - type: boolean - default: "false" - example: "false" - Attachments: - description: See Attachments - type: array - items: - $ref: '#/components/schemas/Attachment' - type: object - PurchaseOrders: - type: object - x-objectArrayKey: purchase_orders - properties: - pagination: - $ref: '#/components/schemas/Pagination' - Warnings: - description: Displays array of warning messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - PurchaseOrders: - type: array - items: - $ref: '#/components/schemas/PurchaseOrder' - PurchaseOrder: - externalDocs: - url: 'http://developer.xero.com/documentation/api/purchase-orders/' - properties: - Contact: - $ref: '#/components/schemas/Contact' - LineItems: - description: See LineItems - type: array - items: - $ref: '#/components/schemas/LineItem' - Date: - description: Date purchase order was issued – YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the - timezone setting of the organisation - type: string - x-is-msdate: true - DeliveryDate: - description: Date the goods are to be delivered – YYYY-MM-DD - type: string - x-is-msdate: true - LineAmountTypes: - $ref: '#/components/schemas/LineAmountTypes' - type: string - PurchaseOrderNumber: - description: Unique alpha numeric code identifying purchase order (when missing - will auto-generate from your Organisation Invoice Settings) - type: string - Reference: - description: Additional reference number - type: string - BrandingThemeID: - description: See BrandingThemes - type: string - format: uuid - CurrencyCode: - $ref: '#/components/schemas/CurrencyCode' - type: string - Status: - description: See Purchase Order Status Codes - type: string - enum: - - DRAFT - - SUBMITTED - - AUTHORISED - - BILLED - - DELETED - SentToContact: - description: Boolean to set whether the purchase order should be marked as - “sent”. This can be set only on purchase orders that have been - approved or billed - type: boolean - DeliveryAddress: - description: The address the goods are to be delivered to - type: string - AttentionTo: - description: The person that the delivery is going to - type: string - Telephone: - description: The phone number for the person accepting the delivery - type: string - DeliveryInstructions: - description: A free text feild for instructions (500 characters max) - type: string - ExpectedArrivalDate: - description: The date the goods are expected to arrive. - type: string - x-is-msdate: true - PurchaseOrderID: - description: Xero generated unique identifier for purchase order - type: string - format: uuid - CurrencyRate: - description: The currency rate for a multicurrency purchase order. If no rate is specified, the XE.com day rate is used. - type: number - format: double - x-is-money: true - SubTotal: - description: Total of purchase order excluding taxes - readOnly: true - type: number - format: double - x-is-money: true - TotalTax: - description: Total tax on purchase order - readOnly: true - type: number - format: double - x-is-money: true - Total: - description: Total of Purchase Order tax inclusive (i.e. SubTotal + TotalTax) - readOnly: true - type: number - format: double - x-is-money: true - TotalDiscount: - description: Total of discounts applied on the purchase order line items - readOnly: true - type: number - format: double - x-is-money: true - HasAttachments: - description: boolean to indicate if a purchase order has an attachment - readOnly: true - type: boolean - default: "false" - example: "false" - UpdatedDateUTC: - description: Last modified date UTC format - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - StatusAttributeString: - description: A string to indicate if a invoice status - type: string - ValidationErrors: - description: Displays array of validation error messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - Warnings: - description: Displays array of warning messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - Attachments: - description: Displays array of attachments from the API - type: array - items: - $ref: '#/components/schemas/Attachment' - type: object - Pagination: - type: object - properties: - page: - type: integer - pageSize: - type: integer - pageCount: - type: integer - itemCount: - type: integer - Quotes: - type: object - x-objectArrayKey: quotes - properties: - Quotes: - type: array - items: - $ref: '#/components/schemas/Quote' - Quote: - externalDocs: - url: 'http://developer.xero.com/documentation/api/Quotes/' - properties: - QuoteID: - description: QuoteID GUID is automatically generated and is returned after create or GET. - type: string - format: uuid - QuoteNumber: - description: Unique alpha numeric code identifying a quote (Max Length = 255) - maxLength: 255 - type: string - Reference: - description: Additional reference number - maxLength: 4000 - type: string - Terms: - description: Terms of the quote - maxLength: 4000 - type: string - Contact: - $ref: '#/components/schemas/Contact' - type: string - LineItems: - description: See LineItems - type: array - items: - $ref: '#/components/schemas/LineItem' - Date: - description: Date quote was issued – YYYY-MM-DD. If the Date element is not specified it will default to the current date based on the timezone setting of the organisation - type: string - x-is-msdate: true - DateString: - description: Date the quote was issued (YYYY-MM-DD) - type: string - ExpiryDate: - description: Date the quote expires – YYYY-MM-DD. - type: string - x-is-msdate: true - ExpiryDateString: - description: Date the quote expires – YYYY-MM-DD. - type: string - Status: - $ref: '#/components/schemas/QuoteStatusCodes' - type: string - CurrencyCode: - $ref: '#/components/schemas/CurrencyCode' - type: string - CurrencyRate: - description: The currency rate for a multicurrency quote - type: number - format: double - SubTotal: - description: Total of quote excluding taxes. - readOnly: true - type: number - format: double - x-is-money: true - TotalTax: - description: Total tax on quote - readOnly: true - type: number - format: double - x-is-money: true - Total: - description: Total of Quote tax inclusive (i.e. SubTotal + TotalTax). This will be ignored if it doesn’t equal the sum of the LineAmounts - readOnly: true - type: number - format: double - x-is-money: true - TotalDiscount: - description: Total of discounts applied on the quote line items - readOnly: true - type: number - format: double - x-is-money: true - Title: - description: Title text for the quote - type: string - maxLength: 100 - Summary: - description: Summary text for the quote - type: string - maxLength: 3000 - BrandingThemeID: - description: See BrandingThemes - type: string - format: uuid - UpdatedDateUTC: - description: Last modified date UTC format - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - LineAmountTypes: - $ref: '#/components/schemas/QuoteLineAmountTypes' - type: string - description: See Quote Line Amount Types - StatusAttributeString: - description: A string to indicate if a invoice status - type: string - ValidationErrors: - description: Displays array of validation error messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - type: object - QuoteLineAmountTypes: - description: Line amounts are exclusive of tax by default if you don’t specify this element. See Line Amount Types - type: string - enum: - - EXCLUSIVE - - INCLUSIVE - - NOTAX - QuoteStatusCodes: - description: The status of the quote. - type: string - enum: - - DRAFT - - SENT - - DECLINED - - ACCEPTED - - INVOICED - - DELETED - Receipts: - type: object - x-objectArrayKey: receipts - properties: - Receipts: - type: array - items: - $ref: '#/components/schemas/Receipt' - Receipt: - externalDocs: - url: 'http://developer.xero.com/documentation/api/receipts/' - properties: - Date: - description: Date of receipt – YYYY-MM-DD - type: string - x-is-msdate: true - Contact: - $ref: '#/components/schemas/Contact' - LineItems: - type: array - items: - $ref: '#/components/schemas/LineItem' - User: - $ref: '#/components/schemas/User' - Reference: - description: Additional reference number - type: string - LineAmountTypes: - $ref: '#/components/schemas/LineAmountTypes' - type: string - SubTotal: - description: Total of receipt excluding taxes - type: number - format: double - x-is-money: true - TotalTax: - description: Total tax on receipt - type: number - format: double - x-is-money: true - Total: - description: Total of receipt tax inclusive (i.e. SubTotal + TotalTax) - type: number - format: double - x-is-money: true - ReceiptID: - description: Xero generated unique identifier for receipt - type: string - format: uuid - Status: - description: Current status of receipt – see status types - type: string - enum: - - DRAFT - - SUBMITTED - - AUTHORISED - - DECLINED - - VOIDED - ReceiptNumber: - description: Xero generated sequence number for receipt in current claim for a given user - readOnly: true - type: string - UpdatedDateUTC: - description: Last modified date UTC format - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - HasAttachments: - description: boolean to indicate if a receipt has an attachment - readOnly: true - type: boolean - default: "false" - example: "false" - Url: - description: URL link to a source document – shown as “Go to [appName]” in the Xero app - readOnly: true - type: string - ValidationErrors: - description: Displays array of validation error messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - Warnings: - description: Displays array of warning messages from the API - type: array - items: - $ref: '#/components/schemas/ValidationError' - Attachments: - description: Displays array of attachments from the API - type: array - items: - $ref: '#/components/schemas/Attachment' - type: object - RepeatingInvoices: - type: object - x-objectArrayKey: repeating_invoices - properties: - RepeatingInvoices: - type: array - items: - $ref: '#/components/schemas/RepeatingInvoice' - RepeatingInvoice: - externalDocs: - url: 'http://developer.xero.com/documentation/api/repeating-invoices/' - properties: - Type: - description: See Invoice Types - type: string - enum: - - ACCPAY - - ACCREC - Contact: - $ref: '#/components/schemas/Contact' - Schedule: - $ref: '#/components/schemas/Schedule' - LineItems: - description: See LineItems - type: array - items: - $ref: '#/components/schemas/LineItem' - LineAmountTypes: - $ref: '#/components/schemas/LineAmountTypes' - type: string - Reference: - description: ACCREC only – additional reference number - type: string - BrandingThemeID: - description: See BrandingThemes - type: string - format: uuid - CurrencyCode: - $ref: '#/components/schemas/CurrencyCode' - type: string - Status: - description: One of the following - DRAFT or AUTHORISED – See Invoice Status - Codes - type: string - enum: - - DRAFT - - AUTHORISED - - DELETED - SubTotal: - description: Total of invoice excluding taxes - type: number - format: double - x-is-money: true - TotalTax: - description: Total tax on invoice - type: number - format: double - x-is-money: true - Total: - description: Total of Invoice tax inclusive (i.e. SubTotal + TotalTax) - type: number - format: double - x-is-money: true - RepeatingInvoiceID: - description: Xero generated unique identifier for repeating invoice template - type: string - format: uuid - ID: - description: Xero generated unique identifier for repeating invoice template - type: string - format: uuid - HasAttachments: - description: Boolean to indicate if an invoice has an attachment - readOnly: true - type: boolean - default: "false" - example: "false" - Attachments: - description: Displays array of attachments from the API - type: array - items: - $ref: '#/components/schemas/Attachment' - ApprovedForSending: - description: Boolean to indicate whether the invoice has been approved for sending - type: boolean - default: "false" - example: "false" - SendCopy: - description: Boolean to indicate whether a copy is sent to sender's email - type: boolean - default: "false" - example: "false" - MarkAsSent: - description: Boolean to indicate whether the invoice in the Xero app displays as "sent" - type: boolean - default: "false" - example: "false" - IncludePDF: - description: Boolean to indicate whether to include PDF attachment - type: boolean - default: "false" - example: "false" - type: object - ReportWithRows: - type: object - properties: - Reports: - type: array - items: - $ref: '#/components/schemas/ReportWithRow' - ReportWithRow: - externalDocs: - url: 'http://developer.xero.com/documentation/api/reports/' - properties: - ReportID: - description: ID of the Report - type: string - ReportName: - description: Name of the report - type: string - ReportTitle: - description: Title of the report - type: string - ReportType: - description: The type of report (BalanceSheet,ProfitLoss, etc) - type: string - ReportTitles: - description: Report titles array (3 to 4 strings with the report name, orgnisation name and time frame of report) - type: array - items: - type: string - ReportDate: - description: Date of report - type: string - Rows: - type: array - items: - $ref: '#/components/schemas/ReportRows' - UpdatedDateUTC: - description: Updated Date - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - Fields: - type: array - items: - $ref: '#/components/schemas/ReportFields' - ReportRows: - type: object - properties: - RowType: - $ref: '#/components/schemas/RowType' - Title: - type: string - Cells: - type: array - items: - $ref: '#/components/schemas/ReportCell' - Rows: - type: array - items: - $ref: '#/components/schemas/ReportRow' - RowType: - type: string - enum: - - Header - - Section - - Row - - SummaryRow - ReportRow: - type: object - properties: - RowType: - $ref: '#/components/schemas/RowType' - Title: - type: string - Cells: - type: array - items: - $ref: '#/components/schemas/ReportCell' - ReportCell: - type: object - properties: - Value: - type: string - Attributes: - type: array - items: - $ref: '#/components/schemas/ReportAttribute' - ReportAttribute: - externalDocs: - url: 'http://developer.xero.com/documentation/api/reports/' - properties: - Id: - type: string - Value: - type: string - ReportFields: - type: object - properties: - FieldID: - type: string - Description: - type: string - Value: - type: string - Reports: - type: object - x-objectArrayKey: reports - properties: - Reports: - type: array - items: - $ref: '#/components/schemas/Report' - Report: - externalDocs: - url: 'http://developer.xero.com/documentation/api/reports/' - properties: - ReportName: - description: See Prepayment Types - type: string - ReportType: - description: See Prepayment Types - type: string - enum: - - AgedPayablesByContact - ReportTitle: - description: See Prepayment Types - type: string - ReportDate: - description: Date of report - type: string - UpdatedDateUTC: - description: Updated Date - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - Contacts: - type: array - items: - $ref: '#/components/schemas/TenNinetyNineContact' - TenNinetyNineContact: - properties: - Box1: - description: Box 1 on 1099 Form - type: number - format: double - x-is-money: true - Box2: - description: Box 2 on 1099 Form - type: number - format: double - x-is-money: true - Box3: - description: Box 3 on 1099 Form - type: number - format: double - x-is-money: true - Box4: - description: Box 4 on 1099 Form - type: number - format: double - x-is-money: true - Box5: - description: Box 5 on 1099 Form - type: number - format: double - x-is-money: true - Box6: - description: Box 6 on 1099 Form - type: number - format: double - x-is-money: true - Box7: - description: Box 7 on 1099 Form - type: number - format: double - x-is-money: true - Box8: - description: Box 8 on 1099 Form - type: number - format: double - x-is-money: true - Box9: - description: Box 9 on 1099 Form - type: number - format: double - x-is-money: true - Box10: - description: Box 10 on 1099 Form - type: number - format: double - x-is-money: true - Box11: - description: Box 11 on 1099 Form - type: number - format: double - x-is-money: true - Box13: - description: Box 13 on 1099 Form - type: number - format: double - x-is-money: true - Box14: - description: Box 14 on 1099 Form - type: number - format: double - x-is-money: true - Name: - description: Contact name on 1099 Form - type: string - FederalTaxIDType: - description: Contact Fed Tax ID type - type: string - City: - description: Contact city on 1099 Form - type: string - Zip: - description: Contact zip on 1099 Form - type: string - State: - description: Contact State on 1099 Form - type: string - Email: - description: Contact email on 1099 Form - type: string - StreetAddress: - description: Contact address on 1099 Form - type: string - TaxID: - description: Contact tax id on 1099 Form - type: string - ContactId: - description: Contact contact id - type: string - format: uuid - LegalName: - description: Contact legal name - type: string - BusinessName: - description: Contact business name - type: string - FederalTaxClassification: - description: Contact federal tax classification - type: string - enum: - - SOLE_PROPRIETOR - - PARTNERSHIP - - TRUST_OR_ESTATE - - NONPROFIT - - C_CORP - - S_CORP - - OTHER - Schedule: - externalDocs: - url: 'http://developer.xero.com/documentation/api/repeating-invoices/' - properties: - Period: - description: Integer used with the unit e.g. 1 (every 1 week), 2 (every 2 months) - type: integer - Unit: - description: One of the following - WEEKLY or MONTHLY - type: string - enum: - - WEEKLY - - MONTHLY - DueDate: - description: Integer used with due date type e.g 20 (of following month), 31 (of current month) - type: integer - DueDateType: - description: the payment terms - type: string - enum: - - DAYSAFTERBILLDATE - - DAYSAFTERBILLMONTH - - DAYSAFTERINVOICEDATE - - DAYSAFTERINVOICEMONTH - - OFCURRENTMONTH - - OFFOLLOWINGMONTH - StartDate: - description: Date the first invoice of the current version of the repeating - schedule was generated (changes when repeating invoice is edited) - type: string - x-is-msdate: true - NextScheduledDate: - description: The calendar date of the next invoice in the schedule to be generated - type: string - x-is-msdate: true - EndDate: - description: Invoice end date – only returned if the template has an end date set - type: string - x-is-msdate: true - type: object - TaxRates: - type: object - x-objectArrayKey: tax_rates - properties: - TaxRates: - type: array - items: - $ref: '#/components/schemas/TaxRate' - TaxType: - description: See Tax Types – can only be used on update calls - type: string - enum: - - OUTPUT - - INPUT - - CAPEXINPUT - - EXEMPTEXPORT - - EXEMPTEXPENSES - - EXEMPTCAPITAL - - EXEMPTOUTPUT - - INPUTTAXED - - BASEXCLUDED - - GSTONCAPIMPORTS - - GSTONIMPORTS - - NONE - - INPUT2 - - ZERORATED - - OUTPUT2 - - CAPEXINPUT2 - - CAPEXOUTPUT - - CAPEXOUTPUT2 - - CAPEXSRINPUT - - CAPEXSROUTPUT - - ECACQUISITIONS - - ECZRINPUT - - ECZROUTPUT - - ECZROUTPUTSERVICES - - EXEMPTINPUT - - REVERSECHARGES - - RRINPUT - - RROUTPUT - - SRINPUT - - SROUTPUT - - ZERORATEDINPUT - - ZERORATEDOUTPUT - - BLINPUT - - DSOUTPUT - - EPINPUT - - ES33OUTPUT - - ESN33OUTPUT - - IGDSINPUT2 - - IMINPUT2 - - MEINPUT - - NRINPUT - - OPINPUT - - OSOUTPUT - - TXESSINPUT - - TXN33INPUT - - TXPETINPUT - - TXREINPUT - - INPUT3 - - INPUT4 - - OUTPUT3 - - OUTPUT4 - - SROUTPUT2 - - TXCA - - SRCAS - - BLINPUT2 - - DRCHARGESUPPLY20 - - DRCHARGE20 - - DRCHARGESUPPLY5 - - DRCHARGE5 - - BADDEBTRELIEF - - IGDSINPUT3 - - SROVR - - TOURISTREFUND - - TXRCN33 - - TXRCRE - - TXRCESS - - TXRCTS - - OUTPUTY23 - - DSOUTPUTY23 - - INPUTY23 - - IMINPUT2Y23 - - IGDSINPUT2Y23 - - TXPETINPUTY23 - - TXESSINPUTY23 - - TXN33INPUTY23 - - TXREINPUTY23 - - TXCAY23 - - BADDEBTRELIEFY23 - - IGDSINPUT3Y23 - - SROVRRSY23 - - SROVRLVGY23 - - SRLVGY23 - - TXRCN33Y23 - - TXRCREY23 - - TXRCESSY23 - - TXRCTSY23 - - IM - - IMY23 - - IMESS - - IMESSY23 - - IMN33 - - IMN33Y23 - - IMRE - - IMREY23 - - BADDEBTRECOVERY - - BADDEBTRECOVERYY23 - - OUTPUTY24 - - DSOUTPUTY24 - - INPUTY24 - - IGDSINPUT2Y24 - - TXPETINPUTY24 - - TXESSINPUTY24 - - TXN33INPUTY24 - - TXREINPUTY24 - - TXCAY24 - - BADDEBTRELIEFY24 - - IGDSINPUT3Y24 - - SROVRRSY24 - - SROVRLVGY24 - - SRLVGY24 - - TXRCTSY24 - - TXRCESSY24 - - TXRCN33Y24 - - TXRCREY24 - - IMY24 - - IMESSY24 - - IMN33Y24 - - IMREY24 - - BADDEBTRECOVERYY24 - - OSOUTPUT2 - - BLINPUT3 - - BLINPUT3Y23 - - BLINPUT3Y24 - Setup: - externalDocs: - url: 'https://developer.xero.com/documentation/api-guides/conversions' - properties: - ConversionDate: - $ref: '#/components/schemas/ConversionDate' - ConversionBalances: - description: Balance supplied for each account that has a value as at the conversion date. - type: array - items: - $ref: '#/components/schemas/ConversionBalances' - Accounts: - type: array - items: - $ref: '#/components/schemas/Account' - ConversionDate: - description: The date when the organisation starts using Xero - type: object - properties: - Month: - description: The month the organisation starts using Xero. Value is an integer between 1 and 12 - type: integer - example: 1 - Year: - description: The year the organisation starts using Xero. Value is an integer greater than 2006 - type: integer - example: 2020 - ConversionBalances: - description: Balance supplied for each account that has a value as at the conversion date. - properties: - AccountCode: - description: The account code for a account - type: string - Balance: - description: The opening balances of the account. Debits are positive, credits are negative values - type: number - format: double - BalanceDetails: - type: array - items: - $ref: '#/components/schemas/BalanceDetails' - type: object - BalanceDetails: - description: An array to specify multiple currency balances of an account - properties: - Balance: - description: The opening balances of the account. Debits are positive, credits are negative values - type: number - format: double - CurrencyCode: - description: The currency of the balance (Not required for base currency) - type: string - CurrencyRate: - description: (Optional) Exchange rate to base currency when money is spent or received. If not specified, XE rate for the day is applied - type: number - format: double - x-is-money: true - type: object - ImportSummaryObject: - externalDocs: - url: 'https://developer.xero.com/documentation/api-guides/conversions' - properties: - ImportSummary: - $ref: '#/components/schemas/ImportSummary' - ImportSummary: - externalDocs: - url: 'https://developer.xero.com/documentation/api-guides/conversions' - description: A summary of the import from setup endpoint - type: object - properties: - Accounts: - $ref: '#/components/schemas/ImportSummaryAccounts' - Organisation: - $ref: '#/components/schemas/ImportSummaryOrganisation' - ImportSummaryAccounts: - description: A summary of the accounts changes - type: object - properties: - Total: - description: The total number of accounts in the org - type: integer - format: int32 - New: - description: The number of new accounts created - type: integer - format: int32 - Updated: - description: The number of accounts updated - type: integer - format: int32 - Deleted: - description: The number of accounts deleted - type: integer - format: int32 - Locked: - description: The number of locked accounts - type: integer - format: int32 - System: - description: The number of system accounts - type: integer - format: int32 - Errored: - description: The number of accounts that had an error - type: integer - format: int32 - Present: - type: boolean - NewOrUpdated: - description: The number of new or updated accounts - type: integer - format: int32 - ImportSummaryOrganisation: - type: object - properties: - Present: - type: boolean - TaxRate: - externalDocs: - url: 'http://developer.xero.com/documentation/api/tax-rates/' - properties: - Name: - description: Name of tax rate - type: string - TaxType: - description: The tax type - type: string - TaxComponents: - description: See TaxComponents - type: array - items: - $ref: '#/components/schemas/TaxComponent' - Status: - description: See Status Codes - type: string - enum: - - ACTIVE - - DELETED - - ARCHIVED - - PENDING - ReportTaxType: - description: See ReportTaxTypes - type: string - enum: - - AVALARA - - BASEXCLUDED - - CAPITALSALESOUTPUT - - CAPITALEXPENSESINPUT - - ECOUTPUT - - ECOUTPUTSERVICES - - ECINPUT - - ECACQUISITIONS - - EXEMPTEXPENSES - - EXEMPTINPUT - - EXEMPTOUTPUT - - GSTONIMPORTS - - INPUT - - INPUTTAXED - - MOSSSALES - - NONE - - NONEOUTPUT - - OUTPUT - - PURCHASESINPUT - - SALESOUTPUT - - EXEMPTCAPITAL - - EXEMPTEXPORT - - CAPITALEXINPUT - - GSTONCAPIMPORTS - - GSTONCAPITALIMPORTS - - REVERSECHARGES - - PAYMENTS - - INVOICE - - CASH - - ACCRUAL - - FLATRATECASH - - FLATRATEACCRUAL - - ACCRUALS - - TXCA - - SRCAS - - DSOUTPUT - - BLINPUT2 - - EPINPUT - - IMINPUT2 - - MEINPUT - - IGDSINPUT2 - - ESN33OUTPUT - - OPINPUT - - OSOUTPUT - - TXN33INPUT - - TXESSINPUT - - TXREINPUT - - TXPETINPUT - - NRINPUT - - ES33OUTPUT - - ZERORATEDINPUT - - ZERORATEDOUTPUT - - DRCHARGESUPPLY - - DRCHARGE - - CAPINPUT - - CAPIMPORTS - - IMINPUT - - INPUT2 - - CIUINPUT - - SRINPUT - - OUTPUT2 - - SROUTPUT - - CAPOUTPUT - - SROUTPUT2 - - CIUOUTPUT - - ZROUTPUT - - ZREXPORT - - ACC28PLUS - - ACCUPTO28 - - OTHEROUTPUT - - SHOUTPUT - - ZRINPUT - - BADDEBT - - OTHERINPUT - - BADDEBTRELIEF - - IGDSINPUT3 - - SROVR - - TOURISTREFUND - - TXRCN33 - - TXRCRE - - TXRCESS - - TXRCTS - - CAPEXINPUT - - UNDEFINED - - CAPEXOUTPUT - - ZEROEXPOUTPUT - - GOODSIMPORT - - NONEINPUT - - NOTREPORTED - - SROVRRS - - SROVRLVG - - SRLVG - - IM - - IMESS - - IMN33 - - IMRE - - BADDEBTRECOVERY - - USSALESTAX - - BLINPUT3 - CanApplyToAssets: - description: Boolean to describe if tax rate can be used for asset accounts i.e. true,false - readOnly: true - type: boolean - CanApplyToEquity: - description: Boolean to describe if tax rate can be used for equity accounts i.e true,false - readOnly: true - type: boolean - CanApplyToExpenses: - description: Boolean to describe if tax rate can be used for expense accounts i.e. true,false - readOnly: true - type: boolean - CanApplyToLiabilities: - description: Boolean to describe if tax rate can be used for liability accounts i.e. true,false - readOnly: true - type: boolean - CanApplyToRevenue: - description: Boolean to describe if tax rate can be used for revenue accounts - i.e. true,false - readOnly: true - type: boolean - DisplayTaxRate: - description: Tax Rate (decimal to 4dp) e.g 12.5000 - readOnly: true - type: number - format: double - x-is-money: true - EffectiveRate: - description: Effective Tax Rate (decimal to 4dp) e.g 12.5000 - readOnly: true - type: number - format: double - x-is-money: true - type: object - TaxComponent: - externalDocs: - url: 'http://developer.xero.com/documentation/api/tax-rates/' - properties: - Name: - description: Name of Tax Component - type: string - Rate: - description: Tax Rate (up to 4dp) - type: number - format: double - x-is-money: true - IsCompound: - description: Boolean to describe if Tax rate is compounded. - type: boolean - IsNonRecoverable: - description: Boolean to describe if tax rate is non-recoverable. Non-recoverable rates are only applicable to Canadian organisations - type: boolean - type: object - TrackingCategories: - type: object - x-objectArrayKey: tracking_categories - properties: - TrackingCategories: - type: array - items: - $ref: '#/components/schemas/TrackingCategory' - TrackingCategory: - externalDocs: - url: 'http://developer.xero.com/documentation/api/tracking-categories/' - properties: - TrackingCategoryID: - description: The Xero identifier for a tracking category e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9 - type: string - format: uuid - TrackingOptionID: - description: The Xero identifier for a tracking option e.g. dc54c220-0140-495a-b925-3246adc0075f - type: string - format: uuid - Name: - description: The name of the tracking category e.g. Department, Region (max - length = 100) - maxLength: 100 - type: string - Option: - description: The option name of the tracking option e.g. East, West (max - length = 100) - maxLength: 100 - type: string - Status: - description: The status of a tracking category - type: string - enum: - - ACTIVE - - ARCHIVED - - DELETED - Options: - description: See Tracking Options - type: array - items: - $ref: '#/components/schemas/TrackingOption' - type: object - TrackingOptions: - type: object - x-objectArrayKey: options - properties: - Options: - type: array - items: - $ref: '#/components/schemas/TrackingOption' - TrackingOption: - externalDocs: - url: 'http://developer.xero.com/documentation/api/tracking-categories/' - properties: - TrackingOptionID: - description: The Xero identifier for a tracking option e.g. - ae777a87-5ef3-4fa0-a4f0-d10e1f13073a - type: string - format: uuid - Name: - description: The name of the tracking option e.g. Marketing, East (max length = 100) - maxLength: 100 - type: string - Status: - description: The status of a tracking option - type: string - enum: - - ACTIVE - - ARCHIVED - - DELETED - TrackingCategoryID: - description: Filter by a tracking category e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9 - type: string - format: uuid - type: object - SalesTrackingCategory: - externalDocs: - url: 'http://developer.xero.com/documentation/api/tracking-categories/' - properties: - TrackingCategoryName: - description: The default sales tracking category name for contacts - type: string - TrackingOptionName: - description: The default purchase tracking category name for contacts - type: string - type: object - Users: - type: object - x-objectArrayKey: users - properties: - Users: - type: array - items: - $ref: '#/components/schemas/User' - User: - externalDocs: - url: 'http://developer.xero.com/documentation/api/users/' - properties: - UserID: - description: Xero identifier - type: string - format: uuid - EmailAddress: - description: Email address of user - type: string - FirstName: - description: First name of user - type: string - LastName: - description: Last name of user - type: string - UpdatedDateUTC: - description: Timestamp of last change to user - type: string - x-is-msdate-time: true - example: "/Date(1573755038314)/" - readOnly: true - IsSubscriber: - description: Boolean to indicate if user is the subscriber - type: boolean - OrganisationRole: - description: User role that defines permissions in Xero and via API (READONLY, INVOICEONLY, STANDARD, FINANCIALADVISER, etc) - type: string - enum: - - READONLY - - INVOICEONLY - - STANDARD - - FINANCIALADVISER - - MANAGEDCLIENT - - CASHBOOKCLIENT - - UNKNOWN - type: object - Error: - externalDocs: - url: 'https://developer.xero.com/documentation/api/http-response-codes' - properties: - ErrorNumber: - description: Exception number - type: integer - Type: - description: Exception type - type: string - Message: - description: Exception message - type: string - Elements: - description: Array of Elements of validation Errors - type: array - items: - $ref: '#/components/schemas/Element' - type: object - Element: - externalDocs: - url: 'https://developer.xero.com/documentation/api/http-response-codes' - properties: - ValidationErrors: - description: Array of Validation Error message - type: array - items: - $ref: '#/components/schemas/ValidationError' - BatchPaymentID: - description: Unique ID for batch payment object with validation error - type: string - format: uuid - BankTransactionID: - type: string - format: uuid - CreditNoteID: - type: string - format: uuid - ContactID: - type: string - format: uuid - InvoiceID: - type: string - format: uuid - ItemID: - type: string - format: uuid - PurchaseOrderID: - type: string - format: uuid - type: object - ValidationError: - externalDocs: - url: 'https://developer.xero.com/documentation/api/http-response-codes' - properties: - Message: - description: Validation error message - type: string - type: object - InvoiceAddress: - properties: - InvoiceAddressType: - description: Indicates whether the address is defined as origin (FROM) or destination (TO) - type: string - enum: - - FROM - - TO - AddressLine1: - description: First line of a physical address - type: string - AddressLine2: - description: Second line of a physical address - type: string - AddressLine3: - description: Third line of a physical address - type: string - AddressLine4: - description: Fourth line of a physical address - type: string - City: - description: City of a physical address - type: string - Region: - description: Region or state of a physical address - type: string - PostalCode: - description: Postal code of a physical address - type: string - Country: - description: Country of a physical address - type: string - type: object - TaxBreakdownComponent: - properties: - TaxComponentId: - description: The unique ID number of this component - type: string - format: uuid - Type: - description: The type of the jurisdiction - type: string - enum: - - SYSGST/USCOUNTRY - - SYSGST/USSTATE - - SYSGST/USCOUNTY - - SYSGST/USCITY - - SYSGST/USSPECIAL - Name: - description: The name of the jurisdiction - type: string - TaxPercentage: - description: The percentage of the tax - type: number - TaxAmount: - description: The amount of the tax - type: number - TaxableAmount: - description: The amount that is taxable - type: number - NonTaxableAmount: - description: The amount that is not taxable - type: number - ExemptAmount: - description: The amount that is exempt - type: number - StateAssignedNo: - description: The state assigned number of the jurisdiction - type: string - JurisdictionRegion: - description: Name identifying the region within the country - type: string - type: object \ No newline at end of file +openapi: 3.0.0 +info: + title: Xero Accounting API + version: 10.1.0 + termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/ + contact: + name: Xero Platform Team + email: api@xero.com + url: https://developer.xero.com +servers: + - description: The Xero Accounting API exposes accounting and related functions of the main Xero application and can be used for a variety of purposes such as creating transactions like invoices and credit notes, right through to extracting accounting data via our reports endpoint. + url: https://api.xero.com/api.xro/2.0 +paths: + /Accounts: + parameters: + - $ref: '#/components/parameters/requiredHeader' + type: string + get: + security: + - OAuth2: + - accounting.settings + - accounting.settings.read + tags: + - Accounting + operationId: getAccounts + summary: Retrieves the full chart of accounts + parameters: + - $ref: '#/components/parameters/ifModifiedSince' + - in: query + name: where + description: Filter by an any element + example: Status=="ACTIVE" AND Type=="BANK" + x-example-csharp: Status==\"ACTIVE\" + x-example-java: Status=="' + Account.StatusEnum.ACTIVE+ '" + x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Account::STATUS_ACTIVE . '" + x-example-ruby: Status==#{XeroRuby::Accounting::Account::ACTIVE} + schema: + type: string + - in: query + name: order + description: Order by an any element + example: Name ASC + schema: + type: string + responses: + "200": + description: Success - return response of type Accounts array with 0 to n Account + content: + application/json: + schema: + $ref: '#/components/schemas/Accounts' + example: + Accounts: + - AccountID: ebd06280-af70-4bed-97c6-7451a454ad85 + Code: "091" + Name: Business Savings Account + Type: BANK + TaxType: NONE + EnablePaymentsToAccount: false + BankAccountNumber: "0209087654321050" + BankAccountType: BANK + CurrencyCode: NZD + - AccountID: 7d05a53d-613d-4eb2-a2fc-dcb6adb80b80 + Code: "200" + Name: Sales + Type: REVENUE + TaxType: OUTPUT2 + Description: Income from any normal business activity + EnablePaymentsToAccount: false + put: + security: + - OAuth2: + - accounting.settings + tags: + - Accounting + operationId: createAccount + summary: Creates a new chart of accounts + parameters: + - $ref: '#/components/parameters/idempotencyKey' + x-hasAccountingValidationError: true + x-example: + - object: + is_object: true + key: account + keyPascal: Account + - code: + key: code + keyPascal: Code + default: 123456 + object: account + - name: + key: name + keyPascal: Name + default: FooBar + object: account + - type: + key: type + keyPascal: Type + default: EXPENSE + nonString: true + php: XeroAPI\XeroPHP\Models\Accounting\AccountType::EXPENSE + node: AccountType.EXPENSE + ruby: XeroRuby::Accounting::AccountType::EXPENSE + python: AccountType.EXPENSE + java: com.xero.models.accounting.AccountType.EXPENSE + csharp: AccountType.EXPENSE + object: account + - description: + is_last: true + key: description + keyPascal: Description + default: Hello World + object: account + responses: + "200": + description: Success - created new Account and return response of type Accounts array with new Account + content: + application/json: + schema: + $ref: '#/components/schemas/Accounts' + example: + Id: 11814c9d-3b5e-492e-93b0-fad16bf3244f + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1550793549392)/ + Accounts: + - AccountID: 66b262e2-561e-423e-8937-47d558f13442 + Code: "123456" + Name: Foobar + Status: ACTIVE + Type: EXPENSE + TaxType: INPUT + Description: Hello World + Class: EXPENSE + EnablePaymentsToAccount: false + ShowInExpenseClaims: false + ReportingCode: EXP + ReportingCodeName: Expense + UpdatedDateUTC: /Date(1550793549320+0000)/ + "400": + description: Validation Error - some data was incorrect returns response of type Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + ErrorNumber: 10 + Type: ValidationException + Message: A validation exception occurred + Elements: + - AccountID: 00000000-0000-0000-0000-000000000000 + Code: "123456" + Name: Foobar + Type: EXPENSE + Description: Hello World + ValidationErrors: + - Message: Please enter a unique Name. + requestBody: + required: true + description: Account object in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/Account' + example: + Code: "123456" + Name: Foobar + Type: EXPENSE + Description: Hello World + /Accounts/{AccountID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.settings + - accounting.settings.read + tags: + - Accounting + operationId: getAccount + summary: Retrieves a single chart of accounts by using a unique account Id + parameters: + - $ref: '#/components/parameters/AccountID' + responses: + "200": + description: Success - return response of type Accounts array with one Account + content: + application/json: + schema: + $ref: '#/components/schemas/Accounts' + example: + Id: 323455cc-9511-4451-a873-248d2983f38e + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1550797359081)/ + Accounts: + - AccountID: 99ce6032-0678-4aa0-8148-240c75fee33a + Code: "123456" + Name: FooBar + Status: ACTIVE + Type: EXPENSE + TaxType: INPUT + Description: Hello World + Class: EXPENSE + EnablePaymentsToAccount: false + ShowInExpenseClaims: false + ReportingCode: EXP + ReportingCodeName: Expense + UpdatedDateUTC: /Date(1550797359120+0000)/ + post: + security: + - OAuth2: + - accounting.settings + tags: + - Accounting + operationId: updateAccount + summary: Updates a chart of accounts + x-hasAccountingValidationError: true + x-example: + - account: + is_object: true + key: account + keyPascal: Account + - code: + key: code + keyPascal: Code + default: 123456 + object: account + - name: + key: name + keyPascal: Name + default: BarFoo + object: account + - type: + key: type + keyPascal: Type + default: EXPENSE + nonString: true + php: XeroAPI\XeroPHP\Models\Accounting\AccountType::EXPENSE + node: AccountType.EXPENSE + ruby: XeroRuby::Accounting::AccountType::EXPENSE + python: AccountType.EXPENSE + java: com.xero.models.accounting.AccountType.EXPENSE + csharp: AccountType.EXPENSE + object: account + - description: + key: description + keyPascal: Description + default: Hello World + object: account + - taxType: + is_last: true + key: taxType + keyPascal: TaxType + keySnake: tax_type + default: NONE + object: account + - accounts: + is_object: true + key: accounts + keyPascal: Accounts + - accounts: + is_last: true + is_array_add: true + key: accounts + keyPascal: Accounts + java: Accounts + csharp: Account + object: account + parameters: + - $ref: '#/components/parameters/AccountID' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - update existing Account and return response of type Accounts array with updated Account + content: + application/json: + schema: + $ref: '#/components/schemas/Accounts' + example: + Id: 9012e75c-ec08-40a9-ae15-153fc1f35c4d + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1550795389340)/ + Accounts: + - AccountID: 99ce6032-0678-4aa0-8148-240c75fee33a + Code: "654321" + Name: BarFoo + Status: ACTIVE + Type: EXPENSE + TaxType: INPUT + Description: Good Bye World + Class: EXPENSE + EnablePaymentsToAccount: false + ShowInExpenseClaims: false + ReportingCode: EXP + ReportingCodeName: Expense + UpdatedDateUTC: /Date(1550795389333+0000)/ + "400": + description: Validation Error - some data was incorrect returns response of type Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + ErrorNumber: 10 + Type: ValidationException + Message: A validation exception occurred + Elements: + - AccountID: 00000000-0000-0000-0000-000000000000 + Code: "123456" + Name: Foobar + Type: EXPENSE + Description: Hello World + ValidationErrors: + - Message: Please enter a unique Name. + requestBody: + required: true + description: Request of type Accounts array with one Account + content: + application/json: + schema: + $ref: '#/components/schemas/Accounts' + example: + Accounts: + - Code: "123456" + Name: BarFoo + AccountID: 99ce6032-0678-4aa0-8148-240c75fee33a + Type: EXPENSE + Description: GoodBye World + TaxType: INPUT + EnablePaymentsToAccount: false + ShowInExpenseClaims: false + Class: EXPENSE + ReportingCode: EXP + ReportingCodeName: Expense + UpdatedDateUTC: "2019-02-21T16:29:47.96-08:00" + delete: + security: + - OAuth2: + - accounting.settings + tags: + - Accounting + operationId: deleteAccount + x-hasAccountingValidationError: true + summary: Deletes a chart of accounts + parameters: + - $ref: '#/components/parameters/AccountID' + responses: + "200": + description: Success - delete existing Account and return response of type Accounts array with deleted Account + content: + application/json: + schema: + $ref: '#/components/schemas/Accounts' + example: + Id: 76bb0543-8efe-4acc-b7f6-67dfcdec37b4 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1550798217216)/ + Accounts: + - AccountID: 7f3c0bec-f3e7-4073-b4d6-cc56dd027ef1 + Code: "123456" + Name: FooBar + Status: DELETED + Type: EXPENSE + TaxType: INPUT + Description: Hello World + Class: EXPENSE + EnablePaymentsToAccount: false + ShowInExpenseClaims: false + ReportingCode: EXP + ReportingCodeName: Expense + UpdatedDateUTC: /Date(1550798217210+0000)/ + "400": + description: Validation Error - some data was incorrect returns response of type Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + ErrorNumber: 10 + Type: ValidationException + Message: A validation exception occurred + Elements: + - AccountID: 00000000-0000-0000-0000-000000000000 + Code: "123456" + Name: Foobar + Type: EXPENSE + Description: Hello World + ValidationErrors: + - Message: Please enter a unique Name. + /Accounts/{AccountID}/Attachments: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getAccountAttachments + summary: Retrieves attachments for a specific accounts by using a unique account Id + parameters: + - $ref: '#/components/parameters/AccountID' + responses: + "200": + description: Success - return response of type Attachments array of Attachment + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: 439c1573-3cd8-4697-a9f6-81fa651ee8f3 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1550852630329)/ + Attachments: + - AttachmentID: 52a643be-cd5c-489f-9778-53a9fd337756 + FileName: sample5.jpg + Url: https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg + MimeType: image/jpg + ContentLength: 2878711 + /Accounts/{AccountID}/Attachments/{AttachmentID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getAccountAttachmentById + summary: Retrieves a specific attachment from a specific account using a unique attachment Id + parameters: + - $ref: '#/components/parameters/AccountID' + - $ref: '#/components/parameters/AttachmentID' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of attachment for Account as binary data + content: + application/octet-stream: + schema: + type: string + format: binary + /Accounts/{AccountID}/Attachments/{FileName}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getAccountAttachmentByFileName + summary: Retrieves an attachment for a specific account by filename + parameters: + - $ref: '#/components/parameters/AccountID' + - $ref: '#/components/parameters/FileName' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of attachment for Account as binary data + content: + application/octet-stream: + schema: + type: string + format: binary + post: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: updateAccountAttachmentByFileName + x-hasAccountingValidationError: true + summary: Updates attachment on a specific account by filename + parameters: + - $ref: '#/components/parameters/AccountID' + - $ref: '#/components/parameters/FileName' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Attachments array of Attachment + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: c8d6413a-1da2-4faa-9848-21f60443e906 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1550859714477)/ + Attachments: + - AttachmentID: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + FileName: sample5.jpg + Url: https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg + MimeType: image/jpg + ContentLength: 2878711 + "400": + description: Validation Error - some data was incorrect returns response of type Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + put: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: createAccountAttachmentByFileName + x-hasAccountingValidationError: true + summary: Creates an attachment on a specific account + parameters: + - $ref: '#/components/parameters/AccountID' + - $ref: '#/components/parameters/FileName' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Attachments array of Attachment + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: 724cdff5-bcd1-4c5c-977e-e864c24258e0 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1550856817769)/ + Attachments: + - AttachmentID: ab95b276-9dce-4925-9077-439818ba270f + FileName: sample5.jpg + Url: https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg + MimeType: image/jpg + ContentLength: 2878711 + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + /BatchPayments: + parameters: + - $ref: '#/components/parameters/requiredHeader' + description: Batch payments allow you to bundle multiple bills or invoices into one payment transaction. This means a single payment in Xero can be reconciled with a single transaction on the bank statement making for a much simpler bank reconciliation experience. + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getBatchPayments + summary: Retrieves either one or many batch payments for invoices + parameters: + - $ref: '#/components/parameters/ifModifiedSince' + - in: query + name: where + description: Filter by an any element + example: Status=="AUTHORISED" + x-example-csharp: Status==\"AUTHORISED\" + x-example-java: Status=="' + BatchPayment.StatusEnum.AUTHORISED + '" + x-example-php: Status=="' . XeroAPI\XeroPHP\Models\Accounting\BatchPayment::STATUS_AUTHORISED . '" + x-example-ruby: Status==#{XeroRuby::Accounting::BatchPayment::AUTHORISED} + schema: + type: string + - in: query + name: order + description: Order by an any element + example: Date ASC + schema: + type: string + responses: + "200": + description: Success - return response of type BatchPayments array of BatchPayment objects + content: + application/json: + schema: + $ref: '#/components/schemas/BatchPayments' + example: + Id: 6ab84949-4fe5-4788-a135-4d8f690d24d7 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1550866184006)/ + BatchPayments: + - Account: + AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9 + Reference: Hello World + BatchPaymentID: d0e9bbbf-5b8a-48b6-906a-035591fcb061 + DateString: 2017-11-28T00:00:00 + Date: /Date(1511827200000+0000)/ + Payments: + - Invoice: + InvoiceID: 0975dec2-0cf6-498d-9c9f-c6775b45c61d + Payments: [] + CreditNotes: [] + Prepayments: [] + Overpayments: [] + HasErrors: false + IsDiscounted: false + LineItems: [] + PaymentID: 97ec2ef8-f4d6-4de5-9f2a-385d41cdc2fc + Amount: 200.00 + - Invoice: + InvoiceID: 600982d9-6605-4e11-afa1-d8dec2be7b52 + Payments: [] + CreditNotes: [] + Prepayments: [] + Overpayments: [] + HasErrors: false + IsDiscounted: false + LineItems: [] + PaymentID: e232795f-b919-4865-a754-12f6ae8402c0 + Amount: 200.00 + - Invoice: + InvoiceID: 99a2bd54-4ab1-413c-90bb-57f6464fe5d6 + Payments: [] + CreditNotes: [] + Prepayments: [] + Overpayments: [] + HasErrors: false + IsDiscounted: false + LineItems: [] + PaymentID: c2d571a5-38ff-4d37-9d43-dfadb4ad53ff + Amount: 200.00 + - Invoice: + InvoiceID: c81942c8-bfc5-4c88-a21a-b892a4a8c1c5 + Payments: [] + CreditNotes: [] + Prepayments: [] + Overpayments: [] + HasErrors: false + IsDiscounted: false + LineItems: [] + PaymentID: 0f3c18dc-49bd-47a4-a875-03c84a29978f + Amount: 200.00 + - Invoice: + InvoiceID: 6c9a1d89-8319-42f6-87d6-7690e748af85 + Payments: [] + CreditNotes: [] + Prepayments: [] + Overpayments: [] + HasErrors: false + IsDiscounted: false + LineItems: [] + PaymentID: 43541eed-f3ac-44ac-88cb-9fe1cb7ed8b8 + Amount: 200.00 + Type: RECBATCH + Status: AUTHORISED + TotalAmount: 1000.00 + UpdatedDateUTC: /Date(1511893792820+0000)/ + IsReconciled: false + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createBatchPayment + summary: Creates one or many batch payments for invoices + x-hasAccountingValidationError: true + x-example: + - currDate: + is_date: true + key: currDate + keyPascal: CurrDate + keySnake: curr_date + java_datatype: LocalDate + default: LocalDate.now() + java: LocalDate.now() + csharp: DateTime.Now + node: '''2020-12-10''' + php: new DateTime('2020-12-10') + python: dateutil.parser.parse('2020-12-03T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - paymentAccount: + is_object: true + key: paymentAccount + keyPascal: Account + keySnake: payment_account + - accountID: + is_last: true + is_uuid: true + key: accountID + keyPascal: AccountID + keySnake: account_id + default: 00000000-0000-0000-0000-000000000000 + object: paymentAccount + - bankAccount: + is_object: true + key: bankAccount + keyPascal: Account + keySnake: bank_account + - accountID: + is_last: true + is_uuid: true + key: accountID + keyPascal: AccountID + keySnake: account_id + default: 00000000-0000-0000-0000-000000000000 + object: bankAccount + - invoice: + is_object: true + key: invoice + keyPascal: Invoice + - invoiceID: + is_last: true + is_uuid: true + key: invoiceID + keyPascal: InvoiceID + keySnake: invoice_id + default: 00000000-0000-0000-0000-000000000000 + object: invoice + - payment: + is_object: true + key: payment + keyPascal: Payment + - set_bankaccount: + is_variable: true + nonString: true + key: account + keyPascal: Account + default: bankAccount + python: bank_account + ruby: bank_account + object: payment + - date: + is_variable: true + nonString: true + key: date + keyPascal: Date + default: currDate + python: curr_date + ruby: curr_date + object: payment + - amount: + nonString: true + key: amount + keyPascal: Amount + default: 1.00 + is_money: true + object: payment + - set_invoice: + is_last: true + is_variable: true + nonString: true + key: invoice + keyPascal: Invoice + default: invoice + object: payment + - payments: + is_list: true + key: payments + keyPascal: Payment + - add_payments: + is_last: true + is_list_add: true + key: payments + keyPascal: Payments + object: payment + - batchPayment: + is_object: true + key: batchPayment + keyPascal: BatchPayment + keySnake: batch_payment + - set_paymentaccount: + is_variable: true + nonString: true + key: account + keyPascal: Account + default: paymentAccount + python: payment_account + ruby: payment_account + object: batchPayment + - reference: + key: reference + keyPascal: Reference + default: hello foobar + object: batchPayment + - date: + is_variable: true + nonString: true + key: date + keyPascal: Date + default: currDate + python: curr_date + ruby: curr_date + object: batchPayment + - set_payments: + is_last: true + is_variable: true + nonString: true + key: payments + keyPascal: Payments + default: payments + object: batchPayment + - batchPayments: + is_object: true + key: batchPayments + keyPascal: BatchPayments + - add_batchPayments: + is_last: true + is_array_add: true + key: batchPayments + keyPascal: BatchPayments + keySnake: batch_payments + java: BatchPayments + python: batch_payment + ruby: batch_payment + csharp: BatchPayment + object: batchPayment + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type BatchPayments array of BatchPayment objects + content: + application/json: + schema: + $ref: '#/components/schemas/BatchPayments' + example: + Id: 424745ed-6356-46ad-87d4-3585f9062fb4 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1550865988111)/ + BatchPayments: + - Account: + AccountID: 5ec2f302-cd60-4f8b-a915-9229dd45e6fa + Reference: Foobar123 + BatchPaymentID: d318c343-208e-49fe-b04a-45642349bcf1 + DateString: 2019-02-22T00:00:00 + Date: /Date(1550793600000+0000)/ + Payments: + - Invoice: + InvoiceID: 3323652c-155e-433b-8a73-4dde7cfbf410 + Payments: [] + CreditNotes: [] + Prepayments: [] + Overpayments: [] + HasErrors: false + IsDiscounted: false + LineItems: [] + PaymentID: c05098fa-ae3c-4f00-80ec-0a9df07dedff + Amount: 1.00 + - Invoice: + InvoiceID: e4abafb4-1f5b-4d9f-80b3-9a7b815bc302 + Payments: [] + CreditNotes: [] + Prepayments: [] + Overpayments: [] + HasErrors: false + IsDiscounted: false + LineItems: [] + PaymentID: 96409489-2f7d-4804-9a6d-6b939b0e038a + Amount: 1.00 + - Invoice: + InvoiceID: e6039672-b161-40cd-b07b-a0178e7186ad + Payments: [] + CreditNotes: [] + Prepayments: [] + Overpayments: [] + HasErrors: false + IsDiscounted: false + LineItems: [] + PaymentID: d2796067-bf71-4f06-b386-81f1454fa866 + Amount: 1.00 + Type: RECBATCH + Status: AUTHORISED + TotalAmount: 3.00 + UpdatedDateUTC: /Date(1550865987783+0000)/ + IsReconciled: false + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: BatchPayments with an array of Payments in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/BatchPayments' + example: + BatchPayments: + - Account: + AccountID: 00000000-0000-0000-0000-000000000000 + Reference: ref + Date: "2018-08-01" + Payments: + - Account: + Code: "001" + Date: "2019-12-31" + Amount: 500 + Invoice: + InvoiceID: 00000000-0000-0000-0000-000000000000 + LineItems: [] + Contact: {} + Type: ACCPAY + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: deleteBatchPayment + summary: Updates a specific batch payment for invoices and credit notes + parameters: + - $ref: '#/components/parameters/idempotencyKey' + x-hasAccountingValidationError: true + x-example: + - batchPaymentDelete: + is_object: true + key: batchPaymentDelete + keyPascal: BatchPaymentDelete + - status: + is_last: true + key: status + keyPascal: Status + default: DELETED + object: batchPaymentDelete + - batchPaymentID: + is_last: true + is_uuid: true + key: batchPaymentID + keyPascal: BatchPaymentID + keySnake: batch_payment_id + default: 00000000-0000-0000-0000-000000000000 + object: batchPaymentDelete + responses: + "200": + description: Success - return response of type BatchPayments array for updated BatchPayment + content: + application/json: + schema: + $ref: '#/components/schemas/BatchPayments' + example: + Id: ee23328c-4a8b-4ee7-8fb6-9796ffab9cb0 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1583945852489)/ + BatchPayments: + - Account: + AccountID: efb6e3a4-3156-4cee-bfe1-a282a3cc1d8f + BatchPaymentID: b649632e-2782-4c74-95a5-d994d7140ed9 + DateString: 2022-08-01T00:00:00 + Date: /Date(1659312000000+0000)/ + Payments: [] + Type: PAYBATCH + Status: DELETED + TotalAmount: 18.00 + UpdatedDateUTC: /Date(1659377631813+0000)/ + IsReconciled: false + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/BatchPaymentDelete' + example: + BatchPaymentID: 9bf296e9-0748-4d29-a3dc-24dde1098030 + Status: DELETED + /BatchPayments/{BatchPaymentID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getBatchPayment + summary: Retrieves a specific batch payment using a unique batch payment Id + parameters: + - $ref: '#/components/parameters/BatchPaymentID' + responses: + "200": + description: Success - return response of type BatchPayments array with matching batch payment Id + content: + application/json: + schema: + $ref: '#/components/schemas/BatchPayments' + example: + Id: 6ab84949-4fe5-4788-a135-4d8f690d24d7 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1550866184006)/ + BatchPayments: + - Account: + AccountID: 13918178-849a-4823-9a31-57b7eac713d7 + Reference: ref + BatchPaymentID: 44a1013e-4946-4a73-b207-dfe5424a5ea5 + DateString: 2018-10-03T00:00:00 + Date: /Date(1538524800000+0000)/ + Payments: + - Invoice: + InvoiceID: 5aa9451d-95d1-4f95-a966-bbab2573f71c + Payments: [] + CreditNotes: [] + Prepayments: [] + Overpayments: [] + HasErrors: false + IsDiscounted: false + LineItems: [] + PaymentID: a22a64cb-364e-43fa-9a1f-bb2cd1f4adde + Reference: ref/cheque + Amount: 913.55 + - Invoice: + InvoiceID: 30a87092-31b5-4a2c-831e-327486533dd2 + Payments: [] + CreditNotes: [] + Prepayments: [] + Overpayments: [] + HasErrors: false + IsDiscounted: false + LineItems: [] + PaymentID: 6e20be79-32d8-4ae1-978e-f76d9b245c02 + Amount: 495 + - Invoice: + InvoiceID: 86d6e00f-ef56-49f7-9a54-796ccd5ca057 + Payments: [] + CreditNotes: [] + Prepayments: [] + Overpayments: [] + HasErrors: false + IsDiscounted: false + LineItems: [] + PaymentID: 4ba761b8-5940-4a3f-bcdf-7775adb00332 + Amount: 3080 + Type: RECBATCH + Status: AUTHORISED + TotalAmount: 4488.55 + UpdatedDateUTC: /Date(1538525239370+0000)/ + IsReconciled: false + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: deleteBatchPaymentByUrlParam + summary: Updates a specific batch payment for invoices and credit notes + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/BatchPaymentID' + responses: + "200": + description: Success - return response of type BatchPayments array for updated BatchPayment + content: + application/json: + schema: + $ref: '#/components/schemas/BatchPayments' + example: + Id: ee23328c-4a8b-4ee7-8fb6-9796ffab9cb0 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1583945852489)/ + BatchPayments: + - Account: + AccountID: efb6e3a4-3156-4cee-bfe1-a282a3cc1d8f + BatchPaymentID: b649632e-2782-4c74-95a5-d994d7140ed9 + DateString: 2022-08-01T00:00:00 + Date: /Date(1659312000000+0000)/ + Payments: [] + Type: PAYBATCH + Status: DELETED + TotalAmount: 18.00 + UpdatedDateUTC: /Date(1659377631813+0000)/ + IsReconciled: false + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/BatchPaymentDeleteByUrlParam' + example: + Status: DELETED + /BatchPayments/{BatchPaymentID}/History: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getBatchPaymentHistory + summary: Retrieves history from a specific batch payment + parameters: + - $ref: '#/components/parameters/BatchPaymentID' + responses: + "200": + description: Success - return response of HistoryRecords array of 0 to N HistoryRecord + content: + application/json: + schema: + $ref: '#/components/schemas/HistoryRecords' + example: + Id: c58e2f9c-baad-42a4-8bb7-f32b6f88fa04 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1550898452503)/ + HistoryRecords: + - Changes: Approved + DateUTCString: 2017-11-28T18:29:52 + DateUTC: /Date(1511893792813+0000)/ + User: Buzz Lightyear + Details: "" + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createBatchPaymentHistoryRecord + summary: Creates a history record for a specific batch payment + x-hasAccountingValidationError: true + x-example: + - historyRecord: + is_object: true + key: historyRecord + keyPascal: HistoryRecord + keySnake: history_record + - Details: + is_last: true + key: details + keyPascal: Details + default: Hello World + object: historyRecord + - historyRecords: + is_object: true + key: historyRecords + keyPascal: HistoryRecords + - add_historyRecord: + is_last: true + is_array_add: true + key: historyRecords + keyPascal: HistoryRecords + keySnake: history_records + java: HistoryRecords + python: history_record + ruby: history_record + csharp: HistoryRecord + object: historyRecord + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/BatchPaymentID' + responses: + "200": + description: Success - return response of type HistoryRecords array of HistoryRecord objects + content: + application/json: + schema: + $ref: '#/components/schemas/HistoryRecords' + example: + Id: d7525479-3392-44c0-bb37-ff4a0b5df5bd + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1550899400362)/ + HistoryRecords: + - DateUTCString: 2019-02-23T05:23:20 + DateUTC: /Date(1550899400362)/ + Details: Hello World + ValidationErrors: [] + "400": + $ref: '#/components/responses/400Error' + requestBody: + $ref: '#/components/requestBodies/historyRecords' + /BankTransactions: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getBankTransactions + summary: Retrieves any spent or received money transactions + parameters: + - $ref: '#/components/parameters/ifModifiedSince' + - in: query + name: where + description: Filter by an any element + example: Status=="AUTHORISED" + x-example-java: Status=="' + BankTransaction.StatusEnum.AUTHORISED + '" + x-example-csharp: Status==\"AUTHORISED\" + x-example-php: Status=="' . XeroAPI\XeroPHP\Models\Accounting\BankTransaction::STATUS_AUTHORISED . '" + x-example-ruby: Status==#{XeroRuby::Accounting::BankTransaction::AUTHORISED} + schema: + type: string + - in: query + name: order + description: Order by an any element + example: Type ASC + schema: + type: string + - in: query + name: page + description: Up to 100 bank transactions will be returned in a single API call with line items details + example: 1 + schema: + type: integer + - $ref: '#/components/parameters/unitdp' + - $ref: '#/components/parameters/pageSize' + responses: + "200": + description: Success - return response of type BankTransactions array with 0 to n BankTransaction + content: + application/json: + schema: + $ref: '#/components/schemas/BankTransactions' + example: + Id: 18e7e80c-5dca-4a57-974e-8b572cc5efe8 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551212901659)/ + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 3 + BankTransactions: + - BankTransactionID: db54aab0-ad40-4ced-bcff-0940ba20db2c + BankAccount: + AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9 + Code: "088" + Name: Business Wells Fargo + BatchPayment: + Account: + AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9 + BatchPaymentID: b54aa50c-794c-461b-89d1-846e1b84d9c0 + Date: /Date(1476316800000+0000)/ + Type: RECBATCH + Status: AUTHORISED + TotalAmount: "12.00" + UpdatedDateUTC: /Date(1476392487037+0000)/ + IsReconciled: "false" + Type: RECEIVE + IsReconciled: false + PrepaymentID: cb62750f-b49c-464b-a45b-e2e2c514c8a9 + HasAttachments: true + Contact: + ContactID: 9c2c64de-12c9-4167-b503-e2c0e1aa1f49 + Name: sam + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2016-10-13T00:00:00 + Date: /Date(1476316800000+0000)/ + Status: AUTHORISED + LineAmountTypes: Exclusive + LineItems: [] + SubTotal: 10 + TotalTax: 0 + Total: 10 + UpdatedDateUTC: /Date(1476389616437+0000)/ + CurrencyCode: USD + - BankTransactionID: 29a69c45-64ca-4805-a1cc-34990de837b3 + BankAccount: + AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9 + Code: "088" + Name: Business Wells Fargo + Type: SPEND-OVERPAYMENT + IsReconciled: false + OverpaymentID: 7d457db3-3b0a-47e9-8b79-81252a7bcdcb + HasAttachments: false + Contact: + ContactID: 9c2c64de-12c9-4167-b503-e2c0e1aa1f49 + Name: sam + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2016-10-13T00:00:00 + Date: /Date(1476316800000+0000)/ + Status: AUTHORISED + LineAmountTypes: NoTax + LineItems: [] + SubTotal: 9 + TotalTax: 0 + Total: 9 + UpdatedDateUTC: /Date(1476389930500+0000)/ + CurrencyCode: USD + - BankTransactionID: 0b89bf5c-d40b-4514-96be-36a739fb0188 + BankAccount: + AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9 + Code: "088" + Name: Business Wells Fargo + Type: SPEND-OVERPAYMENT + IsReconciled: false + OverpaymentID: bf9b5f33-c0d6-4182-84a2-40848023e5a1 + HasAttachments: false + Contact: + ContactID: 9c2c64de-12c9-4167-b503-e2c0e1aa1f49 + Name: sam + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2016-10-13T00:00:00 + Date: /Date(1476316800000+0000)/ + Status: AUTHORISED + LineAmountTypes: NoTax + LineItems: [] + SubTotal: 8 + TotalTax: 0 + Total: 8 + UpdatedDateUTC: /Date(1476392487037+0000)/ + CurrencyCode: USD + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createBankTransactions + summary: Creates one or more spent or received money transaction + x-hasAccountingValidationError: true + x-example: + - contact: + is_object: true + key: contact + keyPascal: Contact + - contactID: + is_uuid: true + is_last: true + key: contactID + keyPascal: ContactID + keySnake: contact_id + default: 00000000-0000-0000-0000-000000000000 + object: contact + - lineItem: + is_object: true + key: lineItem + keyPascal: LineItem + keySnake: line_item + - description: + key: description + keyPascal: Description + default: Foobar + object: lineItem + - quantity: + nonString: true + key: quantity + keyPascal: Quantity + default: 1.0 + is_money: true + object: lineItem + - unitAmount: + nonString: true + key: unitAmount + keyPascal: UnitAmount + keySnake: unit_amount + default: 20.0 + is_money: true + object: lineItem + - accountCode: + is_last: true + key: accountCode + keyPascal: AccountCode + keySnake: account_code + default: "000" + object: lineItem + - line_items: + is_list: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + csharp: LineItem + java: LineItem + - add_lineitems: + is_last: true + is_list_add: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + java: LineItems + python: line_item + ruby: line_item + csharp: LineItem + object: lineItem + - bankAccount: + is_object: true + key: bankAccount + keyPascal: Account + keySnake: bank_account + - accountID: + is_last: true + is_uuid: true + key: accountID + keyPascal: AccountID + keySnake: account_id + default: 00000000-0000-0000-0000-000000000000 + object: bankAccount + - bankTransaction: + is_object: true + key: bankTransaction + keyPascal: BankTransaction + keySnake: bank_transaction + - type: + nonString: true + key: type + keyPascal: Type + default: RECEIVE + php: XeroAPI\XeroPHP\Models\Accounting\BankTransaction::TYPE_RECEIVE + node: BankTransaction.TypeEnum.RECEIVE + ruby: XeroRuby::Accounting::BankTransaction::RECEIVE + python_string: RECEIVE + java: com.xero.models.accounting.BankTransaction.TypeEnum.RECEIVE + csharp: BankTransaction.TypeEnum.RECEIVE + object: bankTransaction + - set_contact: + is_variable: true + nonString: true + key: contact + keyPascal: Contact + default: contact + object: bankTransaction + - set_lineitems: + is_variable: true + nonString: true + key: lineItems + keyPascal: LineItems + object: bankTransaction + default: lineItems + - set_bankaccount: + is_last: true + is_variable: true + nonString: true + key: bankAccount + keyPascal: BankAccount + keySnake: bank_account + python: bank_account + ruby: bank_account + default: bankAccount + object: bankTransaction + - bankTransactions: + is_object: true + key: bankTransactions + keyPascal: BankTransactions + - add_bankTransaction: + is_last: true + is_array_add: true + key: bankTransactions + keyPascal: BankTransactions + keySnake: bank_transactions + java: BankTransactions + python: bank_transaction + ruby: bank_transaction + csharp: BankTransaction + object: bankTransaction + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/unitdp' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type BankTransactions array with new BankTransaction + content: + application/json: + schema: + $ref: '#/components/schemas/BankTransactions' + example: + Id: 5bc1d776-3c7f-4fe8-9b2d-09e747077a88 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551213568047)/ + BankTransactions: + - BankTransactionID: 1289c190-e46d-434b-9628-463ffdb52f00 + BankAccount: + AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9 + Code: "088" + Name: Business Wells Fargo + Type: SPEND + Reference: "" + IsReconciled: false + CurrencyRate: 1.000000 + Contact: + ContactID: 5cc8cf28-567e-4d43-b287-687cfcaec47c + ContactStatus: ACTIVE + Name: Katherine Warren + FirstName: Katherine + LastName: Warren + EmailAddress: kat.warren@clampett.com + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + - AddressType: POBOX + AddressLine1: "" + AddressLine2: "" + AddressLine3: "" + AddressLine4: "" + City: Palo Alto + Region: CA + PostalCode: "94020" + Country: United States + Phones: + - PhoneType: DEFAULT + PhoneNumber: 847-1294 + PhoneAreaCode: (626) + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1503348544227+0000)/ + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2019-02-26T00:00:00 + Date: /Date(1551139200000+0000)/ + Status: AUTHORISED + LineAmountTypes: Inclusive + LineItems: + - Description: Foobar + UnitAmount: 20.00 + TaxType: TAX001 + TaxAmount: 1.74 + LineAmount: 20.00 + AccountCode: "400" + Tracking: [] + Quantity: 1.0000 + LineItemID: d2a06879-da49-4d6c-83b5-72a93a523ec6 + AccountID: ebd06280-af70-4bed-97c6-7451a454ad85 + ValidationErrors: [] + SubTotal: 18.26 + TotalTax: 1.74 + Total: 20.00 + UpdatedDateUTC: /Date(1551213567813+0000)/ + CurrencyCode: USD + StatusAttributeString: ERROR + ValidationErrors: + - Message: 'The Contact must contain at least 1 of the following elements to identify the contact: Name, ContactID, ContactNumber' + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: BankTransactions with an array of BankTransaction objects in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/BankTransactions' + example: + bankTransactions: + - type: BankTransaction.TypeEnum.SPEND + contact: + contactID: 00000000-0000-0000-0000-000000000000 + lineItems: + - description: Foobar + quantity: 1.0 + unitAmount: 20.0 + accountCode: "000" + bankAccount: + code: "000" + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: updateOrCreateBankTransactions + summary: Updates or creates one or more spent or received money transaction + x-hasAccountingValidationError: true + x-example: + - contact: + is_object: true + key: contact + keyPascal: Contact + - contactID: + is_uuid: true + is_last: true + key: contactID + keyPascal: ContactID + keySnake: contact_id + default: 00000000-0000-0000-0000-000000000000 + object: contact + - lineItem: + is_object: true + key: lineItem + keyPascal: LineItem + keySnake: line_item + - description: + key: description + keyPascal: Description + default: Foobar + object: lineItem + - quantity: + nonString: true + key: quantity + keyPascal: Quantity + default: 1.0 + is_money: true + object: lineItem + - unitAmount: + nonString: true + key: unitAmount + keyPascal: UnitAmount + keySnake: unit_amount + default: 20.0 + is_money: true + object: lineItem + - accountCode: + is_last: true + key: accountCode + keyPascal: AccountCode + keySnake: account_code + default: "000" + object: lineItem + - line_items: + is_list: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + csharp: LineItem + java: LineItem + - add_lineitems: + is_last: true + is_list_add: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + java: LineItems + python: line_item + ruby: line_item + csharp: LineItem + object: lineItem + - bankAccount: + is_object: true + key: bankAccount + keyPascal: Account + keySnake: bank_account + - accountID: + is_last: true + is_uuid: true + key: accountID + keyPascal: AccountID + keySnake: account_id + default: 00000000-0000-0000-0000-000000000000 + object: bankAccount + - bankTransaction: + is_object: true + key: bankTransaction + keyPascal: BankTransaction + keySnake: bank_transaction + - type: + nonString: true + key: type + keyPascal: Type + default: RECEIVE + php: XeroAPI\XeroPHP\Models\Accounting\BankTransaction::TYPE_RECEIVE + node: BankTransaction.TypeEnum.RECEIVE + ruby: XeroRuby::Accounting::BankTransaction::RECEIVE + python_string: RECEIVE + java: com.xero.models.accounting.BankTransaction.TypeEnum.RECEIVE + csharp: BankTransaction.TypeEnum.RECEIVE + object: bankTransaction + - set_contact: + is_variable: true + nonString: true + key: contact + keyPascal: Contact + default: contact + object: bankTransaction + - set_lineitems: + is_variable: true + nonString: true + key: lineItems + keyPascal: LineItems + object: bankTransaction + default: lineItems + - set_bankaccount: + is_last: true + is_variable: true + nonString: true + key: bankAccount + keyPascal: BankAccount + keySnake: bank_account + python: bank_account + ruby: bank_account + default: bankAccount + object: bankTransaction + - bankTransactions: + is_object: true + key: bankTransactions + keyPascal: BankTransactions + - add_bankTransaction: + is_last: true + is_array_add: true + key: bankTransactions + keyPascal: BankTransactions + keySnake: bank_transactions + java: BankTransactions + python: bank_transaction + ruby: bank_transaction + csharp: BankTransaction + object: bankTransaction + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/unitdp' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type BankTransactions array with new BankTransaction + content: + application/json: + schema: + $ref: '#/components/schemas/BankTransactions' + example: + Id: 5bc1d776-3c7f-4fe8-9b2d-09e747077a88 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551213568047)/ + BankTransactions: + - BankTransactionID: 1289c190-e46d-434b-9628-463ffdb52f00 + BankAccount: + AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9 + Code: "088" + Name: Business Wells Fargo + Type: SPEND + Reference: "" + IsReconciled: false + CurrencyRate: 1.000000 + Contact: + ContactID: 5cc8cf28-567e-4d43-b287-687cfcaec47c + ContactStatus: ACTIVE + Name: Katherine Warren + FirstName: Katherine + LastName: Warren + EmailAddress: kat.warren@clampett.com + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + - AddressType: POBOX + AddressLine1: "" + AddressLine2: "" + AddressLine3: "" + AddressLine4: "" + City: Palo Alto + Region: CA + PostalCode: "94020" + Country: United States + Phones: + - PhoneType: DEFAULT + PhoneNumber: 847-1294 + PhoneAreaCode: (626) + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1503348544227+0000)/ + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2019-02-26T00:00:00 + Date: /Date(1551139200000+0000)/ + Status: AUTHORISED + LineAmountTypes: Inclusive + LineItems: + - Description: Foobar + UnitAmount: 20.00 + TaxType: TAX001 + TaxAmount: 1.74 + LineAmount: 20.00 + AccountCode: "400" + Tracking: [] + Quantity: 1.0000 + LineItemID: d2a06879-da49-4d6c-83b5-72a93a523ec6 + AccountID: ebd06280-af70-4bed-97c6-7451a454ad85 + ValidationErrors: [] + SubTotal: 18.26 + TotalTax: 1.74 + Total: 20.00 + UpdatedDateUTC: /Date(1551213567813+0000)/ + CurrencyCode: USD + StatusAttributeString: ERROR + ValidationErrors: + - Message: 'The Contact must contain at least 1 of the following elements to identify the contact: Name, ContactID, ContactNumber' + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/BankTransactions' + example: + BankTransactions: + - Type: SPEND + Contact: + ContactID: 00000000-0000-0000-0000-000000000000 + Lineitems: + - Description: Foobar + Quantity: 1 + UnitAmount: 20 + AccountCode: "400" + BankAccount: + Code: "088" + /BankTransactions/{BankTransactionID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getBankTransaction + summary: Retrieves a single spent or received money transaction by using a unique bank transaction Id + parameters: + - $ref: '#/components/parameters/BankTransactionID' + - $ref: '#/components/parameters/unitdp' + responses: + "200": + description: Success - return response of type BankTransactions array with a specific BankTransaction + content: + application/json: + schema: + $ref: '#/components/schemas/BankTransactions' + example: + Id: 612e204d-21ab-469b-ac84-afe0697b4461 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551212902962)/ + BankTransactions: + - BankTransactionID: db54aab0-ad40-4ced-bcff-0940ba20db2c + BankAccount: + AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9 + Code: "088" + Name: Business Wells Fargo + BatchPayment: + Account: + AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9 + BatchPaymentID: b54aa50c-794c-461b-89d1-846e1b84d9c0 + Date: /Date(1476316800000+0000)/ + Type: RECBATCH + Status: AUTHORISED + TotalAmount: "12.00" + UpdatedDateUTC: /Date(1476392487037+0000)/ + IsReconciled: "false" + Type: RECEIVE + IsReconciled: false + CurrencyRate: 1.000000 + PrepaymentID: cb62750f-b49c-464b-a45b-e2e2c514c8a9 + HasAttachments: true + Attachments: + - AttachmentID: 45dd3143-9856-42d2-9a6c-53814f67a33e + FileName: sample2.jpg + Url: https://api.xero.com/api.xro/2.0/banktransaction/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample2.jpg + MimeType: image/jpg + ContentLength: 2878711 + Contact: + ContactID: 9c2c64de-12c9-4167-b503-e2c0e1aa1f49 + ContactStatus: ACTIVE + Name: sam + EmailAddress: "" + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + - AddressType: POBOX + City: "" + Region: "" + PostalCode: "" + Country: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1518821703467+0000)/ + ContactGroups: [] + DefaultCurrency: USD + ContactPersons: [] + HasValidationErrors: false + DateString: 2016-10-13T00:00:00 + Date: /Date(1476316800000+0000)/ + Status: AUTHORISED + LineAmountTypes: Exclusive + LineItems: + - Description: hello + UnitAmount: 10.00 + TaxType: OUTPUT + TaxAmount: 0.00 + LineAmount: 10.00 + AccountCode: "400" + Tracking: [] + Quantity: 1.0000 + LineItemID: 40bec527-a744-4149-96c5-0ab643b51158 + AccountID: ebd06280-af70-4bed-97c6-7451a454ad85 + ValidationErrors: [] + SubTotal: 10.00 + TotalTax: 0.00 + Total: 10.00 + UpdatedDateUTC: /Date(1476389616437+0000)/ + CurrencyCode: USD + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: updateBankTransaction + summary: Updates a single spent or received money transaction + x-hasAccountingValidationError: true + x-example: + - contact: + is_object: true + key: contact + keyPascal: Contact + - contactID: + is_uuid: true + is_last: true + key: contactID + keyPascal: ContactID + keySnake: contact_id + default: 00000000-0000-0000-0000-000000000000 + object: contact + - lineItem: + is_object: true + key: lineItem + keyPascal: LineItem + keySnake: line_item + - description: + key: description + keyPascal: Description + default: Foobar + object: lineItem + - quantity: + nonString: true + key: quantity + keyPascal: Quantity + default: 1.0 + is_money: true + object: lineItem + - unitAmount: + nonString: true + key: unitAmount + keyPascal: UnitAmount + keySnake: unit_amount + default: 20.0 + is_money: true + object: lineItem + - accountCode: + is_last: true + key: accountCode + keyPascal: AccountCode + keySnake: account_code + default: "000" + object: lineItem + - line_items: + is_list: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + csharp: LineItem + java: LineItem + - add_lineitems: + is_last: true + is_list_add: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + java: LineItems + python: line_item + ruby: line_item + csharp: LineItem + object: lineItem + - bankAccount: + is_object: true + key: bankAccount + keyPascal: Account + keySnake: bank_account + - accountID: + is_last: true + is_uuid: true + key: accountID + keyPascal: AccountID + keySnake: account_id + default: 00000000-0000-0000-0000-000000000000 + object: bankAccount + - bankTransaction: + is_object: true + key: bankTransaction + keyPascal: BankTransaction + keySnake: bank_transaction + - reference: + key: reference + keyPascal: Reference + default: You just updated + object: bankTransaction + - type: + nonString: true + key: type + keyPascal: Type + default: RECEIVE + php: XeroAPI\XeroPHP\Models\Accounting\BankTransaction::TYPE_RECEIVE + node: BankTransaction.TypeEnum.RECEIVE + ruby: XeroRuby::Accounting::BankTransaction::RECEIVE + python_string: RECEIVE + java: com.xero.models.accounting.BankTransaction.TypeEnum.RECEIVE + csharp: BankTransaction.TypeEnum.RECEIVE + object: bankTransaction + - set_contact: + is_variable: true + nonString: true + key: contact + keyPascal: Contact + default: contact + object: bankTransaction + - set_lineitems: + is_variable: true + nonString: true + key: lineItems + keyPascal: LineItems + object: bankTransaction + default: lineItems + - set_bankaccount: + is_last: true + is_variable: true + nonString: true + key: bankAccount + keyPascal: BankAccount + keySnake: bank_account + python: bank_account + ruby: bank_account + default: bankAccount + object: bankTransaction + - bankTransactions: + is_object: true + key: bankTransactions + keyPascal: BankTransactions + - add_bankTransaction: + is_last: true + is_array_add: true + key: bankTransactions + keyPascal: BankTransactions + keySnake: bank_transactions + java: BankTransactions + python: bank_transaction + ruby: bank_transaction + csharp: BankTransaction + object: bankTransaction + parameters: + - $ref: '#/components/parameters/BankTransactionID' + - $ref: '#/components/parameters/unitdp' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type BankTransactions array with updated BankTransaction + content: + application/json: + schema: + $ref: '#/components/schemas/BankTransactions' + example: + Id: f2c7f037-96fc-49bd-8f59-d3c7bfdd4746 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551213568875)/ + BankTransactions: + - BankTransactionID: 1289c190-e46d-434b-9628-463ffdb52f00 + BankAccount: + AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9 + Code: "088" + Name: Business Wells Fargo + Type: SPEND + Reference: You just updated + IsReconciled: false + CurrencyRate: 1.000000 + HasAttachments: false + Attachments: [] + Contact: + ContactID: 5cc8cf28-567e-4d43-b287-687cfcaec47c + ContactStatus: ACTIVE + Name: Katherine Warren + FirstName: Katherine + LastName: Warren + EmailAddress: kat.warren@clampett.com + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + - AddressType: POBOX + AddressLine1: "" + AddressLine2: "" + AddressLine3: "" + AddressLine4: "" + City: Palo Alto + Region: CA + PostalCode: "94020" + Country: United States + Phones: + - PhoneType: DEFAULT + PhoneNumber: 847-1294 + PhoneAreaCode: (626) + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1503348544227+0000)/ + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2019-02-25T00:00:00 + Date: /Date(1551052800000+0000)/ + Status: AUTHORISED + LineAmountTypes: Inclusive + LineItems: + - Description: Foobar + UnitAmount: 20.00 + TaxType: TAX001 + TaxAmount: 1.74 + LineAmount: 20.00 + AccountCode: "400" + Tracking: [] + Quantity: 1.0000 + LineItemID: d2a06879-da49-4d6c-83b5-72a93a523ec6 + AccountID: ebd06280-af70-4bed-97c6-7451a454ad85 + ValidationErrors: [] + SubTotal: 18.26 + TotalTax: 1.74 + Total: 20.00 + UpdatedDateUTC: /Date(1551213568733+0000)/ + CurrencyCode: USD + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/BankTransactions' + example: + BankTransactions: + - Type: SPEND + Contact: + ContactID: 00000000-0000-0000-0000-000000000000 + ContactStatus: ACTIVE + Name: Buzz Lightyear + FirstName: Buzz + LastName: Lightyear + EmailAddress: buzz.Lightyear@email.com + ContactPersons: [] + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + - AddressType: POBOX + AddressLine1: "" + AddressLine2: "" + AddressLine3: "" + AddressLine4: "" + City: Palo Alto + Region: CA + PostalCode: "94020" + Country: United States + Phones: + - PhoneType: DEFAULT + PhoneNumber: 847-1294 + PhoneAreaCode: (626) + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + UpdatedDateUTC: "2017-08-21T13:49:04.227-07:00" + ContactGroups: [] + Lineitems: [] + BankAccount: + Code: "088" + Name: Business Wells Fargo + AccountID: 00000000-0000-0000-0000-000000000000 + IsReconciled: false + Date: "2019-02-25" + Reference: You just updated + CurrencyCode: USD + CurrencyRate: 1 + Status: AUTHORISED + LineAmountTypes: Inclusive + TotalTax: 1.74 + BankTransactionID: 00000000-0000-0000-0000-000000000000 + UpdatedDateUTC: "2019-02-26T12:39:27.813-08:00" + /BankTransactions/{BankTransactionID}/Attachments: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getBankTransactionAttachments + summary: Retrieves any attachments from a specific bank transactions + parameters: + - $ref: '#/components/parameters/BankTransactionID' + responses: + "200": + description: Success - return response of type Attachments array with 0 to n Attachment + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: c50798e1-29e9-4a30-a452-bb6e42e400c8 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551303999577)/ + Attachments: + - AttachmentID: 4508a692-e52c-4ad8-a138-2f13e22bf57b + FileName: sample5.jpg + Url: https://api.xero.com/api.xro/2.0/BankTransactions/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample5.jpg + MimeType: image/jpg + ContentLength: 2878711 + - AttachmentID: 45dd3143-9856-42d2-9a6c-53814f67a33e + FileName: sample2.jpg + Url: https://api.xero.com/api.xro/2.0/BankTransactions/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample2.jpg + MimeType: image/jpg + ContentLength: 2878711 + /BankTransactions/{BankTransactionID}/Attachments/{AttachmentID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getBankTransactionAttachmentById + summary: Retrieves specific attachments from a specific BankTransaction using a unique attachment Id + parameters: + - $ref: '#/components/parameters/BankTransactionID' + - $ref: '#/components/parameters/AttachmentID' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of attachment for BankTransaction as binary data + content: + application/octet-stream: + schema: + type: string + format: binary + /BankTransactions/{BankTransactionID}/Attachments/{FileName}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getBankTransactionAttachmentByFileName + summary: Retrieves a specific attachment from a specific bank transaction by filename + parameters: + - $ref: '#/components/parameters/BankTransactionID' + - $ref: '#/components/parameters/FileName' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of attachment for BankTransaction as binary data + content: + application/octet-stream: + schema: + type: string + format: binary + post: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: updateBankTransactionAttachmentByFileName + x-hasAccountingValidationError: true + summary: Updates a specific attachment from a specific bank transaction by filename + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/BankTransactionID' + - $ref: '#/components/parameters/FileName' + responses: + "200": + description: Success - return response of Attachments array of Attachment + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: 572ad2fe-8c23-45aa-82f9-864485327685 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551286166630)/ + Attachments: + - AttachmentID: 4508a692-e52c-4ad8-a138-2f13e22bf57b + FileName: sample5.jpg + Url: https://api.xero.com/api.xro/2.0/BankTransactions/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample5.jpg + MimeType: image/jpg + ContentLength: 2878711 + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + put: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: createBankTransactionAttachmentByFileName + x-hasAccountingValidationError: true + summary: Creates an attachment for a specific bank transaction by filename + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/BankTransactionID' + - $ref: '#/components/parameters/FileName' + responses: + "200": + description: Success - return response of Attachments array of Attachment + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: 572ad2fe-8c23-45aa-82f9-864485327685 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551286166630)/ + Attachments: + - AttachmentID: 4508a692-e52c-4ad8-a138-2f13e22bf57b + FileName: sample5.jpg + Url: https://api.xero.com/api.xro/2.0/BankTransactions/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample5.jpg + MimeType: image/jpg + ContentLength: 2878711 + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + /BankTransactions/{BankTransactionID}/History: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getBankTransactionsHistory + summary: Retrieves history from a specific bank transaction using a unique bank transaction Id + parameters: + - $ref: '#/components/parameters/BankTransactionID' + responses: + "200": + $ref: '#/components/responses/HistoryRetrieved' + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createBankTransactionHistoryRecord + summary: Creates a history record for a specific bank transactions + x-hasAccountingValidationError: true + x-example: + - historyRecord: + is_object: true + key: historyRecord + keyPascal: HistoryRecord + keySnake: history_record + - Details: + is_last: true + key: details + keyPascal: Details + default: Hello World + object: historyRecord + - historyRecords: + is_object: true + key: historyRecords + keyPascal: HistoryRecords + - add_historyRecord: + is_last: true + is_array_add: true + key: historyRecords + keyPascal: HistoryRecords + keySnake: history_records + java: HistoryRecords + python: history_record + ruby: history_record + csharp: HistoryRecord + object: historyRecord + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/BankTransactionID' + responses: + "200": + $ref: '#/components/responses/HistoryRecordCreated' + "400": + $ref: '#/components/responses/400Error' + requestBody: + $ref: '#/components/requestBodies/historyRecords' + /BankTransfers: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getBankTransfers + summary: Retrieves all bank transfers + parameters: + - $ref: '#/components/parameters/ifModifiedSince' + - in: query + name: where + description: Filter by an any element + example: HasAttachments==true + schema: + type: string + - in: query + name: order + description: Order by an any element + example: Amount ASC + schema: + type: string + responses: + "200": + description: Success - return response of BankTransfers array of 0 to N BankTransfer + content: + application/json: + schema: + $ref: '#/components/schemas/BankTransfers' + example: + Id: dfc0d130-9007-4a98-a5ef-6f01700f18e2 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551311318988)/ + BankTransfers: + - BankTransferID: 6221458a-ef7a-4d5f-9b1c-1b96ce03833c + CreatedDateUTCString: 2016-10-17T20:46:01 + CreatedDateUTC: /Date(1476737161140+0000)/ + DateString: 2016-11-12T21:10:00 + Date: /Date(1478985000000+0000)/ + FromBankAccount: + AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9 + Name: Business Wells Fargo + ToBankAccount: + AccountID: 7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa + Name: My Savings + Amount: 20.00 + FromBankTransactionID: a3eca480-bc04-4292-9bbd-5c57b8ba12b4 + ToBankTransactionID: 4ca13f40-f3a0-4530-a442-a600f5696118 + FromIsReconciled: true + ToIsReconciled: true + Reference: Sub 098801 + HasAttachments: true + - BankTransferID: 9f0153d5-617c-4903-887b-3875807aa27a + CreatedDateUTCString: 2016-10-21T23:28:42 + CreatedDateUTC: /Date(1477092522333+0000)/ + DateString: 2016-10-19T20:10:00 + Date: /Date(1476907800000+0000)/ + FromBankAccount: + AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9 + Name: Business Wells Fargo + ToBankAccount: + AccountID: 7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa + Name: My Savings + Amount: 20.00 + FromBankTransactionID: cb74287e-5682-4973-b354-93e2c7a836d3 + ToBankTransactionID: 4c48ba6c-f318-4405-aee6-b5efa2c70f55 + FromIsReconciled: false + ToIsReconciled: false + Reference: Sub 098801 + HasAttachments: false + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createBankTransfer + summary: Creates a bank transfer + parameters: + - $ref: '#/components/parameters/idempotencyKey' + x-hasAccountingValidationError: true + x-example: + - fromBankAccount: + is_object: true + key: fromBankAccount + keyPascal: Account + - accountID: + is_last: true + is_uuid: true + key: accountID + keyPascal: AccountID + keySnake: account_id + default: 00000000-0000-0000-0000-000000000000 + object: fromBankAccount + - toBankAccount: + is_object: true + key: toBankAccount + keyPascal: Account + - accountID: + is_last: true + is_uuid: true + key: accountID + keyPascal: AccountID + keySnake: account_id + default: 00000000-0000-0000-0000-000000000000 + object: toBankAccount + - bankTransfer: + is_object: true + key: bankTransfer + keyPascal: BankTransfer + keySnake: bank_transfer + - set_fromBankAccount: + is_variable: true + nonString: true + key: fromBankAccount + keyPascal: FromBankAccount + keySnake: from_bank_account + default: fromBankAccount + object: bankTransfer + - set_toBankAccount: + is_variable: true + nonString: true + key: toBankAccount + keyPascal: ToBankAccount + keySnake: to_bank_account + default: toBankAccount + object: bankTransfer + - amount: + is_last: true + nonString: true + key: amount + keyPascal: Amount + default: 1.0 + is_money: true + object: bankTransfer + - bankTransfers: + is_object: true + key: bankTransfers + keyPascal: BankTransfers + - add_bankTransfer: + is_last: true + is_array_add: true + key: bankTransfers + keyPascal: BankTransfers + keySnake: bank_transfers + java: BankTransfers + python: bank_transfer + ruby: bank_transfer + csharp: BankTransfer + object: bankTransfer + responses: + "200": + description: Success - return response of BankTransfers array of one BankTransfer + content: + application/json: + schema: + $ref: '#/components/schemas/BankTransfers' + example: + Id: ae767b68-affd-4e17-bac0-83eaf1854dcd + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551311317475)/ + BankTransfers: + - BankTransferID: 76eea4b6-f026-464c-b6f3-5fb39a196145 + DateString: 2019-02-27T00:00:00 + Date: /Date(1551225600000+0000)/ + FromBankAccount: + AccountID: 7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa + Code: "090" + Name: My Savings + ToBankAccount: + AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9 + Code: "088" + Name: Business Wells Fargo + Amount: 50.00 + FromBankTransactionID: e4059952-5acb-4a56-b076-53fad85f2930 + ToBankTransactionID: 88e4ac17-293b-4e5a-8d8b-3ce3a0b1ee17 + FromIsReconciled: true + ToIsReconciled: true + Reference: Sub 098801 + CurrencyRate: 1.000000 + ValidationErrors: [] + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: BankTransfers with array of BankTransfer objects in request body + content: + application/json: + schema: + $ref: '#/components/schemas/BankTransfers' + example: + BankTransfers: + - FromBankAccount: + Code: "090" + Name: My Savings + AccountID: 00000000-0000-0000-0000-000000000000 + Type: BANK + BankAccountNumber: "123455" + Status: ACTIVE + BankAccountType: BANK + CurrencyCode: USD + TaxType: NONE + EnablePaymentsToAccount: false + ShowInExpenseClaims: false + Class: ASSET + ReportingCode: ASS + ReportingCodeName: Assets + HasAttachments: false + UpdatedDateUTC: "2016-10-17T13:45:33.993-07:00" + ToBankAccount: + Code: "088" + Name: Business Wells Fargo + AccountID: 00000000-0000-0000-0000-000000000000 + Type: BANK + BankAccountNumber: "123455" + Status: ACTIVE + BankAccountType: BANK + CurrencyCode: USD + TaxType: NONE + EnablePaymentsToAccount: false + ShowInExpenseClaims: false + Class: ASSET + ReportingCode: ASS + ReportingCodeName: Assets + HasAttachments: false + UpdatedDateUTC: "2016-06-03T08:31:14.517-07:00" + Amount: "50.00" + FromIsReconciled: true + ToIsReconciled: true + Reference: Sub 098801 + /BankTransfers/{BankTransferID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getBankTransfer + summary: Retrieves specific bank transfers by using a unique bank transfer Id + parameters: + - $ref: '#/components/parameters/BankTransferID' + responses: + "200": + description: Success - return response of BankTransfers array with one BankTransfer + content: + application/json: + schema: + $ref: '#/components/schemas/BankTransfers' + example: + Id: 1a5fa46d-5ece-4ef2-89b1-77c293b5d833 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551311320368)/ + BankTransfers: + - BankTransferID: 6221458a-ef7a-4d5f-9b1c-1b96ce03833c + CreatedDateUTCString: 2016-10-17T20:46:01 + CreatedDateUTC: /Date(1476737161140+0000)/ + DateString: 2016-11-12T21:10:00 + Date: /Date(1478985000000+0000)/ + FromBankAccount: + AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9 + Code: "088" + Name: Business Wells Fargo + ToBankAccount: + AccountID: 7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa + Code: "090" + Name: My Savings + Amount: 20.00 + FromBankTransactionID: a3eca480-bc04-4292-9bbd-5c57b8ba12b4 + ToBankTransactionID: 4ca13f40-f3a0-4530-a442-a600f5696118 + FromIsReconciled: false + ToIsReconciled: false + Reference: Sub 098801 + CurrencyRate: 1.000000 + HasAttachments: true + Attachments: + - AttachmentID: e05a6fd8-0e47-47a9-9799-b809c8267260 + FileName: HelloWorld.jpg + Url: https://api.xero.com/api.xro/2.0/banktransfer/6221458a-ef7a-4d5f-9b1c-1b96ce03833c/Attachments/HelloWorld.jpg + MimeType: image/jpg + ContentLength: 2878711 + /BankTransfers/{BankTransferID}/Attachments: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getBankTransferAttachments + summary: Retrieves attachments from a specific bank transfer + parameters: + - $ref: '#/components/parameters/BankTransferID' + responses: + "200": + description: Success - return response of Attachments array of 0 to N Attachment for a Bank Transfer + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: 5cb6b587-7b02-46b6-97fe-d8ad8f20321b + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551397557272)/ + Attachments: + - AttachmentID: e05a6fd8-0e47-47a9-9799-b809c8267260 + FileName: HelloWorld.jpg + Url: https://api.xero.com/api.xro/2.0/BankTransfers/6221458a-ef7a-4d5f-9b1c-1b96ce03833c/Attachments/HelloWorld.jpg + MimeType: image/jpg + ContentLength: 2878711 + /BankTransfers/{BankTransferID}/Attachments/{AttachmentID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getBankTransferAttachmentById + summary: Retrieves a specific attachment from a specific bank transfer using a unique attachment ID + parameters: + - $ref: '#/components/parameters/BankTransferID' + - $ref: '#/components/parameters/AttachmentID' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of binary data from the Attachment to a Bank Transfer + content: + application/octet-stream: + schema: + type: string + format: binary + /BankTransfers/{BankTransferID}/Attachments/{FileName}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getBankTransferAttachmentByFileName + summary: Retrieves a specific attachment on a specific bank transfer by file name + parameters: + - $ref: '#/components/parameters/BankTransferID' + - $ref: '#/components/parameters/FileName' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of binary data from the Attachment to a Bank Transfer + content: + application/octet-stream: + schema: + type: string + format: binary + post: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: updateBankTransferAttachmentByFileName + x-hasAccountingValidationError: true + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/BankTransferID' + - $ref: '#/components/parameters/FileName' + responses: + "200": + description: Success - return response of Attachments array of 0 to N Attachment for a Bank Transfer + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: c7810140-19c2-4ff7-b3ec-b7e95ce7becf + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551398138226)/ + Attachments: + - AttachmentID: 0851935c-c4c5-4de8-9247-ce22efde6f82 + FileName: sample5.jpg + Url: https://api.xero.com/api.xro/2.0/BankTransfers/6221458a-ef7a-4d5f-9b1c-1b96ce03833c/Attachments/sample5.jpg + MimeType: image/jpg + ContentLength: 2878711 + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + put: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: createBankTransferAttachmentByFileName + x-hasAccountingValidationError: true + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/BankTransferID' + - $ref: '#/components/parameters/FileName' + responses: + "200": + description: Success - return response of Attachments array of 0 to N Attachment for a Bank Transfer + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: b73ba149-76a9-4e7c-a5c6-b9230022f416 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551397998372)/ + Attachments: + - AttachmentID: 9478be4c-c707-48c1-b4a7-83d8eaf442b5 + FileName: sample5.jpg + Url: https://api.xero.com/api.xro/2.0/BankTransfers/6221458a-ef7a-4d5f-9b1c-1b96ce03833c/Attachments/sample5.jpg + MimeType: image/jpg + ContentLength: 2878711 + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + /BankTransfers/{BankTransferID}/History: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getBankTransferHistory + summary: Retrieves history from a specific bank transfer using a unique bank transfer Id + parameters: + - $ref: '#/components/parameters/BankTransferID' + responses: + "200": + $ref: '#/components/responses/HistoryRetrieved' + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createBankTransferHistoryRecord + summary: Creates a history record for a specific bank transfer + x-hasAccountingValidationError: true + x-example: + - historyRecord: + is_object: true + key: historyRecord + keyPascal: HistoryRecord + keySnake: history_record + - Details: + is_last: true + key: details + keyPascal: Details + default: Hello World + object: historyRecord + - historyRecords: + is_object: true + key: historyRecords + keyPascal: HistoryRecords + - add_historyRecord: + is_last: true + is_array_add: true + key: historyRecords + keyPascal: HistoryRecords + keySnake: history_records + java: HistoryRecords + python: history_record + ruby: history_record + csharp: HistoryRecord + object: historyRecord + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/BankTransferID' + responses: + "200": + $ref: '#/components/responses/HistoryRecordCreated' + "400": + $ref: '#/components/responses/400Error' + requestBody: + $ref: '#/components/requestBodies/historyRecords' + /BrandingThemes: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.settings + - accounting.settings.read + tags: + - Accounting + operationId: getBrandingThemes + summary: Retrieves all the branding themes + responses: + "200": + description: Success - return response of type BrandingThemes + content: + application/json: + schema: + $ref: '#/components/schemas/BrandingThemes' + example: + Id: d1a1beea-bdfe-4ee4-9dbc-27226a26cd68 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1550881711906)/ + BrandingThemes: + - BrandingThemeID: dabc7637-62c1-4941-8a6e-ee44fa5090e7 + Name: Standard + SortOrder: 0 + CreatedDateUTC: /Date(1464967643813+0000)/ + /BrandingThemes/{BrandingThemeID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.settings + - accounting.settings.read + tags: + - Accounting + operationId: getBrandingTheme + summary: Retrieves a specific branding theme using a unique branding theme Id + parameters: + - $ref: '#/components/parameters/BrandingThemeID' + responses: + "200": + description: Success - return response of type BrandingThemes with one BrandingTheme + content: + application/json: + schema: + $ref: '#/components/schemas/BrandingThemes' + example: + Id: df671650-cf14-4a7f-b609-4166933719bc + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1550881713071)/ + BrandingThemes: + - BrandingThemeID: dabc7637-62c1-4941-8a6e-ee44fa5090e7 + Name: Standard + SortOrder: 0 + CreatedDateUTC: /Date(1464967643813+0000)/ + /BrandingThemes/{BrandingThemeID}/PaymentServices: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - paymentservices + tags: + - Accounting + operationId: getBrandingThemePaymentServices + summary: Retrieves the payment services for a specific branding theme + x-excludeFromPreview: true + parameters: + - $ref: '#/components/parameters/BrandingThemeID' + responses: + "200": + description: Success - return response of type PaymentServices array with 0 to N PaymentService + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentServices' + example: + Id: bfd5adbe-0e92-48f0-8c5a-39072f6c4ed3 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551139339419)/ + PaymentServices: + - PaymentServiceID: 8cc53aa4-ae01-45b9-b06c-69c42eeae61f + PaymentServiceName: Buzz Lightyear + PaymentServiceType: PayPal + - PaymentServiceID: dede7858-14e3-4a46-bf95-4d4cc491e645 + PaymentServiceName: ACME Payment + PaymentServiceUrl: https://www.payupnow.com/ + PaymentServiceType: Custom + PayNowText: Pay Now + post: + security: + - OAuth2: + - paymentservices + tags: + - Accounting + operationId: createBrandingThemePaymentServices + summary: Creates a new custom payment service for a specific branding theme + x-excludeFromPreview: true + x-hasAccountingValidationError: true + x-example: + - object: + is_object: true + key: paymentService + keyPascal: PaymentService + keySnake: payment_service + - paymentServiceID: + is_uuid: true + key: paymentServiceID + keyPascal: PaymentServiceID + keySnake: payment_service_id + default: 00000000-0000-0000-0000-000000000000 + object: paymentService + - paymentServiceName: + key: paymentServiceName + keyPascal: PaymentServiceName + keySnake: payment_service_name + default: ACME Payments + object: paymentService + - paymentServiceUrl: + key: paymentServiceUrl + keyPascal: PaymentServiceUrl + keySnake: payment_service_url + default: https://www.payupnow.com/ + object: paymentService + - payNowText: + is_last: true + key: payNowText + keyPascal: PayNowText + keySnake: pay_now_text + default: Pay Now + object: paymentService + - paymentServices: + is_object: true + key: paymentServices + keyPascal: PaymentServices + - add_paymentService: + is_last: true + is_array_add: true + key: paymentServices + keyPascal: PaymentServices + java: PaymentServices + csharp: PaymentService + object: paymentService + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/BrandingThemeID' + responses: + "200": + description: Success - return response of type PaymentServices array with newly created PaymentService + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentServices' + example: + Id: 918feecb-067a-4ed9-841b-571c04eaada3 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551139338915)/ + PaymentServices: + - PaymentServiceID: 00000000-0000-0000-0000-000000000000 + PaymentServiceName: ACME Payments + PaymentServiceUrl: https://www.payupnow.com/ + PaymentServiceType: Custom + PayNowText: Pay Now + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: PaymentServices array with PaymentService object in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentServices' + example: + PaymentServices: + - PaymentServiceID: 54b3b4f6-0443-4fba-bcd1-61ec0c35ca55 + PaymentServiceName: PayUpNow + PaymentServiceUrl: https://www.payupnow.com/ + PaymentServiceType: Custom + PayNowText: Time To Pay + /Budgets: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.budgets.read + tags: + - Accounting + operationId: getBudgets + summary: Retrieve a list of budgets + parameters: + - in: query + name: IDs + x-snake: ids + description: Filter by BudgetID. Allows you to retrieve a specific individual budget. + style: form + explode: false + example: '"00000000-0000-0000-0000-000000000000"' + x-example-java: UUID.fromString("00000000-0000-0000-0000-000000000000") + x-example-php: '"00000000-0000-0000-0000-000000000000"' + x-example-csharp: Guid.Parse("00000000-0000-0000-0000-000000000000"); + schema: + type: string + items: + type: string + format: uuid + - in: query + name: DateTo + x-snake: date_to + description: Filter by start date + example: "2019-10-31" + schema: + type: string + format: date + - in: query + name: DateFrom + x-snake: date_from + description: Filter by end date + example: "2019-10-31" + schema: + type: string + format: date + responses: + "200": + description: Success - return response of type Budgets array with 0 to N Budgets + content: + application/json: + schema: + $ref: '#/components/schemas/Budgets' + example: + Id: 04e93d48-e72f-4775-b7dd-15a041fab972 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551399323399)/ + Budgets: + - BudgetID: 847da917-9565-466c-a9cd-3ecf7eb9d094 + Status: APPROVED + Description: FY2021 budget + Type: TRACKING + UpdatedDateUTC: /Date(1622138002077+0000)/ + BudgetLines: [] + Tracking: [] + - BudgetID: 93a4bab1-0021-4320-a2ec-c250528b4bc5 + Status: APPROVED + Description: Overall Budget + Type: OVERALL + UpdatedDateUTC: /Date(1622137786913+0000)/ + BudgetLines: [] + Tracking: [] + /Budgets/{BudgetID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.budgets.read + tags: + - Accounting + operationId: getBudget + summary: Retrieves a specific budget, which includes budget lines + parameters: + - $ref: '#/components/parameters/BudgetID' + - in: query + name: DateTo + x-snake: date_to + description: Filter by start date + example: "2019-10-31" + schema: + type: string + format: date + - in: query + name: DateFrom + x-snake: date_from + description: Filter by end date + example: "2019-10-31" + schema: + type: string + format: date + responses: + "200": + description: Success - return response of type Invoices array with specified Invoices + content: + application/json: + schema: + $ref: '#/components/schemas/Budgets' + example: + Id: 04e93d48-e72f-4775-b7dd-15a041fab972 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551399323399)/ + Budgets: + BudgetID: c1d195d4-92aa-4abd-867a-7ac2f9d60500 + Type: TRACKING + Description: Daniels Northern Budget + UpdatedDateUTC: 2017-08-14T01:18:26.74 + Tracking: + - TrackingCategoryID: e94ba240-3edf-4ef3-8317-10147b968f94 + Name: Region + TrackingOptionID: e94ba240-3edf-4ef3-8317-10147b968f94 + Option: North + - TrackingCategoryID: d8580491-4167-4a81-9624-ad3bdd8e46ce + Name: Salesperson + TrackingOptionID: 9c24de87-a2b7-439d-a216-35d1af7bdec3 + Option: Daniel + BudgetLines: + - AccountID: 9c24de87-a2b7-439d-a216-35d1af7bdec3 + AccountCode: "200" + BudgetBalances: + - Period: 2019-08 + Amount: "1000" + Notes: Sample note + - Period: 2019-09 + Amount: "1050" + Notes: "" + - Period: 2019-10 + Amount: "1102" + Notes: "" + - AccountID: 385f90ae-e798-4990-9b1c-db8eb8b735c2 + AccountCode: "420" + BudgetBalances: + - Period: 2019-08 + Amount: "500" + Notes: "" + - Period: 2019-09 + Amount: "505" + Notes: Special Month + - Period: 2019-10 + Amount: "510" + Notes: "" + /Contacts: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.contacts + - accounting.contacts.read + tags: + - Accounting + operationId: getContacts + summary: Retrieves all contacts in a Xero organisation + parameters: + - $ref: '#/components/parameters/ifModifiedSince' + - in: query + name: where + description: Filter by an any element + example: ContactStatus=="ACTIVE" + x-example-csharp: ContactStatus==\"ACTIVE\" + x-example-java: ContactStatus=="' + Contact.ContactStatusEnum.ACTIVE + '" + x-example-php: ContactStatus=="' . \XeroAPI\XeroPHP\Models\Accounting\Contact::CONTACT_STATUS_ACTIVE . '" + x-example-ruby: ContactStatus==#{XeroRuby::Accounting::Contact::ACTIVE} + schema: + type: string + - in: query + name: order + description: Order by an any element + example: Name ASC + schema: + type: string + - in: query + name: IDs + x-snake: ids + description: Filter by a comma separated list of ContactIDs. Allows you to retrieve a specific set of contacts in a single call. + style: form + explode: false + example: '"00000000-0000-0000-0000-000000000000"' + x-example-java: Arrays.asList(UUID.fromString("00000000-0000-0000-0000-000000000000")) + x-example-php: '"00000000-0000-0000-0000-000000000000"' + x-example-csharp: new List<Guid>{Guid.Parse("00000000-0000-0000-0000-000000000000")}; + schema: + type: array + items: + type: string + format: uuid + - in: query + name: page + description: e.g. page=1 - Up to 100 contacts will be returned in a single API call. + example: 1 + schema: + type: integer + - in: query + name: includeArchived + x-snake: include_archived + description: e.g. includeArchived=true - Contacts with a status of ARCHIVED will be included in the response + example: true + x-example-python: "True" + schema: + type: boolean + - $ref: '#/components/parameters/summaryOnly' + - in: query + name: searchTerm + x-snake: search_term + description: Search parameter that performs a case-insensitive text search across the Name, FirstName, LastName, ContactNumber and EmailAddress fields. + example: Joe Bloggs + schema: + type: string + - $ref: '#/components/parameters/pageSize' + responses: + "200": + description: Success - return response of type Contacts array with 0 to N Contact + content: + application/json: + schema: + $ref: '#/components/schemas/Contacts' + example: + Id: 04e93d48-e72f-4775-b7dd-15a041fab972 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551399323399)/ + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 2 + Contacts: + - ContactID: 5cc8cf28-567e-4d43-b287-687cfcaec47c + ContactStatus: ACTIVE + Name: Katherine Warren + FirstName: Katherine + LastName: Warren + CompanyNumber: NumberBusiness1234 + EmailAddress: kat.warren@clampett.com + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + - AddressType: POBOX + AddressLine1: "" + AddressLine2: "" + AddressLine3: "" + AddressLine4: "" + City: Palo Alto + Region: CA + PostalCode: "94020" + Country: United States + Phones: + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: DEFAULT + PhoneNumber: 847-1294 + PhoneAreaCode: (626) + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1503348544227+0000)/ + ContactGroups: [] + IsSupplier: true + IsCustomer: true + SalesDefaultLineAmountType: INCLUSIVE + PurchasesDefaultLineAmountType: INCLUSIVE + Balances: + AccountsReceivable: + Outstanding: 760.00 + Overdue: 920.00 + AccountsPayable: + Outstanding: 231.60 + Overdue: 360.00 + ContactPersons: [] + HasAttachments: false + HasValidationErrors: false + - ContactID: 3ec601ad-eddc-4ccb-a8ac-736e88293b1b + ContactStatus: ACTIVE + Name: Lisa Parker + FirstName: Lisa + LastName: Parker + EmailAddress: lparker@parkerandco.com + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + - AddressType: POBOX + AddressLine1: "" + AddressLine2: "" + AddressLine3: "" + AddressLine4: "" + City: Anchorage + Region: AK + PostalCode: "99501" + Country: United States + Phones: + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: DEFAULT + PhoneNumber: 266-3583 + PhoneAreaCode: (510) + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1503348546760+0000)/ + ContactGroups: [] + IsSupplier: false + IsCustomer: false + ContactPersons: [] + HasAttachments: false + HasValidationErrors: false + put: + security: + - OAuth2: + - accounting.contacts + tags: + - Accounting + operationId: createContacts + summary: Creates multiple contacts (bulk) in a Xero organisation + x-hasAccountingValidationError: true + x-example: + - phone: + is_object: true + key: phone + keyPascal: Phone + - phoneNumber: + key: phoneNumber + keyPascal: PhoneNumber + keySnake: phone_number + default: 555-1212 + object: phone + - phoneType: + is_last: true + nonString: true + key: phoneType + keyPascal: PhoneType + keySnake: phone_type + default: MOBILE + php: XeroAPI\XeroPHP\Models\Accounting\Phone::PHONE_TYPE_MOBILE + node: Phone.PhoneTypeEnum.MOBILE + ruby: XeroRuby::Accounting::PhoneType::MOBILE + python_string: MOBILE + java: com.xero.models.accounting.Phone.PhoneTypeEnum.MOBILE + csharp: Phone.PhoneTypeEnum.MOBILE + object: phone + - phones: + is_list: true + key: phones + keyPascal: Phone + - add_phone: + is_last: true + is_list_add: true + key: phones + keyPascal: Phones + object: phone + - contact: + is_object: true + key: contact + keyPascal: Contact + - name: + key: name + keyPascal: Name + default: Bruce Banner + object: contact + - emailAddress: + key: emailAddress + keyPascal: EmailAddress + keySnake: email_address + default: hulk@avengers.com + object: contact + - set_phones: + is_last: true + is_variable: true + nonString: true + key: phones + keyPascal: Phones + default: phones + object: contact + - contacts: + is_object: true + key: contacts + keyPascal: Contacts + - add_contact: + is_last: true + is_array_add: true + key: contacts + keyPascal: Contacts + java: Contacts + csharp: Contact + object: contact + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Contacts array with newly created Contact + content: + application/json: + schema: + $ref: '#/components/schemas/Contacts' + example: + Id: e997d6d7-6dad-4458-beb8-d9c1bf7f2edf + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551399321121)/ + Contacts: + - ContactID: 3ff6d40c-af9a-40a3-89ce-3c1556a25591 + ContactStatus: ACTIVE + CompanyNumber: NumberBusiness1234 + Name: Foo9987 + EmailAddress: sid32476@blah.com + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + - AddressType: POBOX + City: "" + Region: "" + PostalCode: "" + Country: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 555-1212 + PhoneAreaCode: "415" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1551399321043+0000)/ + ContactGroups: [] + IsSupplier: false + IsCustomer: false + SalesDefaultLineAmountType: INCLUSIVE + PurchasesDefaultLineAmountType: INCLUSIVE + SalesTrackingCategories: [] + PurchasesTrackingCategories: [] + PaymentTerms: + Bills: + Day: 15 + Type: OFCURRENTMONTH + Sales: + Day: 10 + Type: DAYSAFTERBILLMONTH + ContactPersons: [] + HasValidationErrors: false + "400": + description: Validation Error - some data was incorrect returns response of type Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + ErrorNumber: 10 + Type: ValidationException + Message: A validation exception occurred + Elements: + - ContactID: 00000000-0000-0000-0000-000000000000 + AccountNumber: 12345-ABCD + Name: Buzz Lightyear + EmailAddress: buzzlightyear@email.com + AccountsReceivableTaxType: NONE + AccountsPayableTaxType: INPUT + Addresses: + - AddressType: STREET + AddressLine1: 101 Green St + AddressLine2: 5th floor + City: San Francisco + Region: CA + PostalCode: "94041" + Country: US + AttentionTo: Rod Drury + ValidationErrors: [] + Phones: + - PhoneType: MOBILE + PhoneNumber: 555-1212 + PhoneAreaCode: "415" + ValidationErrors: [] + ContactGroups: [] + PaymentTerms: + Bills: + Day: 15 + Type: OFCURRENTMONTH + ValidationErrors: [] + Sales: + Day: 10 + Type: DAYSAFTERBILLMONTH + ValidationErrors: [] + ContactPersons: [] + HasValidationErrors: true + ValidationErrors: + - Message: The contact name Buzz Lightyear is already assigned to another contact. The contact name must be unique across all active contacts. + requestBody: + required: true + description: Contacts with an array of Contact objects to create in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/Contacts' + example: + Contacts: + - ContactID: 3ff6d40c-af9a-40a3-89ce-3c1556a25591 + ContactStatus: ACTIVE + Name: Foo9987 + EmailAddress: sid32476@blah.com + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + - AddressType: POBOX + City: "" + Region: "" + PostalCode: "" + Country: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 555-1212 + PhoneAreaCode: "415" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1551399321043+0000)/ + ContactGroups: [] + IsSupplier: false + IsCustomer: false + SalesTrackingCategories: [] + PurchasesTrackingCategories: [] + PaymentTerms: + Bills: + Day: 15 + Type: OFCURRENTMONTH + Sales: + Day: 10 + Type: DAYSAFTERBILLMONTH + ContactPersons: [] + post: + security: + - OAuth2: + - accounting.contacts + tags: + - Accounting + operationId: updateOrCreateContacts + summary: Updates or creates one or more contacts in a Xero organisation + x-hasAccountingValidationError: true + x-example: + - phone: + is_object: true + key: phone + keyPascal: Phone + - phoneNumber: + key: phoneNumber + keyPascal: PhoneNumber + keySnake: phone_number + default: 555-1212 + object: phone + - phoneType: + is_last: true + nonString: true + key: phoneType + keyPascal: PhoneType + keySnake: phone_type + default: MOBILE + php: XeroAPI\XeroPHP\Models\Accounting\Phone::PHONE_TYPE_MOBILE + node: Phone.PhoneTypeEnum.MOBILE + ruby: XeroRuby::Accounting::PhoneType::MOBILE + python_string: MOBILE + java: com.xero.models.accounting.Phone.PhoneTypeEnum.MOBILE + csharp: Phone.PhoneTypeEnum.MOBILE + object: phone + - phones: + is_list: true + key: phones + keyPascal: Phone + - add_phone: + is_last: true + is_list_add: true + key: phones + keyPascal: Phones + object: phone + - contact: + is_object: true + key: contact + keyPascal: Contact + - name: + key: name + keyPascal: Name + default: Bruce Banner + object: contact + - emailAddress: + key: emailAddress + keyPascal: EmailAddress + keySnake: email_address + default: hulk@avengers.com + object: contact + - set_phones: + is_last: true + is_variable: true + nonString: true + key: phones + keyPascal: Phones + default: phones + object: contact + - contacts: + is_object: true + key: contacts + keyPascal: Contacts + - add_contact: + is_last: true + is_array_add: true + key: contacts + keyPascal: Contacts + java: Contacts + csharp: Contact + object: contact + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Contacts array with newly created Contact + content: + application/json: + schema: + $ref: '#/components/schemas/Contacts' + example: + Id: e997d6d7-6dad-4458-beb8-d9c1bf7f2edf + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551399321121)/ + Contacts: + - ContactID: 00000000-0000-0000-0000-000000000000 + ContactStatus: ACTIVE + Name: Bruce Banner + CompanyNumber: NumberBusiness1234 + EmailAddress: bruce@banner.com + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + - AddressType: POBOX + City: "" + Region: "" + PostalCode: "" + Country: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 555-1212 + PhoneAreaCode: "415" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1551399321043+0000)/ + ContactGroups: [] + IsSupplier: false + IsCustomer: false + SalesDefaultLineAmountType: INCLUSIVE + PurchasesDefaultLineAmountType: INCLUSIVE + SalesTrackingCategories: [] + PurchasesTrackingCategories: [] + PaymentTerms: + Bills: + Day: 15 + Type: OFCURRENTMONTH + Sales: + Day: 10 + Type: DAYSAFTERBILLMONTH + ContactPersons: [] + HasValidationErrors: false + "400": + description: Validation Error - some data was incorrect returns response of type Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + ErrorNumber: 10 + Type: ValidationException + Message: A validation exception occurred + Elements: + - ContactID: 00000000-0000-0000-0000-000000000000 + AccountNumber: 12345-ABCD + Name: Buzz Lightyear + EmailAddress: buzzlightyear@email.com + AccountsReceivableTaxType: NONE + AccountsPayableTaxType: INPUT + Addresses: + - AddressType: STREET + AddressLine1: 101 Green St + AddressLine2: 5th floor + City: San Francisco + Region: CA + PostalCode: "94041" + Country: US + AttentionTo: Rod Drury + ValidationErrors: [] + Phones: + - PhoneType: MOBILE + PhoneNumber: 555-1212 + PhoneAreaCode: "415" + ValidationErrors: [] + ContactGroups: [] + PaymentTerms: + Bills: + Day: 15 + Type: OFCURRENTMONTH + ValidationErrors: [] + Sales: + Day: 10 + Type: DAYSAFTERBILLMONTH + ValidationErrors: [] + ContactPersons: [] + HasValidationErrors: true + ValidationErrors: + - Message: The contact name Buzz Lightyear is already assigned to another contact. The contact name must be unique across all active contacts. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Contacts' + example: + Contacts: + - Name: Bruce Banner + EmailAddress: hulk@avengers.com + Phones: + - PhoneType: MOBILE + PhoneNumber: 555-1212 + PhoneAreaCode: "415" + PaymentTerms: + Bills: + Day: 15 + Type: OFCURRENTMONTH + Sales: + Day: 10 + Type: DAYSAFTERBILLMONTH + /Contacts/{ContactNumber}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.contacts + - accounting.contacts.read + tags: + - Accounting + operationId: getContactByContactNumber + summary: Retrieves a specific contact by contact number in a Xero organisation + parameters: + - required: true + in: path + name: ContactNumber + x-snake: contact_number + description: This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50). + example: SB2 + schema: + type: string + responses: + "200": + description: Success - return response of type Contacts array with a unique Contact + content: + application/json: + schema: + $ref: '#/components/schemas/Contacts' + example: + Id: 5c83b115-a6e8-4f2a-877f-ba63d009235b + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551462703288)/ + Contacts: + - ContactID: 8138a266-fb42-49b2-a104-014b7045753d + ContactNumber: SB2 + AccountNumber: "1234567" + ContactStatus: ACTIVE + Name: Acme Parts Co. + FirstName: Blake + LastName: Kohler + CompanyNumber: NumberBusiness1234 + EmailAddress: bk@krave.co + BankAccountDetails: "12334567" + TaxNumber: 123-22-3456 + AccountsReceivableTaxType: TAX003 + AccountsPayableTaxType: TAX022 + Addresses: + - AddressType: STREET + AddressLine1: 123 Fake Street + City: Vancouver + Region: British Columbia + PostalCode: V6B 2T4 + Country: "" + AttentionTo: "" + - AddressType: POBOX + AddressLine1: 1234 Fake Street + City: Vancouver + Region: British Columbia + PostalCode: V6B 2T4 + Country: "" + AttentionTo: Blake + Phones: + - PhoneType: DDI + PhoneNumber: 489-44493 + PhoneAreaCode: "345" + PhoneCountryCode: "4" + - PhoneType: DEFAULT + PhoneNumber: 408-0914 + PhoneAreaCode: "604" + PhoneCountryCode: "1" + - PhoneType: FAX + PhoneNumber: 123-9933 + PhoneAreaCode: "123" + PhoneCountryCode: "2" + - PhoneType: MOBILE + PhoneNumber: 999-44 + PhoneAreaCode: "234" + PhoneCountryCode: "3" + UpdatedDateUTC: /Date(1551459777193+0000)/ + ContactGroups: [] + IsSupplier: true + IsCustomer: true + SalesDefaultLineAmountType: INCLUSIVE + PurchasesDefaultLineAmountType: INCLUSIVE + DefaultCurrency: USD + Discount: 13.00 + Website: http://www.google.com + BrandingTheme: + BrandingThemeID: dabc7637-62c1-4941-8a6e-ee44fa5090e7 + Name: Standard + PurchasesDefaultAccountCode: "660" + SalesDefaultAccountCode: "002" + BatchPayments: + BankAccountNumber: "12334567" + BankAccountName: Citi Bank + Details: biz checking + Code: "" + Reference: "" + Balances: + AccountsReceivable: + Outstanding: 118.90 + Overdue: 136.90 + AccountsPayable: + Outstanding: -43.60 + Overdue: 40.00 + PaymentTerms: + Bills: + Day: 12 + Type: OFFOLLOWINGMONTH + Sales: + Day: 14 + Type: OFCURRENTMONTH + ContactPersons: + - FirstName: Sue + LastName: Johnson + EmailAddress: sue.johnson@krave.com + IncludeInEmails: true + HasAttachments: true + Attachments: + - AttachmentID: 04e0a3e3-b116-456a-9f32-9706f0d33afa + FileName: sample5.jpg + Url: https://api.xero.com/api.xro/2.0/contact/8138a266-fb42-49b2-a104-014b7045753d/Attachments/sample5.jpg + MimeType: image/jpg + ContentLength: 2878711 + HasValidationErrors: false + /Contacts/{ContactID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.contacts + - accounting.contacts.read + tags: + - Accounting + operationId: getContact + summary: Retrieves a specific contacts in a Xero organisation using a unique contact Id + parameters: + - $ref: '#/components/parameters/ContactID' + responses: + "200": + description: Success - return response of type Contacts array with a unique Contact + content: + application/json: + schema: + $ref: '#/components/schemas/Contacts' + example: + Id: 5c83b115-a6e8-4f2a-877f-ba63d009235b + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551462703288)/ + Contacts: + - ContactID: 8138a266-fb42-49b2-a104-014b7045753d + ContactNumber: SB2 + AccountNumber: "1234567" + ContactStatus: ACTIVE + Name: Acme Parts Co. + FirstName: Blake + LastName: Kohler + CompanyNumber: NumberBusiness1234 + EmailAddress: bk@krave.co + BankAccountDetails: "12334567" + TaxNumber: 123-22-3456 + AccountsReceivableTaxType: TAX003 + AccountsPayableTaxType: TAX022 + Addresses: + - AddressType: STREET + AddressLine1: 123 Fake Street + City: Vancouver + Region: British Columbia + PostalCode: V6B 2T4 + Country: "" + AttentionTo: "" + - AddressType: POBOX + AddressLine1: 1234 Fake Street + City: Vancouver + Region: British Columbia + PostalCode: V6B 2T4 + Country: "" + AttentionTo: Blake + Phones: + - PhoneType: DDI + PhoneNumber: 489-44493 + PhoneAreaCode: "345" + PhoneCountryCode: "4" + - PhoneType: DEFAULT + PhoneNumber: 408-0914 + PhoneAreaCode: "604" + PhoneCountryCode: "1" + - PhoneType: FAX + PhoneNumber: 123-9933 + PhoneAreaCode: "123" + PhoneCountryCode: "2" + - PhoneType: MOBILE + PhoneNumber: 999-44 + PhoneAreaCode: "234" + PhoneCountryCode: "3" + UpdatedDateUTC: /Date(1551459777193+0000)/ + ContactGroups: [] + IsSupplier: true + IsCustomer: true + SalesDefaultLineAmountType: INCLUSIVE + PurchasesDefaultLineAmountType: INCLUSIVE + DefaultCurrency: USD + Discount: 13.00 + Website: http://www.google.com + BrandingTheme: + BrandingThemeID: dabc7637-62c1-4941-8a6e-ee44fa5090e7 + Name: Standard + PurchasesDefaultAccountCode: "660" + SalesDefaultAccountCode: "002" + BatchPayments: + BankAccountNumber: "12334567" + BankAccountName: Citi Bank + Details: biz checking + Code: "" + Reference: "" + Balances: + AccountsReceivable: + Outstanding: 118.90 + Overdue: 136.90 + AccountsPayable: + Outstanding: -43.60 + Overdue: 40.00 + PaymentTerms: + Bills: + Day: 12 + Type: OFFOLLOWINGMONTH + Sales: + Day: 14 + Type: OFCURRENTMONTH + ContactPersons: + - FirstName: Sue + LastName: Johnson + EmailAddress: sue.johnson@krave.com + IncludeInEmails: true + HasAttachments: true + Attachments: + - AttachmentID: 04e0a3e3-b116-456a-9f32-9706f0d33afa + FileName: sample5.jpg + Url: https://api.xero.com/api.xro/2.0/contact/8138a266-fb42-49b2-a104-014b7045753d/Attachments/sample5.jpg + MimeType: image/jpg + ContentLength: 2878711 + HasValidationErrors: false + post: + security: + - OAuth2: + - accounting.contacts + tags: + - Accounting + operationId: updateContact + summary: Updates a specific contact in a Xero organisation + x-hasAccountingValidationError: true + x-example: + - contact: + is_object: true + key: contact + keyPascal: Contact + - name: + key: name + keyPascal: Name + default: Thanos + object: contact + - contactID: + is_last: true + is_uuid: true + key: contactID + keyPascal: ContactID + default: 00000000-0000-0000-0000-000000000000 + object: contact + - contacts: + is_object: true + key: contacts + keyPascal: Contacts + - add_contact: + is_last: true + is_array_add: true + key: contacts + keyPascal: Contacts + java: Contacts + csharp: Contact + object: contact + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/ContactID' + responses: + "200": + description: Success - return response of type Contacts array with an updated Contact + content: + application/json: + schema: + $ref: '#/components/schemas/Contacts' + example: + Id: 4166b727-c3f0-4881-acd0-d4f7c0e8fcda + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551400031795)/ + Contacts: + - ContactID: d5be01fb-b09f-4c3a-9c67-e10c2a03412c + ContactStatus: ACTIVE + Name: FooBar + EmailAddress: sid30680@blah.com + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + - AddressType: POBOX + City: "" + Region: "" + PostalCode: "" + Country: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 555-1212 + PhoneAreaCode: "415" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1551400031763+0000)/ + ContactGroups: [] + IsSupplier: false + IsCustomer: false + SalesDefaultLineAmountType: INCLUSIVE + PurchasesDefaultLineAmountType: INCLUSIVE + SalesTrackingCategories: [] + PurchasesTrackingCategories: [] + PaymentTerms: + Bills: + Day: 15 + Type: OFCURRENTMONTH + Sales: + Day: 10 + Type: DAYSAFTERBILLMONTH + ContactPersons: [] + HasValidationErrors: false + "400": + $ref: '#/components/responses/400Error' + requestBody: + description: an array of Contacts containing single Contact object with properties to update + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Contacts' + example: + Contacts: + - ContactID: 00000000-0000-0000-0000-000000000000 + Name: Thanos + /Contacts/{ContactID}/Attachments: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getContactAttachments + x-hasAccountingValidationError: true + summary: Retrieves attachments for a specific contact in a Xero organisation + responses: + "200": + description: Success - return response of type Attachments array with 0 to N Attachment + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: 0f63b631-a205-496d-b1d2-e6b13a9b497b + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551483890413)/ + Attachments: + - AttachmentID: 04e0a3e3-b116-456a-9f32-9706f0d33afa + FileName: sample5.jpg + Url: https://api.xero.com/api.xro/2.0/Contacts/8138a266-fb42-49b2-a104-014b7045753d/Attachments/sample5.jpg + MimeType: image/jpg + ContentLength: 2878711 + parameters: + - $ref: '#/components/parameters/ContactID' + /Contacts/{ContactID}/Attachments/{AttachmentID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getContactAttachmentById + summary: Retrieves a specific attachment from a specific contact using a unique attachment Id + parameters: + - $ref: '#/components/parameters/ContactID' + - $ref: '#/components/parameters/AttachmentID' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of attachment for Contact as binary data + content: + application/octet-stream: + schema: + type: string + format: binary + /Contacts/{ContactID}/Attachments/{FileName}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getContactAttachmentByFileName + summary: Retrieves a specific attachment from a specific contact by file name + parameters: + - $ref: '#/components/parameters/ContactID' + - $ref: '#/components/parameters/FileName' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of attachment for Contact as binary data + content: + application/octet-stream: + schema: + type: string + format: binary + post: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: updateContactAttachmentByFileName + x-hasAccountingValidationError: true + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/ContactID' + - $ref: '#/components/parameters/FileName' + responses: + "200": + description: Success - return response of type Attachments array with an updated Attachment + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: 8543ae1a-297c-49b8-bf91-47decac452d5 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1551485146555)/ + Attachments: + - AttachmentID: 8b537c1b-bbb5-47fd-857e-370c369dda7c + FileName: HelloWorld.jpg + Url: https://api.xero.com/api.xro/2.0/Contacts/8138a266-fb42-49b2-a104-014b7045753d/Attachments/HelloWorld.jpg + MimeType: image/jpg + ContentLength: 2878711 + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + put: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: createContactAttachmentByFileName + x-hasAccountingValidationError: true + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/ContactID' + - $ref: '#/components/parameters/FileName' + responses: + "200": + description: Success - return response of type Attachments array with an newly created Attachment + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: a5eddf71-86aa-42f5-99e2-0aaf9caf96b6 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1551484292734)/ + Attachments: + - AttachmentID: 27e37b01-6996-4ebe-836c-95fd472ad674 + FileName: sample5.jpg + Url: https://api.xero.com/api.xro/2.0/Contacts/8138a266-fb42-49b2-a104-014b7045753d/Attachments/sample5.jpg + MimeType: image/jpg + ContentLength: 2878711 + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + /Contacts/{ContactID}/CISSettings: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.settings + - accounting.settings.read + tags: + - Accounting + operationId: getContactCISSettings + summary: Retrieves CIS settings for a specific contact in a Xero organisation + parameters: + - $ref: '#/components/parameters/ContactID' + responses: + "200": + description: Success - return response of type CISSettings for a specific Contact + content: + application/json: + schema: + $ref: '#/components/schemas/CISSettings' + example: + CISSetting: + - CISContractorEnabled: true + CISSubContractorEnabled: true + Rate: 100 + /Contacts/{ContactID}/History: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.contacts + - accounting.contacts.read + tags: + - Accounting + operationId: getContactHistory + summary: Retrieves history records for a specific contact + parameters: + - $ref: '#/components/parameters/ContactID' + responses: + "200": + $ref: '#/components/responses/HistoryRetrieved' + put: + security: + - OAuth2: + - accounting.contacts + tags: + - Accounting + operationId: createContactHistory + summary: Creates a new history record for a specific contact + x-hasAccountingValidationError: true + x-example: + - historyRecord: + is_object: true + key: historyRecord + keyPascal: HistoryRecord + keySnake: history_record + - Details: + is_last: true + key: details + keyPascal: Details + default: Hello World + object: historyRecord + - historyRecords: + is_object: true + key: historyRecords + keyPascal: HistoryRecords + - add_historyRecord: + is_last: true + is_array_add: true + key: historyRecords + keyPascal: HistoryRecords + keySnake: history_records + java: HistoryRecords + python: history_record + ruby: history_record + csharp: HistoryRecord + object: historyRecord + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/ContactID' + requestBody: + $ref: '#/components/requestBodies/historyRecords' + responses: + "200": + $ref: '#/components/responses/HistoryRecordCreated' + "400": + $ref: '#/components/responses/400Error' + /ContactGroups: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.contacts + - accounting.contacts.read + tags: + - Accounting + operationId: getContactGroups + summary: Retrieves the contact Id and name of each contact group + parameters: + - in: query + name: where + description: Filter by an any element + example: Status=="ACTIVE" + x-example-csharp: Status==\"ACTIVE\" + x-example-java: Status=="' + ContactGroup.StatusEnum.ACTIVE + '" + x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\ContactGroup::STATUS_ACTIVE . '" + x-example-ruby: Status==#{XeroRuby::Accounting::ContactGroup::ACTIVE} + schema: + type: string + - in: query + name: order + description: Order by an any element + example: Name ASC + schema: + type: string + responses: + "200": + description: Success - return response of type Contact Groups array of Contact Group + content: + application/json: + schema: + $ref: '#/components/schemas/ContactGroups' + example: + Id: b825df86-1a72-49c9-97dd-36afc7d04bd5 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1551746015603)/ + ContactGroups: + - ContactGroupID: d7a86b80-8dac-4d89-a334-9dcf5753676c + Name: Suppliers + Status: ACTIVE + Contacts: [] + HasValidationErrors: false + - ContactGroupID: ab089fd4-012f-4043-a6e4-e7be01e87e50 + Name: Old Group84262 + Status: ACTIVE + Contacts: [] + HasValidationErrors: false + put: + security: + - OAuth2: + - accounting.contacts + tags: + - Accounting + operationId: createContactGroup + summary: Creates a contact group + parameters: + - $ref: '#/components/parameters/idempotencyKey' + x-hasAccountingValidationError: true + x-example: + - contact: + is_object: true + key: contactGroup + keyPascal: ContactGroup + keySnake: contact_group + - name: + is_last: true + key: name + keyPascal: Name + default: VIPs + object: contactGroup + - contactGroups: + is_object: true + key: contactGroups + keyPascal: ContactGroups + - add_ContactGroup: + is_last: true + is_array_add: true + key: contactGroups + keyPascal: ContactGroups + keySnake: contact_groups + java: ContactGroups + python: contact_group + ruby: contact_group + csharp: ContactGroup + object: contactGroup + responses: + "200": + description: Success - return response of type Contact Groups array of newly created Contact Group + content: + application/json: + schema: + $ref: '#/components/schemas/ContactGroups' + example: + Id: 5afe53f9-2271-45b8-9767-88d023b71d34 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1551745740920)/ + ContactGroups: + - ContactGroupID: d7a86b80-8dac-4d89-a334-9dcf5753676c + Name: Suppliers + Status: ACTIVE + Contacts: [] + HasValidationErrors: false + "400": + description: Validation Error - some data was incorrect returns response of type Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + ErrorNumber: 10 + Type: ValidationException + Message: A validation exception occurred + Elements: + - ContactGroupID: 00000000-0000-0000-0000-000000000000 + Name: Suppliers + Contacts: [] + HasValidationErrors: true + ValidationErrors: + - Message: You’ve reached the limit of 100 contact groups. + requestBody: + description: ContactGroups with an array of names in request body + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ContactGroups' + example: + ContactGroups: + - Name: VIPs + /ContactGroups/{ContactGroupID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.contacts + - accounting.contacts.read + tags: + - Accounting + operationId: getContactGroup + summary: Retrieves a specific contact group by using a unique contact group Id + parameters: + - $ref: '#/components/parameters/ContactGroupID' + responses: + "200": + description: Success - return response of type Contact Groups array with a specific Contact Group + content: + application/json: + schema: + $ref: '#/components/schemas/ContactGroups' + example: + Id: 079c14f6-2c2d-464e-a2c7-0edf7e465723 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1551746772976)/ + ContactGroups: + - ContactGroupID: 17b44ed7-4389-4162-91cb-3dd5766e4e22 + Name: Oasis + Status: ACTIVE + Contacts: + - ContactID: 4e1753b9-018a-4775-b6aa-1bc7871cfee3 + Name: Noel Gallagher + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + - ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Name: Liam Gallagher + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + HasValidationErrors: false + post: + security: + - OAuth2: + - accounting.contacts + tags: + - Accounting + operationId: updateContactGroup + summary: Updates a specific contact group + x-hasAccountingValidationError: true + x-example: + - contact: + is_object: true + key: contactGroup + keyPascal: ContactGroup + keySnake: contact_group + - name: + is_last: true + key: name + keyPascal: Name + default: Vendor + object: contactGroup + - contactGroups: + is_object: true + key: contactGroups + keyPascal: ContactGroups + - add_ContactGroup: + is_last: true + is_array_add: true + key: contactGroups + keyPascal: ContactGroups + keySnake: contact_groups + java: ContactGroups + python: contact_group + ruby: contact_group + csharp: ContactGroup + object: contactGroup + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/ContactGroupID' + responses: + "200": + description: Success - return response of type Contact Groups array of updated Contact Group + content: + application/json: + schema: + $ref: '#/components/schemas/ContactGroups' + example: + Id: b1ba6cdb-1637-4209-bb92-bd0c593f3243 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1551746288544)/ + ContactGroups: + - ContactGroupID: 13f47537-7c1d-4e62-966e-617d76558fc5 + Name: Supplier Vendor + Status: ACTIVE + Contacts: [] + HasValidationErrors: false + "400": + $ref: '#/components/responses/400Error' + requestBody: + description: an array of Contact groups with Name of specific group to update + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ContactGroups' + example: + ContactGroups: + - Name: Suppliers + /ContactGroups/{ContactGroupID}/Contacts: + parameters: + - $ref: '#/components/parameters/requiredHeader' + put: + security: + - OAuth2: + - accounting.contacts + tags: + - Accounting + operationId: createContactGroupContacts + summary: Creates contacts to a specific contact group + x-hasAccountingValidationError: true + x-example: + - contact: + is_object: true + key: contact + keyPascal: Contact + - contactID: + is_last: true + is_uuid: true + key: contactID + keyPascal: ContactID + keySnake: contact_id + default: 00000000-0000-0000-0000-000000000000 + object: contact + - contacts: + is_object: true + key: contacts + keyPascal: Contacts + - add_contact: + is_last: true + is_array_add: true + key: contacts + keyPascal: Contacts + java: Contacts + csharp: Contact + object: contact + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/ContactGroupID' + responses: + "200": + description: Success - return response of type Contacts array of added Contacts + content: + application/json: + schema: + $ref: '#/components/schemas/Contacts' + example: + Id: 99db8024-6895-45c8-a1b5-54805aa8689c + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1551747495785)/ + Contacts: + - ContactID: a3675fc4-f8dd-4f03-ba5b-f1870566bcd7 + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + ValidationErrors: [] + - ContactID: 4e1753b9-018a-4775-b6aa-1bc7871cfee3 + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + ValidationErrors: [] + "400": + $ref: '#/components/responses/400Error' + requestBody: + description: Contacts with array of contacts specifying the ContactID to be added to ContactGroup in body of request + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Contacts' + example: + Contacts: + - ContactID: a3675fc4-f8dd-4f03-ba5b-f1870566bcd7 + - ContactID: 4e1753b9-018a-4775-b6aa-1bc7871cfee3 + delete: + security: + - OAuth2: + - accounting.contacts + tags: + - Accounting + operationId: deleteContactGroupContacts + summary: Deletes all contacts from a specific contact group + parameters: + - $ref: '#/components/parameters/ContactGroupID' + responses: + "204": + description: Success - return response 204 no content + x-isEmpty: true + /ContactGroups/{ContactGroupID}/Contacts/{ContactID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + delete: + security: + - OAuth2: + - accounting.contacts + tags: + - Accounting + operationId: deleteContactGroupContact + summary: Deletes a specific contact from a contact group using a unique contact Id + parameters: + - $ref: '#/components/parameters/ContactGroupID' + - $ref: '#/components/parameters/ContactID' + responses: + "204": + description: Success - return response 204 no content + x-isEmpty: true + "400": + $ref: '#/components/responses/400Error' + /CreditNotes: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getCreditNotes + summary: Retrieves any credit notes + parameters: + - $ref: '#/components/parameters/ifModifiedSince' + - in: query + name: where + description: Filter by an any element + example: Status=="DRAFT" + x-example-csharp: Status==\"DRAFT\" + x-example-java: Status=="' + CreditNote.StatusEnum.DRAFT + '" + x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\CreditNote::STATUS_DRAFT . '" + x-example-ruby: Status==#{XeroRuby::Accounting::CreditNote::DRAFT} + schema: + type: string + - in: query + name: order + description: Order by an any element + example: CreditNoteNumber ASC + schema: + type: string + - in: query + name: page + description: e.g. page=1 – Up to 100 credit notes will be returned in a single API call with line items shown for each credit note + example: 1 + schema: + type: integer + - $ref: '#/components/parameters/unitdp' + - $ref: '#/components/parameters/pageSize' + responses: + "200": + description: Success - return response of type Credit Notes array of CreditNote + content: + application/json: + schema: + $ref: '#/components/schemas/CreditNotes' + example: + Id: 306379b0-3d75-4c77-953a-be08fa0efae8 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1551812506620)/ + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 2 + CreditNotes: + - CreditNoteID: 249f15fa-f2a7-4acc-8769-0984103f2225 + CreditNoteNumber: CN-0005 + Payments: + - PaymentID: 6b037c9b-2e5d-4905-84d3-eabfb3438242 + Date: /Date(1552521600000+0000)/ + Amount: 2.00 + Reference: Too much + CurrencyRate: 1.000000 + HasAccount: false + HasValidationErrors: false + ID: 249f15fa-f2a7-4acc-8769-0984103f2225 + CurrencyRate: 1.000000 + Type: ACCRECCREDIT + Reference: US Tour + RemainingCredit: 32.50 + Allocations: [] + HasAttachments: true + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Name: Liam Gallagher + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2019-03-05T00:00:00 + Date: /Date(1551744000000+0000)/ + Status: AUTHORISED + LineAmountTypes: Exclusive + LineItems: [] + SubTotal: 30.00 + TotalTax: 4.50 + Total: 34.50 + UpdatedDateUTC: /Date(1551812346157+0000)/ + CurrencyCode: NZD + - CreditNoteID: f8021bd2-9a6a-4c19-8477-163da0b9290f + CreditNoteNumber: "" + Payments: [] + ID: f8021bd2-9a6a-4c19-8477-163da0b9290f + CurrencyRate: 1.000000 + Type: ACCPAYCREDIT + Reference: "" + RemainingCredit: 46.00 + Allocations: [] + HasAttachments: false + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Name: Liam Gallagher + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2019-01-05T00:00:00 + Date: /Date(1546646400000+0000)/ + Status: DRAFT + LineAmountTypes: Exclusive + LineItems: [] + SubTotal: 40.00 + TotalTax: 6.00 + Total: 46.00 + UpdatedDateUTC: /Date(1551812506153+0000)/ + CurrencyCode: NZD + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createCreditNotes + summary: Creates a new credit note + x-hasAccountingValidationError: true + x-example: + - currDate: + is_date: true + key: currDate + keyPascal: CurrDate + keySnake: curr_date + java_datatype: LocalDate + default: LocalDate.now() + java: LocalDate.now() + node: '''2020-12-10''' + csharp: DateTime.Now + php: new DateTime('2020-12-10') + python: dateutil.parser.parse('2020-12-03T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - contact: + is_object: true + key: contact + keyPascal: Contact + - contactID: + is_last: true + is_uuid: true + key: contactID + keyPascal: ContactID + keySnake: contact_id + default: 00000000-0000-0000-0000-000000000000 + object: contact + - lineItem: + is_object: true + key: lineItem + keyPascal: LineItem + keySnake: line_item + - description: + key: description + keyPascal: Description + default: Foobar + object: lineItem + - quantity: + nonString: true + key: quantity + keyPascal: Quantity + default: 1.0 + is_money: true + object: lineItem + - unitAmount: + nonString: true + key: unitAmount + keyPascal: UnitAmount + keySnake: unit_amount + default: 20.0 + is_money: true + object: lineItem + - accountCode: + is_last: true + key: accountCode + keyPascal: AccountCode + keySnake: account_code + default: "000" + object: lineItem + - line_items: + is_list: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + csharp: LineItem + java: LineItem + - add_lineitems: + is_last: true + is_list_add: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + java: LineItems + python: line_item + ruby: line_item + csharp: LineItem + object: lineItem + - creditNote: + is_object: true + key: creditNote + keyPascal: CreditNote + keySnake: credit_note + - type: + nonString: true + key: type + keyPascal: Type + default: ACCPAYCREDIT + php: XeroAPI\XeroPHP\Models\Accounting\CreditNote::TYPE_ACCPAYCREDIT + node: CreditNote.TypeEnum.ACCPAYCREDIT + ruby: XeroRuby::Accounting::CreditNote::ACCPAYCREDIT + python_string: ACCPAYCREDIT + java: com.xero.models.accounting.CreditNote.TypeEnum.ACCPAYCREDIT + csharp: CreditNote.TypeEnum.ACCPAYCREDIT + object: creditNote + - set_contact: + is_variable: true + nonString: true + key: contact + keyPascal: Contact + default: contact + object: creditNote + - date: + is_variable: true + nonString: true + key: date + keyPascal: Date + default: currDate + python: curr_date + ruby: curr_date + object: creditNote + - set_lineitem: + is_last: true + is_variable: true + nonString: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + default: lineItems + python: line_items + ruby: line_items + object: creditNote + - creditNotes: + is_object: true + key: creditNotes + keyPascal: CreditNotes + - add_creditNote: + is_last: true + is_array_add: true + key: creditNotes + keyPascal: CreditNotes + keySnake: credit_notes + java: CreditNotes + python: credit_note + ruby: credit_note + csharp: CreditNote + object: creditNote + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/unitdp' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Credit Notes array of newly created CreditNote + content: + application/json: + schema: + $ref: '#/components/schemas/CreditNotes' + example: + Id: 5e57a661-42da-4a19-96a0-00405a0e946d + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1551812702713)/ + CreditNotes: + - CreditNoteID: f9256f04-5a99-4680-acb9-6b4639cc439a + CreditNoteNumber: "" + Payments: [] + ID: f9256f04-5a99-4680-acb9-6b4639cc439a + CurrencyRate: 1.000000 + Type: ACCPAYCREDIT + Reference: "" + RemainingCredit: 46.00 + Allocations: [] + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + ContactStatus: ACTIVE + Name: Liam Gallagher + FirstName: Liam + LastName: Gallagher + EmailAddress: liam@rockstar.com + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + AttentionTo: "" + - AddressType: POBOX + City: Anytown + Region: NY + PostalCode: "10101" + Country: USA + AttentionTo: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: 222-2222 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: 333-2233 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 444-3433 + PhoneAreaCode: "212" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1551747281053+0000)/ + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2019-01-05T00:00:00 + Date: /Date(1546646400000+0000)/ + Status: DRAFT + LineAmountTypes: Exclusive + LineItems: + - Description: Foobar + UnitAmount: 20.00 + TaxType: INPUT2 + TaxAmount: 6.00 + LineAmount: 40.00 + AccountCode: "400" + Tracking: [] + Quantity: 2.0000 + ValidationErrors: [] + SubTotal: 40.00 + TotalTax: 6.00 + Total: 46.00 + UpdatedDateUTC: /Date(1551812702650+0000)/ + CurrencyCode: NZD + StatusAttributeString: OK + ValidationErrors: + - Message: An existing Credit Note with the specified CreditNoteID could not be found + "400": + $ref: '#/components/responses/400Error' + requestBody: + description: Credit Notes with array of CreditNote object in body of request + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreditNotes' + example: + CreditNotes: + - Type: ACCPAYCREDIT + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Date: "2019-01-05" + LineItems: + - Description: Foobar + Quantity: 2.0 + UnitAmount: 20.0 + AccountCode: "400" + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: updateOrCreateCreditNotes + summary: Updates or creates one or more credit notes + x-hasAccountingValidationError: true + x-example: + - currDate: + is_date: true + key: currDate + keyPascal: CurrDate + keySnake: curr_date + java_datatype: LocalDate + default: LocalDate.now() + java: LocalDate.now() + csharp: DateTime.Now + node: '''2020-12-10''' + php: new DateTime('2020-12-10') + python: dateutil.parser.parse('2020-12-03T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - contact: + is_object: true + key: contact + keyPascal: Contact + - contactID: + is_last: true + is_uuid: true + key: contactID + keyPascal: ContactID + keySnake: contact_id + default: 00000000-0000-0000-0000-000000000000 + object: contact + - lineItem: + is_object: true + key: lineItem + keyPascal: LineItem + keySnake: line_item + - description: + key: description + keyPascal: Description + default: Foobar + object: lineItem + - quantity: + nonString: true + key: quantity + keyPascal: Quantity + default: 1.0 + is_money: true + object: lineItem + - unitAmount: + nonString: true + key: unitAmount + keyPascal: UnitAmount + keySnake: unit_amount + default: 20.0 + is_money: true + object: lineItem + - accountCode: + is_last: true + key: accountCode + keyPascal: AccountCode + keySnake: account_code + default: "000" + object: lineItem + - line_items: + is_list: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + csharp: LineItem + java: LineItem + - add_lineitems: + is_last: true + is_list_add: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + java: LineItems + python: line_item + ruby: line_item + csharp: LineItem + object: lineItem + - creditNote: + is_object: true + key: creditNote + keyPascal: CreditNote + keySnake: credit_note + - type: + nonString: true + key: type + keyPascal: Type + default: ACCPAYCREDIT + php: XeroAPI\XeroPHP\Models\Accounting\CreditNote::TYPE_ACCPAYCREDIT + node: CreditNote.TypeEnum.ACCPAYCREDIT + ruby: XeroRuby::Accounting::CreditNote::ACCPAYCREDIT + python_string: ACCPAYCREDIT + java: com.xero.models.accounting.CreditNote.TypeEnum.ACCPAYCREDIT + csharp: CreditNote.TypeEnum.ACCPAYCREDIT + object: creditNote + - set_contact: + is_variable: true + nonString: true + key: contact + keyPascal: Contact + default: contact + object: creditNote + - date: + is_variable: true + nonString: true + key: date + keyPascal: Date + default: currDate + python: curr_date + ruby: curr_date + object: creditNote + - set_lineitem: + is_last: true + is_variable: true + nonString: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + default: lineItems + python: line_items + ruby: line_items + object: creditNote + - creditNotes: + is_object: true + key: creditNotes + keyPascal: CreditNotes + - add_creditNote: + is_last: true + is_array_add: true + key: creditNotes + keyPascal: CreditNotes + keySnake: credit_notes + java: CreditNotes + python: credit_note + ruby: credit_note + csharp: CreditNote + object: creditNote + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/unitdp' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Credit Notes array of newly created CreditNote + content: + application/json: + schema: + $ref: '#/components/schemas/CreditNotes' + example: + Id: 5e57a661-42da-4a19-96a0-00405a0e946d + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1551812702713)/ + CreditNotes: + - CreditNoteID: f9256f04-5a99-4680-acb9-6b4639cc439a + CreditNoteNumber: "" + Payments: [] + ID: f9256f04-5a99-4680-acb9-6b4639cc439a + CurrencyRate: 1.000000 + Type: ACCPAYCREDIT + Reference: "" + SentToContact: true + RemainingCredit: 46.00 + Allocations: [] + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + ContactStatus: ACTIVE + Name: Liam Gallagher + FirstName: Liam + LastName: Gallagher + EmailAddress: liam@rockstar.com + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + AttentionTo: "" + - AddressType: POBOX + City: Anytown + Region: NY + PostalCode: "10101" + Country: USA + AttentionTo: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: 222-2222 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: 333-2233 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 444-3433 + PhoneAreaCode: "212" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1551747281053+0000)/ + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2019-01-05T00:00:00 + Date: /Date(1546646400000+0000)/ + Status: DRAFT + LineAmountTypes: Exclusive + LineItems: + - Description: Foobar + UnitAmount: 20.00 + TaxType: INPUT2 + TaxAmount: 6.00 + LineAmount: 40.00 + AccountCode: "400" + Tracking: [] + Quantity: 2.0000 + ValidationErrors: [] + SubTotal: 40.00 + TotalTax: 6.00 + Total: 46.00 + UpdatedDateUTC: /Date(1551812702650+0000)/ + CurrencyCode: NZD + StatusAttributeString: OK + ValidationErrors: + - Message: An existing Credit Note with the specified CreditNoteID could not be found + "400": + $ref: '#/components/responses/400Error' + requestBody: + description: an array of Credit Notes with a single CreditNote object. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreditNotes' + example: + CreditNotes: + - Type: ACCPAYCREDIT + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Date: "2019-01-05" + Status: AUTHORISED + Reference: HelloWorld + LineItems: + - Description: Foobar + Quantity: 2.0 + UnitAmount: 20.0 + AccountCode: "400" + /CreditNotes/{CreditNoteID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getCreditNote + summary: Retrieves a specific credit note using a unique credit note Id + parameters: + - $ref: '#/components/parameters/CreditNoteID' + - $ref: '#/components/parameters/unitdp' + responses: + "200": + description: Success - return response of type Credit Notes array with a unique CreditNote + content: + application/json: + schema: + $ref: '#/components/schemas/CreditNotes' + example: + Id: dd5c5da7-08ab-486a-ac34-aea295f1614b + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1551812703811)/ + CreditNotes: + - CreditNoteID: 249f15fa-f2a7-4acc-8769-0984103f2225 + CreditNoteNumber: CN-0005 + Payments: + - PaymentID: 6b037c9b-2e5d-4905-84d3-eabfb3438242 + Date: /Date(1552521600000+0000)/ + Amount: 2.00 + Reference: Too much + CurrencyRate: 1.000000 + HasAccount: false + HasValidationErrors: false + ID: 249f15fa-f2a7-4acc-8769-0984103f2225 + CurrencyRate: 1.000000 + Type: ACCRECCREDIT + Reference: US Tour + RemainingCredit: 32.50 + Allocations: [] + HasAttachments: true + Attachments: + - AttachmentID: 9b9c9b62-069e-4f5a-a172-183195f084bb + FileName: Screen Shot 2019-03-04 at 9.00.06 AM.png + Url: https://api.xero.com/api.xro/2.0/creditnotes/249f15fa-f2a7-4acc-8769-0984103f2225/Attachments/Screen%20Shot%202019-03-04%20at%209.00.06%20AM.png + MimeType: image/png + ContentLength: 82334 + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + ContactStatus: ACTIVE + Name: Liam Gallagher + FirstName: Liam + LastName: Gallagher + EmailAddress: liam@rockstar.com + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + AttentionTo: "" + - AddressType: POBOX + City: Anytown + Region: NY + PostalCode: "10101" + Country: USA + AttentionTo: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: 222-2222 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: 333-2233 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 444-3433 + PhoneAreaCode: "212" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1551747281053+0000)/ + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2019-03-05T00:00:00 + Date: /Date(1551744000000+0000)/ + Status: AUTHORISED + LineAmountTypes: Exclusive + LineItems: + - Description: Mic Stand + UnitAmount: 30.00 + TaxType: OUTPUT2 + TaxAmount: 4.50 + LineAmount: 30.00 + AccountCode: "200" + Tracking: [] + Quantity: 1.0000 + ValidationErrors: [] + SubTotal: 30.00 + TotalTax: 4.50 + Total: 34.50 + UpdatedDateUTC: /Date(1551812346157+0000)/ + CurrencyCode: NZD + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: updateCreditNote + summary: Updates a specific credit note + x-hasAccountingValidationError: true + x-example: + - currDate: + is_date: true + key: currDate + keyPascal: CurrDate + keySnake: curr_date + java_datatype: LocalDate + default: LocalDate.now() + java: LocalDate.now() + csharp: DateTime.Now + node: '''2020-12-10''' + php: new DateTime('2020-12-10') + python: dateutil.parser.parse('2020-12-03T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - contact: + is_object: true + key: contact + keyPascal: Contact + - contactID: + is_last: true + is_uuid: true + key: contactID + keyPascal: ContactID + keySnake: contact_id + default: 00000000-0000-0000-0000-000000000000 + object: contact + - lineItem: + is_object: true + key: lineItem + keyPascal: LineItem + keySnake: line_item + - description: + key: description + keyPascal: Description + default: Foobar + object: lineItem + - quantity: + nonString: true + key: quantity + keyPascal: Quantity + default: 1.0 + is_money: true + object: lineItem + - unitAmount: + nonString: true + key: unitAmount + keyPascal: UnitAmount + keySnake: unit_amount + default: 20.0 + is_money: true + object: lineItem + - accountCode: + is_last: true + key: accountCode + keyPascal: AccountCode + keySnake: account_code + default: "000" + object: lineItem + - line_items: + is_list: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + csharp: LineItem + java: LineItem + - add_lineitems: + is_last: true + is_list_add: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + java: LineItems + python: line_item + ruby: line_item + csharp: LineItem + object: lineItem + - creditNote: + is_object: true + key: creditNote + keyPascal: CreditNote + keySnake: credit_note + - type: + nonString: true + key: type + keyPascal: Type + default: ACCPAYCREDIT + php: XeroAPI\XeroPHP\Models\Accounting\CreditNote::TYPE_ACCPAYCREDIT + node: CreditNote.TypeEnum.ACCPAYCREDIT + ruby: XeroRuby::Accounting::CreditNote::ACCPAYCREDIT + python_string: ACCPAYCREDIT + java: com.xero.models.accounting.CreditNote.TypeEnum.ACCPAYCREDIT + csharp: CreditNote.TypeEnum.ACCPAYCREDIT + object: creditNote + - status: + nonString: true + key: status + keyPascal: Status + default: AUTHORISED + php: XeroAPI\XeroPHP\Models\Accounting\CreditNote::STATUS_AUTHORISED + node: CreditNote.StatusEnum.AUTHORISED + ruby: XeroRuby::Accounting::CreditNote::AUTHORISED + python_string: AUTHORISED + java: com.xero.models.accounting.CreditNote.StatusEnum.AUTHORISED + csharp: CreditNote.StatusEnum.AUTHORISED + object: creditNote + - reference: + key: reference + keyPascal: Reference + default: My ref. + object: creditNote + - set_contact: + is_variable: true + nonString: true + key: contact + keyPascal: Contact + default: contact + object: creditNote + - date: + is_variable: true + nonString: true + key: date + keyPascal: Date + default: currDate + python: curr_date + ruby: curr_date + object: creditNote + - set_lineitem: + is_last: true + is_variable: true + nonString: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + default: lineItems + python: line_items + ruby: line_items + object: creditNote + - creditNotes: + is_object: true + key: creditNotes + keyPascal: CreditNotes + - add_creditNote: + is_last: true + is_array_add: true + key: creditNotes + keyPascal: CreditNotes + keySnake: credit_notes + java: CreditNotes + python: credit_note + ruby: credit_note + csharp: CreditNote + object: creditNote + parameters: + - $ref: '#/components/parameters/CreditNoteID' + - $ref: '#/components/parameters/unitdp' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Credit Notes array with updated CreditNote + content: + application/json: + schema: + $ref: '#/components/schemas/CreditNotes' + example: + Id: db2f7659-6044-418d-a4c6-d4b93eba4e1e + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1551812704253)/ + CreditNotes: + - CreditNoteID: f9256f04-5a99-4680-acb9-6b4639cc439a + CreditNoteNumber: "" + Payments: [] + ID: f9256f04-5a99-4680-acb9-6b4639cc439a + CurrencyRate: 1.000000 + Type: ACCPAYCREDIT + Reference: HelloWorld + RemainingCredit: 46.00 + Allocations: [] + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + ContactStatus: ACTIVE + Name: Liam Gallagher + FirstName: Liam + LastName: Gallagher + EmailAddress: liam@rockstar.com + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + AttentionTo: "" + - AddressType: POBOX + City: Anytown + Region: NY + PostalCode: "10101" + Country: USA + AttentionTo: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: 222-2222 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: 333-2233 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 444-3433 + PhoneAreaCode: "212" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1551747281053+0000)/ + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2019-01-05T00:00:00 + Date: /Date(1546646400000+0000)/ + Status: AUTHORISED + LineAmountTypes: Exclusive + LineItems: + - Description: Foobar + UnitAmount: 20.00 + TaxType: INPUT2 + TaxAmount: 6.00 + LineAmount: 40.00 + AccountCode: "400" + Tracking: [] + Quantity: 2.0000 + ValidationErrors: [] + SubTotal: 40.00 + TotalTax: 6.00 + Total: 46.00 + UpdatedDateUTC: /Date(1551812704223+0000)/ + CurrencyCode: NZD + "400": + $ref: '#/components/responses/400Error' + requestBody: + description: an array of Credit Notes containing credit note details to update + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreditNotes' + example: + CreditNotes: + - Type: ACCPAYCREDIT + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Date: "2019-01-05" + Status: AUTHORISED + Reference: HelloWorld + SentToContact: true + LineItems: + - Description: Foobar + Quantity: 2 + UnitAmount: 20 + AccountCode: "400" + /CreditNotes/{CreditNoteID}/Attachments: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getCreditNoteAttachments + summary: Retrieves attachments for a specific credit notes + parameters: + - $ref: '#/components/parameters/CreditNoteID' + responses: + "200": + description: Success - return response of type Attachments array with all Attachment for specific Credit Note + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: 2bb15054-3868-4f85-a9c6-0402ec8c1201 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1551822670731)/ + Attachments: + - AttachmentID: b7eb1fc9-a0f9-4e8e-9373-6689f5350832 + FileName: HelloWorld.png + Url: https://api.xero.com/api.xro/2.0/CreditNotes/249f15fa-f2a7-4acc-8769-0984103f2225/Attachments/HelloWorld.png + MimeType: image/png + ContentLength: 76091 + /CreditNotes/{CreditNoteID}/Attachments/{AttachmentID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getCreditNoteAttachmentById + summary: Retrieves a specific attachment from a specific credit note using a unique attachment Id + parameters: + - $ref: '#/components/parameters/CreditNoteID' + - $ref: '#/components/parameters/AttachmentID' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of attachment for Credit Note as binary data + content: + application/octet-stream: + schema: + type: string + format: binary + /CreditNotes/{CreditNoteID}/Attachments/{FileName}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getCreditNoteAttachmentByFileName + summary: Retrieves a specific attachment on a specific credit note by file name + parameters: + - $ref: '#/components/parameters/CreditNoteID' + - $ref: '#/components/parameters/FileName' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of attachment for Credit Note as binary data + content: + application/octet-stream: + schema: + type: string + format: binary + post: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: updateCreditNoteAttachmentByFileName + x-hasAccountingValidationError: true + summary: Updates attachments on a specific credit note by file name + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/CreditNoteID' + - $ref: '#/components/parameters/FileName' + responses: + "200": + description: Success - return response of type Attachments array with updated Attachment for specific Credit Note + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: 27253066-8c4d-4e34-a251-7a749b72de40 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1551828247939)/ + Attachments: + - AttachmentID: 103e49f1-e47c-4b4d-b5e8-77d9d00fa70a + FileName: HelloWorld.jpg + Url: https://api.xero.com/api.xro/2.0/CreditNotes/249f15fa-f2a7-4acc-8769-0984103f2225/Attachments/HelloWorld.jpg + MimeType: image/jpg + ContentLength: 2878711 + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + put: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: createCreditNoteAttachmentByFileName + x-hasAccountingValidationError: true + summary: Creates an attachment for a specific credit note + parameters: + - $ref: '#/components/parameters/CreditNoteID' + - $ref: '#/components/parameters/FileName' + - $ref: '#/components/parameters/includeOnline' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Attachments array with newly created Attachment for specific Credit Note + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: 22a8d402-5dea-40ed-9d01-26896429f649 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1551822953320)/ + Attachments: + - AttachmentID: 91bbae3f-5de5-4e3d-875f-8662f25897bd + FileName: sample5.jpg + Url: https://api.xero.com/api.xro/2.0/CreditNotes/249f15fa-f2a7-4acc-8769-0984103f2225/Attachments/sample5.jpg + MimeType: image/jpg + ContentLength: 2878711 + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + /CreditNotes/{CreditNoteID}/pdf: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getCreditNoteAsPdf + x-path: /CreditNotes/{CreditNoteID} + summary: Retrieves credit notes as PDF files + parameters: + - $ref: '#/components/parameters/CreditNoteID' + responses: + "200": + description: Success - return response of binary data from the Attachment to a Credit Note + content: + application/pdf: + schema: + type: string + format: binary + /CreditNotes/{CreditNoteID}/Allocations: + parameters: + - $ref: '#/components/parameters/requiredHeader' + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createCreditNoteAllocation + summary: Creates allocation for a specific credit note + x-hasAccountingValidationError: true + x-example: + - currDate: + is_date: true + key: currDate + keyPascal: CurrDate + keySnake: curr_date + java_datatype: LocalDate + default: LocalDate.now() + java: LocalDate.now() + csharp: DateTime.Now + node: '''2020-12-10''' + php: new DateTime('2020-12-10') + python: dateutil.parser.parse('2020-12-03T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - invoice: + is_object: true + key: invoice + keyPascal: Invoice + - invoiceID: + is_last: true + is_uuid: true + key: invoiceID + keyPascal: InvoiceID + default: 00000000-0000-0000-0000-000000000000 + object: invoice + - allocation: + is_object: true + key: allocation + keyPascal: Allocation + - amount: + nonString: true + key: amount + keyPascal: Amount + default: 1.0 + is_money: true + csharp: new decimal(1.0) + object: allocation + - date: + is_variable: true + nonString: true + key: date + keyPascal: Date + default: currDate + python: curr_date + ruby: curr_date + object: allocation + - set_invoice: + is_last: true + is_variable: true + nonString: true + key: invoice + keyPascal: Invoice + default: invoice + object: allocation + - allocations: + is_object: true + key: allocations + keyPascal: Allocations + - add_allocation: + is_last: true + is_array_add: true + key: allocations + keyPascal: Allocations + java: Allocations + csharp: Allocation + object: allocation + parameters: + - $ref: '#/components/parameters/CreditNoteID' + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Allocations array with newly created Allocation for specific Credit Note + content: + application/json: + schema: + $ref: '#/components/schemas/Allocations' + example: + Id: 73452751-6eaa-4bcb-86f5-4c013316f4cf + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1551828543255)/ + Allocations: + - Amount: 1.00 + Date: /Date(1551744000000+0000)/ + Invoice: + InvoiceID: c45720a1-ade3-4a38-a064-d15489be6841 + Payments: [] + CreditNotes: [] + Prepayments: [] + Overpayments: [] + HasErrors: false + IsDiscounted: false + LineItems: [] + ValidationErrors: [] + CreditNote: + CreditNoteID: 7be578f5-63af-45c8-9b00-dcc4732baf0b + ID: 7be578f5-63af-45c8-9b00-dcc4732baf0b + LineItems: [] + ValidationErrors: [] + "400": + $ref: '#/components/responses/400Error' + requestBody: + description: Allocations with array of Allocation object in body of request. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Allocations' + example: + Allocations: + - Invoice: + LineItems: [] + InvoiceID: c45720a1-ade3-4a38-a064-d15489be6841 + Amount: 1 + Date: "2019-03-05" + /CreditNotes/{CreditNoteID}/Allocations/{AllocationID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + delete: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: deleteCreditNoteAllocations + summary: Deletes an Allocation from a Credit Note + parameters: + - $ref: '#/components/parameters/CreditNoteID' + - $ref: '#/components/parameters/AllocationID' + responses: + "200": + description: Success - return response of type Allocation with the isDeleted flag as true + content: + application/json: + schema: + $ref: '#/components/schemas/Allocation' + example: + AllocationId: 2bb15054-3868-4f85-a9c6-0402ec8c1201 + Date: /Date(1551822670731)/ + Invoice: + - InvoiceID: b7eb1fc9-a0f9-4e8e-9373-6689f5350832 + IsDeleted: true + /CreditNotes/{CreditNoteID}/History: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getCreditNoteHistory + summary: Retrieves history records of a specific credit note + parameters: + - $ref: '#/components/parameters/CreditNoteID' + responses: + "200": + $ref: '#/components/responses/HistoryRetrieved' + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createCreditNoteHistory + summary: Retrieves history records of a specific credit note + x-hasAccountingValidationError: true + x-example: + - historyRecord: + is_object: true + key: historyRecord + keyPascal: HistoryRecord + keySnake: history_record + - Details: + is_last: true + key: details + keyPascal: Details + default: Hello World + object: historyRecord + - historyRecords: + is_object: true + key: historyRecords + keyPascal: HistoryRecords + - add_historyRecord: + is_last: true + is_array_add: true + key: historyRecords + keyPascal: HistoryRecords + keySnake: history_records + java: HistoryRecords + python: history_record + ruby: history_record + csharp: HistoryRecord + object: historyRecord + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/CreditNoteID' + responses: + "200": + $ref: '#/components/responses/HistoryRecordCreated' + "400": + $ref: '#/components/responses/400Error' + requestBody: + $ref: '#/components/requestBodies/historyRecords' + /Currencies: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.settings + - accounting.settings.read + tags: + - Accounting + operationId: getCurrencies + summary: Retrieves currencies for your Xero organisation + parameters: + - in: query + name: where + description: Filter by an any element + example: Code=="USD" + x-example-csharp: Code==\"USD\" + x-example-php: Code=="' . \XeroAPI\XeroPHP\Models\Accounting\CurrencyCode::USD . '" + x-example-ruby: Code==#{XeroRuby::Accounting::CurrencyCode::USD} + schema: + type: string + - in: query + name: order + description: Order by an any element + example: Code ASC + schema: + type: string + responses: + "200": + description: Success - return response of type Currencies array with all Currencies + content: + application/json: + schema: + $ref: '#/components/schemas/Currencies' + example: + Id: e6803fc8-8035-4251-b3e4-39d6b2de0f4a + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552322853043)/ + Currencies: + - Code: NZD + Description: New Zealand Dollar + put: + security: + - OAuth2: + - accounting.settings + tags: + - Accounting + operationId: createCurrency + summary: Create a new currency for a Xero organisation + parameters: + - $ref: '#/components/parameters/idempotencyKey' + x-hasAccountingValidationError: true + x-example: + - currency: + is_object: true + key: currency + keyPascal: Currency + - code: + nonString: true + key: code + keyPascal: Code + default: USD + php: XeroAPI\XeroPHP\Models\Accounting\CurrencyCode::USD + node: CurrencyCode.USD + ruby: XeroRuby::Accounting::CurrencyCode::USD + python: CurrencyCode.USD + java: com.xero.models.accounting.CurrencyCode.USD + csharp: CurrencyCode.USD + object: currency + - description: + is_last: true + key: description + keyPascal: Description + default: United States Dollar + object: currency + responses: + "200": + description: Unsupported - return response incorrect exception, API is not able to create new Currency + content: + application/json: + schema: + $ref: '#/components/schemas/Currencies' + example: + Currencies: + - Code: USD + Description: United States Dollar + requestBody: + required: true + description: Currency object in the body of request + content: + application/json: + schema: + $ref: '#/components/schemas/Currency' + example: + Code: USD + Description: United States Dollar + /Employees: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.settings + - accounting.settings.read + tags: + - Accounting + operationId: getEmployees + summary: Retrieves employees used in Xero payrun + parameters: + - $ref: '#/components/parameters/ifModifiedSince' + - in: query + name: where + description: Filter by an any element + example: Status=="ACTIVE" + x-example-csharp: Status==\"ACTIVE\" + x-example-java: Status=="' + Employee.StatusEnum.ACTIVE + '" + x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Employee::STATUS_ACTIVE . '" + x-example-ruby: Status==#{XeroRuby::Accounting::Employee::ACTIVE} + schema: + type: string + - in: query + name: order + description: Order by an any element + example: LastName ASC + schema: + type: string + responses: + "200": + description: Success - return response of type Employees array with all Employee + content: + application/json: + schema: + $ref: '#/components/schemas/Employees' + example: + Id: 593cbccc-5cd2-4cd2-be5e-150f0843709e + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552325082775)/ + Employees: + - EmployeeID: 972615c5-ad3d-47a0-b579-20370d374578 + Status: ACTIVE + FirstName: Tony + LastName: Stark + ExternalLink: + Url: http://twitter.com/#!/search/Stark+Industries + Description: Go to external link + UpdatedDateUTC: /Date(1552324681593+0000)/ + - EmployeeID: ad3db144-6362-459c-8c36-5d31d196e629 + Status: ACTIVE + FirstName: Bruce + LastName: Banner + ExternalLink: + Url: http://twitter.com/#!/search/Nick+Fury + Description: Go to external link + UpdatedDateUTC: /Date(1552325081303+0000)/ + - EmployeeID: e1ada26b-a10e-4065-a941-af34b53740e3 + Status: ACTIVE + FirstName: Nick + LastName: Fury + ExternalLink: + Url: http://twitter.com/#!/search/Nick+Fury + Description: Go to external link + UpdatedDateUTC: /Date(1552324737990+0000)/ + put: + security: + - OAuth2: + - accounting.settings + tags: + - Accounting + operationId: createEmployees + summary: Creates new employees used in Xero payrun + x-hasAccountingValidationError: true + x-example: + - employee: + is_object: true + key: employee + keyPascal: Employee + - firstName: + key: firstName + keyPascal: FirstName + keySnake: first_name + default: Nick + object: employee + - lastName: + is_last: true + key: lastName + keyPascal: LastName + keySnake: last_name + default: Fury + object: employee + - employees: + is_object: true + key: employees + keyPascal: Employees + - add_employee: + is_last: true + is_array_add: true + key: employees + keyPascal: Employees + java: Employees + csharp: Employee + object: employee + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Employees array with new Employee + content: + application/json: + schema: + $ref: '#/components/schemas/Employees' + example: + Id: 0d6a08e7-6936-4828-a1bc-e4595e0ef778 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552324736508)/ + Employees: + - EmployeeID: e1ada26b-a10e-4065-a941-af34b53740e3 + Status: ACTIVE + FirstName: Nick + LastName: Fury + ExternalLink: + Url: http://twitter.com/#!/search/Nick+Fury + Description: Go to external link + UpdatedDateUTC: /Date(1552324736463+0000)/ + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Employees with array of Employee object in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/Employees' + example: + Employees: + - FirstName: Nick + LastName: Fury + ExternalLink: + Url: http://twitter.com/#!/search/Nick+Fury + post: + security: + - OAuth2: + - accounting.settings + tags: + - Accounting + operationId: updateOrCreateEmployees + summary: Creates a single new employees used in Xero payrun + x-hasAccountingValidationError: true + x-example: + - employee: + is_object: true + key: employee + keyPascal: Employee + - firstName: + key: firstName + keyPascal: FirstName + keySnake: first_name + default: Nick + object: employee + - lastName: + is_last: true + key: lastName + keyPascal: LastName + keySnake: last_name + default: Fury + object: employee + - employees: + is_object: true + key: employees + keyPascal: Employees + - add_employee: + is_last: true + is_array_add: true + key: employees + keyPascal: Employees + java: Employees + csharp: Employee + object: employee + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Employees array with new Employee + content: + application/json: + schema: + $ref: '#/components/schemas/Employees' + example: + Id: 0d6a08e7-6936-4828-a1bc-e4595e0ef778 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552324736508)/ + Employees: + - EmployeeID: e1ada26b-a10e-4065-a941-af34b53740e3 + Status: ACTIVE + FirstName: Nick + LastName: Fury + ExternalLink: + Url: http://twitter.com/#!/search/Nick+Fury + Description: Go to external link + UpdatedDateUTC: /Date(1552324736463+0000)/ + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Employees with array of Employee object in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/Employees' + example: + Employees: + - FirstName: Nick + LastName: Fury + ExternalLink: + Url: http://twitter.com/#!/search/Nick+Fury + /Employees/{EmployeeID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.settings + - accounting.settings.read + tags: + - Accounting + operationId: getEmployee + summary: Retrieves a specific employee used in Xero payrun using a unique employee Id + parameters: + - $ref: '#/components/parameters/EmployeeID' + responses: + "200": + description: Success - return response of type Employees array with specified Employee + content: + application/json: + schema: + $ref: '#/components/schemas/Employees' + example: + Id: 417a529e-4f8d-4b1a-8816-7100245cf8b2 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552325084085)/ + Employees: + - EmployeeID: 972615c5-ad3d-47a0-b579-20370d374578 + Status: ACTIVE + FirstName: Tony + LastName: Stark + ExternalLink: + Url: http://twitter.com/#!/search/Stark+Industries + Description: Go to external link + UpdatedDateUTC: /Date(1552324681593+0000)/ + /ExpenseClaims: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getExpenseClaims + summary: Retrieves expense claims + parameters: + - $ref: '#/components/parameters/ifModifiedSince' + - in: query + name: where + description: Filter by an any element + example: Status=="SUBMITTED" + x-example-csharp: Status==\"SUBMITTED\" + x-example-java: Status=="' + ExpenseClaim.StatusEnum.SUBMITTED + '" + x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\ExpenseClaim::STATUS_SUBMITTED . '" + x-example-ruby: Status==#{XeroRuby::Accounting::ExpenseClaim::SUBMITTED} + schema: + type: string + - in: query + name: order + description: Order by an any element + example: Status ASC + schema: + type: string + responses: + "200": + description: Success - return response of type ExpenseClaims array with all ExpenseClaims + content: + application/json: + schema: + $ref: '#/components/schemas/ExpenseClaims' + example: + Id: f6a8867e-af29-41ee-8f77-855f5ff214fe + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552325853538)/ + ExpenseClaims: + - ExpenseClaimID: 646b15ab-b874-4e13-82ae-f4385b2ac4b6 + Status: AUTHORISED + UpdatedDateUTC: /Date(1552325851767+0000)/ + User: + UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273 + EmailAddress: api@xero.com + FirstName: 'API ' + LastName: Team + UpdatedDateUTC: /Date(1511957179217+0000)/ + IsSubscriber: true + OrganisationRole: FINANCIALADVISER + Receipts: [] + Payments: [] + Total: 40.00 + AmountDue: 40.00 + AmountPaid: 0.00 + ReportingDate: /Date(1552262400000+0000)/ + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createExpenseClaims + summary: Creates expense claims + parameters: + - $ref: '#/components/parameters/idempotencyKey' + x-hasAccountingValidationError: true + x-example: + - currDate: + is_date: true + key: currDate + keyPascal: CurrDate + keySnake: curr_date + java_datatype: LocalDate + default: LocalDate.now() + java: LocalDate.now() + csharp: DateTime.Now + node: '''2020-12-10''' + php: new DateTime('2020-12-10') + python: dateutil.parser.parse('2020-12-03T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - user: + is_object: true + key: user + keyPascal: User + - userID: + is_last: true + is_uuid: true + key: userID + keyPascal: UserID + keySnake: user_id + default: 00000000-0000-0000-0000-000000000000 + object: user + - receipt: + is_object: true + key: receipt + keyPascal: Receipt + - receiptID: + is_uuid: true + key: receiptID + keyPascal: ReceiptID + keySnake: receipt_id + default: 00000000-0000-0000-0000-000000000000 + object: receipt + - date: + is_last: true + is_variable: true + nonString: true + key: date + keyPascal: Date + default: currDate + python: curr_date + ruby: curr_date + object: receipt + - receipts: + is_list: true + key: receipts + keyPascal: Receipt + - add_receipts: + is_last: true + is_list_add: true + key: receipts + keyPascal: Receipts + object: receipt + - expenseClaim: + is_object: true + key: expenseClaim + keyPascal: ExpenseClaim + keySnake: expense_claim + - status: + nonString: true + key: status + keyPascal: Status + default: SUBMITTED + php: XeroAPI\XeroPHP\Models\Accounting\ExpenseClaim::STATUS_SUBMITTED + node: ExpenseClaim.StatusEnum.SUBMITTED + ruby: XeroRuby::Accounting::ExpenseClaim::SUBMITTED + python_string: SUBMITTED + java: com.xero.models.accounting.ExpenseClaim.StatusEnum.SUBMITTED + csharp: ExpenseClaim.StatusEnum.SUBMITTED + object: expenseClaim + - set_user: + is_variable: true + nonString: true + key: user + keyPascal: User + default: user + object: expenseClaim + - set_receipt: + is_last: true + is_variable: true + nonString: true + key: receipts + keyPascal: Receipts + default: receipts + object: expenseClaim + - expenseClaims: + is_object: true + key: expenseClaims + keyPascal: ExpenseClaims + - add_expenseClaim: + is_array_add: true + is_last: true + key: expenseClaims + keyPascal: ExpenseClaims + keySnake: expense_claims + java: ExpenseClaims + python: expense_claim + ruby: expense_claim + csharp: ExpenseClaim + object: expenseClaim + requestBody: + required: true + description: ExpenseClaims with array of ExpenseClaim object in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/ExpenseClaims' + example: + ExpenseClaims: + - Status: SUBMITTED + User: + UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273 + Receipts: + - Lineitems: [] + ReceiptID: dc1c7f6d-0a4c-402f-acac-551d62ce5816 + responses: + "200": + description: Success - return response of type ExpenseClaims array with newly created ExpenseClaim + content: + application/json: + schema: + $ref: '#/components/schemas/ExpenseClaims' + example: + Id: 4a0879a6-3860-4b73-adc6-f6a0e0f68fc8 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552325850201)/ + ExpenseClaims: + - ExpenseClaimID: 646b15ab-b874-4e13-82ae-f4385b2ac4b6 + Status: SUBMITTED + UpdatedDateUTC: /Date(1552325850107+0000)/ + User: + UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273 + EmailAddress: api@xero.com + FirstName: 'API ' + LastName: Team + UpdatedDateUTC: /Date(1511957179217+0000)/ + IsSubscriber: true + OrganisationRole: FINANCIALADVISER + Receipts: + - ReceiptID: dc1c7f6d-0a4c-402f-acac-551d62ce5816 + ReceiptNumber: 1 + Status: SUBMITTED + User: + UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273 + EmailAddress: api@xero.com + FirstName: 'API ' + LastName: Team + UpdatedDateUTC: /Date(1511957179217+0000)/ + IsSubscriber: true + OrganisationRole: FINANCIALADVISER + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Name: Liam Gallagher + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + Date: /Date(1552348800000+0000)/ + UpdatedDateUTC: /Date(1552325848457+0000)/ + Reference: "" + LineAmountTypes: NoTax + LineItems: + - Description: Foobar + UnitAmount: 20.00 + TaxType: NONE + TaxAmount: 0.00 + LineAmount: 40.00 + Tracking: [] + Quantity: 2.0000 + SubTotal: 40.00 + TotalTax: 0.00 + Total: 40.00 + ID: dc1c7f6d-0a4c-402f-acac-551d62ce5816 + HasAttachments: false + Payments: [] + Total: 40.00 + AmountDue: 40.00 + AmountPaid: 0.00 + StatusAttributeString: OK + "400": + $ref: '#/components/responses/400Error' + /ExpenseClaims/{ExpenseClaimID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getExpenseClaim + summary: Retrieves a specific expense claim using a unique expense claim Id + parameters: + - $ref: '#/components/parameters/ExpenseClaimID' + responses: + "200": + description: Success - return response of type ExpenseClaims array with specified ExpenseClaim + content: + application/json: + schema: + $ref: '#/components/schemas/ExpenseClaims' + example: + Id: b54bb45d-37da-4f53-9f1d-536302d6bad7 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552325854864)/ + ExpenseClaims: + - ExpenseClaimID: 646b15ab-b874-4e13-82ae-f4385b2ac4b6 + Status: AUTHORISED + UpdatedDateUTC: /Date(1552325851767+0000)/ + User: + UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273 + EmailAddress: api@xero.com + FirstName: 'API ' + LastName: Team + UpdatedDateUTC: /Date(1511957179217+0000)/ + IsSubscriber: true + OrganisationRole: FINANCIALADVISER + Receipts: + - ReceiptID: dc1c7f6d-0a4c-402f-acac-551d62ce5816 + ReceiptNumber: 1 + Status: AUTHORISED + User: + UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273 + EmailAddress: api@xero.com + FirstName: 'API ' + LastName: Team + UpdatedDateUTC: /Date(1511957179217+0000)/ + IsSubscriber: true + OrganisationRole: FINANCIALADVISER + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Name: Liam Gallagher + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + Date: /Date(1552348800000+0000)/ + UpdatedDateUTC: /Date(1552325848457+0000)/ + Reference: "" + LineAmountTypes: NoTax + LineItems: + - Description: Foobar + UnitAmount: 20.00 + TaxType: NONE + TaxAmount: 0.00 + LineAmount: 40.00 + AccountCode: "400" + Tracking: [] + Quantity: 2.0000 + SubTotal: 40.00 + TotalTax: 0.00 + Total: 40.00 + ID: dc1c7f6d-0a4c-402f-acac-551d62ce5816 + HasAttachments: false + Payments: [] + Total: 40.00 + AmountDue: 40.00 + AmountPaid: 0.00 + ReportingDate: /Date(1552262400000+0000)/ + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: updateExpenseClaim + summary: Updates a specific expense claims + x-hasAccountingValidationError: true + x-example: + - currDate: + is_date: true + key: currDate + keyPascal: CurrDate + keySnake: curr_date + java_datatype: LocalDate + default: LocalDate.now() + java: LocalDate.now() + csharp: DateTime.Now + node: '''2020-12-10''' + php: new DateTime('2020-12-10') + python: dateutil.parser.parse('2020-12-03T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - user: + is_object: true + key: user + keyPascal: User + - userID: + is_last: true + is_uuid: true + key: userID + keyPascal: UserID + keySnake: user_id + default: 00000000-0000-0000-0000-000000000000 + object: user + - receipt: + is_object: true + key: receipt + keyPascal: Receipt + - receiptID: + is_uuid: true + key: receiptID + keyPascal: ReceiptID + keySnake: receipt_id + default: 00000000-0000-0000-0000-000000000000 + object: receipt + - date: + is_last: true + is_variable: true + nonString: true + key: date + keyPascal: Date + default: currDate + python: curr_date + ruby: curr_date + object: receipt + - receipts: + is_list: true + key: receipts + keyPascal: Receipt + - add_receipts: + is_last: true + is_list_add: true + key: receipts + keyPascal: Receipts + object: receipt + - expenseClaim: + is_object: true + key: expenseClaim + keyPascal: ExpenseClaim + keySnake: expense_claim + - status: + nonString: true + key: status + keyPascal: Status + default: SUBMITTED + php: XeroAPI\XeroPHP\Models\Accounting\ExpenseClaim::STATUS_SUBMITTED + node: ExpenseClaim.StatusEnum.SUBMITTED + ruby: XeroRuby::Accounting::ExpenseClaim::SUBMITTED + python_string: SUBMITTED + java: com.xero.models.accounting.ExpenseClaim.StatusEnum.SUBMITTED + csharp: ExpenseClaim.StatusEnum.SUBMITTED + object: expenseClaim + - set_user: + is_variable: true + nonString: true + key: user + keyPascal: User + default: user + object: expenseClaim + - set_receipt: + is_last: true + is_variable: true + nonString: true + key: receipts + keyPascal: Receipts + default: receipts + object: expenseClaim + - expenseClaims: + is_object: true + key: expenseClaims + keyPascal: ExpenseClaims + - add_expenseClaim: + is_array_add: true + is_last: true + key: expenseClaims + keyPascal: ExpenseClaims + keySnake: expense_claims + java: ExpenseClaims + python: expense_claim + ruby: expense_claim + csharp: ExpenseClaim + object: expenseClaim + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/ExpenseClaimID' + responses: + "200": + description: Success - return response of type ExpenseClaims array with updated ExpenseClaim + content: + application/json: + schema: + $ref: '#/components/schemas/ExpenseClaims' + example: + Id: 8ee87f9c-058b-4f1b-b5b2-29569bf055d7 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552325851907)/ + ExpenseClaims: + - ExpenseClaimID: 646b15ab-b874-4e13-82ae-f4385b2ac4b6 + Status: AUTHORISED + UpdatedDateUTC: /Date(1552325851767+0000)/ + User: + UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273 + EmailAddress: api@xero.com + FirstName: 'API ' + LastName: Team + UpdatedDateUTC: /Date(1511957179217+0000)/ + IsSubscriber: true + OrganisationRole: FINANCIALADVISER + Receipts: + - ReceiptID: dc1c7f6d-0a4c-402f-acac-551d62ce5816 + ReceiptNumber: 1 + Status: AUTHORISED + User: + UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273 + EmailAddress: api@xero.com + FirstName: 'API ' + LastName: Team + UpdatedDateUTC: /Date(1511957179217+0000)/ + IsSubscriber: true + OrganisationRole: FINANCIALADVISER + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Name: Liam Gallagher + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + Date: /Date(1552348800000+0000)/ + UpdatedDateUTC: /Date(1552325848457+0000)/ + Reference: "" + LineAmountTypes: NoTax + LineItems: + - Description: Foobar + UnitAmount: 20.00 + TaxType: NONE + TaxAmount: 0.00 + LineAmount: 40.00 + AccountCode: "400" + Tracking: [] + Quantity: 2.0000 + SubTotal: 40.00 + TotalTax: 0.00 + Total: 40.00 + ID: dc1c7f6d-0a4c-402f-acac-551d62ce5816 + HasAttachments: false + Payments: [] + Total: 40.00 + AmountDue: 40.00 + AmountPaid: 0.00 + ReportingDate: /Date(1552262400000+0000)/ + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ExpenseClaims' + example: + ExpenseClaims: + - Status: SUBMITTED + User: + UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273 + Receipts: + - Lineitems: [] + ReceiptID: dc1c7f6d-0a4c-402f-acac-551d62ce5816 + /ExpenseClaims/{ExpenseClaimID}/History: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getExpenseClaimHistory + summary: Retrieves history records of a specific expense claim + parameters: + - $ref: '#/components/parameters/ExpenseClaimID' + responses: + "200": + $ref: '#/components/responses/HistoryRetrieved' + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createExpenseClaimHistory + summary: Creates a history record for a specific expense claim + x-hasAccountingValidationError: true + x-example: + - historyRecord: + is_object: true + key: historyRecord + keyPascal: HistoryRecord + keySnake: history_record + - Details: + is_last: true + key: details + keyPascal: Details + default: Hello World + object: historyRecord + - historyRecords: + is_object: true + key: historyRecords + keyPascal: HistoryRecords + - add_historyRecord: + is_last: true + is_array_add: true + key: historyRecords + keyPascal: HistoryRecords + keySnake: history_records + java: HistoryRecords + python: history_record + ruby: history_record + csharp: HistoryRecord + object: historyRecord + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/ExpenseClaimID' + responses: + "200": + $ref: '#/components/responses/HistoryRecordCreated' + requestBody: + $ref: '#/components/requestBodies/historyRecords' + /Invoices: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getInvoices + summary: Retrieves sales invoices or purchase bills + parameters: + - $ref: '#/components/parameters/ifModifiedSince' + - in: query + name: where + description: Filter by an any element + example: Status=="DRAFT" + x-example-java: Status=="' + Invoice.StatusEnum.DRAFT + '" + x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Invoice::STATUS_DRAFT . '" + x-example-ruby: Status==#{XeroRuby::Accounting::Invoice::DRAFT} + x-example-csharp: Status==\"DRAFT\" + schema: + type: string + - in: query + name: order + description: Order by an any element + example: InvoiceNumber ASC + schema: + type: string + - in: query + name: IDs + x-snake: ids + description: Filter by a comma-separated list of InvoicesIDs. + style: form + explode: false + example: '"00000000-0000-0000-0000-000000000000"' + x-example-java: Arrays.asList(UUID.fromString("00000000-0000-0000-0000-000000000000")) + x-example-php: '"00000000-0000-0000-0000-000000000000"' + x-example-csharp: new List<Guid>{Guid.Parse("00000000-0000-0000-0000-000000000000")}; + schema: + type: array + items: + type: string + format: uuid + - in: query + name: InvoiceNumbers + x-snake: invoice_numbers + description: Filter by a comma-separated list of InvoiceNumbers. + style: form + explode: false + example: '"INV-001", "INV-002"' + x-example-java: Arrays.asList("INV-001","INV-002") + x-example-php: '"INV-001", "INV-002"' + x-example-csharp: new List<string>{"INV-001","INV-002"}; + schema: + type: array + items: + type: string + - in: query + name: ContactIDs + x-snake: contact_ids + description: Filter by a comma-separated list of ContactIDs. + style: form + explode: false + example: '"00000000-0000-0000-0000-000000000000"' + x-example-java: Arrays.asList(UUID.fromString("00000000-0000-0000-0000-000000000000")) + x-example-php: '"00000000-0000-0000-0000-000000000000"' + x-example-csharp: new List<Guid>{Guid.Parse("00000000-0000-0000-0000-000000000000")}; + schema: + type: array + items: + type: string + format: uuid + - in: query + name: Statuses + x-snake: statuses + description: Filter by a comma-separated list Statuses. For faster response times we recommend using these explicit parameters instead of passing OR conditions into the Where filter. + explode: false + example: '"DRAFT", "SUBMITTED"' + x-example-java: Arrays.asList("DRAFT","SUBMITTED") + x-example-php: '"DRAFT", "SUBMITTED"' + x-example-csharp: new List<string>{"DRAFT","SUBMITTED"}; + schema: + type: array + items: + type: string + - in: query + name: page + description: e.g. page=1 – Up to 100 invoices will be returned in a single API call with line items shown for each invoice + example: 1 + schema: + type: integer + - in: query + name: includeArchived + x-snake: include_archived + description: e.g. includeArchived=true - Invoices with a status of ARCHIVED will be included in the response + example: true + x-example-python: "True" + schema: + type: boolean + - in: query + name: createdByMyApp + x-snake: created_by_my_app + description: When set to true you'll only retrieve Invoices created by your app + example: false + x-example-python: "False" + schema: + type: boolean + - $ref: '#/components/parameters/unitdp' + - $ref: '#/components/parameters/summaryOnly' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/searchTerm' + responses: + "200": + description: Success - return response of type Invoices array with all Invoices + content: + application/json: + schema: + $ref: '#/components/schemas/Invoices' + example: + Id: 900c500b-e83c-4ce2-902a-b8ba04751748 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552326816230)/ + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 3 + Invoices: + - Type: ACCREC + InvoiceID: d4956132-ed94-4dd7-9eaa-aa22dfdf06f2 + InvoiceNumber: INV-0001 + Reference: Red Fish, Blue Fish + Payments: [] + CreditNotes: [] + Prepayments: [] + Overpayments: [] + AmountDue: 0.00 + AmountPaid: 0.00 + AmountCredited: 0.00 + SentToContact: true + CurrencyRate: 1.000000 + HasErrors: false + IsDiscounted: false + HasAttachments: false + RepeatingInvoiceID: 428c0d75-909f-4b04-8403-a48dc27283b0 + Contact: + ContactID: a3675fc4-f8dd-4f03-ba5b-f1870566bcd7 + Name: Barney Rubble-83203 + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2018-10-20T00:00:00 + Date: /Date(1539993600000+0000)/ + DueDateString: 2018-12-30T00:00:00 + DueDate: /Date(1546128000000+0000)/ + Status: VOIDED + LineAmountTypes: Exclusive + LineItems: [] + SubTotal: 40.00 + TotalTax: 0.00 + Total: 40.00 + UpdatedDateUTC: /Date(1541176290160+0000)/ + CurrencyCode: NZD + - Type: ACCREC + InvoiceID: 046d8a6d-1ae1-4b4d-9340-5601bdf41b87 + InvoiceNumber: INV-0002 + Reference: Red Fish, Blue Fish + Payments: + - PaymentID: 99ea7f6b-c513-4066-bc27-b7c65dcd76c2 + Date: /Date(1543449600000+0000)/ + Amount: 46.00 + CurrencyRate: 1.000000 + HasAccount: false + HasValidationErrors: false + CreditNotes: [] + Prepayments: [] + Overpayments: [] + AmountDue: 0.00 + AmountPaid: 46.00 + AmountCredited: 0.00 + SentToContact: true + CurrencyRate: 1.000000 + HasErrors: false + IsDiscounted: false + HasAttachments: false + Contact: + ContactID: a3675fc4-f8dd-4f03-ba5b-f1870566bcd7 + Name: Barney Rubble-83203 + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2018-10-20T00:00:00 + Date: /Date(1539993600000+0000)/ + DueDateString: 2018-12-30T00:00:00 + DueDate: /Date(1546128000000+0000)/ + Status: PAID + LineAmountTypes: Exclusive + LineItems: [] + SubTotal: 40.00 + TotalTax: 6.00 + Total: 46.00 + UpdatedDateUTC: /Date(1541176592690+0000)/ + CurrencyCode: NZD + FullyPaidOnDate: /Date(1543449600000+0000)/ + - Type: ACCREC + InvoiceID: 7ef31b20-de17-4312-8382-412f869b1510 + InvoiceNumber: INV-0003 + Reference: "" + Payments: [] + CreditNotes: [] + Prepayments: [] + Overpayments: [] + AmountDue: 115.00 + AmountPaid: 0.00 + AmountCredited: 0.00 + CurrencyRate: 1.000000 + HasErrors: false + IsDiscounted: false + HasAttachments: false + Contact: + ContactID: a3675fc4-f8dd-4f03-ba5b-f1870566bcd7 + Name: Barney Rubble-83203 + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2018-11-02T00:00:00 + Date: /Date(1541116800000+0000)/ + DueDateString: 2018-11-07T00:00:00 + DueDate: /Date(1541548800000+0000)/ + Status: AUTHORISED + LineAmountTypes: Exclusive + LineItems: [] + SubTotal: 100.00 + TotalTax: 15.00 + Total: 115.00 + UpdatedDateUTC: /Date(1541176648927+0000)/ + CurrencyCode: NZD + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createInvoices + summary: Creates one or more sales invoices or purchase bills + x-hasAccountingValidationError: true + x-example: + - dateValue: + is_date: true + key: dateValue + keyPascal: Date + keySnake: date_value + java_datatype: LocalDate + default: LocalDate.of(2020, Month.OCTOBER, 10) + java: LocalDate.of(2020, Month.OCTOBER, 10) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-10') + node: '''2020-10-10''' + python: dateutil.parser.parse('2020-10-10T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - dueDateValue: + is_date: true + key: dueDateValue + keyPascal: Date + keySnake: due_date_value + java_datatype: LocalDate + csharp_datatype: DateTime + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - contact: + is_object: true + key: contact + keyPascal: Contact + - contactID: + is_last: true + is_uuid: true + key: contactID + keyPascal: ContactID + keySnake: contact_id + default: 00000000-0000-0000-0000-000000000000 + object: contact + - lineItemTracking: + is_object: true + key: lineItemTracking + keyPascal: LineItemTracking + keySnake: line_item_tracking + - trackingCategoryId: + is_uuid: true + key: trackingCategoryID + keyPascal: TrackingCategoryID + keySnake: tracking_category_id + default: 00000000-0000-0000-0000-000000000000 + object: lineItemTracking + - trackingOptionID: + is_last: true + is_uuid: true + key: trackingOptionID + keyPascal: TrackingOptionID + keySnake: tracking_option_id + default: 00000000-0000-0000-0000-000000000000 + object: lineItemTracking + - lineItemTrackings: + is_list: true + key: lineItemTrackings + keyPascal: LineItemTracking + keySnake: line_item_trackings + - add_lineitemtrackings: + is_last: true + is_list_add: true + key: lineItemTrackings + keyPascal: LineItemTrackings + keySnake: line_item_trackings + python: line_item_tracking + ruby: line_item_tracking + object: lineItemTracking + - lineItem: + is_object: true + key: lineItem + keyPascal: LineItem + keySnake: line_item + - description: + key: description + keyPascal: Description + default: Foobar + object: lineItem + - quantity: + nonString: true + key: quantity + keyPascal: Quantity + default: 1.0 + is_money: true + object: lineItem + - unitAmount: + nonString: true + key: unitAmount + keyPascal: UnitAmount + keySnake: unit_amount + default: 20.0 + is_money: true + object: lineItem + - accountCode: + key: accountCode + keyPascal: AccountCode + keySnake: account_code + default: "000" + object: lineItem + - tracking: + is_last: true + nonString: true + key: tracking + keyPascal: Tracking + default: lineItemTrackings + object: lineItem + - line_items: + is_list: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + csharp: LineItem + java: LineItem + - add_lineitems: + is_last: true + is_list_add: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + java: LineItems + python: line_item + ruby: line_item + csharp: LineItem + object: lineItem + - invoice: + is_object: true + key: invoice + keyPascal: Invoice + - type: + nonString: true + key: type + keyPascal: Type + default: ACCREC + php: XeroAPI\XeroPHP\Models\Accounting\Invoice::TYPE_ACCREC + node: Invoice.TypeEnum.ACCREC + ruby: XeroRuby::Accounting::Invoice::ACCREC + python_string: ACCREC + java: com.xero.models.accounting.Invoice.TypeEnum.ACCREC + csharp: Invoice.TypeEnum.ACCREC + object: invoice + - set_contact: + is_variable: true + nonString: true + key: contact + keyPascal: Contact + default: contact + object: invoice + - date: + is_variable: true + nonString: true + key: date + keyPascal: Date + default: dateValue + python: date_value + ruby: date_value + object: invoice + - dueDate: + is_variable: true + nonString: true + key: dueDate + keyPascal: DueDate + keySnake: due_date + default: dueDateValue + python: due_date_value + ruby: due_date_value + object: invoice + - set_lineitem: + is_variable: true + nonString: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + default: lineItems + python: line_items + ruby: line_items + object: invoice + - reference: + key: reference + keyPascal: Reference + default: Website Design + object: invoice + - status: + is_last: true + nonString: true + key: status + keyPascal: Status + default: DRAFT + php: XeroAPI\XeroPHP\Models\Accounting\Invoice::STATUS_DRAFT + node: Invoice.StatusEnum.DRAFT + ruby: XeroRuby::Accounting::Invoice::DRAFT + python_string: DRAFT + java: com.xero.models.accounting.Invoice.StatusEnum.DRAFT + csharp: Invoice.StatusEnum.DRAFT + object: invoice + - invoices: + is_object: true + key: invoices + keyPascal: Invoices + - add_invoice: + is_last: true + is_array_add: true + key: invoices + keyPascal: Invoices + java: Invoices + csharp: Invoice + object: invoice + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/unitdp' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Invoices array with newly created Invoice + content: + application/json: + schema: + $ref: '#/components/schemas/Invoices' + example: + Id: ccece84a-075c-4fcd-9073-149d4f7a91cf + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552327126164)/ + Invoices: + - Type: ACCREC + InvoiceID: ed255415-e141-4150-aab7-89c3bbbb851c + InvoiceNumber: INV-0007 + Reference: Website Design + Prepayments: [] + Overpayments: [] + AmountDue: 40.00 + AmountPaid: 0.00 + SentToContact: false + CurrencyRate: 1.000000 + HasErrors: false + IsDiscounted: false + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + ContactStatus: ACTIVE + Name: Liam Gallagher + FirstName: Liam + LastName: Gallagher + EmailAddress: liam@rockstar.com + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + AttentionTo: "" + - AddressType: POBOX + City: Anytown + Region: NY + PostalCode: "10101" + Country: USA + AttentionTo: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: 222-2222 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: 333-2233 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 444-3433 + PhoneAreaCode: "212" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1551747281053+0000)/ + ContactGroups: + - ContactGroupID: 17b44ed7-4389-4162-91cb-3dd5766e4e22 + Name: Oasis + Status: ACTIVE + Contacts: [] + HasValidationErrors: false + IsSupplier: true + IsCustomer: true + SalesTrackingCategories: [] + PurchasesTrackingCategories: [] + ContactPersons: + - FirstName: Debbie + LastName: Gwyther + EmailAddress: debbie@rockstar.com + IncludeInEmails: false + HasValidationErrors: false + DateString: 2019-03-11T00:00:00 + Date: /Date(1552262400000+0000)/ + DueDateString: 2018-12-10T00:00:00 + DueDate: /Date(1544400000000+0000)/ + Status: AUTHORISED + LineAmountTypes: Exclusive + LineItems: + - Description: Acme Tires + UnitAmount: 20.00 + TaxType: NONE + TaxAmount: 0.00 + LineAmount: 40.00 + AccountCode: "200" + Tracking: [] + Quantity: 2.0000 + LineItemID: 5f7a612b-fdcc-4d33-90fa-a9f6bc6db32f + ValidationErrors: [] + SubTotal: 40.00 + TotalTax: 0.00 + Total: 40.00 + UpdatedDateUTC: /Date(1552327126117+0000)/ + CurrencyCode: NZD + StatusAttributeString: OK + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Invoices with an array of invoice objects in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/Invoices' + example: + Invoices: + - Type: ACCREC + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + LineItems: + - Description: Acme Tires + Quantity: 2 + UnitAmount: 20 + AccountCode: "200" + TaxType: NONE + LineAmount: 40 + Date: "2019-03-11" + DueDate: "2018-12-10" + Reference: Website Design + Status: AUTHORISED + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: updateOrCreateInvoices + summary: Updates or creates one or more sales invoices or purchase bills + x-hasAccountingValidationError: true + x-example: + - dateValue: + is_date: true + key: dateValue + keyPascal: Date + keySnake: date_value + java_datatype: LocalDate + default: LocalDate.of(2020, Month.OCTOBER, 10) + java: LocalDate.of(2020, Month.OCTOBER, 10) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-10') + node: '''2020-10-10''' + python: dateutil.parser.parse('2020-10-10T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - dueDateValue: + is_date: true + key: dueDateValue + keyPascal: Date + keySnake: due_date_value + java_datatype: LocalDate + default: LocalDate.of(2020, Month.OCTOBER, 28) + java: LocalDate.of(2020, Month.OCTOBER, 28) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-28') + node: '''2020-10-28''' + python: dateutil.parser.parse('2020-10-28T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - contact: + is_object: true + key: contact + keyPascal: Contact + - contactID: + is_last: true + is_uuid: true + key: contactID + keyPascal: ContactID + keySnake: contact_id + default: 00000000-0000-0000-0000-000000000000 + object: contact + - lineItem: + is_object: true + key: lineItem + keyPascal: LineItem + keySnake: line_item + - description: + key: description + keyPascal: Description + default: Foobar + object: lineItem + - quantity: + nonString: true + key: quantity + keyPascal: Quantity + default: 1.0 + is_money: true + object: lineItem + - unitAmount: + nonString: true + key: unitAmount + keyPascal: UnitAmount + keySnake: unit_amount + default: 20.0 + is_money: true + object: lineItem + - accountCode: + is_last: true + key: accountCode + keyPascal: AccountCode + keySnake: account_code + default: "000" + object: lineItem + - line_items: + is_list: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + csharp: LineItem + java: LineItem + - add_lineitems: + is_last: true + is_list_add: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + java: LineItems + python: line_item + ruby: line_item + csharp: LineItem + object: lineItem + - invoice: + is_object: true + key: invoice + keyPascal: Invoice + - type: + nonString: true + key: type + keyPascal: Type + default: ACCREC + php: XeroAPI\XeroPHP\Models\Accounting\Invoice::TYPE_ACCREC + node: Invoice.TypeEnum.ACCREC + ruby: XeroRuby::Accounting::Invoice::ACCREC + python_string: ACCREC + java: com.xero.models.accounting.Invoice.TypeEnum.ACCREC + csharp: Invoice.TypeEnum.ACCREC + object: invoice + - set_contact: + is_variable: true + nonString: true + key: contact + keyPascal: Contact + default: contact + object: invoice + - date: + is_variable: true + nonString: true + key: date + keyPascal: Date + default: dateValue + python: date_value + ruby: date_value + object: invoice + - dueDate: + is_variable: true + nonString: true + key: dueDate + keyPascal: Date + keySnake: due_date + default: dueDateValue + python: due_date_value + ruby: due_date_value + object: invoice + - set_lineitem: + is_variable: true + nonString: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + default: lineItems + python: line_items + ruby: line_items + object: invoice + - reference: + key: reference + keyPascal: Reference + default: Website Design + object: invoice + - status: + is_last: true + nonString: true + key: status + keyPascal: Status + default: DRAFT + php: XeroAPI\XeroPHP\Models\Accounting\Invoice::STATUS_DRAFT + node: Invoice.StatusEnum.DRAFT + ruby: XeroRuby::Accounting::Invoice::DRAFT + python_string: DRAFT + java: com.xero.models.accounting.Invoice.StatusEnum.DRAFT + csharp: Invoice.StatusEnum.DRAFT + object: invoice + - invoices: + is_object: true + key: invoices + keyPascal: Invoices + - add_invoice: + is_last: true + is_array_add: true + key: invoices + keyPascal: Invoices + java: Invoices + csharp: Invoice + object: invoice + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/unitdp' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Invoices array with newly created Invoice + content: + application/json: + schema: + $ref: '#/components/schemas/Invoices' + example: + Id: ccece84a-075c-4fcd-9073-149d4f7a91cf + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552327126164)/ + Invoices: + - Type: ACCREC + InvoiceID: ed255415-e141-4150-aab7-89c3bbbb851c + InvoiceNumber: INV-0007 + Reference: Website Design + Prepayments: [] + Overpayments: [] + AmountDue: 40.00 + AmountPaid: 0.00 + SentToContact: false + CurrencyRate: 1.000000 + HasErrors: false + IsDiscounted: false + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + ContactStatus: ACTIVE + Name: Liam Gallagher + FirstName: Liam + LastName: Gallagher + EmailAddress: liam@rockstar.com + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + AttentionTo: "" + - AddressType: POBOX + City: Anytown + Region: NY + PostalCode: "10101" + Country: USA + AttentionTo: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: 222-2222 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: 333-2233 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 444-3433 + PhoneAreaCode: "212" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1551747281053+0000)/ + ContactGroups: + - ContactGroupID: 17b44ed7-4389-4162-91cb-3dd5766e4e22 + Name: Oasis + Status: ACTIVE + Contacts: [] + HasValidationErrors: false + IsSupplier: true + IsCustomer: true + SalesTrackingCategories: [] + PurchasesTrackingCategories: [] + ContactPersons: + - FirstName: Debbie + LastName: Gwyther + EmailAddress: debbie@rockstar.com + IncludeInEmails: false + HasValidationErrors: false + DateString: 2019-03-11T00:00:00 + Date: /Date(1552262400000+0000)/ + DueDateString: 2018-12-10T00:00:00 + DueDate: /Date(1544400000000+0000)/ + Status: AUTHORISED + LineAmountTypes: Exclusive + LineItems: + - Description: Acme Tires + UnitAmount: 20.00 + TaxType: NONE + TaxAmount: 0.00 + LineAmount: 40.00 + AccountCode: "200" + Tracking: [] + Quantity: 2.0000 + LineItemID: 5f7a612b-fdcc-4d33-90fa-a9f6bc6db32f + ValidationErrors: [] + SubTotal: 40.00 + TotalTax: 0.00 + Total: 40.00 + UpdatedDateUTC: /Date(1552327126117+0000)/ + CurrencyCode: NZD + StatusAttributeString: OK + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Invoices' + example: + Invoices: + - Type: ACCREC + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + LineItems: + - Description: Acme Tires + Quantity: 2 + UnitAmount: 20 + AccountCode: "200" + TaxType: NONE + LineAmount: 40 + Date: "2019-03-11" + DueDate: "2018-12-10" + Reference: Website Design + Status: AUTHORISED + /Invoices/{InvoiceID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getInvoice + summary: Retrieves a specific sales invoice or purchase bill using a unique invoice Id + parameters: + - $ref: '#/components/parameters/InvoiceID' + - $ref: '#/components/parameters/unitdp' + responses: + "200": + description: Success - return response of type Invoices array with specified Invoices + content: + application/json: + schema: + $ref: '#/components/schemas/Invoices' + example: + Id: 516f400a-b764-4c88-831b-12d2b210fa24 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1551981658323)/ + Invoices: + - Type: ACCREC + InvoiceID: a03ffcd2-5d91-4c7e-b483-318584e9e439 + InvoiceNumber: INV-0006 + Reference: Tour + Payments: + - PaymentID: 38928000-e9a0-420c-8884-f624bab2a351 + Date: /Date(1552953600000+0000)/ + Amount: 148062.76 + Reference: Yahoo + CurrencyRate: 1.000000 + HasAccount: false + HasValidationErrors: false + Prepayments: [] + Overpayments: [] + AmountDue: 0.00 + AmountPaid: 148062.76 + SentToContact: false + CurrencyRate: 1.000000 + HasErrors: false + IsDiscounted: false + HasAttachments: true + Attachments: + - AttachmentID: 3a2fe7e0-fac7-4ea2-afb2-31cedaabd294 + FileName: helo-heros.jpg + Url: https://api.xero.com/api.xro/2.0/Invoices/a03ffcd2-5d91-4c7e-b483-318584e9e439/Attachments/helo-heros.jpg + MimeType: image/jpeg + ContentLength: 2878711 + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + ContactStatus: ACTIVE + Name: Liam Gallagher + FirstName: Liam + LastName: Gallagher + EmailAddress: liam@rockstar.com + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + AttentionTo: "" + - AddressType: POBOX + City: Anytown + Region: NY + PostalCode: "10101" + Country: USA + AttentionTo: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: 222-2222 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: 333-2233 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 444-3433 + PhoneAreaCode: "212" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1551747281053+0000)/ + ContactGroups: + - ContactGroupID: 17b44ed7-4389-4162-91cb-3dd5766e4e22 + Name: Oasis + Status: ACTIVE + Contacts: [] + HasValidationErrors: false + IsSupplier: true + IsCustomer: true + SalesTrackingCategories: [] + PurchasesTrackingCategories: [] + ContactPersons: + - FirstName: Debbie + LastName: Gwyther + EmailAddress: debbie@rockstar.com + IncludeInEmails: false + HasValidationErrors: false + DateString: 2019-03-07T00:00:00 + Date: /Date(1551916800000+0000)/ + DueDateString: 2019-03-13T00:00:00 + DueDate: /Date(1552435200000+0000)/ + Status: PAID + LineAmountTypes: Exclusive + LineItems: + - ItemCode: "123" + Description: Guitars Fender Strat + UnitAmount: 148062.76 + TaxType: NONE + TaxAmount: 0.00 + LineAmount: 148062.76 + AccountCode: "200" + Tracking: [] + Quantity: 1.0000 + LineItemID: b18f39d9-7739-4246-9288-72afe939d2d5 + ValidationErrors: [] + SubTotal: 148062.76 + TotalTax: 0.00 + Total: 148062.76 + UpdatedDateUTC: /Date(1551981568133+0000)/ + CurrencyCode: NZD + FullyPaidOnDate: /Date(1552953600000+0000)/ + StatusAttributeString: ERROR + ValidationErrors: + - Message: 'Invoice # must be unique.' + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: updateInvoice + summary: Updates a specific sales invoices or purchase bills + x-hasAccountingValidationError: true + x-example: + - invoice: + is_object: true + key: invoice + keyPascal: Invoice + - reference: + is_last: true + key: reference + keyPascal: Reference + default: I am Iron man + object: invoice + - invoices: + is_object: true + key: invoices + keyPascal: Invoices + - add_invoice: + is_last: true + is_array_add: true + key: invoices + keyPascal: Invoices + java: Invoices + csharp: Invoice + object: invoice + parameters: + - $ref: '#/components/parameters/InvoiceID' + - $ref: '#/components/parameters/unitdp' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Invoices array with updated Invoice + content: + application/json: + schema: + $ref: '#/components/schemas/Invoices' + example: + Id: bd83b60e-9d16-4a3b-9f59-0a2d0ccd35f2 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552329729002)/ + Invoices: + - Type: ACCREC + InvoiceID: 4074292c-09b3-456d-84e7-add864c6c39b + InvoiceNumber: INV-0008 + Reference: My the Force be With You + Prepayments: [] + Overpayments: [] + AmountDue: 575.00 + AmountPaid: 0.00 + SentToContact: false + CurrencyRate: 1.000000 + HasErrors: false + IsDiscounted: false + Contact: + ContactID: be392c72-c121-4f83-9512-03ac71e54c20 + ContactStatus: ACTIVE + Name: Luke Skywalker + EmailAddress: "" + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + - AddressType: POBOX + City: "" + Region: "" + PostalCode: "" + Country: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1552329691573+0000)/ + ContactGroups: [] + IsSupplier: false + IsCustomer: true + DefaultCurrency: NZD + SalesTrackingCategories: [] + PurchasesTrackingCategories: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2019-03-11T00:00:00 + Date: /Date(1552262400000+0000)/ + DueDateString: 2019-03-12T00:00:00 + DueDate: /Date(1552348800000+0000)/ + Status: SUBMITTED + LineAmountTypes: Exclusive + LineItems: + - Description: Light Saber + UnitAmount: 500.00 + TaxType: OUTPUT2 + TaxAmount: 75.00 + LineAmount: 500.00 + AccountCode: "200" + Tracking: [] + Quantity: 1.0000 + LineItemID: 6de1bf9f-de95-4c47-9287-37305db758c9 + ValidationErrors: [] + SubTotal: 500.00 + TotalTax: 75.00 + Total: 575.00 + UpdatedDateUTC: /Date(1552329728987+0000)/ + CurrencyCode: NZD + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Invoices' + example: + Invoices: + - Reference: May the force be with you + InvoiceID: 00000000-0000-0000-0000-000000000000 + LineItems: [] + Contact: {} + Type: ACCPAY + /Invoices/{InvoiceID}/pdf: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getInvoiceAsPdf + x-path: /Invoices/{InvoiceID} + summary: Retrieves invoices or purchase bills as PDF files + parameters: + - $ref: '#/components/parameters/InvoiceID' + responses: + "200": + description: Success - return response of byte array pdf version of specified Invoices + content: + application/pdf: + schema: + type: string + format: binary + /Invoices/{InvoiceID}/Attachments: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getInvoiceAttachments + summary: Retrieves attachments for a specific invoice or purchase bill + parameters: + - $ref: '#/components/parameters/InvoiceID' + responses: + "200": + description: Success - return response of type Attachments array of Attachments for specified Invoices + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: 7e357a45-69f5-4e8f-8d7b-15da8ef50aab + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552330258523)/ + Attachments: + - AttachmentID: 9808ad7f-c8d4-41cf-995e-bc29cb76fd2c + FileName: foobar.jpg + Url: https://api.xero.com/api.xro/2.0/Invoices/4074292c-09b3-456d-84e7-add864c6c39b/Attachments/foobar.jpg + MimeType: image/jpg + ContentLength: 2878711 + - AttachmentID: 5a500c1a-5a02-48de-939e-1d234fd170d4 + FileName: sample5.jpg + Url: https://api.xero.com/api.xro/2.0/Invoices/4074292c-09b3-456d-84e7-add864c6c39b/Attachments/sample5.jpg + MimeType: image/jpg + ContentLength: 2878711 + /Invoices/{InvoiceID}/Attachments/{AttachmentID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getInvoiceAttachmentById + summary: Retrieves a specific attachment from a specific invoices or purchase bills by using a unique attachment Id + parameters: + - $ref: '#/components/parameters/InvoiceID' + - $ref: '#/components/parameters/AttachmentID' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of attachment for Invoice as binary data + content: + application/octet-stream: + schema: + type: string + format: binary + /Invoices/{InvoiceID}/Attachments/{FileName}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getInvoiceAttachmentByFileName + summary: Retrieves an attachment from a specific invoice or purchase bill by filename + parameters: + - $ref: '#/components/parameters/InvoiceID' + - $ref: '#/components/parameters/FileName' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of attachment for Invoice as binary data + content: + application/octet-stream: + schema: + type: string + format: binary + post: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: updateInvoiceAttachmentByFileName + x-hasAccountingValidationError: true + summary: Updates an attachment from a specific invoices or purchase bill by filename + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/InvoiceID' + - $ref: '#/components/parameters/FileName' + responses: + "200": + description: Success - return response of type Attachments array with updated Attachment + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: acd7d618-5fef-4d45-849c-a339ea31a973 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552330524005)/ + Attachments: + - AttachmentID: 08085449-fda3-45f4-a685-ff44c8a29ee3 + FileName: HelloWorld.jpg + Url: https://api.xero.com/api.xro/2.0/Invoices/4074292c-09b3-456d-84e7-add864c6c39b/Attachments/HelloWorld.jpg + MimeType: image/jpg + ContentLength: 2878711 + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + put: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: createInvoiceAttachmentByFileName + x-hasAccountingValidationError: true + summary: Creates an attachment for a specific invoice or purchase bill by filename + parameters: + - $ref: '#/components/parameters/InvoiceID' + - $ref: '#/components/parameters/FileName' + - $ref: '#/components/parameters/includeOnline' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Attachments array with newly created Attachment + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: 971fbd18-c850-453a-825f-63f2fee096ee + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552330001318)/ + Attachments: + - AttachmentID: 5a500c1a-5a02-48de-939e-1d234fd170d4 + FileName: sample5.jpg + Url: https://api.xero.com/api.xro/2.0/Invoices/4074292c-09b3-456d-84e7-add864c6c39b/Attachments/sample5.jpg + MimeType: image/jpg + ContentLength: 2878711 + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + /Invoices/{InvoiceID}/OnlineInvoice: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getOnlineInvoice + summary: Retrieves a URL to an online invoice + parameters: + - $ref: '#/components/parameters/InvoiceID' + responses: + "200": + description: Success - return response of type OnlineInvoice array with one OnlineInvoice + content: + application/json: + schema: + $ref: '#/components/schemas/OnlineInvoices' + example: + Id: d20705fb-fe1c-4366-835b-98de7474da3c + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552331100745)/ + OnlineInvoices: + - OnlineInvoiceUrl: https://in.xero.com/bCWCCfytGdTXoJam9HENWlQt07G6zcDaj4gQojHu + /Invoices/{InvoiceID}/Email: + parameters: + - $ref: '#/components/parameters/requiredHeader' + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: emailInvoice + summary: Sends a copy of a specific invoice to related contact via email + x-hasAccountingValidationError: true + x-example: + - requestEmpty: + is_last: true + is_object: true + key: requestEmpty + keyPascal: RequestEmpty + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/InvoiceID' + responses: + "204": + description: Success - return response 204 no content + x-isEmpty: true + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RequestEmpty' + example: {} + /Invoices/{InvoiceID}/History: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getInvoiceHistory + summary: Retrieves history records for a specific invoice + parameters: + - $ref: '#/components/parameters/InvoiceID' + responses: + "200": + $ref: '#/components/responses/HistoryRetrieved' + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createInvoiceHistory + summary: Creates a history record for a specific invoice + x-hasAccountingValidationError: true + x-example: + - historyRecord: + is_object: true + key: historyRecord + keyPascal: HistoryRecord + keySnake: history_record + - Details: + is_last: true + key: details + keyPascal: Details + default: Hello World + object: historyRecord + - historyRecords: + is_object: true + key: historyRecords + keyPascal: HistoryRecords + - add_historyRecord: + is_last: true + is_array_add: true + key: historyRecords + keyPascal: HistoryRecords + keySnake: history_records + java: HistoryRecords + python: history_record + ruby: history_record + csharp: HistoryRecord + object: historyRecord + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/InvoiceID' + responses: + "200": + $ref: '#/components/responses/HistoryRecordCreated' + "400": + $ref: '#/components/responses/400Error' + requestBody: + $ref: '#/components/requestBodies/historyRecords' + /InvoiceReminders/Settings: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.settings + - accounting.settings.read + tags: + - Accounting + operationId: getInvoiceReminders + summary: Retrieves invoice reminder settings + responses: + "200": + description: Success - return response of Invoice Reminders + content: + application/json: + schema: + $ref: '#/components/schemas/InvoiceReminders' + example: + Id: c7cd0953-c012-4be8-b618-63ce4c2c3494 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552331430618)/ + InvoiceReminders: + - Enabled: false + /Items: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.settings + - accounting.settings.read + tags: + - Accounting + operationId: getItems + summary: Retrieves items + parameters: + - $ref: '#/components/parameters/ifModifiedSince' + - in: query + name: where + description: Filter by an any element + example: IsSold==true + schema: + type: string + - in: query + name: order + description: Order by an any element + example: Code ASC + schema: + type: string + - $ref: '#/components/parameters/unitdp' + responses: + "200": + description: Success - return response of type Items array with all Item + content: + application/json: + schema: + $ref: '#/components/schemas/Items' + example: + Id: 8487e8d7-5fb3-4f02-b949-dec8f1e38182 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552331874897)/ + Items: + - ItemID: c8c54d65-f3f2-452d-926e-bf450b12fb07 + Code: "123" + Description: Guitars Fender Strat + UpdatedDateUTC: /Date(1551981476267+0000)/ + PurchaseDetails: {} + SalesDetails: + UnitPrice: 5000.0000 + AccountCode: "200" + TaxType: OUTPUT2 + Name: Guitars + IsTrackedAsInventory: false + IsSold: true + IsPurchased: false + - ItemID: a4544d51-48f6-441f-a623-99ecbced6ab7 + Code: abc65591 + Description: Barfoo + UpdatedDateUTC: /Date(1552331873580+0000)/ + PurchaseDetails: {} + SalesDetails: {} + Name: Hello11350 + IsTrackedAsInventory: false + IsSold: true + IsPurchased: true + put: + security: + - OAuth2: + - accounting.settings + tags: + - Accounting + operationId: createItems + summary: Creates one or more items + x-hasAccountingValidationError: true + x-example: + - purchaseDetails: + is_object: true + key: purchaseDetails + keyPascal: Purchase + keySnake: purchase_details + - cOGSAccountCode: + is_last: true + key: cOGSAccountCode + keyPascal: CoGSAccountCode + keySnake: cogs_account_code + keyCsharp: COGSAccountCode + default: 500 + object: purchaseDetails + - item: + is_object: true + key: item + keyPascal: Item + - code: + key: code + keyPascal: Code + default: abcXYZ123 + object: item + - name: + key: name + keyPascal: Name + default: HelloWorld + object: item + - description: + key: description + keyPascal: Description + default: Foobar + object: item + - inventoryAssetAccountCode: + key: inventoryAssetAccountCode + keyPascal: InventoryAssetAccountCode + keySnake: inventory_asset_account_code + default: 140 + object: item + - set_purchaseDetails: + is_last: true + is_variable: true + nonString: true + key: purchaseDetails + keyPascal: PurchaseDetails + keySnake: purchase_details + default: purchaseDetails + python: purchase_details + ruby: purchase_details + object: item + - items: + is_object: true + key: items + keyPascal: Items + - add_item: + is_last: true + is_array_add: true + key: items + keyPascal: Items + java: Items + csharp: Item + object: item + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/unitdp' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Items array with newly created Item + content: + application/json: + schema: + $ref: '#/components/schemas/Items' + example: + Id: ae7ef7c8-9024-4d42-8d59-5f26ed3f508b + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552331871904)/ + Items: + - ItemID: a4544d51-48f6-441f-a623-99ecbced6ab7 + Code: abc65591 + Description: foobar + UpdatedDateUTC: /Date(1552331871707)/ + PurchaseDetails: {} + SalesDetails: {} + Name: Hello11350 + IsTrackedAsInventory: false + IsSold: true + IsPurchased: true + ValidationErrors: + - Message: Price List Item with Code ''abc'' already exists + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Items with an array of Item objects in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/Items' + example: + Items: + - Code: code123 + Name: Item Name XYZ + Description: Foobar + InventoryAssetAccountCode: "140" + PurchaseDetails: + COGSAccountCode: "500" + post: + security: + - OAuth2: + - accounting.settings + tags: + - Accounting + operationId: updateOrCreateItems + summary: Updates or creates one or more items + x-hasAccountingValidationError: true + x-example: + - item: + is_object: true + key: item + keyPascal: Item + - code: + key: code + keyPascal: Code + default: abcXYZ123 + object: item + - name: + key: name + keyPascal: Name + default: HelloWorld + object: item + - description: + is_last: true + key: description + keyPascal: Description + default: Foobar + object: item + - items: + is_object: true + key: items + keyPascal: Items + - add_item: + is_last: true + is_array_add: true + key: items + keyPascal: Items + java: Items + csharp: Item + object: item + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/unitdp' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Items array with newly created Item + content: + application/json: + schema: + $ref: '#/components/schemas/Items' + example: + Id: ae7ef7c8-9024-4d42-8d59-5f26ed3f508b + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552331871904)/ + Items: + - ItemID: a4544d51-48f6-441f-a623-99ecbced6ab7 + Code: abc65591 + Description: foobar + UpdatedDateUTC: /Date(1552331871707)/ + PurchaseDetails: {} + SalesDetails: {} + Name: Hello11350 + IsTrackedAsInventory: false + IsSold: true + IsPurchased: true + ValidationErrors: + - Message: Price List Item with Code ''abc'' already exists + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Items' + example: + Items: + - Code: ItemCode123 + Name: ItemName XYZ + Description: Item Description ABC + /Items/{ItemID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.settings + - accounting.settings.read + tags: + - Accounting + operationId: getItem + summary: Retrieves a specific item using a unique item Id + parameters: + - $ref: '#/components/parameters/ItemID' + - $ref: '#/components/parameters/unitdp' + responses: + "200": + description: Success - return response of type Items array with specified Item + content: + application/json: + schema: + $ref: '#/components/schemas/Items' + example: + Id: 0bbd8a92-9ba7-4711-8040-8d6a609ca7e8 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552333420160)/ + Items: + - ItemID: c8c54d65-f3f2-452d-926e-bf450b12fb07 + Code: "123" + Description: Guitars Fender Strat + PurchaseDescription: Brand new Fender Strats + UpdatedDateUTC: /Date(1552333309387+0000)/ + PurchaseDetails: + UnitPrice: 2500.0000 + COGSAccountCode: "310" + TaxType: INPUT2 + SalesDetails: + UnitPrice: 5000.0000 + AccountCode: "200" + TaxType: OUTPUT2 + Name: Guitars + IsTrackedAsInventory: true + InventoryAssetAccountCode: "630" + TotalCostPool: 25000.00 + QuantityOnHand: 10.0000 + IsSold: true + IsPurchased: true + ValidationErrors: [] + post: + security: + - OAuth2: + - accounting.settings + tags: + - Accounting + operationId: updateItem + summary: Updates a specific item + x-hasAccountingValidationError: true + x-example: + - item: + is_object: true + key: item + keyPascal: Item + - code: + key: code + keyPascal: Code + default: ItemCode123 + object: item + - description: + is_last: true + key: description + keyPascal: Description + default: Goodbye + object: item + - items: + is_object: true + key: items + keyPascal: Items + - add_item: + is_last: true + is_array_add: true + key: items + keyPascal: Items + java: Items + csharp: Item + object: item + parameters: + - $ref: '#/components/parameters/ItemID' + - $ref: '#/components/parameters/unitdp' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Items array with updated Item + content: + application/json: + schema: + $ref: '#/components/schemas/Items' + example: + Id: 24feb629-6b14-499e-9aa1-fc2c596c0280 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552332558975)/ + Items: + - ItemID: a7e87086-e0ae-4df2-83d7-e26e9a6b7786 + Code: abc38306 + Description: Hello Xero + UpdatedDateUTC: /Date(1552332558924)/ + PurchaseDetails: {} + SalesDetails: {} + Name: Hello8746 + IsTrackedAsInventory: false + IsSold: true + IsPurchased: true + ValidationErrors: [] + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Items' + example: + Items: + - Code: ItemCode123 + Description: Description 123 + delete: + security: + - OAuth2: + - accounting.settings + tags: + - Accounting + operationId: deleteItem + summary: Deletes a specific item + parameters: + - $ref: '#/components/parameters/ItemID' + responses: + "204": + description: Success - return response 204 no content + x-isEmpty: true + "400": + $ref: '#/components/responses/400Error' + /Items/{ItemID}/History: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.settings + - accounting.settings.read + tags: + - Accounting + operationId: getItemHistory + summary: Retrieves history for a specific item + parameters: + - $ref: '#/components/parameters/ItemID' + responses: + "200": + $ref: '#/components/responses/HistoryRetrieved' + put: + security: + - OAuth2: + - accounting.settings + tags: + - Accounting + operationId: createItemHistory + summary: Creates a history record for a specific item + x-hasAccountingValidationError: true + x-example: + - historyRecord: + is_object: true + key: historyRecord + keyPascal: HistoryRecord + keySnake: history_record + - Details: + is_last: true + key: details + keyPascal: Details + default: Hello World + object: historyRecord + - historyRecords: + is_object: true + key: historyRecords + keyPascal: HistoryRecords + - add_historyRecord: + is_last: true + is_array_add: true + key: historyRecords + keyPascal: HistoryRecords + keySnake: history_records + java: HistoryRecords + python: history_record + ruby: history_record + csharp: HistoryRecord + object: historyRecord + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/ItemID' + responses: + "200": + $ref: '#/components/responses/HistoryRecordCreated' + requestBody: + $ref: '#/components/requestBodies/historyRecords' + /Journals: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.journals.read + tags: + - Accounting + operationId: getJournals + summary: Retrieves journals + parameters: + - $ref: '#/components/parameters/ifModifiedSince' + - in: query + name: offset + description: Offset by a specified journal number. e.g. journals with a JournalNumber greater than the offset will be returned + example: 10 + schema: + type: integer + - in: query + name: paymentsOnly + x-snake: payments_only + description: Filter to retrieve journals on a cash basis. Journals are returned on an accrual basis by default. + example: true + x-example-python: "True" + schema: + type: boolean + responses: + "200": + description: Success - return response of type Journals array with all Journals + content: + application/json: + schema: + $ref: '#/components/schemas/Journals' + example: + Id: 49a09a97-df50-4679-8043-02c86e0dcf5f + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552335214210)/ + Journals: + - JournalID: 1b31feeb-aa23-404c-8c19-24c827c53661 + JournalDate: /Date(1539993600000+0000)/ + JournalNumber: 1 + CreatedDateUTC: /Date(1541176243467+0000)/ + Reference: Red Fish, Blue Fish + SourceID: d4956132-ed94-4dd7-9eaa-aa22dfdf06f2 + SourceType: ACCREC + JournalLines: + - JournalLineID: 81e6b1bf-d812-4f87-8dc4-698558ae043e + AccountID: b94495d0-44ab-4199-a1d0-427a4877e100 + AccountCode: "610" + AccountType: CURRENT + AccountName: Accounts Receivable + Description: "" + NetAmount: 40.00 + GrossAmount: 40.00 + TaxAmount: 0.00 + TrackingCategories: [] + - JournalLineID: ad221a8c-ebee-4c1b-88ed-d574e27e8803 + AccountID: e0a5d892-9f9f-44f0-a153-5cb7db125170 + AccountCode: "200" + AccountType: REVENUE + AccountName: Sales + Description: Acme Tires + NetAmount: -40.00 + GrossAmount: -40.00 + TaxAmount: 0.00 + TaxType: NONE + TaxName: No GST + TrackingCategories: [] + - JournalID: 2be66e45-805b-46de-921d-c67e1d3dad2a + JournalDate: /Date(1539993600000+0000)/ + JournalNumber: 9 + CreatedDateUTC: /Date(1541176504083+0000)/ + Reference: Red Fish, Blue Fish + SourceID: 046d8a6d-1ae1-4b4d-9340-5601bdf41b87 + SourceType: ACCREC + JournalLines: + - JournalLineID: ba8a5680-a753-4a35-b3dd-0bc72e5c26a1 + AccountID: b94495d0-44ab-4199-a1d0-427a4877e100 + AccountCode: "610" + AccountType: CURRENT + AccountName: Accounts Receivable + Description: "" + NetAmount: 40.00 + GrossAmount: 40.00 + TaxAmount: 0.00 + TrackingCategories: [] + - JournalLineID: 09a0b9b9-0222-4e24-8c31-efef472e22f1 + AccountID: e0a5d892-9f9f-44f0-a153-5cb7db125170 + AccountCode: "200" + AccountType: REVENUE + AccountName: Sales + Description: Acme Tires + NetAmount: -40.00 + GrossAmount: -40.00 + TaxAmount: 0.00 + TaxType: NONE + TaxName: No GST + TrackingCategories: [] + - JournalID: d0ed2957-ebba-4d3a-8367-ae9ccd574885 + JournalDate: /Date(1543449600000+0000)/ + JournalNumber: 14 + CreatedDateUTC: /Date(1541176592673+0000)/ + SourceID: 99ea7f6b-c513-4066-bc27-b7c65dcd76c2 + SourceType: ACCRECPAYMENT + JournalLines: + - JournalLineID: 1bdae2b7-3035-40ec-b344-b12b1c23adc4 + AccountID: b94495d0-44ab-4199-a1d0-427a4877e100 + AccountCode: "610" + AccountType: CURRENT + AccountName: Accounts Receivable + Description: "" + NetAmount: -46.00 + GrossAmount: -46.00 + TaxAmount: 0.00 + TrackingCategories: [] + - JournalLineID: 353be85e-ae79-4bb3-9483-5ea7682fc0a3 + AccountID: 5690f1e8-1d02-4893-90c2-ee1a69eff942 + AccountCode: "970" + AccountType: EQUITY + AccountName: Owner A Funds Introduced + Description: "" + NetAmount: 46.00 + GrossAmount: 46.00 + TaxAmount: 0.00 + TrackingCategories: [] + - JournalID: 772e8133-7f12-4edc-ab98-aa6dceb16c9d + JournalDate: /Date(1552262400000+0000)/ + JournalNumber: 30 + CreatedDateUTC: /Date(1552333389227+0000)/ + Reference: "" + SourceID: 5376633d-0456-43a3-8234-e457a3f50a12 + SourceType: ACCPAY + JournalLines: + - JournalLineID: 33469836-642f-4973-a708-0e99339dff4a + AccountID: a2a4795b-a01f-40eb-afa6-a34b4514875d + AccountCode: "800" + AccountType: CURRLIAB + AccountName: Accounts Payable + Description: "" + NetAmount: -28750.00 + GrossAmount: -28750.00 + TaxAmount: 0.00 + TrackingCategories: [] + - JournalLineID: 4f3b6462-5cf6-4b55-a2ae-de4039878215 + AccountID: 53a12a15-7e9b-4a31-85f4-a7cee6d04215 + AccountCode: "630" + AccountType: CURRENT + AccountName: Inventory + Description: Brand new Fender Strats + NetAmount: 25000.00 + GrossAmount: 28750.00 + TaxAmount: 3750.00 + TaxType: INPUT2 + TaxName: 15% GST on Expenses + TrackingCategories: [] + - JournalLineID: 534e822e-d441-48a7-8e57-5ad54729e83e + AccountID: 17d9a4a0-3181-4803-a96b-f0dbe589091b + AccountCode: "820" + AccountType: CURRLIAB + AccountName: GST + Description: "" + NetAmount: 3750.00 + GrossAmount: 3750.00 + TaxAmount: 0.00 + TrackingCategories: [] + /Journals/{JournalID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.journals.read + tags: + - Accounting + operationId: getJournal + summary: Retrieves a specific journal using a unique journal Id. + parameters: + - $ref: '#/components/parameters/JournalID' + responses: + "200": + description: Success - return response of type Journals array with specified Journal + content: + application/json: + schema: + $ref: '#/components/schemas/Journals' + example: + Id: 39ab8367-eb14-420d-83a9-e01ddddd21f8 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552335613002)/ + Journals: + - JournalID: 1b31feeb-aa23-404c-8c19-24c827c53661 + JournalDate: /Date(1539993600000+0000)/ + JournalNumber: 1 + CreatedDateUTC: /Date(1541176243467+0000)/ + Reference: Red Fish, Blue Fish + JournalLines: + - JournalLineID: 81e6b1bf-d812-4f87-8dc4-698558ae043e + AccountID: b94495d0-44ab-4199-a1d0-427a4877e100 + AccountCode: "610" + AccountType: CURRENT + AccountName: Accounts Receivable + Description: "" + NetAmount: 40.00 + GrossAmount: 40.00 + TaxAmount: 0.00 + TaxType: "" + TaxName: "" + TrackingCategories: [] + - JournalLineID: ad221a8c-ebee-4c1b-88ed-d574e27e8803 + AccountID: e0a5d892-9f9f-44f0-a153-5cb7db125170 + AccountCode: "200" + AccountType: REVENUE + AccountName: Sales + Description: Acme Tires + NetAmount: -40.00 + GrossAmount: -40.00 + TaxAmount: 0.00 + TaxType: NONE + TaxName: No GST + TrackingCategories: [] + /Journals/{JournalNumber}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.journals.read + tags: + - Accounting + operationId: getJournalByNumber + summary: Retrieves a specific journal using a unique journal number. + parameters: + - $ref: '#/components/parameters/JournalNumber' + responses: + "200": + description: Success - return response of type Journals array with specified Journal + content: + application/json: + schema: + $ref: '#/components/schemas/Journals' + example: + Id: 39ab8367-eb14-420d-83a9-e01ddddd21f8 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552335613002)/ + Journals: + - JournalID: 1b31feeb-aa23-404c-8c19-24c827c53661 + JournalDate: /Date(1539993600000+0000)/ + JournalNumber: 1 + CreatedDateUTC: /Date(1541176243467+0000)/ + Reference: Red Fish, Blue Fish + JournalLines: + - JournalLineID: 81e6b1bf-d812-4f87-8dc4-698558ae043e + AccountID: b94495d0-44ab-4199-a1d0-427a4877e100 + AccountCode: "610" + AccountType: CURRENT + AccountName: Accounts Receivable + Description: "" + NetAmount: 40.00 + GrossAmount: 40.00 + TaxAmount: 0.00 + TaxType: "" + TaxName: "" + TrackingCategories: [] + - JournalLineID: ad221a8c-ebee-4c1b-88ed-d574e27e8803 + AccountID: e0a5d892-9f9f-44f0-a153-5cb7db125170 + AccountCode: "200" + AccountType: REVENUE + AccountName: Sales + Description: Acme Tires + NetAmount: -40.00 + GrossAmount: -40.00 + TaxAmount: 0.00 + TaxType: NONE + TaxName: No GST + TrackingCategories: [] + /LinkedTransactions: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getLinkedTransactions + summary: Retrieves linked transactions (billable expenses) + parameters: + - in: query + name: page + description: Up to 100 linked transactions will be returned in a single API call. Use the page parameter to specify the page to be returned e.g. page=1. + example: 1 + schema: + type: integer + - in: query + name: LinkedTransactionID + x-snake: linked_transaction_id + description: The Xero identifier for an Linked Transaction + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + - in: query + name: SourceTransactionID + x-snake: source_transaction_id + description: Filter by the SourceTransactionID. Get the linked transactions created from a particular ACCPAY invoice + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + - in: query + name: ContactID + x-snake: contact_id + description: Filter by the ContactID. Get all the linked transactions that have been assigned to a particular customer. + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + - in: query + name: Status + x-snake: status + description: Filter by the combination of ContactID and Status. Get the linked transactions associated to a customer and with a status + example: APPROVED + schema: + type: string + - in: query + name: TargetTransactionID + x-snake: target_transaction_id + description: Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + responses: + "200": + description: Success - return response of type LinkedTransactions array with all LinkedTransaction + content: + application/json: + schema: + $ref: '#/components/schemas/LinkedTransactions' + example: + Id: 516aabd0-e670-48d5-b0eb-10dce4494dd8 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552348338096)/ + LinkedTransactions: + - LinkedTransactionID: 5cf7d9c0-b9a7-4433-a2dc-ae3c11bba39b + SourceTransactionID: aec416dd-38ea-40dc-9f0b-813c8c71f87f + SourceLineItemID: 77e0b23b-5b79-4f4b-ae20-c9031d41442f + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + TargetTransactionID: 83693fc1-5b05-4807-b190-109d4a85dd5f + TargetLineItemID: d5128ff1-0f39-4d2a-a6d5-46dfaf5f075c + Status: ONDRAFT + Type: BILLABLEEXPENSE + UpdatedDateUTC: /Date(1552347991000+0000)/ + SourceTransactionTypeCode: ACCPAY + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createLinkedTransaction + summary: Creates linked transactions (billable expenses) + parameters: + - $ref: '#/components/parameters/idempotencyKey' + x-hasAccountingValidationError: true + x-example: + - linkedTransaction: + is_object: true + key: linkedTransaction + keyPascal: LinkedTransaction + keySnake: linked_transaction + - sourceTransactionID: + is_uuid: true + key: sourceTransactionID + keyPascal: SourceTransactionID + keySnake: source_transaction_id + default: 00000000-0000-0000-0000-000000000000 + object: linkedTransaction + - sourceLineItemID: + is_last: true + is_uuid: true + key: sourceLineItemID + keyPascal: SourceLineItemID + keySnake: source_line_item_id + default: 00000000-0000-0000-0000-000000000000 + object: linkedTransaction + responses: + "200": + description: Success - return response of type LinkedTransactions array with newly created LinkedTransaction + content: + application/json: + schema: + $ref: '#/components/schemas/LinkedTransactions' + example: + Id: f32b30e5-32d1-42a8-bcc9-5b22828f725c + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552351054646)/ + LinkedTransactions: + - LinkedTransactionID: e9684b6c-4df9-45a0-917b-85cc29857008 + SourceTransactionID: a848644a-f20f-4630-98c3-386bd7505631 + SourceLineItemID: b0df260d-3cc8-4ced-9bd6-41924f624ed3 + Status: DRAFT + Type: BILLABLEEXPENSE + UpdatedDateUTC: /Date(1552351055000+0000)/ + SourceTransactionTypeCode: ACCPAY + ValidationErrors: + - Message: The SourceLineItemID and SourceTransactionID do not match + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: LinkedTransaction object in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/LinkedTransaction' + example: + LinkedTransactions: + - SourceTransactionID: a848644a-f20f-4630-98c3-386bd7505631 + SourceLineItemID: b0df260d-3cc8-4ced-9bd6-41924f624ed3 + /LinkedTransactions/{LinkedTransactionID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getLinkedTransaction + summary: Retrieves a specific linked transaction (billable expenses) using a unique linked transaction Id + parameters: + - $ref: '#/components/parameters/LinkedTransactionID' + responses: + "200": + description: Success - return response of type LinkedTransactions array with a specified LinkedTransaction + content: + application/json: + schema: + $ref: '#/components/schemas/LinkedTransactions' + example: + Id: 171ca542-874d-44e2-8930-db9bccd7d88b + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552348339875)/ + LinkedTransactions: + - LinkedTransactionID: 5cf7d9c0-b9a7-4433-a2dc-ae3c11bba39b + SourceTransactionID: aec416dd-38ea-40dc-9f0b-813c8c71f87f + SourceLineItemID: 77e0b23b-5b79-4f4b-ae20-c9031d41442f + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + TargetTransactionID: 83693fc1-5b05-4807-b190-109d4a85dd5f + TargetLineItemID: d5128ff1-0f39-4d2a-a6d5-46dfaf5f075c + Status: ONDRAFT + Type: BILLABLEEXPENSE + UpdatedDateUTC: /Date(1552347991000+0000)/ + SourceTransactionTypeCode: ACCPAY + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: updateLinkedTransaction + summary: Updates a specific linked transactions (billable expenses) + x-hasAccountingValidationError: true + x-example: + - linkedTransaction: + is_object: true + key: linkedTransaction + keyPascal: LinkedTransaction + keySnake: linked_transaction + - sourceLineItemID: + is_uuid: true + key: sourceLineItemID + keyPascal: SourceLineItemID + keySnake: source_line_item_id + default: 00000000-0000-0000-0000-000000000000 + object: linkedTransaction + - contactID: + is_last: true + is_uuid: true + key: contactID + keyPascal: ContactID + default: 00000000-0000-0000-0000-000000000000 + object: linkedTransaction + - linkedTransactions: + is_object: true + key: linkedTransactions + keyPascal: LinkedTransactions + - add_linkedTransaction: + is_last: true + is_array_add: true + key: linkedTransactions + keyPascal: LinkedTransactions + keySnake: linked_transactions + java: LinkedTransactions + python: linked_transaction + ruby: linked_transaction + csharp: LinkedTransaction + object: linkedTransaction + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/LinkedTransactionID' + responses: + "200": + description: Success - return response of type LinkedTransactions array with updated LinkedTransaction + content: + application/json: + schema: + $ref: '#/components/schemas/LinkedTransactions' + example: + Id: bd364af7-08f0-432b-81db-c1e5ba05f3dd + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552351488159)/ + LinkedTransactions: + - LinkedTransactionID: e9684b6c-4df9-45a0-917b-85cc29857008 + SourceTransactionID: a848644a-f20f-4630-98c3-386bd7505631 + SourceLineItemID: b0df260d-3cc8-4ced-9bd6-41924f624ed3 + ContactID: 4e1753b9-018a-4775-b6aa-1bc7871cfee3 + Status: DRAFT + Type: BILLABLEEXPENSE + UpdatedDateUTC: /Date(1552351055000+0000)/ + SourceTransactionTypeCode: ACCPAY + "400": + description: Success - return response of type LinkedTransactions array with updated LinkedTransaction + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + ErrorNumber: 10 + Type: ValidationException + Message: A validation exception occurred + Elements: + - LinkedTransactionID: 5a68b5b4-8cf0-4af5-8c3c-513cc19e1c73 + SourceTransactionID: aec416dd-38ea-40dc-9f0b-813c8c71f87f + SourceLineItemID: 77e0b23b-5b79-4f4b-ae20-c9031d41442f + ContactID: 4e1753b9-018a-4775-b6aa-1bc7871cfee3 + TargetTransactionID: 83693fc1-5b05-4807-b190-109d4a85dd5f + TargetLineItemID: d5128ff1-0f39-4d2a-a6d5-46dfaf5f075c + Status: ONDRAFT + Type: BILLABLEEXPENSE + UpdatedDateUTC: /Date(1552349706000+0000)/ + SourceTransactionTypeCode: ACCPAY + ValidationErrors: + - Message: The ContactID and the TargetTransaction ContactID do not match + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/LinkedTransactions' + example: + LinkedTransactions: + - SourceTransactionID: 00000000-0000-0000-0000-000000000000 + SourceLineItemID: 00000000-0000-0000-0000-000000000000 + delete: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: deleteLinkedTransaction + summary: Deletes a specific linked transactions (billable expenses) + parameters: + - $ref: '#/components/parameters/LinkedTransactionID' + responses: + "204": + description: Success - return response 204 no content + x-isEmpty: true + "400": + $ref: '#/components/responses/400Error' + /ManualJournals: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getManualJournals + summary: Retrieves manual journals + parameters: + - $ref: '#/components/parameters/ifModifiedSince' + - in: query + name: where + description: Filter by an any element + example: Status=="DRAFT" + x-example-csharp: Status==\"DRAFT\" + x-example-java: Status=="' + ManualJournal.StatusEnum.DRAFT + '" + x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\ManualJournal::STATUS_DRAFT . '" + x-example-ruby: Status==#{XeroRuby::Accounting::ManualJournal::DRAFT} + schema: + type: string + - in: query + name: order + description: Order by an any element + example: Date ASC + schema: + type: string + - in: query + name: page + description: e.g. page=1 – Up to 100 manual journals will be returned in a single API call with line items shown for each overpayment + example: 1 + schema: + type: integer + - $ref: '#/components/parameters/pageSize' + responses: + "200": + description: Success - return response of type ManualJournals array with a all ManualJournals + content: + application/json: + schema: + $ref: '#/components/schemas/ManualJournals' + example: + Id: 8a508ec1-b578-48bf-97df-020c918fbf7d + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552357217359)/ + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 3 + ManualJournals: + - Date: /Date(1553126400000+0000)/ + Status: POSTED + LineAmountTypes: NoTax + UpdatedDateUTC: /Date(1552357188083+0000)/ + ManualJournalID: 0b159335-606b-485f-b51b-97b3b32bad32 + Narration: 'Reversal: These aren''''t the droids you are looking for' + JournalLines: [] + ShowOnCashBasisReports: true + HasAttachments: false + - Date: /Date(1552348800000+0000)/ + Status: POSTED + LineAmountTypes: NoTax + UpdatedDateUTC: /Date(1552357188147+0000)/ + ManualJournalID: 99cb8353-ce73-4a5d-8e0d-8b0edf86cfc4 + Narration: These aren''t the droids you are looking for + JournalLines: [] + ShowOnCashBasisReports: true + HasAttachments: true + - Date: /Date(1552262400000+0000)/ + Status: DRAFT + LineAmountTypes: NoTax + UpdatedDateUTC: /Date(1552357216843+0000)/ + ManualJournalID: ecb6b362-c78f-462a-a229-a66abf115e92 + Narration: Foo bar + JournalLines: [] + ShowOnCashBasisReports: true + HasAttachments: false + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createManualJournals + summary: Creates one or more manual journals + x-hasAccountingValidationError: true + x-example: + - dateValue: + is_date: true + key: dateValue + keyPascal: Date + keySnake: date_value + java_datatype: LocalDate + default: LocalDate.of(2020, Month.OCTOBER, 10) + java: LocalDate.of(2020, Month.OCTOBER, 10) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2019-10-10') + node: '''2020-10-10''' + python: dateutil.parser.parse('2020-12-03T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - manualJournalLines: + is_list: true + key: manualJournalLines + keyPascal: ManualJournalLine + keySnake: manual_journal_lines + - credit: + is_object: true + key: credit + keyPascal: ManualJournalLine + - lineAmount: + nonString: true + key: lineAmount + keyPascal: LineAmount + keySnake: line_amount + default: -100.0 + is_money: true + object: credit + - accountCode: + key: accountCode + keyPascal: AccountCode + keySnake: account_code + default: 400 + object: credit + - description: + is_last: true + key: description + keyPascal: Description + default: Hello there + object: credit + - add_credit: + is_last: true + is_list_add: true + key: manualJournalLines + keyPascal: ManualJournalLine + keySnake: manual_journal_lines + object: credit + - debit: + is_object: true + key: debit + keyPascal: ManualJournalLine + - lineAmount: + nonString: true + key: lineAmount + keyPascal: LineAmount + keySnake: line_amount + default: 100.0 + is_money: true + object: debit + - accountCode: + key: accountCode + keyPascal: AccountCode + keySnake: account_code + default: 120 + object: debit + - description: + is_last: true + key: description + keyPascal: Description + default: Hello there + object: debit + - add_debit: + is_last: true + is_list_add: true + key: manualJournalLines + keyPascal: ManualJournalLine + keySnake: manual_journal_lines + object: debit + - manualJournal: + is_object: true + key: manualJournal + keyPascal: ManualJournal + keySnake: manual_journal + - narration: + key: narration + keyPascal: Narration + default: Foobar + object: manualJournal + - date: + is_variable: true + nonString: true + key: date + keyPascal: Date + default: dateValue + python: date_value + ruby: date_value + object: manualJournal + - set_manualJournalLines: + is_last: true + is_variable: true + nonString: true + key: journalLines + keyPascal: JournalLines + keySnake: journal_lines + default: manualJournalLines + python: manual_journal_lines + ruby: manual_journal_lines + object: manualJournal + - manualJournals: + is_object: true + key: manualJournals + keyPascal: ManualJournals + - add_manualJournal: + is_last: true + is_array_add: true + key: manualJournals + keyPascal: ManualJournals + keySnake: manual_journals + java: ManualJournals + php: manualJournals + python: manual_journal + ruby: manual_journal + csharp: ManualJournal + object: manualJournal + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type ManualJournals array with newly created ManualJournal + content: + application/json: + schema: + $ref: '#/components/schemas/ManualJournals' + example: + Id: 45dfa608-0fcb-4f30-a377-c82cd348569c + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552595972952)/ + ManualJournals: + - Date: /Date(1552521600000+0000)/ + Status: DRAFT + LineAmountTypes: NoTax + UpdatedDateUTC: /Date(1552595972920+0000)/ + ManualJournalID: d312dd5e-a53e-46d1-9d51-c569ef4570b7 + Narration: Foo bar + JournalLines: + - Description: Hello there + TaxType: NONE + LineAmount: 100.00 + AccountCode: "400" + Tracking: [] + AccountID: c4f29c22-28c2-4a13-9eab-ecbbd641ffdf + IsBlank: false + - Description: Goodbye + TaxType: NONE + LineAmount: -100.00 + AccountCode: "400" + Tracking: + - Name: Simpsons + Option: Bart + TrackingCategoryID: 6a68adde-f210-4465-b0a9-0d8cc6f50762 + TrackingOptionID: dc54c220-0140-495a-b925-3246adc0075f + AccountID: c4f29c22-28c2-4a13-9eab-ecbbd641ffdf + IsBlank: false + ShowOnCashBasisReports: true + Warnings: + - Message: Account code ''476'' has been removed as it does not match a recognised account. + ValidationErrors: + - Message: The total debits (100.00) must equal total credits (-10.00) + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: ManualJournals array with ManualJournal object in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/ManualJournals' + example: + ManualJournals: + - Narration: Journal Desc + JournalLines: + - LineAmount: 100 + AccountCode: "400" + Description: Money Movement + - LineAmount: -100 + AccountCode: "400" + Description: Prepayment of things + Tracking: + - Name: North + Option: Region + Date: "2019-03-14" + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: updateOrCreateManualJournals + summary: Updates or creates a single manual journal + x-hasAccountingValidationError: true + x-example: + - dateValue: + is_date: true + key: dateValue + keyPascal: Date + keySnake: date_value + java_datatype: LocalDate + default: LocalDate.of(2020, Month.OCTOBER, 10) + java: LocalDate.of(2020, Month.OCTOBER, 10) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-10') + node: '''2020-10-10''' + python: dateutil.parser.parse('2020-12-03T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - manualJournalLines: + is_list: true + key: manualJournalLines + keyPascal: ManualJournalLine + keySnake: manual_journal_lines + - credit: + is_object: true + key: credit + keyPascal: ManualJournalLine + - lineAmount: + nonString: true + key: lineAmount + keyPascal: LineAmount + keySnake: line_amount + default: -100.0 + is_money: true + object: credit + - accountCode: + key: accountCode + keyPascal: AccountCode + keySnake: account_code + default: 400 + object: credit + - description: + is_last: true + key: description + keyPascal: Description + default: Hello there + object: credit + - add_credit: + is_last: true + is_list_add: true + key: manualJournalLines + keyPascal: ManualJournalLine + keySnake: manual_journal_lines + object: credit + - debit: + is_object: true + key: debit + keyPascal: ManualJournalLine + - lineAmount: + nonString: true + key: lineAmount + keyPascal: LineAmount + keySnake: line_amount + default: 100.0 + is_money: true + object: debit + - accountCode: + key: accountCode + keyPascal: AccountCode + keySnake: account_code + default: 120 + object: debit + - description: + is_last: true + key: description + keyPascal: Description + default: Hello there + object: debit + - add_debit: + is_last: true + is_list_add: true + key: manualJournalLines + keyPascal: ManualJournalLine + keySnake: manual_journal_lines + object: debit + - manualJournal: + is_object: true + key: manualJournal + keyPascal: ManualJournal + keySnake: manual_journal + - narration: + key: narration + keyPascal: Narration + default: Foobar + object: manualJournal + - date: + is_variable: true + nonString: true + key: date + keyPascal: Date + default: dateValue + python: date_value + ruby: date_value + object: manualJournal + - set_manualJournalLines: + is_last: true + is_variable: true + nonString: true + key: manualJournalLines + keyPascal: JournalLines + keySnake: journal_lines + default: manualJournalLines + python: manual_journal_lines + ruby: manual_journal_lines + object: manualJournal + - manualJournals: + is_object: true + key: manualJournals + keyPascal: ManualJournals + - add_manualJournal: + is_last: true + is_array_add: true + key: manualJournals + keyPascal: ManualJournals + keySnake: manual_journals + java: ManualJournals + php: manualJournals + python: manual_journal + ruby: manual_journal + csharp: ManualJournal + object: manualJournal + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type ManualJournals array with newly created ManualJournal + content: + application/json: + schema: + $ref: '#/components/schemas/ManualJournals' + example: + Id: 45dfa608-0fcb-4f30-a377-c82cd348569c + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552595972952)/ + ManualJournals: + - Date: /Date(1552521600000+0000)/ + Status: DRAFT + LineAmountTypes: NoTax + UpdatedDateUTC: /Date(1552595972920+0000)/ + ManualJournalID: d312dd5e-a53e-46d1-9d51-c569ef4570b7 + Narration: Foo bar + JournalLines: + - Description: Hello there + TaxType: NONE + LineAmount: 100.00 + AccountCode: "400" + Tracking: [] + AccountID: c4f29c22-28c2-4a13-9eab-ecbbd641ffdf + IsBlank: false + - Description: Goodbye + TaxType: NONE + LineAmount: -100.00 + AccountCode: "400" + Tracking: + - Name: Simpsons + Option: Bart + TrackingCategoryID: 6a68adde-f210-4465-b0a9-0d8cc6f50762 + TrackingOptionID: dc54c220-0140-495a-b925-3246adc0075f + AccountID: c4f29c22-28c2-4a13-9eab-ecbbd641ffdf + IsBlank: false + ShowOnCashBasisReports: true + Warnings: + - Message: Account code ''476'' has been removed as it does not match a recognised account. + ValidationErrors: + - Message: The total debits (100.00) must equal total credits (-10.00) + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: ManualJournals array with ManualJournal object in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/ManualJournals' + example: + ManualJournals: + - Narration: Journal Desc + JournalLines: + - LineAmount: 100 + AccountCode: "400" + Description: Money Movement + - LineAmount: -100 + AccountCode: "400" + Description: Prepayment of things + Tracking: + - Name: North + Option: Region + Date: "2019-03-14" + /ManualJournals/{ManualJournalID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getManualJournal + summary: Retrieves a specific manual journal + parameters: + - $ref: '#/components/parameters/ManualJournalID' + responses: + "200": + description: Success - return response of type ManualJournals array with a specified ManualJournals + content: + application/json: + schema: + $ref: '#/components/schemas/ManualJournals' + example: + Id: 7321fc21-1a13-4f40-ae47-df59cff5676d + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552399859139)/ + ManualJournals: + - Date: /Date(1552348800000+0000)/ + Status: POSTED + LineAmountTypes: NoTax + UpdatedDateUTC: /Date(1552357188147+0000)/ + ManualJournalID: 99cb8353-ce73-4a5d-8e0d-8b0edf86cfc4 + Narration: These aren''t the droids you are looking for + JournalLines: + - Description: These aren''t the droids you are looking for + TaxType: NONE + TaxAmount: 0.00 + LineAmount: 100.00 + AccountCode: "429" + Tracking: [] + AccountID: 160bad11-c1b7-4c7e-8903-dca925d78721 + IsBlank: false + - Description: Yes the are + TaxType: NONE + TaxAmount: 0.00 + LineAmount: -100.00 + AccountCode: "200" + Tracking: [] + AccountID: e0a5d892-9f9f-44f0-a153-5cb7db125170 + IsBlank: false + ShowOnCashBasisReports: true + HasAttachments: true + Attachments: + - AttachmentID: 166ca8f8-8bc6-4780-8466-a0e474d586ea + FileName: giphy.gif + Url: https://api.xero.com/api.xro/2.0/manualjournal/99cb8353-ce73-4a5d-8e0d-8b0edf86cfc4/Attachments/giphy.gif + MimeType: image/gif + ContentLength: 495727 + - AttachmentID: 5e5036f9-b1e0-4c5d-a93f-61900137e40b + FileName: ridehistory.pdf + Url: https://api.xero.com/api.xro/2.0/manualjournal/99cb8353-ce73-4a5d-8e0d-8b0edf86cfc4/Attachments/ridehistory.pdf + MimeType: application/pdf + ContentLength: 4423 + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: updateManualJournal + summary: Updates a specific manual journal + x-hasAccountingValidationError: true + x-example: + - dateValue: + is_date: true + key: dateValue + keyPascal: Date + keySnake: date_value + java_datatype: LocalDate + default: LocalDate.of(2020, Month.OCTOBER, 10) + java: LocalDate.of(2020, Month.OCTOBER, 10) + csharp: new DateTime(2020, 10, 10) + php: new DateTime('2020-10-10') + node: '''2020-10-10''' + python: dateutil.parser.parse('2020-12-03T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - manualJournalLines: + is_list: true + key: manualJournalLines + keyPascal: ManualJournalLine + keySnake: manual_journal_lines + - credit: + is_object: true + key: credit + keyPascal: ManualJournalLine + - lineAmount: + nonString: true + key: lineAmount + keyPascal: LineAmount + keySnake: line_amount + default: -100.0 + is_money: true + object: credit + - accountCode: + key: accountCode + keyPascal: AccountCode + keySnake: account_code + default: 400 + object: credit + - description: + is_last: true + key: description + keyPascal: Description + default: Hello there + object: credit + - add_credit: + is_last: true + is_list_add: true + key: manualJournalLines + keyPascal: ManualJournalLine + keySnake: manual_journal_lines + object: credit + - debit: + is_object: true + key: debit + keyPascal: ManualJournalLine + - lineAmount: + nonString: true + key: lineAmount + keyPascal: LineAmount + keySnake: line_amount + default: 100.0 + is_money: true + object: debit + - accountCode: + key: accountCode + keyPascal: AccountCode + keySnake: account_code + default: 120 + object: debit + - description: + is_last: true + key: description + keyPascal: Description + default: Hello there + object: debit + - add_debit: + is_last: true + is_list_add: true + key: manualJournalLines + keyPascal: ManualJournalLine + keySnake: manual_journal_lines + object: debit + - manualJournal: + is_object: true + key: manualJournal + keyPascal: ManualJournal + keySnake: manual_journal + - narration: + key: narration + keyPascal: Narration + default: Foobar + object: manualJournal + - date: + is_variable: true + nonString: true + key: date + keyPascal: Date + default: dateValue + python: date_value + ruby: date_value + object: manualJournal + - set_manualJournalLines: + is_last: true + is_variable: true + nonString: true + key: manualJournalLines + keyPascal: JournalLines + keySnake: journal_lines + default: manualJournalLines + python: manual_journal_lines + ruby: manual_journal_lines + object: manualJournal + - manualJournals: + is_object: true + key: manualJournals + keyPascal: ManualJournals + - add_manualJournal: + is_last: true + is_array_add: true + key: manualJournals + keyPascal: ManualJournals + keySnake: manual_journals + java: ManualJournals + php: manualJournals + python: manual_journal + ruby: manual_journal + csharp: ManualJournal + object: manualJournal + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/ManualJournalID' + responses: + "200": + description: Success - return response of type ManualJournals array with an updated ManualJournal + content: + application/json: + schema: + $ref: '#/components/schemas/ManualJournals' + example: + Id: b694559c-686c-4047-b657-661ba6c0dd1f + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552357736850)/ + ManualJournals: + - Date: /Date(1552262400000+0000)/ + Status: DRAFT + LineAmountTypes: NoTax + UpdatedDateUTC: /Date(1552357736820+0000)/ + ManualJournalID: 07eac261-78ef-47a0-a0eb-a57b74137877 + Narration: Hello Xero + JournalLines: + - Description: Hello there + TaxType: NONE + TaxAmount: 0.00 + LineAmount: 100.00 + AccountCode: "400" + Tracking: [] + AccountID: c4f29c22-28c2-4a13-9eab-ecbbd641ffdf + IsBlank: false + - Description: Goodbye + TaxType: NONE + TaxAmount: 0.00 + LineAmount: -100.00 + AccountCode: "400" + Tracking: [] + AccountID: c4f29c22-28c2-4a13-9eab-ecbbd641ffdf + IsBlank: false + ShowOnCashBasisReports: true + HasAttachments: false + Attachments: [] + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ManualJournals' + example: + ManualJournals: + - Narration: Hello Xero + ManualJournalID: 00000000-0000-0000-0000-000000000000 + JournalLines: [] + /ManualJournals/{ManualJournalID}/Attachments: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getManualJournalAttachments + summary: Retrieves attachment for a specific manual journal + parameters: + - $ref: '#/components/parameters/ManualJournalID' + responses: + "200": + description: Success - return response of type Attachments array with all Attachments for a ManualJournals + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: 5fa4b3ef-7945-45a7-9bab-10e830673dfb + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552404121471)/ + Attachments: + - AttachmentID: 16e86f32-3e25-4209-8662-c0dfd91b654c + FileName: HelloWorld.jpg + Url: https://api.xero.com/api.xro/2.0/ManualJournals/0b159335-606b-485f-b51b-97b3b32bad32/Attachments/HelloWorld.jpg + MimeType: image/jpg + ContentLength: 2878711 + - AttachmentID: ff7c439e-a057-4807-ac2c-b558d7df7511 + FileName: foobar.jpg + Url: https://api.xero.com/api.xro/2.0/ManualJournals/0b159335-606b-485f-b51b-97b3b32bad32/Attachments/foobar.jpg + MimeType: image/jpg + ContentLength: 2878711 + /ManualJournals/{ManualJournalID}/Attachments/{AttachmentID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getManualJournalAttachmentById + summary: Allows you to retrieve a specific attachment from a specific manual journal using a unique attachment Id + parameters: + - $ref: '#/components/parameters/ManualJournalID' + - $ref: '#/components/parameters/AttachmentID' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of attachment for Manual Journal as binary data + content: + application/octet-stream: + schema: + type: string + format: binary + /ManualJournals/{ManualJournalID}/Attachments/{FileName}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getManualJournalAttachmentByFileName + summary: Retrieves a specific attachment from a specific manual journal by file name + parameters: + - $ref: '#/components/parameters/ManualJournalID' + - $ref: '#/components/parameters/FileName' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of attachment for Manual Journal as binary data + content: + application/octet-stream: + schema: + type: string + format: binary + post: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: updateManualJournalAttachmentByFileName + x-hasAccountingValidationError: true + summary: Updates a specific attachment from a specific manual journal by file name + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/ManualJournalID' + - $ref: '#/components/parameters/FileName' + responses: + "200": + description: Success - return response of type Attachments array with an update Attachment for a ManualJournals + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: e1cb9deb-a8f0-477f-b4d1-cf0c6c39e080 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552401039306)/ + Attachments: + - AttachmentID: 16e86f32-3e25-4209-8662-c0dfd91b654c + FileName: HelloWorld.jpg + Url: https://api.xero.com/api.xro/2.0/ManualJournals/0b159335-606b-485f-b51b-97b3b32bad32/Attachments/HelloWorld.jpg + MimeType: image/jpg + ContentLength: 2878711 + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + put: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: createManualJournalAttachmentByFileName + x-hasAccountingValidationError: true + summary: Creates a specific attachment for a specific manual journal by file name + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/ManualJournalID' + - $ref: '#/components/parameters/FileName' + responses: + "200": + description: Success - return response of type Attachments array with a newly created Attachment for a ManualJournals + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: a864994c-e7d7-4dee-b5ca-0a729fde2f39 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552400898428)/ + Attachments: + - AttachmentID: 47ac97ff-d4f9-48a0-8a8e-49fae29129e7 + FileName: foobar.jpg + Url: https://api.xero.com/api.xro/2.0/ManualJournals/0b159335-606b-485f-b51b-97b3b32bad32/Attachments/foobar.jpg + MimeType: image/jpg + ContentLength: 2878711 + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + /ManualJournals/{ManualJournalID}/History: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getManualJournalsHistory + summary: Retrieves history for a specific manual journal + parameters: + - $ref: '#/components/parameters/ManualJournalID' + responses: + "200": + $ref: '#/components/responses/HistoryRetrieved' + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createManualJournalHistoryRecord + summary: Creates a history record for a specific manual journal + x-hasAccountingValidationError: true + x-example: + - historyRecord: + is_object: true + key: historyRecord + keyPascal: HistoryRecord + keySnake: history_record + - Details: + is_last: true + key: details + keyPascal: Details + default: Hello World + object: historyRecord + - historyRecords: + is_object: true + key: historyRecords + keyPascal: HistoryRecords + - add_historyRecord: + is_last: true + is_array_add: true + key: historyRecords + keyPascal: HistoryRecords + keySnake: history_records + java: HistoryRecords + python: history_record + ruby: history_record + csharp: HistoryRecord + object: historyRecord + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/ManualJournalID' + responses: + "200": + $ref: '#/components/responses/HistoryRecordCreated' + "400": + $ref: '#/components/responses/400Error' + requestBody: + $ref: '#/components/requestBodies/historyRecords' + /Organisation: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.settings + - accounting.settings.read + tags: + - Accounting + operationId: getOrganisations + summary: Retrieves Xero organisation details + responses: + "200": + description: Success - return response of type Organisation array with all Organisation + content: + application/json: + schema: + $ref: '#/components/schemas/Organisations' + example: + Id: 27b7a645-a3ee-43c8-b2c6-a2fa7b84c8c5 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552404447003)/ + Organisations: + - APIKey: CTJ60UH519MXQIXEJSDPDALS3EOZ5Y + Name: Dev Evangelist - Sid Test 3 (NZ-2016-02) + LegalName: Dev Evangelist - Sid Test 3 (NZ-2016-02) + PaysTax: true + Version: NZ + OrganisationType: COMPANY + BaseCurrency: NZD + CountryCode: NZ + IsDemoCompany: false + OrganisationStatus: ACTIVE + TaxNumber: 071-138-054 + FinancialYearEndDay: 31 + FinancialYearEndMonth: 3 + SalesTaxBasis: PAYMENTS + SalesTaxPeriod: TWOMONTHS + DefaultSalesTax: Tax Exclusive + DefaultPurchasesTax: Tax Exclusive + PeriodLockDate: /Date(1546214400000+0000)/ + EndOfYearLockDate: /Date(1546214400000+0000)/ + CreatedDateUTC: /Date(1455827393000)/ + OrganisationEntityType: COMPANY + Timezone: NEWZEALANDSTANDARDTIME + ShortCode: '!mBdtL' + OrganisationID: b2c885a9-4bb9-4a00-9b6e-6c2bf60b1a2b + Edition: BUSINESS + Class: PREMIUM + Addresses: [] + Phones: [] + ExternalLinks: [] + PaymentTerms: {} + /Organisation/Actions: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.settings + - accounting.settings.read + tags: + - Accounting + operationId: getOrganisationActions + summary: Retrieves a list of the key actions your app has permission to perform in the connected Xero organisation. + responses: + "200": + description: Success - return response of type Actions array with all key actions + content: + application/json: + schema: + $ref: '#/components/schemas/Actions' + example: + Id: f02c0dd1-1917-4d57-9853-997f6bcaf2bc + Status: OK + ProviderName: Java OA2 dev 01 + DateTimeUTC: /Date(1602883301013)/ + Actions: + - Name: CreateApprovedInvoice + Status: ALLOWED + - Name: CreateDraftPurchaseOrder + Status: ALLOWED + - Name: CreateApprovedBill + Status: ALLOWED + - Name: AttachFilesIntoInvoice + Status: ALLOWED + - Name: UseMulticurrency + Status: ALLOWED + - Name: CreateDraftInvoice + Status: ALLOWED + - Name: CreateRepeatingInvoice + Status: ALLOWED + - Name: CreateRepeatingBill + Status: ALLOWED + - Name: CreateSentQuote + Status: ALLOWED + - Name: CreateInvoicePayment + Status: ALLOWED + - Name: CreateApprovedPurchaseOrder + Status: ALLOWED + - Name: CreateDraftQuote + Status: ALLOWED + - Name: CreateDraftBill + Status: ALLOWED + /Organisation/{OrganisationID}/CISSettings: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.settings + - accounting.settings.read + tags: + - Accounting + operationId: getOrganisationCISSettings + summary: Retrieves the CIS settings for the Xero organistaion. + parameters: + - $ref: '#/components/parameters/OrganisationID' + responses: + "200": + description: Success - return response of type Organisation array with specified Organisation + content: + application/json: + schema: + $ref: '#/components/schemas/CISOrgSettings' + example: + CISSettings: + - CISEnambed: true + Rate: 10 + /Overpayments: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getOverpayments + summary: Retrieves overpayments + parameters: + - $ref: '#/components/parameters/ifModifiedSince' + - in: query + name: where + description: Filter by an any element + example: Status=="AUTHORISED" + x-example-csharp: Status==\"AUTHORISED\" + x-example-java: Status=="' + Overpayment.StatusEnum.AUTHORISED + '" + x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Overpayment::STATUS_AUTHORISED . '" + x-example-ruby: Status==#{XeroRuby::Accounting::Overpayment::AUTHORISED} + schema: + type: string + - in: query + name: order + description: Order by an any element + example: Status ASC + schema: + type: string + - in: query + name: page + description: e.g. page=1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment + example: 1 + schema: + type: integer + - $ref: '#/components/parameters/unitdp' + - $ref: '#/components/parameters/pageSize' + responses: + "200": + description: Success - return response of type Overpayments array with all Overpayments + content: + application/json: + schema: + $ref: '#/components/schemas/Overpayments' + example: + Id: c0ce675e-e5bc-4b2a-a20e-76a9eaedf89d + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552428951416)/ + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 5 + Overpayments: + - OverpaymentID: 098b4dcb-5622-4699-87f8-9d40c4ccceb3 + ID: 098b4dcb-5622-4699-87f8-9d40c4ccceb3 + Type: SPEND-OVERPAYMENT + RemainingCredit: 500.00 + Allocations: [] + Payments: [] + HasAttachments: false + Contact: + ContactID: af3ffcc1-c578-4658-82f3-5d8d458cc7af + Name: Daddy Warbucks + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2019-03-12T00:00:00 + Date: /Date(1552348800000+0000)/ + Status: AUTHORISED + LineAmountTypes: NoTax + LineItems: [] + SubTotal: 500.00 + TotalTax: 0.00 + Total: 500.00 + UpdatedDateUTC: /Date(1552428535123+0000)/ + CurrencyCode: NZD + - OverpaymentID: 2a8bda49-8908-473b-8bcf-1f90990460eb + ID: 2a8bda49-8908-473b-8bcf-1f90990460eb + Type: RECEIVE-OVERPAYMENT + RemainingCredit: 20.00 + Allocations: [] + Payments: [] + HasAttachments: false + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Name: Liam Gallagher + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2019-03-13T00:00:00 + Date: /Date(1552435200000+0000)/ + Status: AUTHORISED + LineAmountTypes: NoTax + LineItems: [] + SubTotal: 20.00 + TotalTax: 0.00 + Total: 20.00 + UpdatedDateUTC: /Date(1552428568250+0000)/ + CurrencyCode: NZD + - OverpaymentID: ed7f6041-c915-4667-bd1d-54c48e92161e + ID: ed7f6041-c915-4667-bd1d-54c48e92161e + Type: SPEND-OVERPAYMENT + RemainingCredit: 3000.00 + Allocations: [] + Payments: [] + HasAttachments: false + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Name: Liam Gallagher + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2019-03-12T00:00:00 + Date: /Date(1552348800000+0000)/ + Status: AUTHORISED + LineAmountTypes: NoTax + LineItems: [] + SubTotal: 3000.00 + TotalTax: 0.00 + Total: 3000.00 + UpdatedDateUTC: /Date(1552428781527+0000)/ + CurrencyCode: NZD + - OverpaymentID: 0859adbc-ea00-40cd-a877-258cf8644975 + ID: 0859adbc-ea00-40cd-a877-258cf8644975 + Type: RECEIVE-OVERPAYMENT + RemainingCredit: 20.00 + Allocations: [] + Payments: [] + HasAttachments: false + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Name: Liam Gallagher + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2019-03-13T00:00:00 + Date: /Date(1552435200000+0000)/ + Status: AUTHORISED + LineAmountTypes: NoTax + LineItems: [] + SubTotal: 20.00 + TotalTax: 0.00 + Total: 20.00 + UpdatedDateUTC: /Date(1552428842190+0000)/ + CurrencyCode: NZD + - OverpaymentID: 687b877f-634a-415d-92b2-74e62977de30 + ID: 687b877f-634a-415d-92b2-74e62977de30 + Type: RECEIVE-OVERPAYMENT + RemainingCredit: 20.00 + Allocations: [] + Payments: [] + HasAttachments: false + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Name: Liam Gallagher + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2019-03-13T00:00:00 + Date: /Date(1552435200000+0000)/ + Status: AUTHORISED + LineAmountTypes: NoTax + LineItems: [] + SubTotal: 20.00 + TotalTax: 0.00 + Total: 20.00 + UpdatedDateUTC: /Date(1552428950730+0000)/ + CurrencyCode: NZD + /Overpayments/{OverpaymentID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getOverpayment + summary: Retrieves a specific overpayment using a unique overpayment Id + parameters: + - $ref: '#/components/parameters/OverpaymentID' + responses: + "200": + description: Success - return response of type Overpayments array with specified Overpayments + content: + application/json: + schema: + $ref: '#/components/schemas/Overpayments' + example: + Id: 46c9e8e2-9410-4e75-9297-f0ca8fa76c32 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1553278835158)/ + Overpayments: + - OverpaymentID: ed7f6041-c915-4667-bd1d-54c48e92161e + ID: ed7f6041-c915-4667-bd1d-54c48e92161e + CurrencyRate: 1.000000 + Type: SPEND-OVERPAYMENT + RemainingCredit: 2999.00 + Allocations: + - Amount: 1.00 + Date: /Date(1552348800000+0000)/ + Invoice: + InvoiceID: c45720a1-ade3-4a38-a064-d15489be6841 + InvoiceNumber: "" + Payments: [] + CreditNotes: [] + Prepayments: [] + Overpayments: [] + HasErrors: false + IsDiscounted: false + LineItems: [] + Payments: [] + HasAttachments: true + Attachments: + - AttachmentID: 247dd942-5245-47a7-adb1-4d9ea075b431 + FileName: giphy.gif + Url: https://api.xero.com/api.xro/2.0/banktransaction/ed7f6041-c915-4667-bd1d-54c48e92161e/Attachments/giphy.gif + MimeType: image/gif + ContentLength: 495727 + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + ContactStatus: ACTIVE + Name: Liam Gallagher + FirstName: Liam + LastName: Gallagher + EmailAddress: liam@rockstar.com + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + AttentionTo: "" + - AddressType: POBOX + City: Anytown + Region: NY + PostalCode: "10101" + Country: USA + AttentionTo: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: 222-2222 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: 333-2233 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 444-3433 + PhoneAreaCode: "212" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1551747281053+0000)/ + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2019-03-12T00:00:00 + Date: /Date(1552348800000+0000)/ + Status: AUTHORISED + LineAmountTypes: NoTax + LineItems: + - Description: Broken TV deposit + UnitAmount: 3000.00 + TaxType: NONE + TaxAmount: 0.00 + LineAmount: 3000.00 + AccountCode: "800" + Tracking: [] + Quantity: 1.0000 + DiscountEnteredAsPercent: true + ValidationErrors: [] + SubTotal: 3000.00 + TotalTax: 0.00 + Total: 3000.00 + UpdatedDateUTC: /Date(1552428952890+0000)/ + CurrencyCode: NZD + /Overpayments/{OverpaymentID}/Allocations: + parameters: + - $ref: '#/components/parameters/requiredHeader' + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createOverpaymentAllocations + summary: Creates a single allocation for a specific overpayment + x-hasAccountingValidationError: true + x-example: + - currDate: + is_date: true + key: currDate + keyPascal: CurrDate + keySnake: curr_date + java_datatype: LocalDate + default: LocalDate.now() + java: LocalDate.now() + csharp: DateTime.Now + node: '''2020-12-10''' + php: new DateTime('2020-12-10') + python: dateutil.parser.parse('2020-12-03T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - invoice: + is_object: true + key: invoice + keyPascal: Invoice + - invoiceID: + is_last: true + is_uuid: true + key: invoiceID + keyPascal: InvoiceID + keySnake: invoice_id + default: 00000000-0000-0000-0000-000000000000 + object: invoice + - allocation: + is_object: true + key: allocation + keyPascal: Allocation + - amount: + nonString: true + key: amount + keyPascal: Amount + default: 1.0 + is_money: true + object: allocation + - date: + is_variable: true + nonString: true + key: date + keyPascal: Date + default: currDate + python: curr_date + ruby: curr_date + object: allocation + - set_invoice: + is_last: true + is_variable: true + nonString: true + key: invoice + keyPascal: Invoice + default: invoice + object: allocation + - allocations: + is_object: true + key: allocations + keyPascal: Allocations + - add_allocation: + is_last: true + is_array_add: true + key: allocations + keyPascal: Allocations + java: Allocations + csharp: Allocation + object: allocation + parameters: + - $ref: '#/components/parameters/OverpaymentID' + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Allocations array with all Allocation for Overpayments + content: + application/json: + schema: + $ref: '#/components/schemas/Allocations' + example: + Id: 3b7f7be2-384a-4703-bcfb-c56e9116c914 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552428952968)/ + Allocations: + - Amount: 1.00 + Date: /Date(1552348800000+0000)/ + Invoice: + InvoiceID: c45720a1-ade3-4a38-a064-d15489be6841 + Payments: [] + CreditNotes: [] + Prepayments: [] + Overpayments: [] + HasErrors: false + IsDiscounted: false + LineItems: [] + ValidationErrors: [] + Overpayment: + OverpaymentID: ed7f6041-c915-4667-bd1d-54c48e92161e + ID: ed7f6041-c915-4667-bd1d-54c48e92161e + LineItems: [] + ValidationErrors: [] + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Allocations array with Allocation object in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/Allocations' + example: + Allocations: + - Invoice: + InvoiceID: 00000000-0000-0000-0000-000000000000 + LineItems: [] + Contact: {} + Type: ACCPAY + Amount: 10.00 + Date: "2019-03-12" + /Overpayments/{OverpaymentID}/Allocations/{AllocationID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + delete: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: deleteOverpaymentAllocations + summary: Deletes an Allocation from an overpayment + parameters: + - $ref: '#/components/parameters/OverpaymentID' + - $ref: '#/components/parameters/AllocationID' + responses: + "200": + description: Success - return response of type Allocation with the isDeleted flag as true + content: + application/json: + schema: + $ref: '#/components/schemas/Allocation' + example: + AllocationId: 2bb15054-3868-4f85-a9c6-0402ec8c1201 + Date: /Date(1551822670731)/ + Invoice: + - InvoiceID: b7eb1fc9-a0f9-4e8e-9373-6689f5350832 + IsDeleted: true + /Overpayments/{OverpaymentID}/History: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getOverpaymentHistory + summary: Retrieves history records of a specific overpayment + parameters: + - $ref: '#/components/parameters/OverpaymentID' + responses: + "200": + $ref: '#/components/responses/HistoryRetrieved' + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createOverpaymentHistory + summary: Creates a history record for a specific overpayment + x-hasAccountingValidationError: true + x-example: + - historyRecord: + is_object: true + key: historyRecord + keyPascal: HistoryRecord + keySnake: history_record + - Details: + is_last: true + key: details + keyPascal: Details + default: Hello World + object: historyRecord + - historyRecords: + is_object: true + key: historyRecords + keyPascal: HistoryRecords + - add_historyRecord: + is_last: true + is_array_add: true + key: historyRecords + keyPascal: HistoryRecords + keySnake: history_records + java: HistoryRecords + python: history_record + ruby: history_record + csharp: HistoryRecord + object: historyRecord + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/OverpaymentID' + responses: + "200": + $ref: '#/components/responses/HistoryRecordCreated' + "400": + description: A failed request due to validation error - API is not able to create HistoryRecord for Overpayments + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + ErrorNumber: 10 + Type: ValidationException + Message: A validation exception occurred + Elements: + - DateUTCString: 2019-03-12T22:30:13 + DateUTC: /Date(1552429813667)/ + Details: Hello World + ValidationErrors: + - Message: The document with the supplied id was not found for this endpoint. + requestBody: + $ref: '#/components/requestBodies/historyRecords' + /Payments: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getPayments + summary: Retrieves payments for invoices and credit notes + parameters: + - $ref: '#/components/parameters/ifModifiedSince' + - in: query + name: where + description: Filter by an any element + example: Status=="AUTHORISED" + x-example-csharp: Status==\"AUTHORISED\" + x-example-java: Status=="' + Payment.StatusEnum.AUTHORISED + '" + x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Payment::STATUS_AUTHORISED . '" + x-example-ruby: Status==#{XeroRuby::Accounting::Payment::AUTHORISED} + schema: + type: string + - in: query + name: order + description: Order by an any element + example: Amount ASC + schema: + type: string + - in: query + name: page + description: Up to 100 payments will be returned in a single API call + example: 1 + schema: + type: integer + - $ref: '#/components/parameters/pageSize' + responses: + "200": + description: Success - return response of type Payments array for all Payments + content: + application/json: + schema: + $ref: '#/components/schemas/Payments' + example: + Id: 9f310473-e1b5-4704-a25c-eec653deb596 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552431874205)/ + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 2 + Payments: + - PaymentID: 99ea7f6b-c513-4066-bc27-b7c65dcd76c2 + BatchPaymentID: b54aa50c-794c-461b-89d1-846e1b84d9c0 + BatchPayment: + Account: + AccountID: 5690f1e8-1d02-4893-90c2-ee1a69eff942 + BatchPaymentID: b54aa50c-794c-461b-89d1-846e1b84d9c0 + Date: /Date(1552521600000+0000)/ + Type: RECBATCH + Status: AUTHORISED + TotalAmount: "50.00" + UpdatedDateUTC: /Date(1541176592690+0000)/ + IsReconciled: "false" + Date: /Date(1543449600000+0000)/ + BankAmount: 46.00 + Amount: 46.00 + Reference: "" + CurrencyRate: 1.000000 + PaymentType: ACCRECPAYMENT + Status: AUTHORISED + UpdatedDateUTC: /Date(1541176592690+0000)/ + HasAccount: true + IsReconciled: false + Account: + AccountID: 5690f1e8-1d02-4893-90c2-ee1a69eff942 + Code: "970" + Invoice: + Type: ACCREC + InvoiceID: 046d8a6d-1ae1-4b4d-9340-5601bdf41b87 + InvoiceNumber: INV-0002 + Payments: [] + CreditNotes: [] + Prepayments: [] + Overpayments: [] + HasErrors: false + IsDiscounted: false + Contact: + ContactID: a3675fc4-f8dd-4f03-ba5b-f1870566bcd7 + ContactNumber: "" + Name: Barney Rubble-83203 + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + LineItems: [] + CurrencyCode: NZD + HasValidationErrors: false + - PaymentID: 6b037c9b-2e5d-4905-84d3-eabfb3438242 + Date: /Date(1552521600000+0000)/ + BankAmount: 2.00 + Amount: 2.00 + Reference: Too much + CurrencyRate: 1.000000 + PaymentType: ARCREDITPAYMENT + Status: AUTHORISED + UpdatedDateUTC: /Date(1551812346173+0000)/ + HasAccount: true + IsReconciled: false + Account: + AccountID: 136ebd08-60ea-4592-8982-be92c153b53a + Code: "980" + Invoice: + Type: ACCRECCREDIT + InvoiceID: 249f15fa-f2a7-4acc-8769-0984103f2225 + InvoiceNumber: CN-0005 + Payments: [] + CreditNotes: [] + Prepayments: [] + Overpayments: [] + HasErrors: false + IsDiscounted: false + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + ContactNumber: "" + Name: Liam Gallagher + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + LineItems: [] + CurrencyCode: NZD + HasValidationErrors: false + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createPayments + summary: Creates multiple payments for invoices or credit notes + x-hasAccountingValidationError: true + x-example: + - dateValue: + is_date: true + key: dateValue + keyPascal: Date + keySnake: date_value + java_datatype: LocalDate + default: LocalDate.of(2020, Month.OCTOBER, 10) + java: LocalDate.now() + csharp: DateTime.Now + php: new DateTime('2020-10-10') + node: '''2020-10-10''' + python: dateutil.parser.parse('2020-10-10T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - invoice: + is_object: true + key: invoice + keyPascal: Invoice + - invoiceID: + is_last: true + is_uuid: true + key: invoiceID + keyPascal: InvoiceID + keySnake: invoice_id + default: 00000000-0000-0000-0000-000000000000 + object: invoice + - account: + is_object: true + key: account + keyPascal: Account + - accountID: + is_last: true + is_uuid: true + key: accountID + keyPascal: AccountID + keySnake: account_id + default: 00000000-0000-0000-0000-000000000000 + object: account + - payment: + is_object: true + key: payment + keyPascal: Payment + - set_invoice: + is_variable: true + nonString: true + key: invoice + keyPascal: Invoice + default: invoice + object: payment + - set_account: + is_variable: true + nonString: true + key: account + keyPascal: Account + default: account + object: payment + - amount: + nonString: true + key: amount + keyPascal: Amount + default: 1.0 + is_money: true + object: payment + - date: + is_last: true + is_variable: true + nonString: true + key: date + keyPascal: Date + default: dateValue + python: date_value + ruby: date_value + object: payment + - payments: + is_object: true + key: payments + keyPascal: Payments + - add_payment: + is_last: true + is_array_add: true + key: payments + keyPascal: Payments + java: Payments + csharp: Payment + object: payment + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Payments array for newly created Payment + content: + application/json: + schema: + $ref: '#/components/schemas/Payments' + example: + Id: 83b5715a-6a77-4c16-b5b8-2da08b5fde44 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552432238716)/ + Payments: + - PaymentID: 61ed71fc-01bf-4eb8-8419-8a18789ff45f + Date: /Date(1552348800000+0000)/ + BankAmount: 1.00 + Amount: 1.00 + CurrencyRate: 1.000000 + PaymentType: ACCRECPAYMENT + Status: AUTHORISED + UpdatedDateUTC: /Date(1552432238623+0000)/ + HasAccount: true + IsReconciled: false + Account: + AccountID: 5690f1e8-1d02-4893-90c2-ee1a69eff942 + Code: "970" + Name: Owner A Funds Introduced + Invoice: + Type: ACCREC + InvoiceID: c7c37b83-ac95-45ea-88ba-8ad83a5f22fe + InvoiceNumber: INV-0004 + Reference: "" + Prepayments: [] + Overpayments: [] + AmountDue: 229.00 + AmountPaid: 1.00 + SentToContact: false + CurrencyRate: 1.000000 + HasErrors: false + IsDiscounted: false + Contact: + ContactID: a3675fc4-f8dd-4f03-ba5b-f1870566bcd7 + Name: Barney Rubble-83203 + ContactPersons: [] + HasValidationErrors: false + DateString: 2018-10-10T00:00:00 + Date: /Date(1539129600000+0000)/ + DueDateString: 2018-10-18T00:00:00 + DueDate: /Date(1539820800000+0000)/ + Status: AUTHORISED + LineAmountTypes: Exclusive + LineItems: + - Description: boo + UnitAmount: 200.00 + TaxType: OUTPUT2 + TaxAmount: 30.00 + LineAmount: 200.00 + AccountCode: "200" + Tracking: [] + Quantity: 1.0000 + LineItemID: 173dfdb9-43b5-4bd2-ae25-9419e662a3a7 + ValidationErrors: [] + SubTotal: 200.00 + TotalTax: 30.00 + Total: 230.00 + UpdatedDateUTC: /Date(1552432238623+0000)/ + CurrencyCode: NZD + HasValidationErrors: true + ValidationErrors: + - Message: Payment amount exceeds the amount outstanding on this document + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Payments array with Payment object in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/Payments' + example: + Payments: + - Invoice: + LineItems: [] + InvoiceID: 00000000-0000-0000-0000-000000000000 + Account: + Code: "970" + Date: "2019-03-12" + Amount: 1 + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createPayment + summary: Creates a single payment for invoice or credit notes + parameters: + - $ref: '#/components/parameters/idempotencyKey' + x-hasAccountingValidationError: true + x-example: + - dateValue: + is_date: true + key: dateValue + keyPascal: Date + keySnake: date_value + java_datatype: LocalDate + default: LocalDate.of(2020, Month.OCTOBER, 10) + java: LocalDate.now() + csharp: DateTime.Now + php: new DateTime('2020-10-10') + node: '''2020-10-10''' + python: dateutil.parser.parse('2020-10-10T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - invoice: + is_object: true + key: invoice + keyPascal: Invoice + - invoiceID: + is_last: true + is_uuid: true + key: invoiceID + keyPascal: InvoiceID + keySnake: invoice_id + default: 00000000-0000-0000-0000-000000000000 + object: invoice + - account: + is_object: true + key: account + keyPascal: Account + - accountID: + is_last: true + is_uuid: true + key: accountID + keyPascal: AccountID + keySnake: account_id + default: 00000000-0000-0000-0000-000000000000 + object: account + - payment: + is_object: true + key: payment + keyPascal: Payment + - set_invoice: + is_variable: true + nonString: true + key: invoice + keyPascal: Invoice + default: invoice + object: payment + - set_account: + is_variable: true + nonString: true + key: account + keyPascal: Account + default: account + object: payment + - amount: + nonString: true + key: amount + keyPascal: Amount + default: 1.0 + is_money: true + object: payment + - date: + is_last: true + is_variable: true + nonString: true + key: date + keyPascal: Date + default: dateValue + python: date_value + ruby: date_value + object: payment + - payments: + is_object: true + key: payments + keyPascal: Payments + - add_payment: + is_last: true + is_array_add: true + key: payments + keyPascal: Payments + java: Payments + csharp: Payment + object: payment + responses: + "200": + description: Success - return response of type Payments array for newly created Payment + content: + application/json: + schema: + $ref: '#/components/schemas/Payments' + example: + Id: 83b5715a-6a77-4c16-b5b8-2da08b5fde44 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552432238716)/ + Payments: + - PaymentID: 61ed71fc-01bf-4eb8-8419-8a18789ff45f + Date: /Date(1552348800000+0000)/ + BankAmount: 1.00 + Amount: 1.00 + CurrencyRate: 1.000000 + PaymentType: ACCRECPAYMENT + Status: AUTHORISED + UpdatedDateUTC: /Date(1552432238623+0000)/ + HasAccount: true + IsReconciled: false + Account: + AccountID: 5690f1e8-1d02-4893-90c2-ee1a69eff942 + Code: "970" + Name: Owner A Funds Introduced + Invoice: + Type: ACCREC + InvoiceID: c7c37b83-ac95-45ea-88ba-8ad83a5f22fe + InvoiceNumber: INV-0004 + Reference: "" + Prepayments: [] + Overpayments: [] + AmountDue: 229.00 + AmountPaid: 1.00 + SentToContact: false + CurrencyRate: 1.000000 + HasErrors: false + IsDiscounted: false + Contact: + ContactID: a3675fc4-f8dd-4f03-ba5b-f1870566bcd7 + Name: Barney Rubble-83203 + ContactPersons: [] + HasValidationErrors: false + DateString: 2018-10-10T00:00:00 + Date: /Date(1539129600000+0000)/ + DueDateString: 2018-10-18T00:00:00 + DueDate: /Date(1539820800000+0000)/ + Status: AUTHORISED + LineAmountTypes: Exclusive + LineItems: + - Description: boo + UnitAmount: 200.00 + TaxType: OUTPUT2 + TaxAmount: 30.00 + LineAmount: 200.00 + AccountCode: "200" + Tracking: [] + Quantity: 1.0000 + LineItemID: 173dfdb9-43b5-4bd2-ae25-9419e662a3a7 + ValidationErrors: [] + SubTotal: 200.00 + TotalTax: 30.00 + Total: 230.00 + UpdatedDateUTC: /Date(1552432238623+0000)/ + CurrencyCode: NZD + HasValidationErrors: true + ValidationErrors: + - Message: Payment amount exceeds the amount outstanding on this document + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Request body with a single Payment object + content: + application/json: + schema: + $ref: '#/components/schemas/Payment' + example: + Payments: + - Invoice: + LineItems: [] + InvoiceID: 00000000-0000-0000-0000-000000000000 + Account: + Code: "970" + Date: "2019-03-12" + Amount: 1 + /Payments/{PaymentID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getPayment + summary: Retrieves a specific payment for invoices and credit notes using a unique payment Id + parameters: + - $ref: '#/components/parameters/PaymentID' + responses: + "200": + description: Success - return response of type Payments array for specified Payment + content: + application/json: + schema: + $ref: '#/components/schemas/Payments' + example: + Id: 4876f9ee-3a17-47d8-8c1b-84377c8f2998 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552431874852)/ + Payments: + - PaymentID: 99ea7f6b-c513-4066-bc27-b7c65dcd76c2 + BatchPaymentID: b54aa50c-794c-461b-89d1-846e1b84d9c0 + BatchPayment: + Account: + AccountID: 5690f1e8-1d02-4893-90c2-ee1a69eff942 + BatchPaymentID: b54aa50c-794c-461b-89d1-846e1b84d9c0 + Date: /Date(1543449600000+0000)/ + Type: RECBATCH + Status: AUTHORISED + TotalAmount: "50.00" + UpdatedDateUTC: /Date(1541176592690+0000)/ + IsReconciled: "false" + Date: /Date(1543449600000+0000)/ + BankAmount: 46.00 + Amount: 46.00 + CurrencyRate: 1.000000 + PaymentType: ACCRECPAYMENT + Status: AUTHORISED + UpdatedDateUTC: /Date(1541176592690+0000)/ + HasAccount: true + IsReconciled: false + Account: + AccountID: 5690f1e8-1d02-4893-90c2-ee1a69eff942 + Code: "970" + Name: Owner A Funds Introduced + Invoice: + Type: ACCREC + InvoiceID: 046d8a6d-1ae1-4b4d-9340-5601bdf41b87 + InvoiceNumber: INV-0002 + Reference: Red Fish, Blue Fish + Payments: + - PaymentID: 99ea7f6b-c513-4066-bc27-b7c65dcd76c2 + Date: /Date(1543449600000+0000)/ + Amount: 46.00 + CurrencyRate: 1.000000 + HasAccount: false + HasValidationErrors: false + Prepayments: [] + Overpayments: [] + AmountDue: 0.00 + AmountPaid: 46.00 + SentToContact: true + CurrencyRate: 1.000000 + HasErrors: false + IsDiscounted: false + Contact: + ContactID: a3675fc4-f8dd-4f03-ba5b-f1870566bcd7 + Name: Barney Rubble-83203 + ContactPersons: [] + HasValidationErrors: false + DateString: 2018-10-20T00:00:00 + Date: /Date(1539993600000+0000)/ + DueDateString: 2018-12-30T00:00:00 + DueDate: /Date(1546128000000+0000)/ + Status: PAID + LineAmountTypes: Exclusive + LineItems: + - Description: Acme Tires + UnitAmount: 20.00 + TaxType: OUTPUT2 + TaxAmount: 6.00 + LineAmount: 40.00 + AccountCode: "200" + Tracking: [] + Quantity: 2.0000 + LineItemID: 878d1688-a905-4866-ae91-5a772c2540c7 + ValidationErrors: [] + SubTotal: 40.00 + TotalTax: 6.00 + Total: 46.00 + UpdatedDateUTC: /Date(1541176592690+0000)/ + CurrencyCode: NZD + FullyPaidOnDate: /Date(1543449600000+0000)/ + HasValidationErrors: false + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: deletePayment + summary: Updates a specific payment for invoices and credit notes + x-hasAccountingValidationError: true + x-example: + - paymentDelete: + is_object: true + key: paymentDelete + keyPascal: PaymentDelete + - status: + is_last: true + key: status + keyPascal: Status + default: DELETED + object: paymentDelete + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/PaymentID' + responses: + "200": + description: Success - return response of type Payments array for updated Payment + content: + application/json: + schema: + $ref: '#/components/schemas/Payments' + example: + Id: ee23328c-4a8b-4ee7-8fb6-9796ffab9cb0 + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1583945852489)/ + Payments: + - PaymentID: c94c996b-1ab3-4ff3-ad19-1cdc77f30817 + Date: /Date(1567382400000+0000)/ + BankAmount: 2.00 + Amount: 2.00 + Reference: foobar + CurrencyRate: 1.000000 + PaymentType: APCREDITPAYMENT + Status: DELETED + UpdatedDateUTC: /Date(1583945852373+0000)/ + HasAccount: true + IsReconciled: false + Account: + AccountID: 57f261f0-e32d-4a7f-be82-22cd992c6367 + Code: "033" + Name: Checking account + Invoice: + Type: ACCPAYCREDIT + InvoiceID: dba68ebc-c05a-4e2d-b97d-964349e5b8d6 + InvoiceNumber: "" + Reference: "" + Prepayments: [] + Overpayments: [] + AmountDue: 22.00 + AmountPaid: 0.00 + SentToContact: false + CurrencyRate: 1.000000 + IsDiscounted: false + HasErrors: false + Contact: + ContactID: 216830cb-9a68-487e-928b-c1a7ccc4fc81 + Name: FooBar73005 + ContactPersons: [] + HasValidationErrors: false + DateString: 2017-01-02T00:00:00 + Date: /Date(1483315200000+0000)/ + Status: AUTHORISED + LineAmountTypes: Exclusive + LineItems: + - Description: Sample Item72716 + UnitAmount: 20.00 + TaxType: INPUT + TaxAmount: 2.00 + LineAmount: 20.00 + AccountCode: "400" + Tracking: [] + Quantity: 1.0000 + ValidationErrors: [] + SubTotal: 20.00 + TotalTax: 2.00 + Total: 22.00 + UpdatedDateUTC: /Date(1583945852363+0000)/ + CurrencyCode: AUD + HasValidationErrors: false + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentDelete' + example: + Payments: + - Status: DELETED + /Payments/{PaymentID}/History: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getPaymentHistory + summary: Retrieves history records of a specific payment + parameters: + - $ref: '#/components/parameters/PaymentID' + responses: + "200": + $ref: '#/components/responses/HistoryRetrieved' + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createPaymentHistory + summary: Creates a history record for a specific payment + x-hasAccountingValidationError: true + x-example: + - historyRecord: + is_object: true + key: historyRecord + keyPascal: HistoryRecord + keySnake: history_record + - Details: + is_last: true + key: details + keyPascal: Details + default: Hello World + object: historyRecord + - historyRecords: + is_object: true + key: historyRecords + keyPascal: HistoryRecords + - add_historyRecord: + is_last: true + is_array_add: true + key: historyRecords + keyPascal: HistoryRecords + keySnake: history_records + java: HistoryRecords + python: history_record + ruby: history_record + csharp: HistoryRecord + object: historyRecord + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/PaymentID' + responses: + "200": + $ref: '#/components/responses/HistoryRecordCreated' + "400": + description: A failed request due to validation error - API is not able to create HistoryRecord for Payments + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + ErrorNumber: 10 + Type: ValidationException + Message: A validation exception occurred + Elements: + - DateUTCString: 2019-03-12T22:30:13 + DateUTC: /Date(1552429813667)/ + Details: Hello World + ValidationErrors: + - Message: The document with the supplied id was not found for this endpoint. + requestBody: + $ref: '#/components/requestBodies/historyRecords' + /PaymentServices: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - paymentservices + tags: + - Accounting + operationId: getPaymentServices + summary: Retrieves payment services + x-excludeFromPreview: true + responses: + "200": + description: Success - return response of type PaymentServices array for all PaymentService + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentServices' + example: + Id: ab82a7dd-5070-4e82-b841-0af52909fe04 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552488713171)/ + PaymentServices: + - PaymentServiceID: 54b3b4f6-0443-4fba-bcd1-61ec0c35ca55 + PaymentServiceName: PayUpNow + PaymentServiceUrl: https://www.payupnow.com/ + PaymentServiceType: Custom + PayNowText: Time To Pay + put: + security: + - OAuth2: + - paymentservices + tags: + - Accounting + operationId: createPaymentService + summary: Creates a payment service + parameters: + - $ref: '#/components/parameters/idempotencyKey' + x-excludeFromPreview: true + x-hasAccountingValidationError: true + x-example: + - object: + is_object: true + key: paymentService + keyPascal: PaymentService + keySnake: payment_service + - paymentServiceName: + key: paymentServiceName + keyPascal: PaymentServiceName + keySnake: payment_service_name + default: ACME Payments + object: paymentService + - paymentServiceUrl: + key: paymentServiceUrl + keyPascal: PaymentServiceUrl + keySnake: payment_service_url + default: https://www.payupnow.com/ + object: paymentService + - payNowText: + is_last: true + key: payNowText + keyPascal: PayNowText + keySnake: pay_now_text + default: Pay Now + object: paymentService + - paymentServices: + is_object: true + key: paymentServices + keyPascal: PaymentServices + - add_paymentService: + is_last: true + is_array_add: true + key: paymentServices + keyPascal: PaymentServices + java: PaymentServices + csharp: PaymentService + object: paymentService + responses: + "200": + description: Success - return response of type PaymentServices array for newly created PaymentService + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentServices' + example: + Id: 7ed8b3c0-2155-49ee-a583-f2dce6607dfb + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552488712813)/ + PaymentServices: + - PaymentServiceID: 54b3b4f6-0443-4fba-bcd1-61ec0c35ca55 + PaymentServiceName: PayUpNow + PaymentServiceUrl: https://www.payupnow.com/ + PaymentServiceType: Custom + PayNowText: Time To Pay + ValidationErrors: + - Message: Payment service could not be found + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: PaymentServices array with PaymentService object in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentServices' + example: + PaymentServices: + - PaymentServiceName: PayUpNow + PaymentServiceUrl: https://www.payupnow.com/ + PayNowText: Time To Pay + /Prepayments: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getPrepayments + summary: Retrieves prepayments + parameters: + - $ref: '#/components/parameters/ifModifiedSince' + - in: query + name: where + description: Filter by an any element + example: Status=="AUTHORISED" + x-example-csharp: Status==\"AUTHORISED\" + x-example-java: Status=="' + Prepayment.StatusEnum.AUTHORISED + '" + x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Prepayment::STATUS_AUTHORISED . '" + x-example-ruby: Status==#{XeroRuby::Accounting::Prepayment::AUTHORISED} + schema: + type: string + - in: query + name: order + description: Order by an any element + example: Reference ASC + schema: + type: string + - in: query + name: page + description: e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment + example: 1 + schema: + type: integer + - $ref: '#/components/parameters/unitdp' + - $ref: '#/components/parameters/pageSize' + responses: + "200": + description: Success - return response of type Prepayments array for all Prepayment + content: + application/json: + schema: + $ref: '#/components/schemas/Prepayments' + example: + Id: d7a9ca0c-6159-4c26-ad2e-715440c50b7d + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552489227595)/ + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 1 + Prepayments: + - PrepaymentID: ce0cddef-cf5a-4e59-b638-f225679115a7 + ID: ce0cddef-cf5a-4e59-b638-f225679115a7 + Type: RECEIVE-PREPAYMENT + Reference: INV-0011 + RemainingCredit: 3450.00 + Allocations: [] + Payments: [] + HasAttachments: true + Contact: + ContactID: be392c72-c121-4f83-9512-03ac71e54c20 + Name: Luke Skywalker + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + DateString: 2019-03-13T00:00:00 + Date: /Date(1552435200000+0000)/ + Status: AUTHORISED + LineAmountTypes: Exclusive + LineItems: [] + SubTotal: 3000.00 + TotalTax: 450.00 + Total: 3450.00 + UpdatedDateUTC: /Date(1552489187730+0000)/ + CurrencyCode: NZD + /Prepayments/{PrepaymentID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getPrepayment + summary: Allows you to retrieve a specified prepayments + parameters: + - $ref: '#/components/parameters/PrepaymentID' + responses: + "200": + description: Success - return response of type Prepayments array for a specified Prepayment + content: + application/json: + schema: + $ref: '#/components/schemas/Prepayments' + example: + Id: 18e5f578-ef28-4096-a7aa-d06d65574b99 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1553540376847)/ + Prepayments: + - PrepaymentID: ce0cddef-cf5a-4e59-b638-f225679115a7 + ID: ce0cddef-cf5a-4e59-b638-f225679115a7 + CurrencyRate: 1.000000 + Type: RECEIVE-PREPAYMENT + Reference: INV-0011 + RemainingCredit: 3449.00 + Allocations: + - Amount: 1.00 + Date: /Date(1552435200000+0000)/ + Invoice: + InvoiceID: c7c37b83-ac95-45ea-88ba-8ad83a5f22fe + InvoiceNumber: INV-0004 + Payments: [] + CreditNotes: [] + Prepayments: [] + Overpayments: [] + HasErrors: false + IsDiscounted: false + LineItems: [] + Payments: [] + HasAttachments: true + Attachments: + - AttachmentID: 2ca06aa0-3629-474a-9401-553d4b7fa9b0 + FileName: giphy.gif + Url: https://api.xero.com/api.xro/2.0/banktransaction/ce0cddef-cf5a-4e59-b638-f225679115a7/Attachments/giphy.gif + MimeType: image/gif + ContentLength: 495727 + Contact: + ContactID: be392c72-c121-4f83-9512-03ac71e54c20 + ContactStatus: ACTIVE + Name: Luke Skywalker + EmailAddress: "" + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + - AddressType: POBOX + City: "" + Region: "" + PostalCode: "" + Country: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1552329691573+0000)/ + ContactGroups: [] + DefaultCurrency: NZD + ContactPersons: [] + HasValidationErrors: false + DateString: 2019-03-13T00:00:00 + Date: /Date(1552435200000+0000)/ + Status: AUTHORISED + LineAmountTypes: Exclusive + LineItems: + - Description: Light Speeder + UnitAmount: 3000.00 + TaxType: OUTPUT2 + TaxAmount: 450.00 + LineAmount: 3000.00 + AccountCode: "200" + Tracking: [] + Quantity: 1.0000 + DiscountEnteredAsPercent: true + ValidationErrors: [] + SubTotal: 3000.00 + TotalTax: 450.00 + Total: 3450.00 + UpdatedDateUTC: /Date(1552522424850+0000)/ + CurrencyCode: NZD + /Prepayments/{PrepaymentID}/Allocations: + parameters: + - $ref: '#/components/parameters/requiredHeader' + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createPrepaymentAllocations + summary: Allows you to create an Allocation for prepayments + x-hasAccountingValidationError: true + x-example: + - currDate: + is_date: true + key: currDate + keyPascal: CurrDate + keySnake: curr_date + java_datatype: LocalDate + default: LocalDate.now() + java: LocalDate.now() + csharp: DateTime.Now + node: '''2020-12-10''' + php: new DateTime('2020-12-10') + python: dateutil.parser.parse('2020-12-03T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - invoice: + is_object: true + key: invoice + keyPascal: Invoice + - invoiceID: + is_last: true + is_uuid: true + key: invoiceID + keyPascal: InvoiceID + keySnake: invoice_id + default: 00000000-0000-0000-0000-000000000000 + object: invoice + - allocation: + is_object: true + key: allocation + keyPascal: Allocation + - set_invoice: + is_variable: true + nonString: true + key: invoice + keyPascal: Invoice + default: invoice + object: allocation + - amount: + nonString: true + key: amount + keyPascal: Amount + default: 1.0 + is_money: true + object: allocation + - date: + is_last: true + is_variable: true + nonString: true + key: date + keyPascal: Date + default: currDate + python: curr_date + ruby: curr_date + object: allocation + - allocations: + is_object: true + key: allocations + keyPascal: Allocations + - add_allocation: + is_last: true + is_array_add: true + key: allocations + keyPascal: Allocations + java: Allocations + csharp: Allocation + object: allocation + parameters: + - $ref: '#/components/parameters/PrepaymentID' + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Allocations array of Allocation for all Prepayment + content: + application/json: + schema: + $ref: '#/components/schemas/Allocations' + example: + Id: d4758808-d14d-45d5-851a-52787ae5739a + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552522424927)/ + Allocations: + - Amount: 1.00 + Date: /Date(1552435200000+0000)/ + Invoice: + InvoiceID: c7c37b83-ac95-45ea-88ba-8ad83a5f22fe + Payments: [] + CreditNotes: [] + Prepayments: [] + Overpayments: [] + HasErrors: false + IsDiscounted: false + LineItems: [] + ValidationErrors: [] + Prepayment: + PrepaymentID: ce0cddef-cf5a-4e59-b638-f225679115a7 + ID: ce0cddef-cf5a-4e59-b638-f225679115a7 + LineItems: [] + ValidationErrors: [] + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Allocations with an array of Allocation object in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/Allocations' + example: + Allocations: + - Invoice: + LineItems: [] + InvoiceID: 00000000-0000-0000-0000-000000000000 + Amount: 1 + Date: "2019-01-10" + /Prepayments/{PrepaymentID}/Allocations/{AllocationID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + delete: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: deletePrepaymentAllocations + summary: Deletes an Allocation from a Prepayment + parameters: + - $ref: '#/components/parameters/PrepaymentID' + - $ref: '#/components/parameters/AllocationID' + responses: + "200": + description: Success - return response of type Allocation with the isDeleted flag as true + content: + application/json: + schema: + $ref: '#/components/schemas/Allocation' + example: + AllocationId: 2bb15054-3868-4f85-a9c6-0402ec8c1201 + Date: /Date(1551822670731)/ + Invoice: + - InvoiceID: b7eb1fc9-a0f9-4e8e-9373-6689f5350832 + IsDeleted: true + /Prepayments/{PrepaymentID}/History: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getPrepaymentHistory + summary: Retrieves history record for a specific prepayment + parameters: + - $ref: '#/components/parameters/PrepaymentID' + responses: + "200": + $ref: '#/components/responses/HistoryRetrieved' + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createPrepaymentHistory + summary: Creates a history record for a specific prepayment + x-hasAccountingValidationError: true + x-example: + - historyRecord: + is_object: true + key: historyRecord + keyPascal: HistoryRecord + keySnake: history_record + - Details: + is_last: true + key: details + keyPascal: Details + default: Hello World + object: historyRecord + - historyRecords: + is_object: true + key: historyRecords + keyPascal: HistoryRecords + - add_historyRecord: + is_last: true + is_array_add: true + key: historyRecords + keyPascal: HistoryRecords + keySnake: history_records + java: HistoryRecords + python: history_record + ruby: history_record + csharp: HistoryRecord + object: historyRecord + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/PrepaymentID' + responses: + "200": + $ref: '#/components/responses/HistoryRecordCreated' + "400": + description: Unsupported - return response incorrect exception, API is not able to create HistoryRecord for Expense Claims + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: ' { "ErrorNumber": 10, "Type": "ValidationException", "Message": "A validation exception occurred", "Elements": [ { "DateUTCString": "2019-03-14T00:15:35", "DateUTC": "/Date(1552522535440)/", "Details": "Hello World", "ValidationErrors": [ { "Message": "The document with the supplied id was not found for this endpoint." } ] } ] }' + requestBody: + $ref: '#/components/requestBodies/historyRecords' + /PurchaseOrders: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getPurchaseOrders + summary: Retrieves purchase orders + parameters: + - $ref: '#/components/parameters/ifModifiedSince' + - in: query + name: Status + x-snake: status + description: Filter by purchase order status + example: SUBMITTED + schema: + type: string + enum: + - DRAFT + - SUBMITTED + - AUTHORISED + - BILLED + - DELETED + - in: query + name: DateFrom + x-snake: date_from + description: Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 + example: "2019-12-01" + schema: + type: string + - in: query + name: DateTo + x-snake: date_to + description: Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 + example: "2019-12-31" + schema: + type: string + - in: query + name: order + description: Order by an any element + example: PurchaseOrderNumber ASC + schema: + type: string + - in: query + name: page + description: To specify a page, append the page parameter to the URL e.g. ?page=1. If there are 100 records in the response you will need to check if there is any more data by fetching the next page e.g ?page=2 and continuing this process until no more results are returned. + example: 1 + schema: + type: integer + - $ref: '#/components/parameters/pageSize' + responses: + "200": + description: Success - return response of type PurchaseOrder array of all PurchaseOrder + content: + application/json: + schema: + $ref: '#/components/schemas/PurchaseOrders' + example: + Id: 66910bfc-15cc-4692-bd4c-cc8f671e653c + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552523977238)/ + pagination: + page: 1 + pageSize: 100 + pageCount: 1 + itemCount: 2 + PurchaseOrders: + - PurchaseOrderID: f9627f0d-b715-4039-bb6a-96dc3eae5ec5 + PurchaseOrderNumber: PO-0001 + DateString: 2019-03-12T00:00:00 + Date: /Date(1552348800000+0000)/ + AttentionTo: Jimmy + HasErrors: false + IsDiscounted: false + Type: PURCHASEORDER + CurrencyRate: 1.000000 + CurrencyCode: NZD + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + ContactStatus: ACTIVE + Name: Liam Gallagher + FirstName: Liam + LastName: Gallagher + Addresses: + - AddressType: POBOX + City: Anytown + Region: NY + PostalCode: "10101" + Country: USA + AttentionTo: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: 222-2222 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: 333-2233 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 444-3433 + PhoneAreaCode: "212" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1551747281053+0000)/ + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + Status: DELETED + LineAmountTypes: Exclusive + LineItems: + - Description: Foobar + UnitAmount: 20.0000 + TaxAmount: 0.00 + LineAmount: 20.00 + Tracking: [] + Quantity: 1.0000 + LineItemID: 0f7b54b8-bfa4-4c5d-9c22-73dbd5796e54 + SubTotal: 20.00 + TotalTax: 0.00 + Total: 20.00 + UpdatedDateUTC: /Date(1552522703443+0000)/ + HasAttachments: false + - PurchaseOrderID: 6afa2e02-c514-4964-ab89-b5c0179b8c50 + PurchaseOrderNumber: PO-0002 + DateString: 2019-03-12T00:00:00 + Date: /Date(1552348800000+0000)/ + AttentionTo: Jimmy + HasErrors: false + IsDiscounted: false + Type: PURCHASEORDER + CurrencyRate: 1.000000 + CurrencyCode: NZD + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + ContactStatus: ACTIVE + Name: Liam Gallagher + FirstName: Liam + LastName: Gallagher + Addresses: + - AddressType: POBOX + City: Anytown + Region: NY + PostalCode: "10101" + Country: USA + AttentionTo: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: 222-2222 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: 333-2233 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 444-3433 + PhoneAreaCode: "212" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1551747281053+0000)/ + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + Status: DELETED + LineAmountTypes: Exclusive + LineItems: + - Description: Foobar + UnitAmount: 20.0000 + TaxAmount: 0.00 + LineAmount: 20.00 + Tracking: [] + Quantity: 1.0000 + LineItemID: 3e4ec232-32b9-491b-84dd-48fb9aa8916f + SubTotal: 20.00 + TotalTax: 0.00 + Total: 20.00 + UpdatedDateUTC: /Date(1552522834733+0000)/ + HasAttachments: false + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createPurchaseOrders + summary: Creates one or more purchase orders + x-hasAccountingValidationError: true + x-example: + - dateValue: + is_date: true + key: dateValue + keyPascal: Date + keySnake: date_value + java_datatype: LocalDate + default: LocalDate.of(2020, Month.OCTOBER, 10) + java: LocalDate.now() + csharp: DateTime.Now + php: new DateTime('2020-12-10') + node: '''2020-10-10''' + python: dateutil.parser.parse('2020-12-03T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - contact: + is_object: true + key: contact + keyPascal: Contact + - contactID: + is_last: true + is_uuid: true + key: contactID + keyPascal: ContactID + keySnake: contact_id + default: 00000000-0000-0000-0000-000000000000 + object: contact + - lineItem: + is_object: true + key: lineItem + keyPascal: LineItem + keySnake: line_item + - description: + key: description + keyPascal: Description + default: Foobar + object: lineItem + - quantity: + nonString: true + key: quantity + keyPascal: Quantity + default: 1.0 + is_money: true + object: lineItem + - unitAmount: + nonString: true + key: unitAmount + keyPascal: UnitAmount + keySnake: unit_amount + default: 20.0 + is_money: true + object: lineItem + - accountCode: + is_last: true + key: accountCode + keyPascal: AccountCode + keySnake: account_code + default: "000" + object: lineItem + - line_items: + is_list: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + csharp: LineItem + java: LineItem + - add_lineitems: + is_last: true + is_list_add: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + java: LineItems + python: line_item + ruby: line_item + csharp: LineItem + object: lineItem + - purchaseOrder: + is_object: true + key: purchaseOrder + keyPascal: PurchaseOrder + keySnake: purchase_order + - set_contact: + is_variable: true + nonString: true + key: contact + keyPascal: Contact + default: contact + object: purchaseOrder + - set_lineitem: + is_variable: true + nonString: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + default: lineItems + python: line_items + ruby: line_items + object: purchaseOrder + - date: + is_last: true + is_variable: true + nonString: true + key: date + keyPascal: Date + default: dateValue + python: date_value + ruby: date_value + object: purchaseOrder + - purchaseOrders: + is_object: true + key: purchaseOrders + keyPascal: PurchaseOrders + - add_purchaseOrder: + is_last: true + is_array_add: true + key: purchaseOrders + keyPascal: PurchaseOrders + keySnake: purchase_orders + java: PurchaseOrders + python: purchase_order + ruby: purchase_order + csharp: PurchaseOrder + object: purchaseOrder + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type PurchaseOrder array for specified PurchaseOrder + content: + application/json: + schema: + $ref: '#/components/schemas/PurchaseOrders' + example: + Id: aa2f9d23-fd76-4bee-9600-30c0f0f34036 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552522946173)/ + PurchaseOrders: + - PurchaseOrderID: 56204648-8fbe-46f8-b09c-2125f7939533 + PurchaseOrderNumber: PO-0004 + DateString: 2019-03-13T00:00:00 + Date: /Date(1552435200000+0000)/ + HasErrors: false + IsDiscounted: false + TotalDiscount: 0.00 + SentToContact: false + Type: PURCHASEORDER + CurrencyRate: 1.000000 + CurrencyCode: NZD + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + ContactStatus: ACTIVE + Name: Liam Gallagher + FirstName: Liam + LastName: Gallagher + EmailAddress: liam@rockstar.com + BankAccountDetails: "" + Addresses: + - null + - AddressType: POBOX + City: Anytown + Region: NY + PostalCode: "10101" + Country: USA + AttentionTo: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: 222-2222 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - null + - PhoneType: FAX + PhoneNumber: 333-2233 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 444-3433 + PhoneAreaCode: "212" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1551747281053+0000)/ + ContactGroups: + - ContactGroupID: 17b44ed7-4389-4162-91cb-3dd5766e4e22 + Name: Oasis + Status: ACTIVE + Contacts: [] + HasValidationErrors: false + IsSupplier: true + IsCustomer: true + SalesTrackingCategories: [] + PurchasesTrackingCategories: [] + ContactPersons: [] + HasValidationErrors: false + Status: DRAFT + LineAmountTypes: Exclusive + LineItems: + - Description: Foobar + UnitAmount: 20.0000 + TaxType: INPUT2 + TaxAmount: 3.00 + LineAmount: 20.00 + AccountCode: "710" + Tracking: [] + Quantity: 1.0000 + LineItemID: 792b7e40-b9f2-47f0-8624-b09f4b0166dd + SubTotal: 20.00 + TotalTax: 3.00 + Total: 23.00 + UpdatedDateUTC: /Date(1552522946077+0000)/ + StatusAttributeString: ERROR + Warnings: + - Message: Only AUTHORISED and BILLED purchase orders may have SentToContact updated. + ValidationErrors: + - Message: Order number must be unique + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: PurchaseOrders with an array of PurchaseOrder object in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/PurchaseOrders' + example: + PurchaseOrders: + - Contact: + ContactID: 00000000-0000-0000-0000-000000000000 + LineItems: + - Description: Foobar + Quantity: 1 + UnitAmount: 20 + AccountCode: "710" + Date: "2019-03-13" + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: updateOrCreatePurchaseOrders + summary: Updates or creates one or more purchase orders + x-hasAccountingValidationError: true + x-example: + - dateValue: + is_date: true + key: dateValue + keyPascal: Date + keySnake: date_value + java_datatype: LocalDate + default: LocalDate.of(2020, Month.OCTOBER, 10) + java: LocalDate.now() + csharp: DateTime.Now + php: new DateTime('2020-12-10') + node: '''2020-10-10''' + python: dateutil.parser.parse('2020-12-03T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - contact: + is_object: true + key: contact + keyPascal: Contact + - contactID: + is_last: true + is_uuid: true + key: contactID + keyPascal: ContactID + keySnake: contact_id + default: 00000000-0000-0000-0000-000000000000 + object: contact + - lineItem: + is_object: true + key: lineItem + keyPascal: LineItem + keySnake: line_item + - description: + key: description + keyPascal: Description + default: Foobar + object: lineItem + - quantity: + nonString: true + key: quantity + keyPascal: Quantity + default: 1.0 + is_money: true + object: lineItem + - unitAmount: + nonString: true + key: unitAmount + keyPascal: UnitAmount + keySnake: unit_amount + default: 20.0 + is_money: true + object: lineItem + - accountCode: + is_last: true + key: accountCode + keyPascal: AccountCode + keySnake: account_code + default: "000" + object: lineItem + - line_items: + is_list: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + csharp: LineItem + java: LineItem + - add_lineitems: + is_last: true + is_list_add: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + java: LineItems + python: line_item + ruby: line_item + csharp: LineItem + object: lineItem + - purchaseOrder: + is_object: true + key: purchaseOrder + keyPascal: PurchaseOrder + keySnake: purchase_order + - set_contact: + is_variable: true + nonString: true + key: contact + keyPascal: Contact + default: contact + object: purchaseOrder + - set_lineitem: + is_variable: true + nonString: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + default: lineItems + python: line_items + ruby: line_items + object: purchaseOrder + - date: + is_last: true + is_variable: true + nonString: true + key: date + keyPascal: Date + default: dateValue + python: date_value + ruby: date_value + object: purchaseOrder + - purchaseOrders: + is_object: true + key: purchaseOrders + keyPascal: PurchaseOrders + - add_purchaseOrder: + is_last: true + is_array_add: true + key: purchaseOrders + keyPascal: PurchaseOrders + keySnake: purchase_orders + java: PurchaseOrders + python: purchase_order + ruby: purchase_order + csharp: PurchaseOrder + object: purchaseOrder + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type PurchaseOrder array for specified PurchaseOrder + content: + application/json: + schema: + $ref: '#/components/schemas/PurchaseOrders' + example: + Id: aa2f9d23-fd76-4bee-9600-30c0f0f34036 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552522946173)/ + PurchaseOrders: + - PurchaseOrderID: 56204648-8fbe-46f8-b09c-2125f7939533 + PurchaseOrderNumber: PO-0004 + DateString: 2019-03-13T00:00:00 + Date: /Date(1552435200000+0000)/ + HasErrors: false + IsDiscounted: false + TotalDiscount: 0.00 + SentToContact: false + Type: PURCHASEORDER + CurrencyRate: 1.000000 + CurrencyCode: NZD + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + ContactStatus: ACTIVE + Name: Liam Gallagher + FirstName: Liam + LastName: Gallagher + EmailAddress: liam@rockstar.com + BankAccountDetails: "" + Addresses: + - null + - AddressType: POBOX + City: Anytown + Region: NY + PostalCode: "10101" + Country: USA + AttentionTo: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: 222-2222 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - null + - PhoneType: FAX + PhoneNumber: 333-2233 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 444-3433 + PhoneAreaCode: "212" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1551747281053+0000)/ + ContactGroups: + - ContactGroupID: 17b44ed7-4389-4162-91cb-3dd5766e4e22 + Name: Oasis + Status: ACTIVE + Contacts: [] + HasValidationErrors: false + IsSupplier: true + IsCustomer: true + SalesTrackingCategories: [] + PurchasesTrackingCategories: [] + ContactPersons: [] + HasValidationErrors: false + Status: DRAFT + LineAmountTypes: Exclusive + LineItems: + - Description: Foobar + UnitAmount: 20.0000 + TaxType: INPUT2 + TaxAmount: 3.00 + LineAmount: 20.00 + AccountCode: "710" + Tracking: [] + Quantity: 1.0000 + LineItemID: 792b7e40-b9f2-47f0-8624-b09f4b0166dd + SubTotal: 20.00 + TotalTax: 3.00 + Total: 23.00 + UpdatedDateUTC: /Date(1552522946077+0000)/ + StatusAttributeString: ERROR + Warnings: + - Message: Only AUTHORISED and BILLED purchase orders may have SentToContact updated. + ValidationErrors: + - Message: Order number must be unique + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PurchaseOrders' + example: + PurchaseOrders: + - Contact: + ContactID: 00000000-0000-0000-0000-000000000000 + LineItems: + - Description: Foobar + Quantity: 1 + UnitAmount: 20 + AccountCode: "710" + Date: "2019-03-13" + /PurchaseOrders/{PurchaseOrderID}/pdf: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getPurchaseOrderAsPdf + x-path: /PurchaseOrders/{PurchaseOrderID} + summary: Retrieves specific purchase order as PDF files using a unique purchase order Id + parameters: + - $ref: '#/components/parameters/PurchaseOrderID' + responses: + "200": + description: Success - return response of byte array pdf version of specified Purchase Orders + content: + application/pdf: + schema: + type: string + format: binary + /PurchaseOrders/{PurchaseOrderID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getPurchaseOrder + summary: Retrieves a specific purchase order using a unique purchase order Id + parameters: + - $ref: '#/components/parameters/PurchaseOrderID' + responses: + "200": + description: Success - return response of type PurchaseOrder array for specified PurchaseOrder + content: + application/json: + schema: + $ref: '#/components/schemas/PurchaseOrders' + example: + Id: 53a8c7a5-92e8-475b-a037-acf7c55c3afd + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1553626110950)/ + PurchaseOrders: + - PurchaseOrderID: 15369a9f-17b6-4235-83c4-0029256d1c37 + PurchaseOrderNumber: PO-0006 + DateString: 2019-03-26T00:00:00 + Date: /Date(1553558400000+0000)/ + DeliveryDateString: 2019-03-28T00:00:00 + DeliveryDate: /Date(1553731200000+0000)/ + DeliveryAddress: |- + 101 Grafton Road + Roseneath + Wellington + 6011 + New Zealand + AttentionTo: CEO + Telephone: 64 123-2222 + DeliveryInstructions: Drop off at front door + HasErrors: false + IsDiscounted: true + TotalDiscount: 250.00 + SentToContact: false + Reference: foobar + Type: PURCHASEORDER + CurrencyRate: 1.000000 + CurrencyCode: NZD + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + ContactStatus: ACTIVE + Name: Liam Gallagher + FirstName: Liam + LastName: Gallagher + EmailAddress: liam@rockstar.com + BankAccountDetails: "" + Addresses: + - null + - AddressType: POBOX + City: Anytown + Region: NY + PostalCode: "10101" + Country: USA + AttentionTo: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: 222-2222 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - null + - PhoneType: FAX + PhoneNumber: 333-2233 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 444-3433 + PhoneAreaCode: "212" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1553672800957+0000)/ + ContactGroups: + - ContactGroupID: 17b44ed7-4389-4162-91cb-3dd5766e4e22 + Name: Oasis + Status: ACTIVE + Contacts: [] + HasValidationErrors: false + IsSupplier: true + IsCustomer: true + DefaultCurrency: NZD + SalesTrackingCategories: [] + PurchasesTrackingCategories: [] + ContactPersons: [] + HasValidationErrors: false + BrandingThemeID: 414d4a87-46d6-4cfc-ab42-4e29d22e5076 + Status: DRAFT + LineAmountTypes: Exclusive + LineItems: + - ItemCode: "123" + Description: Brand new Fender Strats + UnitAmount: 2500.0000 + TaxType: INPUT2 + TaxAmount: 337.50 + LineAmount: 2250.00 + AccountCode: "630" + Tracking: + - Name: Simpsons + Option: Homer + TrackingCategoryID: 6a68adde-f210-4465-b0a9-0d8cc6f50762 + TrackingOptionID: 94faf12f-f65c-4331-8004-b0b7c5a2da23 + Quantity: 1.0000 + DiscountRate: 10.00 + LineItemID: 8a9d3eca-e052-43bc-9b87-221d0648c045 + SubTotal: 2250.00 + TotalTax: 337.50 + Total: 2587.50 + UpdatedDateUTC: /Date(1553626029823+0000)/ + HasAttachments: true + Attachments: + - AttachmentID: 7d94ccdc-ef7b-4806-87ac-8442f25e593b + FileName: HelloWorld.png + Url: https://api.xero.com/api.xro/2.0/PurchaseOrders/15369a9f-17b6-4235-83c4-0029256d1c37/Attachments/HelloWorld.png + MimeType: image/png + ContentLength: 76091 + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: updatePurchaseOrder + summary: Updates a specific purchase order + x-hasAccountingValidationError: true + x-example: + - purchaseOrder: + is_object: true + key: purchaseOrder + keyPascal: PurchaseOrder + keySnake: purchase_order + - attentionTo: + is_last: true + key: attentionTo + keyPascal: AttentionTo + default: Peter Parker + object: purchaseOrder + - purchaseOrders: + is_object: true + key: purchaseOrders + keyPascal: PurchaseOrders + - add_purchaseOrder: + is_last: true + is_array_add: true + key: purchaseOrders + keyPascal: PurchaseOrders + keySnake: purchase_orders + java: PurchaseOrders + python: purchase_order + ruby: purchase_order + csharp: PurchaseOrder + object: purchaseOrder + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/PurchaseOrderID' + responses: + "200": + description: Success - return response of type PurchaseOrder array for updated PurchaseOrder + content: + application/json: + schema: + $ref: '#/components/schemas/PurchaseOrders' + example: + Id: 0e9bb3f8-d68b-4bb2-a54d-7da240a4f51a + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552523976885)/ + PurchaseOrders: + - PurchaseOrderID: f9fc1120-c937-489e-84bc-e822190cfe9c + PurchaseOrderNumber: PO-0005 + DateString: 2019-03-13T00:00:00 + Date: /Date(1552435200000+0000)/ + AttentionTo: Jimmy + HasErrors: false + IsDiscounted: false + TotalDiscount: 0.00 + SentToContact: false + Type: PURCHASEORDER + CurrencyRate: 1.000000 + CurrencyCode: NZD + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + ContactStatus: ACTIVE + Name: Liam Gallagher + FirstName: Liam + LastName: Gallagher + EmailAddress: liam@rockstar.com + BankAccountDetails: "" + Addresses: + - null + - AddressType: POBOX + City: Anytown + Region: NY + PostalCode: "10101" + Country: USA + AttentionTo: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: 222-2222 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - null + - PhoneType: FAX + PhoneNumber: 333-2233 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 444-3433 + PhoneAreaCode: "212" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1551747281053+0000)/ + ContactGroups: + - ContactGroupID: 17b44ed7-4389-4162-91cb-3dd5766e4e22 + Name: Oasis + Status: ACTIVE + Contacts: [] + HasValidationErrors: false + IsSupplier: true + IsCustomer: true + SalesTrackingCategories: [] + PurchasesTrackingCategories: [] + ContactPersons: [] + HasValidationErrors: false + Status: DRAFT + LineAmountTypes: Exclusive + LineItems: + - Description: Foobar + UnitAmount: 20.0000 + TaxType: INPUT2 + TaxAmount: 3.00 + LineAmount: 20.00 + AccountCode: "710" + Tracking: [] + Quantity: 1.0000 + LineItemID: d1d9b2cd-c9f2-4445-8d98-0b8096cf4dae + SubTotal: 20.00 + TotalTax: 3.00 + Total: 23.00 + UpdatedDateUTC: /Date(1552523976853+0000)/ + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PurchaseOrders' + example: + PurchaseOrders: + - AttentionTo: Peter Parker + LineItems: [] + Contact: {} + /PurchaseOrders/{PurchaseOrderNumber}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getPurchaseOrderByNumber + summary: Retrieves a specific purchase order using purchase order number + parameters: + - required: true + in: path + name: PurchaseOrderNumber + x-snake: purchase_order_number + description: Unique identifier for a PurchaseOrder + example: PO1234 + schema: + type: string + responses: + "200": + description: Success - return response of type PurchaseOrder array for specified PurchaseOrder + content: + application/json: + schema: + $ref: '#/components/schemas/PurchaseOrders' + example: + Id: 53a8c7a5-92e8-475b-a037-acf7c55c3afd + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1553626110950)/ + PurchaseOrders: + - PurchaseOrderID: 15369a9f-17b6-4235-83c4-0029256d1c37 + PurchaseOrderNumber: PO-0006 + DateString: 2019-03-26T00:00:00 + Date: /Date(1553558400000+0000)/ + DeliveryDateString: 2019-03-28T00:00:00 + DeliveryDate: /Date(1553731200000+0000)/ + DeliveryAddress: |- + 101 Grafton Road + Roseneath + Wellington + 6011 + New Zealand + AttentionTo: CEO + Telephone: 64 123-2222 + DeliveryInstructions: Drop off at front door + HasErrors: false + IsDiscounted: true + TotalDiscount: 250.00 + SentToContact: false + Reference: foobar + Type: PURCHASEORDER + CurrencyRate: 1.000000 + CurrencyCode: NZD + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + ContactStatus: ACTIVE + Name: Liam Gallagher + FirstName: Liam + LastName: Gallagher + EmailAddress: liam@rockstar.com + BankAccountDetails: "" + Addresses: + - null + - AddressType: POBOX + City: Anytown + Region: NY + PostalCode: "10101" + Country: USA + AttentionTo: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: 222-2222 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - null + - PhoneType: FAX + PhoneNumber: 333-2233 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 444-3433 + PhoneAreaCode: "212" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1553672800957+0000)/ + ContactGroups: + - ContactGroupID: 17b44ed7-4389-4162-91cb-3dd5766e4e22 + Name: Oasis + Status: ACTIVE + Contacts: [] + HasValidationErrors: false + IsSupplier: true + IsCustomer: true + DefaultCurrency: NZD + SalesTrackingCategories: [] + PurchasesTrackingCategories: [] + ContactPersons: [] + HasValidationErrors: false + BrandingThemeID: 414d4a87-46d6-4cfc-ab42-4e29d22e5076 + Status: DRAFT + LineAmountTypes: Exclusive + LineItems: + - ItemCode: "123" + Description: Brand new Fender Strats + UnitAmount: 2500.0000 + TaxType: INPUT2 + TaxAmount: 337.50 + LineAmount: 2250.00 + AccountCode: "630" + Tracking: + - Name: Simpsons + Option: Homer + TrackingCategoryID: 6a68adde-f210-4465-b0a9-0d8cc6f50762 + TrackingOptionID: 94faf12f-f65c-4331-8004-b0b7c5a2da23 + Quantity: 1.0000 + DiscountRate: 10.00 + LineItemID: 8a9d3eca-e052-43bc-9b87-221d0648c045 + SubTotal: 2250.00 + TotalTax: 337.50 + Total: 2587.50 + UpdatedDateUTC: /Date(1553626029823+0000)/ + HasAttachments: true + Attachments: + - AttachmentID: 7d94ccdc-ef7b-4806-87ac-8442f25e593b + FileName: HelloWorld.png + Url: https://api.xero.com/api.xro/2.0/PurchaseOrders/15369a9f-17b6-4235-83c4-0029256d1c37/Attachments/HelloWorld.png + MimeType: image/png + ContentLength: 76091 + /PurchaseOrders/{PurchaseOrderID}/History: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getPurchaseOrderHistory + summary: Retrieves history for a specific purchase order + parameters: + - $ref: '#/components/parameters/PurchaseOrderID' + responses: + "200": + $ref: '#/components/responses/HistoryRetrieved' + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createPurchaseOrderHistory + summary: Creates a history record for a specific purchase orders + x-hasAccountingValidationError: true + x-example: + - historyRecord: + is_object: true + key: historyRecord + keyPascal: HistoryRecord + keySnake: history_record + - Details: + is_last: true + key: details + keyPascal: Details + default: Hello World + object: historyRecord + - historyRecords: + is_object: true + key: historyRecords + keyPascal: HistoryRecords + - add_historyRecord: + is_last: true + is_array_add: true + key: historyRecords + keyPascal: HistoryRecords + keySnake: history_records + java: HistoryRecords + python: history_record + ruby: history_record + csharp: HistoryRecord + object: historyRecord + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/PurchaseOrderID' + responses: + "200": + $ref: '#/components/responses/HistoryRecordCreated' + "400": + $ref: '#/components/responses/400Error' + requestBody: + $ref: '#/components/requestBodies/historyRecords' + /PurchaseOrders/{PurchaseOrderID}/Attachments: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getPurchaseOrderAttachments + summary: Retrieves attachments for a specific purchase order + parameters: + - $ref: '#/components/parameters/PurchaseOrderID' + responses: + "200": + description: Success - return response of type Attachments array of Purchase Orders + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: dfc29f55-8ddd-4921-a82c-bcc0798d207f + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1602100184437)/ + Attachments: + - AttachmentID: dce4eaa7-c8a9-4867-9434-95832b427d3b + FileName: xero-dev1.png + Url: https://api.xero.com/api.xro/2.0/PurchaseOrders/93369c9b-c481-4e21-aaab-bb19e9a26efe/Attachments/2D_2.png + MimeType: image/png + ContentLength: 98715 + - AttachmentID: e58bd37b-e47f-451a-a42c-f946ef229c3e + FileName: xero-dev2.png + Url: https://api.xero.com/api.xro/2.0/PurchaseOrders/93369c9b-c481-4e21-aaab-bb19e9a26efe/Attachments/2D.png + MimeType: image/png + ContentLength: 82529 + - AttachmentID: c8faa564-223f-45e4-a5a1-94430a5b52c1 + FileName: xero-dev3.png + Url: https://api.xero.com/api.xro/2.0/PurchaseOrders/93369c9b-c481-4e21-aaab-bb19e9a26efe/Attachments/Screen%20Shot%202020-09-12%20at%204.31.14%20pm.png + MimeType: image/png + ContentLength: 146384 + /PurchaseOrders/{PurchaseOrderID}/Attachments/{AttachmentID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getPurchaseOrderAttachmentById + summary: Retrieves specific attachment for a specific purchase order using a unique attachment Id + parameters: + - $ref: '#/components/parameters/PurchaseOrderID' + - $ref: '#/components/parameters/AttachmentID' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of attachment for Account as binary data + content: + application/octet-stream: + schema: + type: string + format: binary + /PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getPurchaseOrderAttachmentByFileName + summary: Retrieves a specific attachment for a specific purchase order by filename + parameters: + - $ref: '#/components/parameters/PurchaseOrderID' + - $ref: '#/components/parameters/FileName' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of attachment for Purchase Order as binary data + content: + application/octet-stream: + schema: + type: string + format: binary + post: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: updatePurchaseOrderAttachmentByFileName + x-hasAccountingValidationError: true + summary: Updates a specific attachment for a specific purchase order by filename + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/PurchaseOrderID' + - $ref: '#/components/parameters/FileName' + responses: + "200": + description: Success - return response of type Attachments array of Attachment + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: aeff9be0-54c2-45dd-8e3d-aa4f8af0fbd7 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1602100086197)/ + Attachments: + - AttachmentID: dce4eaa7-c8a9-4867-9434-95832b427d3b + FileName: xero-dev.png + Url: https://api.xero.com/api.xro/2.0/PurchaseOrders/93369c9b-c481-4e21-aaab-bb19e9a26efe/Attachments/2D_2.png + MimeType: image/png + ContentLength: 98715 + "400": + description: Validation Error - some data was incorrect returns response of type Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + put: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: createPurchaseOrderAttachmentByFileName + x-hasAccountingValidationError: true + summary: Creates attachment for a specific purchase order + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/PurchaseOrderID' + - $ref: '#/components/parameters/FileName' + responses: + "200": + description: Success - return response of type Attachments array of Attachment + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: c728a4a4-179e-4bbd-a2d5-63e7f9ceba92 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1602099934723)/ + Attachments: + - AttachmentID: e58bd37b-e47f-451a-a42c-f946ef229c3e + FileName: xero-dev.png + Url: https://api.xero.com/api.xro/2.0/PurchaseOrders/93369c9b-c481-4e21-aaab-bb19e9a26efe/Attachments/2D.png + MimeType: image/png + ContentLength: 82529 + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + /Quotes: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getQuotes + summary: Retrieves sales quotes + parameters: + - $ref: '#/components/parameters/ifModifiedSince' + - in: query + name: DateFrom + x-snake: date_from + description: Filter for quotes after a particular date + example: "2019-10-31" + schema: + type: string + format: date + - in: query + name: DateTo + x-snake: date_to + description: Filter for quotes before a particular date + example: "2019-10-31" + schema: + type: string + format: date + - in: query + name: ExpiryDateFrom + x-snake: expiry_date_from + description: Filter for quotes expiring after a particular date + example: "2019-10-31" + schema: + type: string + format: date + - in: query + name: ExpiryDateTo + x-snake: expiry_date_to + description: Filter for quotes before a particular date + example: "2019-10-31" + schema: + type: string + format: date + - in: query + name: ContactID + x-snake: contact_id + description: Filter for quotes belonging to a particular contact + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + - in: query + name: Status + x-snake: status + description: Filter for quotes of a particular Status + example: DRAFT + schema: + type: string + - in: query + name: page + description: e.g. page=1 – Up to 100 Quotes will be returned in a single API call with line items shown for each quote + example: 1 + schema: + type: integer + - in: query + name: order + description: Order by an any element + example: Status ASC + schema: + type: string + - in: query + name: QuoteNumber + x-snake: quote_number + description: Filter by quote number (e.g. GET https://.../Quotes?QuoteNumber=QU-0001) + example: QU-0001 + schema: + type: string + responses: + "200": + description: Success - return response of type quotes array with all quotes + content: + application/json: + schema: + $ref: '#/components/schemas/Quotes' + example: + Id: bb583e7e-9b6b-471e-88da-4cbfcfad7a57 + Status: OK + ProviderName: Adams OAuth2 App + DateTimeUTC: /Date(1571876635477)/ + Quotes: + - QuoteID: be59294f-2a9c-4cee-8c64-0f0ddbc1883a + QuoteNumber: QU-0001 + Reference: REF-123 + Terms: Not valid after the expiry date + Contact: + ContactID: 060816db-0ed7-44de-ab58-8fee9316fcd5 + Name: Adam + LineItems: + - LineItemID: ccf5e45c-73b6-4659-83e8-520f4c6126fd + AccountCode: "200" + Description: Fish out of Water + UnitAmount: 19.9500 + DiscountRate: 10.00 + LineAmount: 17.96 + ItemCode: BOOK + Quantity: 1.0000 + TaxAmount: 2.69 + TaxType: OUTPUT2 + Tracking: + - TrackingCategoryID: 351953c4-8127-4009-88c3-f9cd8c9cbe9f + TrackingOptionID: ce205173-7387-4651-9726-2cf4c5405ba2 + Name: Region + Option: Eastside + Date: /Date(1571875200000)/ + DateString: 2019-10-24T00:00:00 + ExpiryDate: /Date(1571961600000)/ + ExpiryDateString: 2019-10-25T00:00:00 + Status: ACCEPTED + CurrencyRate: 0.937053 + CurrencyCode: AUD + SubTotal: 17.96 + TotalTax: 2.69 + Total: 20.65 + TotalDiscount: 1.99 + Title: Your Quote + Summary: Please buy this + BrandingThemeID: 4c82c365-35cb-467f-bb11-dce1f2f2f67c + UpdatedDateUTC: /Date(1571869373890)/ + LineAmountTypes: EXCLUSIVE + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createQuotes + summary: Create one or more quotes + x-hasAccountingValidationError: true + x-example: + - dateValue: + is_date: true + key: dateValue + keyPascal: Date + keySnake: date_value + java_datatype: LocalDate + default: LocalDate.of(2020, Month.OCTOBER, 10) + java: LocalDate.now() + csharp: DateTime.Now + php: new DateTime('2020-12-10') + node: '''2020-10-10''' + python: dateutil.parser.parse('2020-12-03T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - contact: + is_object: true + key: contact + keyPascal: Contact + - contactID: + is_last: true + is_uuid: true + key: contactID + keyPascal: ContactID + keySnake: contact_id + default: 00000000-0000-0000-0000-000000000000 + object: contact + - lineItem: + is_object: true + key: lineItem + keyPascal: LineItem + keySnake: line_item + - description: + key: description + keyPascal: Description + default: Foobar + object: lineItem + - quantity: + nonString: true + key: quantity + keyPascal: Quantity + default: 1.0 + is_money: true + object: lineItem + - unitAmount: + nonString: true + key: unitAmount + keyPascal: UnitAmount + keySnake: unit_amount + default: 20.0 + is_money: true + object: lineItem + - accountCode: + is_last: true + key: accountCode + keyPascal: AccountCode + keySnake: account_code + default: "000" + object: lineItem + - line_items: + is_list: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + csharp: LineItem + java: LineItem + - add_lineitems: + is_last: true + is_list_add: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + java: LineItems + python: line_item + ruby: line_item + csharp: LineItem + object: lineItem + - quote: + is_object: true + key: quote + keyPascal: Quote + - set_contact: + is_variable: true + nonString: true + key: contact + keyPascal: Contact + default: contact + object: quote + - set_lineitem: + is_variable: true + nonString: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + default: lineItems + python: line_items + ruby: line_items + object: quote + - date: + is_last: true + is_variable: true + nonString: true + key: date + keyPascal: Date + default: dateValue + python: date_value + ruby: date_value + object: quote + - quotes: + is_object: true + key: quotes + keyPascal: Quotes + - add_quote: + is_last: true + is_array_add: true + key: quotes + keyPascal: Quotes + java: Quotes + csharp: Quote + object: quote + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Quotes with array with newly created Quote + content: + application/json: + schema: + $ref: '#/components/schemas/Quotes' + example: + SummarizeErrors: false + Id: 29571f5a-bf73-4bb6-9de5-86be44e6bf2e + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1580607782916)/ + Quotes: + - QuoteID: 60031d53-6488-4321-9cbd-c1db6dbf9ba4 + QuoteNumber: QU-0008 + Terms: "" + Contact: + ContactID: 6a65f055-b0e0-471a-a933-d1ffdd89393f + Name: John Smith-82160 + EmailAddress: "" + LineItems: + - LineItemID: 26995857-0eea-45fb-b46c-f8ea896ec46e + AccountCode: "12775" + Description: Foobar + UnitAmount: 20.0000 + LineAmount: 20.00 + ItemCode: "" + Quantity: 1.0000 + TaxAmount: 0.00 + Tracking: [] + Date: /Date(1580515200000)/ + DateString: 2020-02-01T00:00:00 + Status: DRAFT + CurrencyRate: 1.000000 + CurrencyCode: USD + SubTotal: 20.00 + TotalTax: 0.00 + Total: 20.00 + UpdatedDateUTC: /Date(1580607782913)/ + LineAmountTypes: EXCLUSIVE + StatusAttributeString: OK + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Quotes with an array of Quote object in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/Quotes' + example: + Quotes: + - Contact: + ContactID: 00000000-0000-0000-0000-000000000000 + LineItems: + - Description: Foobar + Quantity: 1 + UnitAmount: 20 + AccountCode: "12775" + Date: "2020-02-01" + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: updateOrCreateQuotes + summary: Updates or creates one or more quotes + x-hasAccountingValidationError: true + x-example: + - dateValue: + is_date: true + key: dateValue + keyPascal: Date + keySnake: date_value + java_datatype: LocalDate + default: LocalDate.of(2020, Month.OCTOBER, 10) + java: LocalDate.now() + csharp: DateTime.Now + php: new DateTime('2020-12-10') + node: '''2020-10-10''' + python: dateutil.parser.parse('2020-12-03T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - contact: + is_object: true + key: contact + keyPascal: Contact + - contactID: + is_last: true + is_uuid: true + key: contactID + keyPascal: ContactID + keySnake: contact_id + default: 00000000-0000-0000-0000-000000000000 + object: contact + - lineItem: + is_object: true + key: lineItem + keyPascal: LineItem + keySnake: line_item + - description: + key: description + keyPascal: Description + default: Foobar + object: lineItem + - quantity: + nonString: true + key: quantity + keyPascal: Quantity + default: 1.0 + is_money: true + object: lineItem + - unitAmount: + nonString: true + key: unitAmount + keyPascal: UnitAmount + keySnake: unit_amount + default: 20.0 + is_money: true + object: lineItem + - accountCode: + is_last: true + key: accountCode + keyPascal: AccountCode + keySnake: account_code + default: "000" + object: lineItem + - line_items: + is_list: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + csharp: LineItem + java: LineItem + - add_lineitems: + is_last: true + is_list_add: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + java: LineItems + python: line_item + ruby: line_item + csharp: LineItem + object: lineItem + - quote: + is_object: true + key: quote + keyPascal: Quote + - set_contact: + is_variable: true + nonString: true + key: contact + keyPascal: Contact + default: contact + object: quote + - set_lineitem: + is_variable: true + nonString: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + default: lineItems + python: line_items + ruby: line_items + object: quote + - date: + is_last: true + is_variable: true + nonString: true + key: date + keyPascal: Date + default: dateValue + python: date_value + ruby: date_value + object: quote + - quotes: + is_object: true + key: quotes + keyPascal: Quotes + - add_quote: + is_last: true + is_array_add: true + key: quotes + keyPascal: Quotes + java: Quotes + csharp: Quote + object: quote + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Quotes array with updated or created Quote + content: + application/json: + schema: + $ref: '#/components/schemas/Quotes' + example: + SummarizeErrors: false + Id: b425754f-0512-481d-827b-c8958db7667e + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1580607783833)/ + Quotes: + - QuoteID: fd53e0b7-4d24-4c20-be85-043a62ea5847 + QuoteNumber: QU-0009 + Terms: "" + Contact: + ContactID: 6a65f055-b0e0-471a-a933-d1ffdd89393f + Name: John Smith-82160 + EmailAddress: "" + LineItems: + - LineItemID: 898c7fd6-0d94-4ac0-ace8-87e350a042de + AccountCode: "12775" + Description: Foobar + UnitAmount: 20.0000 + LineAmount: 20.00 + ItemCode: "" + Quantity: 1.0000 + TaxAmount: 0.00 + Tracking: [] + Date: /Date(1580515200000)/ + DateString: 2020-02-01T00:00:00 + Status: DRAFT + CurrencyRate: 1.000000 + CurrencyCode: USD + SubTotal: 20.00 + TotalTax: 0.00 + Total: 20.00 + UpdatedDateUTC: /Date(1580607783467)/ + LineAmountTypes: EXCLUSIVE + StatusAttributeString: OK + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Quotes' + example: + Quotes: + - Contact: + ContactID: 00000000-0000-0000-0000-000000000000 + LineItems: + - Description: Foobar + Quantity: 1 + UnitAmount: 20 + AccountCode: "12775" + Date: "2020-02-01" + /Quotes/{QuoteID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getQuote + summary: Retrieves a specific quote using a unique quote Id + parameters: + - $ref: '#/components/parameters/QuoteID' + responses: + "200": + description: Success - return response of type Quotes array with specified Quote + content: + application/json: + schema: + $ref: '#/components/schemas/Quotes' + example: + SummarizeErrors: true + Id: e3626c45-77f1-4ab0-ba9b-3593c7bcd25c + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1580607864786)/ + Quotes: + - QuoteID: 1f90e77a-7b88-4462-874f-1aa675be8fef + QuoteNumber: QU-0007 + Reference: MyQuote + Terms: These are my terms + Contact: + ContactID: 4bc3ecb2-8e2a-4267-a171-0e0ce7e5ac2a + Name: ABC Limited + EmailAddress: john.smith@gmail.com + FirstName: John + LastName: Smith + LineItems: + - LineItemID: 09b47d9f-f78d-4bab-b226-957f55bfb1b5 + AccountCode: "400" + Description: Half day training - Microsoft Office + UnitAmount: 500.0000 + LineAmount: 500.00 + ItemCode: Train-MS + Quantity: 1.0000 + TaxAmount: 0.00 + TaxType: NONE + Tracking: + - TrackingCategoryID: 9bd3f506-6d91-4625-81f0-0f9147f099f4 + TrackingOptionID: d30e2a0d-ae6f-4806-88ca-d8ebdba2af73 + Name: Avengers + Option: IronMan + Date: /Date(1580515200000)/ + DateString: 2020-02-01T00:00:00 + ExpiryDate: /Date(1581724800000)/ + ExpiryDateString: 2020-02-15T00:00:00 + Status: DRAFT + CurrencyRate: 1.547150 + CurrencyCode: NZD + SubTotal: 500.00 + TotalTax: 0.00 + Total: 500.00 + TotalDiscount: 0.00 + Title: "" + Summary: "" + BrandingThemeID: 324587a9-7eed-46c0-ad64-fa941a1b5b3e + UpdatedDateUTC: /Date(1580607757040)/ + LineAmountTypes: EXCLUSIVE + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: updateQuote + summary: Updates a specific quote + x-hasAccountingValidationError: true + x-example: + - dateValue: + is_date: true + key: dateValue + keyPascal: Date + keySnake: date_value + java_datatype: LocalDate + default: LocalDate.of(2020, Month.OCTOBER, 10) + java: LocalDate.now() + csharp: DateTime.Now + php: new DateTime('2020-12-10') + node: '''2020-10-10''' + python: dateutil.parser.parse('2020-12-03T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - contact: + is_object: true + key: contact + keyPascal: Contact + - contactID: + is_last: true + is_uuid: true + key: contactID + keyPascal: ContactID + keySnake: contact_id + default: 00000000-0000-0000-0000-000000000000 + object: contact + - quote: + is_object: true + key: quote + keyPascal: Quote + - reference: + key: reference + keyPascal: Reference + default: I am an update + object: quote + - set_contact: + is_variable: true + nonString: true + key: contact + keyPascal: Contact + default: contact + object: quote + - date: + is_last: true + is_variable: true + nonString: true + key: date + keyPascal: Date + default: dateValue + python: date_value + ruby: date_value + object: quote + - quotes: + is_object: true + key: quotes + keyPascal: Quotes + - add_quote: + is_last: true + is_array_add: true + key: quotes + keyPascal: Quotes + java: Quotes + csharp: Quote + object: quote + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/QuoteID' + responses: + "200": + description: Success - return response of type Quotes array with updated Quote + content: + application/json: + schema: + $ref: '#/components/schemas/Quotes' + example: + SummarizeErrors: true + Id: be4f43a7-ef02-497a-96c2-fc0bc047a82a + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1580605644385)/ + Quotes: + - QuoteID: 8ce6b14c-ef87-4f45-93f0-853137c6d0e1 + QuoteNumber: QU-0008 + Reference: I am an update + Terms: "" + Contact: + ContactID: 8ed7dd03-4e6a-4078-a807-c5309abfec52 + Name: Orlena Greenville 35 + EmailAddress: "" + LineItems: + - LineItemID: be69f44e-9c72-4fcd-9152-0174867cce49 + AccountCode: "12775" + Description: Foobar + UnitAmount: 20.0000 + LineAmount: 20.00 + ItemCode: "" + Quantity: 1.0000 + TaxAmount: 0.00 + Tracking: [] + Date: /Date(1580515200000)/ + DateString: 2020-02-01T00:00:00 + Status: DRAFT + CurrencyRate: 1.000000 + CurrencyCode: USD + SubTotal: 20.00 + TotalTax: 0.00 + Total: 20.00 + UpdatedDateUTC: /Date(1580605644360)/ + LineAmountTypes: EXCLUSIVE + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Quotes' + example: + Quotes: + - Reference: I am an update + Contact: + ContactID: 00000000-0000-0000-0000-000000000000 + Date: "2020-02-01" + /Quotes/{QuoteID}/History: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getQuoteHistory + summary: Retrieves history records of a specific quote + parameters: + - $ref: '#/components/parameters/QuoteID' + responses: + "200": + $ref: '#/components/responses/HistoryRetrieved' + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createQuoteHistory + summary: Creates a history record for a specific quote + x-hasAccountingValidationError: true + x-example: + - historyRecord: + is_object: true + key: historyRecord + keyPascal: HistoryRecord + keySnake: history_record + - Details: + is_last: true + key: details + keyPascal: Details + default: Hello World + object: historyRecord + - historyRecords: + is_object: true + key: historyRecords + keyPascal: HistoryRecords + - add_historyRecord: + is_last: true + is_array_add: true + key: historyRecords + keyPascal: HistoryRecords + keySnake: history_records + java: HistoryRecords + python: history_record + ruby: history_record + csharp: HistoryRecord + object: historyRecord + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/QuoteID' + responses: + "200": + $ref: '#/components/responses/HistoryRecordCreated' + "400": + $ref: '#/components/responses/400Error' + requestBody: + $ref: '#/components/requestBodies/historyRecords' + /Quotes/{QuoteID}/pdf: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getQuoteAsPdf + x-path: /Quotes/{QuoteID} + summary: Retrieves a specific quote as a PDF file using a unique quote Id + parameters: + - $ref: '#/components/parameters/QuoteID' + responses: + "200": + description: Success - return response of byte array pdf version of specified Quotes + content: + application/pdf: + schema: + type: string + format: binary + /Quotes/{QuoteID}/Attachments: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getQuoteAttachments + summary: Retrieves attachments for a specific quote + parameters: + - $ref: '#/components/parameters/QuoteID' + responses: + "200": + description: Success - return response of type Attachments array of Attachment + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: 439c1573-3cd8-4697-a9f6-81fa651ee8f3 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1550852630329)/ + Attachments: + - AttachmentID: 52a643be-cd5c-489f-9778-53a9fd337756 + FileName: sample5.jpg + Url: https://api.xero.com/api.xro/2.0/Quotes/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg + MimeType: image/jpg + ContentLength: 2878711 + /Quotes/{QuoteID}/Attachments/{AttachmentID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getQuoteAttachmentById + summary: Retrieves a specific attachment from a specific quote using a unique attachment Id + parameters: + - $ref: '#/components/parameters/QuoteID' + - $ref: '#/components/parameters/AttachmentID' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of attachment for Quote as binary data + content: + application/octet-stream: + schema: + type: string + format: binary + /Quotes/{QuoteID}/Attachments/{FileName}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getQuoteAttachmentByFileName + summary: Retrieves a specific attachment from a specific quote by filename + parameters: + - $ref: '#/components/parameters/QuoteID' + - $ref: '#/components/parameters/FileName' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of attachment for Quote as binary data + content: + application/octet-stream: + schema: + type: string + format: binary + post: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: updateQuoteAttachmentByFileName + x-hasAccountingValidationError: true + summary: Updates a specific attachment from a specific quote by filename + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/QuoteID' + - $ref: '#/components/parameters/FileName' + responses: + "200": + description: Success - return response of type Attachments array of Attachment + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: c8d6413a-1da2-4faa-9848-21f60443e906 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1550859714477)/ + Attachments: + - AttachmentID: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + FileName: sample5.jpg + Url: https://api.xero.com/api.xro/2.0/Quotes/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg + MimeType: image/jpg + ContentLength: 2878711 + "400": + description: Validation Error - some data was incorrect returns response of type Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + put: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: createQuoteAttachmentByFileName + x-hasAccountingValidationError: true + summary: Creates attachment for a specific quote + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/QuoteID' + - $ref: '#/components/parameters/FileName' + responses: + "200": + description: Success - return response of type Attachments array of Attachment + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: 724cdff5-bcd1-4c5c-977e-e864c24258e0 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1550856817769)/ + Attachments: + - AttachmentID: ab95b276-9dce-4925-9077-439818ba270f + FileName: sample5.jpg + Url: https://api.xero.com/api.xro/2.0/Quotes/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg + MimeType: image/jpg + ContentLength: 2878711 + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + /Receipts: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getReceipts + summary: Retrieves draft expense claim receipts for any user + parameters: + - $ref: '#/components/parameters/ifModifiedSince' + - in: query + name: where + description: Filter by an any element + example: Status=="DRAFT" + x-example-csharp: Status==\"DRAFT\" + x-example-java: Status=="' + Receipt.StatusEnum.DRAFT + '" + x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Receipt::STATUS_DRAFT . '" + x-example-ruby: Status==#{XeroRuby::Accounting::Receipt::DRAFT} + schema: + type: string + - in: query + name: order + description: Order by an any element + example: ReceiptNumber ASC + schema: + type: string + - $ref: '#/components/parameters/unitdp' + responses: + "200": + description: Success - return response of type Receipts array for all Receipt + content: + application/json: + schema: + $ref: '#/components/schemas/Receipts' + example: + Id: 078b2a2c-902f-4154-8739-357ece5982e5 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552524584695)/ + Receipts: + - ReceiptID: a44fd147-af4e-4fe8-a09a-55332df74162 + ReceiptNumber: 1 + Status: DRAFT + User: + UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273 + FirstName: 'API ' + LastName: Team + ValidationErrors: [] + Warnings: [] + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Name: Liam Gallagher + Addresses: [] + Phones: [] + ContactGroups: [] + SalesTrackingCategories: [] + PurchasesTrackingCategories: [] + ContactPersons: [] + Attachments: [] + HasValidationErrors: false + ValidationErrors: [] + Warnings: [] + Date: /Date(1552435200000+0000)/ + UpdatedDateUTC: /Date(1552524583983+0000)/ + Reference: "" + LineAmountTypes: NoTax + LineItems: [] + SubTotal: 40.00 + TotalTax: 0.00 + Total: 40.00 + ID: a44fd147-af4e-4fe8-a09a-55332df74162 + HasAttachments: false + Attachments: [] + ValidationErrors: [] + Warnings: [] + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createReceipt + summary: Creates draft expense claim receipts for any user + x-hasAccountingValidationError: true + x-example: + - contact: + is_object: true + key: contact + keyPascal: Contact + - contactID: + is_last: true + is_uuid: true + key: contactID + keyPascal: ContactID + keySnake: contact_id + default: 00000000-0000-0000-0000-000000000000 + object: contact + - user: + is_object: true + key: user + keyPascal: User + - userID: + is_last: true + is_uuid: true + key: userID + keyPascal: UserID + keySnake: user_id + default: 00000000-0000-0000-0000-000000000000 + object: user + - lineItem: + is_object: true + key: lineItem + keyPascal: LineItem + keySnake: line_item + - description: + key: description + keyPascal: Description + default: Foobar + object: lineItem + - quantity: + nonString: true + key: quantity + keyPascal: Quantity + default: 1.0 + is_money: true + object: lineItem + - unitAmount: + nonString: true + key: unitAmount + keyPascal: UnitAmount + keySnake: unit_amount + default: 20.0 + is_money: true + object: lineItem + - accountCode: + is_last: true + key: accountCode + keyPascal: AccountCode + keySnake: account_code + default: "000" + object: lineItem + - line_items: + is_list: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + csharp: LineItem + java: LineItem + - add_lineitems: + is_last: true + is_list_add: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + java: LineItems + python: line_item + ruby: line_item + csharp: LineItem + object: lineItem + - receipt: + is_object: true + key: receipt + keyPascal: Receipt + - set_contact: + is_variable: true + nonString: true + key: contact + keyPascal: Contact + default: contact + object: receipt + - set_user: + is_variable: true + nonString: true + key: user + keyPascal: User + default: user + object: receipt + - set_lineitem: + is_variable: true + nonString: true + key: lineItems + keyPascal: LineItems + keySnake: line_items + default: lineItems + python: line_items + ruby: line_items + object: receipt + - lineAmountTypes: + nonString: true + key: lineAmountTypes + keyPascal: LineAmountTypes + keySnake: line_amount_types + default: INCLUSIVE + php: XeroAPI\XeroPHP\Models\Accounting\LineAmountTypes::INCLUSIVE + node: LineAmountTypes.Inclusive + ruby: XeroRuby::Accounting::INCLUSIVE + python: LineAmountTypes.INCLUSIVE + java: com.xero.models.accounting.LineAmountTypes.INCLUSIVE + csharp: LineAmountTypes.Exclusive + object: receipt + - status: + is_last: true + nonString: true + key: status + keyPascal: Status + default: DRAFT + php: XeroAPI\XeroPHP\Models\Accounting\Receipt::STATUS_DRAFT + node: Receipt.StatusEnum.DRAFT + ruby: XeroRuby::Accounting::Receipt::DRAFT + python_string: DRAFT + java: com.xero.models.accounting.Receipt.StatusEnum.DRAFT + csharp: Receipt.StatusEnum.DRAFT + object: receipt + - receipts: + is_object: true + key: receipts + keyPascal: Receipts + - add_receipt: + is_last: true + is_array_add: true + key: receipts + keyPascal: Receipts + java: Receipts + csharp: Receipt + object: receipt + parameters: + - $ref: '#/components/parameters/unitdp' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Receipts array for newly created Receipt + content: + application/json: + schema: + $ref: '#/components/schemas/Receipts' + example: + Id: 35898898-5361-4b42-b6ca-9d2c584fc53d + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552524583429)/ + Receipts: + - ReceiptID: a44fd147-af4e-4fe8-a09a-55332df74162 + ReceiptNumber: 1 + Status: DRAFT + User: + UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273 + EmailAddress: api@xero.com + FirstName: 'API ' + LastName: Team + UpdatedDateUTC: /Date(1511957179217+0000)/ + IsSubscriber: true + OrganisationRole: FINANCIALADVISER + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + ContactStatus: ACTIVE + Name: Liam Gallagher + FirstName: Liam + LastName: Gallagher + EmailAddress: liam@rockstar.com + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + AttentionTo: "" + - AddressType: POBOX + City: Anytown + Region: NY + PostalCode: "10101" + Country: USA + AttentionTo: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: 222-2222 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: 333-2233 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 444-3433 + PhoneAreaCode: "212" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1551747281053+0000)/ + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + Date: /Date(1552521600000+0000)/ + UpdatedDateUTC: /Date(1552524583367+0000)/ + Reference: "" + LineAmountTypes: NoTax + LineItems: + - Description: Foobar + UnitAmount: 20.00 + TaxType: NONE + TaxAmount: 0.00 + LineAmount: 40.00 + AccountCode: "400" + Tracking: [] + Quantity: 2.0000 + SubTotal: 40.00 + TotalTax: 0.00 + Total: 40.00 + ID: a44fd147-af4e-4fe8-a09a-55332df74162 + HasAttachments: false + ValidationErrors: + - Message: A valid user should be identified using the UserID. + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Receipts with an array of Receipt object in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/Receipts' + example: + Receipts: + - Contact: + ContactID: 00000000-0000-0000-0000-000000000000 + Lineitems: + - Description: Foobar + Quantity: 2 + UnitAmount: 20 + AccountCode: "400" + TaxType: NONE + LineAmount: 40 + User: + UserID: 00000000-0000-0000-0000-000000000000 + LineAmountTypes: NoTax + Status: DRAFT + /Receipts/{ReceiptID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getReceipt + summary: Retrieves a specific draft expense claim receipt by using a unique receipt Id + parameters: + - $ref: '#/components/parameters/ReceiptID' + - $ref: '#/components/parameters/unitdp' + responses: + "200": + description: Success - return response of type Receipts array for a specified Receipt + content: + application/json: + schema: + $ref: '#/components/schemas/Receipts' + example: + Id: 2c99af06-d278-4580-8c8c-463c806af5b6 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1553800357225)/ + Receipts: + - ReceiptID: a44fd147-af4e-4fe8-a09a-55332df74162 + ReceiptNumber: 1 + Status: DRAFT + User: + UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273 + EmailAddress: api@xero.com + FirstName: 'API ' + LastName: Team + UpdatedDateUTC: /Date(1511957179217+0000)/ + IsSubscriber: true + OrganisationRole: FINANCIALADVISER + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + ContactStatus: ACTIVE + Name: Liam Gallagher + FirstName: Liam + LastName: Gallagher + EmailAddress: liam@rockstar.com + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + AttentionTo: "" + - AddressType: POBOX + City: Anytown + Region: NY + PostalCode: "10101" + Country: USA + AttentionTo: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: 222-2222 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: 333-2233 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 444-3433 + PhoneAreaCode: "212" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1553672800957+0000)/ + ContactGroups: [] + DefaultCurrency: NZD + ContactPersons: [] + HasValidationErrors: false + Date: /Date(1552435200000+0000)/ + UpdatedDateUTC: /Date(1552524583983+0000)/ + Reference: Foobar + LineAmountTypes: NoTax + LineItems: + - Description: Foobar + UnitAmount: 20.00 + TaxType: NONE + TaxAmount: 0.00 + LineAmount: 40.00 + AccountCode: "400" + Tracking: [] + Quantity: 2.0000 + DiscountEnteredAsPercent: true + SubTotal: 40.00 + TotalTax: 0.00 + Total: 40.00 + ID: a44fd147-af4e-4fe8-a09a-55332df74162 + HasAttachments: true + Attachments: + - AttachmentID: e02a84f6-b83a-4983-b3b9-35cd8880c7bc + FileName: HelloWorld.jpg + Url: https://api.xero.com/api.xro/2.0/receipts/a44fd147-af4e-4fe8-a09a-55332df74162/Attachments/HelloWorld.jpg + MimeType: image/jpg + ContentLength: 2878711 + - AttachmentID: 3451e34c-66a6-42b0-91e2-88618bdc169b + FileName: foobar.jpg + Url: https://api.xero.com/api.xro/2.0/receipts/a44fd147-af4e-4fe8-a09a-55332df74162/Attachments/foobar.jpg + MimeType: image/jpg + ContentLength: 2878711 + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: updateReceipt + summary: Updates a specific draft expense claim receipts + x-hasAccountingValidationError: true + x-example: + - dateValue: + is_date: true + key: dateValue + keyPascal: Date + java_datatype: LocalDate + default: LocalDate.of(2020, Month.OCTOBER, 10) + java: LocalDate.now() + csharp: DateTime.Now + php: new DateTime('2020-12-10') + node: '''2020-10-10''' + python: dateutil.parser.parse('2020-10-10T00:00:00Z') + ruby: '''YYYY-MM-DD''' + - user: + is_object: true + key: user + keyPascal: User + - userID: + is_last: true + is_uuid: true + key: userID + keyPascal: UserID + keySnake: user_id + default: 00000000-0000-0000-0000-000000000000 + object: user + - receipt: + is_object: true + key: receipt + keyPascal: Receipt + - set_user: + is_variable: true + nonString: true + key: user + keyPascal: User + default: user + object: receipt + - reference: + key: reference + keyPascal: Reference + default: Foobar + object: receipt + - date: + is_last: true + is_variable: true + nonString: true + key: date + keyPascal: Date + default: dateValue + object: receipt + - receipts: + is_object: true + key: receipts + keyPascal: Receipts + - add_receipt: + is_last: true + is_array_add: true + key: receipts + keyPascal: Receipts + java: Receipts + csharp: Receipt + object: receipt + parameters: + - $ref: '#/components/parameters/ReceiptID' + - $ref: '#/components/parameters/unitdp' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type Receipts array for updated Receipt + content: + application/json: + schema: + $ref: '#/components/schemas/Receipts' + example: + Id: 05b76bf7-4734-4633-a399-7d569a6a25c6 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552675557052)/ + Receipts: + - ReceiptID: e3686fdc-c661-4581-b9df-cbb20782ea66 + ReceiptNumber: 2 + Status: DRAFT + User: + UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273 + EmailAddress: api@xero.com + FirstName: 'API ' + LastName: Team + UpdatedDateUTC: /Date(1511957179217+0000)/ + IsSubscriber: true + OrganisationRole: FINANCIALADVISER + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + ContactStatus: ACTIVE + Name: Liam Gallagher + FirstName: Liam + LastName: Gallagher + EmailAddress: liam@rockstar.com + BankAccountDetails: "" + Addresses: + - AddressType: STREET + City: "" + Region: "" + PostalCode: "" + Country: "" + AttentionTo: "" + - AddressType: POBOX + City: Anytown + Region: NY + PostalCode: "10101" + Country: USA + AttentionTo: "" + Phones: + - PhoneType: DEFAULT + PhoneNumber: 222-2222 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: DDI + PhoneNumber: "" + PhoneAreaCode: "" + PhoneCountryCode: "" + - PhoneType: FAX + PhoneNumber: 333-2233 + PhoneAreaCode: "212" + PhoneCountryCode: "" + - PhoneType: MOBILE + PhoneNumber: 444-3433 + PhoneAreaCode: "212" + PhoneCountryCode: "" + UpdatedDateUTC: /Date(1551747281053+0000)/ + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + Date: /Date(1552694400000+0000)/ + UpdatedDateUTC: /Date(1552675556927+0000)/ + Reference: Foobar + LineAmountTypes: NoTax + LineItems: + - Description: Foobar + UnitAmount: 20.00 + TaxType: NONE + TaxAmount: 0.00 + LineAmount: 40.00 + AccountCode: "400" + Tracking: [] + Quantity: 2.0000 + SubTotal: 40.00 + TotalTax: 0.00 + Total: 40.00 + ID: e3686fdc-c661-4581-b9df-cbb20782ea66 + HasAttachments: false + ValidationErrors: [] + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Receipts' + example: + Receipts: + - Lineitems: [] + User: + UserID: 00000000-0000-0000-0000-000000000000 + Reference: Foobar + /Receipts/{ReceiptID}/Attachments: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getReceiptAttachments + summary: Retrieves attachments for a specific expense claim receipt + parameters: + - $ref: '#/components/parameters/ReceiptID' + responses: + "200": + description: Success - return response of type Attachments array of Attachments for a specified Receipt + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: d379c04d-d3aa-4034-95b8-af69a449bd78 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552686430436)/ + Attachments: + - AttachmentID: 11e5ca6b-d38c-42ab-a29f-c1710d171aa1 + FileName: giphy.gif + Url: https://api.xero.com/api.xro/2.0/Receipts/7923c00d-163d-404c-a608-af3de333db29/Attachments/giphy.gif + MimeType: image/gif + ContentLength: 495727 + /Receipts/{ReceiptID}/Attachments/{AttachmentID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getReceiptAttachmentById + summary: Retrieves a specific attachments from a specific expense claim receipts by using a unique attachment Id + parameters: + - $ref: '#/components/parameters/ReceiptID' + - $ref: '#/components/parameters/AttachmentID' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of attachment for Receipt as binary data + content: + application/octet-stream: + schema: + type: string + format: binary + /Receipts/{ReceiptID}/Attachments/{FileName}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getReceiptAttachmentByFileName + summary: Retrieves a specific attachment from a specific expense claim receipts by file name + parameters: + - $ref: '#/components/parameters/ReceiptID' + - $ref: '#/components/parameters/FileName' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of attachment for Receipt as binary data + content: + application/octet-stream: + schema: + type: string + format: binary + post: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: updateReceiptAttachmentByFileName + x-hasAccountingValidationError: true + summary: Updates a specific attachment on a specific expense claim receipts by file name + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/ReceiptID' + - $ref: '#/components/parameters/FileName' + responses: + "200": + description: Success - return response of type Attachments array with updated Attachment for a specified Receipt + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: aeca1ea8-8fd9-4757-96a6-397dc4957a69 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552686602761)/ + Attachments: + - AttachmentID: e02a84f6-b83a-4983-b3b9-35cd8880c7bc + FileName: HelloWorld.jpg + Url: https://api.xero.com/api.xro/2.0/Receipts/a44fd147-af4e-4fe8-a09a-55332df74162/Attachments/HelloWorld.jpg + MimeType: image/jpg + ContentLength: 2878711 + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + put: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: createReceiptAttachmentByFileName + x-hasAccountingValidationError: true + summary: Creates an attachment on a specific expense claim receipts by file name + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/ReceiptID' + - $ref: '#/components/parameters/FileName' + responses: + "200": + description: Success - return response of type Attachments array with newly created Attachment for a specified Receipt + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: 01c9a720-b1f1-4477-8de8-ff46d945fd1d + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1552686599884)/ + Attachments: + - AttachmentID: 3451e34c-66a6-42b0-91e2-88618bdc169b + FileName: foobar.jpg + Url: https://api.xero.com/api.xro/2.0/Receipts/a44fd147-af4e-4fe8-a09a-55332df74162/Attachments/foobar.jpg + MimeType: image/jpg + ContentLength: 2878711 + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + /Receipts/{ReceiptID}/History: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getReceiptHistory + summary: Retrieves a history record for a specific receipt + parameters: + - $ref: '#/components/parameters/ReceiptID' + responses: + "200": + $ref: '#/components/responses/HistoryRetrieved' + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createReceiptHistory + summary: Creates a history record for a specific receipt + x-hasAccountingValidationError: true + x-example: + - historyRecord: + is_object: true + key: historyRecord + keyPascal: HistoryRecord + keySnake: history_record + - Details: + is_last: true + key: details + keyPascal: Details + default: Hello World + object: historyRecord + - historyRecords: + is_object: true + key: historyRecords + keyPascal: HistoryRecords + - add_historyRecord: + is_last: true + is_array_add: true + key: historyRecords + keyPascal: HistoryRecords + keySnake: history_records + java: HistoryRecords + python: history_record + ruby: history_record + csharp: HistoryRecord + object: historyRecord + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/ReceiptID' + responses: + "200": + $ref: '#/components/responses/HistoryRecordCreated' + "400": + description: Unsupported - return response incorrect exception, API is not able to create HistoryRecord for Receipts + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + ErrorNumber: 10 + Type: ValidationException + Message: A validation exception occurred + Elements: + - DateUTCString: 2019-03-15T21:51:50 + DateUTC: /Date(1552686710791)/ + Details: Hello World + ValidationErrors: + - Message: The document with the supplied id was not found for this endpoint. + requestBody: + $ref: '#/components/requestBodies/historyRecords' + /RepeatingInvoices: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getRepeatingInvoices + summary: Retrieves repeating invoices + parameters: + - in: query + name: where + description: Filter by an any element + example: Status=="DRAFT" + x-example-csharp: Status==\"DRAFT\" + x-example-java: Status=="' + RepeatingInvoice.StatusEnum.DRAFT + '" + x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\RepeatingInvoice::STATUS_DRAFT . '" + x-example-ruby: Status==#{XeroRuby::Accounting::RepeatingInvoice::DRAFT} + schema: + type: string + - in: query + name: order + description: Order by an any element + example: Total ASC + schema: + type: string + responses: + "200": + description: Success - return response of type Repeating Invoices array for all Repeating Invoice + content: + application/json: + schema: + $ref: '#/components/schemas/RepeatingInvoices' + example: + Id: b336833d-a3a8-4a67-ab4c-6280b3ad87b0 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1553805183228)/ + RepeatingInvoices: + - Schedule: + Period: 1 + Unit: MONTHLY + DueDate: 10 + DueDateType: OFFOLLOWINGMONTH + StartDate: /Date(1555286400000+0000)/ + EndDate: /Date(1569801600000+0000)/ + NextScheduledDate: /Date(1555286400000+0000)/ + RepeatingInvoiceID: 428c0d75-909f-4b04-8403-a48dc27283b0 + Type: ACCREC + Reference: '[Week]' + HasAttachments: true + ApprovedForSending: false + SendCopy: false + MarkAsSent: false + IncludePDF: false + ID: 428c0d75-909f-4b04-8403-a48dc27283b0 + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Name: Liam Gallagher + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + Status: AUTHORISED + LineAmountTypes: Exclusive + LineItems: + - Description: Guitars Fender Strat + UnitAmount: 5000.00 + TaxType: OUTPUT2 + TaxAmount: 750.00 + LineAmount: 5000.00 + AccountCode: "200" + Tracking: [] + Quantity: 1.0000 + LineItemID: 13a8353c-d2af-4d5b-920c-438449f08900 + DiscountEnteredAsPercent: true + SubTotal: 5000.00 + TotalTax: 750.00 + Total: 5750.00 + CurrencyCode: NZD + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createRepeatingInvoices + summary: Creates one or more repeating invoice templates + x-hasAccountingValidationError: true + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type RepeatingInvoices array with newly created RepeatingInvoice + content: + application/json: + schema: + $ref: '#/components/schemas/RepeatingInvoices' + example: + Id: b336833d-a3a8-4a67-ab4c-6280b3ad87b0 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1553805183228)/ + RepeatingInvoices: + - Schedule: + Period: 1 + Unit: MONTHLY + DueDate: 10 + DueDateType: OFFOLLOWINGMONTH + StartDate: /Date(1555286400000+0000)/ + EndDate: /Date(1569801600000+0000)/ + NextScheduledDate: /Date(1555286400000+0000)/ + RepeatingInvoiceID: 428c0d75-909f-4b04-8403-a48dc27283b0 + Type: ACCREC + Reference: '[Week]' + HasAttachments: true + ApprovedForSending: false + SendCopy: false + MarkAsSent: false + IncludePDF: false + ID: 428c0d75-909f-4b04-8403-a48dc27283b0 + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Name: Liam Gallagher + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + Status: AUTHORISED + LineAmountTypes: Exclusive + LineItems: + - Description: Guitars Fender Strat + UnitAmount: 5000.00 + TaxType: OUTPUT2 + TaxAmount: 750.00 + LineAmount: 5000.00 + AccountCode: "200" + Tracking: [] + Quantity: 1.0000 + LineItemID: 13a8353c-d2af-4d5b-920c-438449f08900 + DiscountEnteredAsPercent: true + SubTotal: 5000.00 + TotalTax: 750.00 + Total: 5750.00 + CurrencyCode: NZD + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: RepeatingInvoices with an array of repeating invoice objects in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/RepeatingInvoices' + example: + RepeatingInvoices: + - Schedule: + Period: 1 + Unit: MONTHLY + DueDate: 10 + DueDateType: OFFOLLOWINGMONTH + StartDate: /Date(1555286400000+0000)/ + Type: ACCREC + Reference: '[Week]' + ApprovedForSending: false + SendCopy: false + MarkAsSent: false + IncludePDF: false + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Name: Liam Gallagher + Status: AUTHORISED + LineAmountTypes: Exclusive + LineItems: + - Description: Guitars Fender Strat + UnitAmount: 5000.00 + TaxType: OUTPUT2 + TaxAmount: 750.00 + LineAmount: 5000.00 + AccountCode: "200" + Tracking: [] + Quantity: 1.0000 + LineItemID: 13a8353c-d2af-4d5b-920c-438449f08900 + DiscountEnteredAsPercent: true + CurrencyCode: NZD + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: updateOrCreateRepeatingInvoices + summary: Creates or deletes one or more repeating invoice templates + x-hasAccountingValidationError: true + parameters: + - $ref: '#/components/parameters/summarizeErrors' + - $ref: '#/components/parameters/idempotencyKey' + responses: + "200": + description: Success - return response of type RepeatingInvoices array with newly created RepeatingInvoice + content: + application/json: + schema: + $ref: '#/components/schemas/RepeatingInvoices' + example: + Id: b336833d-a3a8-4a67-ab4c-6280b3ad87b0 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1553805183228)/ + RepeatingInvoices: + - Schedule: + Period: 1 + Unit: MONTHLY + DueDate: 10 + DueDateType: OFFOLLOWINGMONTH + StartDate: /Date(1555286400000+0000)/ + EndDate: /Date(1569801600000+0000)/ + NextScheduledDate: /Date(1555286400000+0000)/ + RepeatingInvoiceID: 428c0d75-909f-4b04-8403-a48dc27283b0 + Type: ACCREC + Reference: '[Week]' + HasAttachments: true + ApprovedForSending: false + SendCopy: false + MarkAsSent: false + IncludePDF: false + ID: 428c0d75-909f-4b04-8403-a48dc27283b0 + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Name: Liam Gallagher + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + Status: AUTHORISED + LineAmountTypes: Exclusive + LineItems: + - Description: Guitars Fender Strat + UnitAmount: 5000.00 + TaxType: OUTPUT2 + TaxAmount: 750.00 + LineAmount: 5000.00 + AccountCode: "200" + Tracking: [] + Quantity: 1.0000 + LineItemID: 13a8353c-d2af-4d5b-920c-438449f08900 + DiscountEnteredAsPercent: true + SubTotal: 5000.00 + TotalTax: 750.00 + Total: 5750.00 + CurrencyCode: NZD + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: RepeatingInvoices with an array of repeating invoice objects in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/RepeatingInvoices' + example: + RepeatingInvoices: + - Schedule: + Period: 1 + Unit: MONTHLY + DueDate: 10 + DueDateType: OFFOLLOWINGMONTH + StartDate: /Date(1555286400000+0000)/ + Type: ACCREC + Reference: '[Week]' + ApprovedForSending: false + SendCopy: false + MarkAsSent: false + IncludePDF: false + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Name: Liam Gallagher + Status: AUTHORISED + LineAmountTypes: Exclusive + LineItems: + - Description: Guitars Fender Strat + UnitAmount: 5000.00 + TaxType: OUTPUT2 + TaxAmount: 750.00 + LineAmount: 5000.00 + AccountCode: "200" + Tracking: [] + Quantity: 1.0000 + LineItemID: 13a8353c-d2af-4d5b-920c-438449f08900 + DiscountEnteredAsPercent: true + CurrencyCode: NZD + /RepeatingInvoices/{RepeatingInvoiceID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getRepeatingInvoice + summary: Retrieves a specific repeating invoice by using a unique repeating invoice Id + parameters: + - $ref: '#/components/parameters/RepeatingInvoiceID' + responses: + "200": + description: Success - return response of type Repeating Invoices array with a specified Repeating Invoice + content: + application/json: + schema: + $ref: '#/components/schemas/RepeatingInvoices' + example: + Id: d9ac3755-7b81-4e3a-bef0-fa8a4f171442 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1553805184820)/ + RepeatingInvoices: + - Schedule: + Period: 1 + Unit: MONTHLY + DueDate: 10 + DueDateType: OFFOLLOWINGMONTH + StartDate: /Date(1555286400000+0000)/ + EndDate: /Date(1569801600000+0000)/ + NextScheduledDate: /Date(1555286400000+0000)/ + RepeatingInvoiceID: 428c0d75-909f-4b04-8403-a48dc27283b0 + Type: ACCREC + Reference: '[Week]' + HasAttachments: true + Attachments: + - AttachmentID: 2a488b0f-3966-4b6e-a7e1-b6d3286351f2 + FileName: HelloWorld.jpg + Url: https://api.xero.com/api.xro/2.0/Invoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/HelloWorld.jpg + MimeType: image/jpg + ContentLength: 2878711 + - AttachmentID: 48294e40-bfd2-4027-a365-f034383cb7aa + FileName: foobar.jpg + Url: https://api.xero.com/api.xro/2.0/Invoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/foobar.jpg + MimeType: image/jpg + ContentLength: 2878711 + - AttachmentID: 528e978a-87b8-44c4-9465-9456ec2f7ee6 + FileName: helo-heros.jpg + Url: https://api.xero.com/api.xro/2.0/Invoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/helo-heros.jpg + MimeType: image/jpeg + ContentLength: 2878711 + ID: 428c0d75-909f-4b04-8403-a48dc27283b0 + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Name: Liam Gallagher + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + Status: AUTHORISED + LineAmountTypes: Exclusive + LineItems: + - Description: Guitars Fender Strat + UnitAmount: 5000.00 + TaxType: OUTPUT2 + TaxAmount: 750.00 + LineAmount: 5000.00 + AccountCode: "200" + Tracking: [] + Quantity: 1.0000 + LineItemID: 13a8353c-d2af-4d5b-920c-438449f08900 + DiscountEnteredAsPercent: true + SubTotal: 5000.00 + TotalTax: 750.00 + Total: 5750.00 + CurrencyCode: NZD + post: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: updateRepeatingInvoice + summary: Deletes a specific repeating invoice template + x-hasAccountingValidationError: true + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/RepeatingInvoiceID' + responses: + "200": + description: Success - return response of type RepeatingInvoices array with deleted Invoice + content: + application/json: + schema: + $ref: '#/components/schemas/RepeatingInvoices' + example: + Id: b336833d-a3a8-4a67-ab4c-6280b3ad87b0 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1553805183228)/ + RepeatingInvoices: + - Schedule: + Period: 1 + Unit: MONTHLY + DueDate: 10 + DueDateType: OFFOLLOWINGMONTH + StartDate: /Date(1555286400000+0000)/ + EndDate: /Date(1569801600000+0000)/ + NextScheduledDate: /Date(1555286400000+0000)/ + RepeatingInvoiceID: 428c0d75-909f-4b04-8403-a48dc27283b0 + Type: ACCREC + Reference: '[Week]' + HasAttachments: true + ApprovedForSending: false + SendCopy: false + MarkAsSent: false + IncludePDF: false + ID: 428c0d75-909f-4b04-8403-a48dc27283b0 + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Name: Liam Gallagher + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + Status: DELETED + LineAmountTypes: Exclusive + LineItems: + - Description: Guitars Fender Strat + UnitAmount: 5000.00 + TaxType: OUTPUT2 + TaxAmount: 750.00 + LineAmount: 5000.00 + AccountCode: "200" + Tracking: [] + Quantity: 1.0000 + LineItemID: 13a8353c-d2af-4d5b-920c-438449f08900 + DiscountEnteredAsPercent: true + SubTotal: 5000.00 + TotalTax: 750.00 + Total: 5750.00 + CurrencyCode: NZD + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RepeatingInvoices' + example: + Schedule: + Period: 1 + Unit: MONTHLY + DueDate: 10 + DueDateType: OFFOLLOWINGMONTH + StartDate: /Date(1555286400000+0000)/ + EndDate: /Date(1569801600000+0000)/ + NextScheduledDate: /Date(1555286400000+0000)/ + RepeatingInvoiceID: 428c0d75-909f-4b04-8403-a48dc27283b0 + Type: ACCREC + Reference: '[Week]' + HasAttachments: true + ApprovedForSending: false + SendCopy: false + MarkAsSent: false + IncludePDF: false + ID: 428c0d75-909f-4b04-8403-a48dc27283b0 + Contact: + ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8 + Name: Liam Gallagher + Addresses: [] + Phones: [] + ContactGroups: [] + ContactPersons: [] + HasValidationErrors: false + Status: DELETED + LineAmountTypes: Exclusive + LineItems: + - Description: Guitars Fender Strat + UnitAmount: 5000.00 + TaxType: OUTPUT2 + TaxAmount: 750.00 + LineAmount: 5000.00 + AccountCode: "200" + Tracking: [] + Quantity: 1.0000 + LineItemID: 13a8353c-d2af-4d5b-920c-438449f08900 + DiscountEnteredAsPercent: true + SubTotal: 5000.00 + TotalTax: 750.00 + Total: 5750.00 + CurrencyCode: NZD + /RepeatingInvoices/{RepeatingInvoiceID}/Attachments: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getRepeatingInvoiceAttachments + summary: Retrieves attachments from a specific repeating invoice + parameters: + - $ref: '#/components/parameters/RepeatingInvoiceID' + responses: + "200": + description: Success - return response of type Attachments array with all Attachments for a specified Repeating Invoice + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: b88b807b-3087-474b-a4f9-d8f1b4f5a899 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1553805762049)/ + Attachments: + - AttachmentID: 2a488b0f-3966-4b6e-a7e1-b6d3286351f2 + FileName: HelloWorld.jpg + Url: https://api.xero.com/api.xro/2.0/RepeatingInvoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/HelloWorld.jpg + MimeType: image/jpg + ContentLength: 2878711 + - AttachmentID: 48294e40-bfd2-4027-a365-f034383cb7aa + FileName: foobar.jpg + Url: https://api.xero.com/api.xro/2.0/RepeatingInvoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/foobar.jpg + MimeType: image/jpg + ContentLength: 2878711 + - AttachmentID: 528e978a-87b8-44c4-9465-9456ec2f7ee6 + FileName: helo-heros.jpg + Url: https://api.xero.com/api.xro/2.0/RepeatingInvoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/helo-heros.jpg + MimeType: image/jpeg + ContentLength: 2878711 + /RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{AttachmentID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getRepeatingInvoiceAttachmentById + summary: Retrieves a specific attachment from a specific repeating invoice + parameters: + - $ref: '#/components/parameters/RepeatingInvoiceID' + - $ref: '#/components/parameters/AttachmentID' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of attachment for Repeating Invoice as binary data + content: + application/octet-stream: + schema: + type: string + format: binary + /RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.attachments + - accounting.attachments.read + tags: + - Accounting + operationId: getRepeatingInvoiceAttachmentByFileName + summary: Retrieves a specific attachment from a specific repeating invoices by file name + parameters: + - $ref: '#/components/parameters/RepeatingInvoiceID' + - $ref: '#/components/parameters/FileName' + - $ref: '#/components/parameters/ContentType' + responses: + "200": + description: Success - return response of attachment for Repeating Invoice as binary data + content: + application/octet-stream: + schema: + type: string + format: binary + post: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: updateRepeatingInvoiceAttachmentByFileName + x-hasAccountingValidationError: true + summary: Updates a specific attachment from a specific repeating invoices by file name + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/RepeatingInvoiceID' + - $ref: '#/components/parameters/FileName' + responses: + "200": + description: Success - return response of type Attachments array with specified Attachment for a specified Repeating Invoice + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: 61b24d5c-4d6e-468f-9de1-abbc234b239a + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1553805873362)/ + Attachments: + - AttachmentID: d086d5f4-9c3d-4edc-a87e-906248eeb652 + FileName: HelloWorld.jpg + Url: https://api.xero.com/api.xro/2.0/RepeatingInvoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/HelloWorld.jpg + MimeType: image/jpg + ContentLength: 2878711 + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + put: + security: + - OAuth2: + - accounting.attachments + tags: + - Accounting + operationId: createRepeatingInvoiceAttachmentByFileName + x-hasAccountingValidationError: true + summary: Creates an attachment from a specific repeating invoices by file name + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/RepeatingInvoiceID' + - $ref: '#/components/parameters/FileName' + responses: + "200": + description: Success - return response of type Attachments array with updated Attachment for a specified Repeating Invoice + x-isAttachment: true + content: + application/json: + schema: + $ref: '#/components/schemas/Attachments' + example: + Id: 219de8c0-ee70-48af-a000-594eba14b417 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1553805866696)/ + Attachments: + - AttachmentID: e078e56c-9a2b-4f6c-a1fa-5d19b0dab611 + FileName: foobar.jpg + Url: https://api.xero.com/api.xro/2.0/RepeatingInvoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/foobar.jpg + MimeType: image/jpg + ContentLength: 2878711 + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: Byte array of file in body of request + content: + application/octet-stream: + schema: + type: string + format: byte + /RepeatingInvoices/{RepeatingInvoiceID}/History: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.transactions + - accounting.transactions.read + tags: + - Accounting + operationId: getRepeatingInvoiceHistory + summary: Retrieves history record for a specific repeating invoice + parameters: + - $ref: '#/components/parameters/RepeatingInvoiceID' + responses: + "200": + $ref: '#/components/responses/HistoryRetrieved' + put: + security: + - OAuth2: + - accounting.transactions + tags: + - Accounting + operationId: createRepeatingInvoiceHistory + summary: Creates a history record for a specific repeating invoice + x-hasAccountingValidationError: true + x-example: + - historyRecord: + is_object: true + key: historyRecord + keyPascal: HistoryRecord + keySnake: history_record + - Details: + is_last: true + key: details + keyPascal: Details + default: Hello World + object: historyRecord + - historyRecords: + is_object: true + key: historyRecords + keyPascal: HistoryRecords + - add_historyRecord: + is_last: true + is_array_add: true + key: historyRecords + keyPascal: HistoryRecords + keySnake: history_records + java: HistoryRecords + python: history_record + ruby: history_record + csharp: HistoryRecord + object: historyRecord + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/RepeatingInvoiceID' + responses: + "200": + $ref: '#/components/responses/HistoryRecordCreated' + "400": + $ref: '#/components/responses/400Error' + requestBody: + $ref: '#/components/requestBodies/historyRecords' + /Reports/TenNinetyNine: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.reports.read + - accounting.reports.tenninetynine.read + tags: + - Accounting + operationId: getReportTenNinetyNine + summary: Retrieve reports for 1099 + parameters: + - in: query + name: reportYear + x-snake: report_year + description: The year of the 1099 report + example: "2019" + schema: + type: string + responses: + "200": + description: Success - return response of type Reports + content: + application/json: + schema: + $ref: '#/components/schemas/Reports' + example: + Id: 8b474ddb-9ef4-457c-8640-1c0e3670ea0e + Status: OK + ProviderName: Java Public Example + DateTimeUTC: /Date(1691540171754)/ + Reports: + - ReportName: 1099-NEC report + ReportDate: 1 Jan 2023 to 31 Dec 2023 + Fields: [] + Contacts: + - Box1: 0.00 + Box2: 0.00 + Box4: 1150.00 + Name: Bank West + FederalTaxIDType: SSN + City: Pinehaven + Zip: "12345" + State: CA + Email: jack@bowest.com + StreetAddress: "Procurement Services\r\nGPO 1234\r\n\r\n\r\n" + TaxID: 234-22-2223 + ContactId: 81d5706a-8057-4338-8511-747cd85f4c68 + LegalName: Jack Sparrow + BusinessName: Bank West + FederalTaxClassification: PARTNERSHIP + - ReportName: 1099-MISC report + ReportDate: 1 Jan 2023 to 31 Dec 2023 + Fields: [] + Contacts: + - Box1: 0.00 + Box2: 0.00 + Box3: 1000.00 + Box4: 0.00 + Box5: 0.00 + Box6: 0.00 + Box7: 0.00 + Box8: 0.00 + Box9: 0.00 + Box10: 0.00 + Box11: 0.00 + Box14: 0.00 + Name: Bank West + FederalTaxIDType: SSN + City: Pinehaven + Zip: "12345" + State: CA + Email: jack@bowest.com + StreetAddress: "Procurement Services\r\nGPO 1234\r\n\r\n\r\n" + TaxID: 234-22-2223 + ContactId: 81d5706a-8057-4338-8511-747cd85f4c68 + LegalName: Jack Sparrow + BusinessName: Bank West + FederalTaxClassification: PARTNERSHIP + - Box1: 0.00 + Box2: 0.00 + Box3: 1000.00 + Box4: 0.00 + Box5: 0.00 + Box6: 0.00 + Box7: 0.00 + Box8: 0.00 + Box9: 0.00 + Box10: 0.00 + Box11: 0.00 + Box14: 0.00 + Name: Hoyt Productions + FederalTaxIDType: SSN + City: Oaktown + Zip: "45123" + State: NY + Email: accounts@hoytmadeupdemo.com + StreetAddress: "100 Rusty Ridge Road\r\nSuite 100\r\n\r\n\r\n" + TaxID: 123-45-6780 + ContactId: 19732b6a-9a5c-4651-b33c-3f8f682e2a2b + LegalName: Raymond Holt + BusinessName: Hoyt productions + FederalTaxClassification: S_CORP + - Box1: 5543.75 + Box2: 0.00 + Box3: 0.00 + Box4: 0.00 + Box5: 0.00 + Box6: 0.00 + Box7: 0.00 + Box8: 0.00 + Box9: 0.00 + Box10: 0.00 + Box11: 0.00 + Box14: 0.00 + Name: Truxton Property Management + FederalTaxIDType: EIN + City: Coppertown + Zip: "21321" + State: FL + Email: accounts@truxtonmadeupdemo.com + StreetAddress: "1000 Copper Avenue\r\nSuite 1000\r\n\r\n\r\n" + TaxID: 33-3332233 + ContactId: 018355fc-c67e-4352-b443-ef3873031983 + LegalName: Jake Peralta + BusinessName: Truxton Property Management + FederalTaxClassification: C_CORP + /Reports/AgedPayablesByContact: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.reports.read + tags: + - Accounting + operationId: getReportAgedPayablesByContact + summary: Retrieves report for aged payables by contact + parameters: + - in: query + required: true + name: contactId + x-snake: contact_id + description: Unique identifier for a Contact + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + - in: query + name: date + description: The date of the Aged Payables By Contact report + example: "2019-10-31" + schema: + type: string + format: date + - $ref: '#/components/parameters/FromDate' + - $ref: '#/components/parameters/ToDate' + responses: + "200": + description: Success - return response of type ReportWithRows + content: + application/json: + schema: + $ref: '#/components/schemas/ReportWithRows' + example: + Id: 5a33f9d4-44a6-4467-a812-4f025506ee35 + Status: OK + ProviderName: Java Public Example + DateTimeUTC: /Date(1555971088085)/ + Reports: + - ReportName: Aged Payables By Contact + ReportType: AgedPayablesByContact + ReportTitles: + - Invoices + - ABC + - From 10 October 2017 to 22 April 2019 + - Showing payments to 22 April 2019 + ReportDate: 22 April 2019 + UpdatedDateUTC: /Date(1555971088085)/ + Fields: [] + Rows: + - RowType: Header + Cells: + - Value: Date + - Value: Reference + - Value: Due Date + - Value: "" + - Value: Total + - Value: Paid + - Value: Credited + - Value: Due + - RowType: Section + Title: "" + Rows: + - RowType: Row + Cells: + - Value: 2017-10-10T00:00:00 + - Value: Opening Balance + - Value: "" + - Value: "" + - Value: "" + - Value: "" + - Value: "" + - Value: "0.00" + - RowType: Section + Title: "" + Rows: + - RowType: Row + Cells: + - Value: 2018-10-09T00:00:00 + Attributes: + - Value: 1f3960ae-0537-4438-a4dd-76d785e6d7d8 + Id: invoiceID + - Value: "" + Attributes: + - Value: 1f3960ae-0537-4438-a4dd-76d785e6d7d8 + Id: invoiceID + - Value: 2018-10-23T00:00:00 + Attributes: + - Value: 1f3960ae-0537-4438-a4dd-76d785e6d7d8 + Id: invoiceID + - Value: 181 days overdue + Attributes: + - Value: 1f3960ae-0537-4438-a4dd-76d785e6d7d8 + Id: invoiceID + - Value: "250.00" + Attributes: + - Value: 1f3960ae-0537-4438-a4dd-76d785e6d7d8 + Id: invoiceID + - Value: "0.00" + Attributes: + - Value: 1f3960ae-0537-4438-a4dd-76d785e6d7d8 + Id: invoiceID + - Value: "0.00" + Attributes: + - Value: 1f3960ae-0537-4438-a4dd-76d785e6d7d8 + Id: invoiceID + - Value: "250.00" + Attributes: + - Value: 1f3960ae-0537-4438-a4dd-76d785e6d7d8 + Id: invoiceID + - RowType: SummaryRow + Cells: + - Value: Total + - Value: "" + - Value: "" + - Value: "" + - Value: "250.00" + - Value: "0.00" + - Value: "0.00" + - Value: "250.00" + - RowType: Section + Title: "" + Rows: + - RowType: SummaryRow + Cells: + - Value: Closing Balance + - Value: "" + - Value: "" + - Value: "" + - Value: "250.00" + - Value: "0.00" + - Value: "0.00" + - Value: "250.00" + /Reports/AgedReceivablesByContact: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.reports.read + tags: + - Accounting + operationId: getReportAgedReceivablesByContact + summary: Retrieves report for aged receivables by contact + parameters: + - in: query + required: true + name: contactId + x-snake: contact_id + description: Unique identifier for a Contact + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + - in: query + name: date + description: The date of the Aged Receivables By Contact report + example: "2019-10-31" + schema: + type: string + format: date + - $ref: '#/components/parameters/FromDate' + - $ref: '#/components/parameters/ToDate' + responses: + "200": + description: Success - return response of type ReportWithRows + content: + application/json: + schema: + $ref: '#/components/schemas/ReportWithRows' + example: + Id: b977b607-955d-47cb-92fd-7c29b3dd755c + Status: OK + ProviderName: Java Public Example + DateTimeUTC: /Date(1556032862815)/ + Reports: + - ReportName: Aged Receivables By Contact + ReportType: AgedReceivablesByContact + ReportTitles: + - Invoices + - ABC + - From 10 October 2017 to 23 April 2019 + - Showing payments to 23 April 2019 + ReportDate: 23 April 2019 + UpdatedDateUTC: /Date(1556032862815)/ + Fields: [] + Rows: + - RowType: Header + Cells: + - Value: Date + - Value: Number + - Value: Due Date + - Value: "" + - Value: Total + - Value: Paid + - Value: Credited + - Value: Due + - RowType: Section + Title: "" + Rows: + - RowType: Row + Cells: + - Value: 2017-10-10T00:00:00 + - Value: Opening Balance + - Value: "" + - Value: "" + - Value: "" + - Value: "" + - Value: "" + - Value: "0.00" + - RowType: Section + Title: "" + Rows: + - RowType: Row + Cells: + - Value: 2018-05-13T00:00:00 + Attributes: + - Value: 40ebad47-24e2-4dc9-a5f5-579df427671b + Id: invoiceID + - Value: IV1242016 + Attributes: + - Value: 40ebad47-24e2-4dc9-a5f5-579df427671b + Id: invoiceID + - Value: 2018-06-22T00:00:00 + Attributes: + - Value: 40ebad47-24e2-4dc9-a5f5-579df427671b + Id: invoiceID + - Value: 305 days overdue + Attributes: + - Value: 40ebad47-24e2-4dc9-a5f5-579df427671b + Id: invoiceID + - Value: "100.00" + Attributes: + - Value: 40ebad47-24e2-4dc9-a5f5-579df427671b + Id: invoiceID + - Value: "0.00" + Attributes: + - Value: 40ebad47-24e2-4dc9-a5f5-579df427671b + Id: invoiceID + - Value: "0.00" + Attributes: + - Value: 40ebad47-24e2-4dc9-a5f5-579df427671b + Id: invoiceID + - Value: "100.00" + Attributes: + - Value: 40ebad47-24e2-4dc9-a5f5-579df427671b + Id: invoiceID + - RowType: Row + Cells: + - Value: 2019-04-23T00:00:00 + Attributes: + - Value: ca0483ce-fa43-4335-8512-751e655337b8 + Id: invoiceID + - Value: INV-0086 + Attributes: + - Value: ca0483ce-fa43-4335-8512-751e655337b8 + Id: invoiceID + - Value: 2019-05-07T00:00:00 + Attributes: + - Value: ca0483ce-fa43-4335-8512-751e655337b8 + Id: invoiceID + - Value: "" + Attributes: + - Value: ca0483ce-fa43-4335-8512-751e655337b8 + Id: invoiceID + - Value: "50.00" + Attributes: + - Value: ca0483ce-fa43-4335-8512-751e655337b8 + Id: invoiceID + - Value: "0.00" + Attributes: + - Value: ca0483ce-fa43-4335-8512-751e655337b8 + Id: invoiceID + - Value: "0.00" + Attributes: + - Value: ca0483ce-fa43-4335-8512-751e655337b8 + Id: invoiceID + - Value: "50.00" + Attributes: + - Value: ca0483ce-fa43-4335-8512-751e655337b8 + Id: invoiceID + - RowType: SummaryRow + Cells: + - Value: Total + - Value: "" + - Value: "" + - Value: "" + - Value: "150.00" + - Value: "0.00" + - Value: "0.00" + - Value: "150.00" + - RowType: Section + Title: "" + Rows: + - RowType: SummaryRow + Cells: + - Value: Closing Balance + - Value: "" + - Value: "" + - Value: "" + - Value: "150.00" + - Value: "0.00" + - Value: "0.00" + - Value: "150.00" + /Reports/BalanceSheet: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.reports.read + tags: + - Accounting + operationId: getReportBalanceSheet + summary: Retrieves report for balancesheet + parameters: + - in: query + name: date + description: The date of the Balance Sheet report + example: "2019-11-01" + schema: + type: string + format: date + - in: query + name: periods + description: The number of periods for the Balance Sheet report + example: 3 + schema: + type: integer + - in: query + name: timeframe + description: The period size to compare to (MONTH, QUARTER, YEAR) + example: MONTH + schema: + type: string + enum: + - MONTH + - QUARTER + - YEAR + - in: query + name: trackingOptionID1 + x-snake: tracking_option_id_1 + description: The tracking option 1 for the Balance Sheet report + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + - in: query + name: trackingOptionID2 + x-snake: tracking_option_id_2 + description: The tracking option 2 for the Balance Sheet report + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + - in: query + name: standardLayout + x-snake: standard_layout + description: The standard layout boolean for the Balance Sheet report + example: true + x-example-python: "True" + schema: + type: boolean + - in: query + name: paymentsOnly + x-snake: payments_only + description: return a cash basis for the Balance Sheet report + example: false + x-example-python: "False" + schema: + type: boolean + responses: + "200": + description: Success - return response of type ReportWithRows + content: + application/json: + schema: + $ref: '#/components/schemas/ReportWithRows' + example: + Id: 2ddba304-6ed3-4da4-b185-3b6289699653 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1555099412778)/ + Reports: + - ReportName: Balance Sheet + ReportType: BalanceSheet + ReportTitles: + - Balance Sheet + - Dev Evangelist - Sid Test 3 (NZ-2016-02) + - As at 30 April 2019 + ReportDate: 12 April 2019 + UpdatedDateUTC: /Date(1555099412778)/ + Fields: [] + Rows: + - RowType: Header + Cells: + - Value: "" + - Value: 30 Apr 2019 + - Value: 31 Mar 2019 + - Value: 28 Feb 2019 + - RowType: Section + Title: Assets + Rows: [] + - RowType: Section + Title: Bank + Rows: + - RowType: Row + Cells: + - Value: Country Savings + Attributes: + - Value: 041207d2-3d61-4e5d-8c1a-b9236955a71c + Id: account + - Value: "-1850.00" + Attributes: + - Value: 041207d2-3d61-4e5d-8c1a-b9236955a71c + Id: account + - Value: "-1850.00" + Attributes: + - Value: 041207d2-3d61-4e5d-8c1a-b9236955a71c + Id: account + - Value: "0.00" + Attributes: + - Value: 041207d2-3d61-4e5d-8c1a-b9236955a71c + Id: account + - RowType: Row + Cells: + - Value: My Big Bank + Attributes: + - Value: 300f3bde-3a5c-4035-9ec5-45b09777679a + Id: account + - Value: "2146.37" + Attributes: + - Value: 300f3bde-3a5c-4035-9ec5-45b09777679a + Id: account + - Value: "2020.00" + Attributes: + - Value: 300f3bde-3a5c-4035-9ec5-45b09777679a + Id: account + - Value: "0.00" + Attributes: + - Value: 300f3bde-3a5c-4035-9ec5-45b09777679a + Id: account + - RowType: SummaryRow + Cells: + - Value: Total Bank + - Value: "296.37" + - Value: "170.00" + - Value: "0.00" + - RowType: Section + Title: Current Assets + Rows: + - RowType: Row + Cells: + - Value: Accounts Receivable + Attributes: + - Value: b94495d0-44ab-4199-a1d0-427a4877e100 + Id: account + - Value: "154355.72" + Attributes: + - Value: b94495d0-44ab-4199-a1d0-427a4877e100 + Id: account + - Value: "154351.78" + Attributes: + - Value: b94495d0-44ab-4199-a1d0-427a4877e100 + Id: account + - Value: "356.50" + Attributes: + - Value: b94495d0-44ab-4199-a1d0-427a4877e100 + Id: account + - RowType: Row + Cells: + - Value: Inventory + Attributes: + - Value: 53a12a15-7e9b-4a31-85f4-a7cee6d04215 + Id: account + - Value: "25000.00" + Attributes: + - Value: 53a12a15-7e9b-4a31-85f4-a7cee6d04215 + Id: account + - Value: "25000.00" + Attributes: + - Value: 53a12a15-7e9b-4a31-85f4-a7cee6d04215 + Id: account + - Value: "0.00" + Attributes: + - Value: 53a12a15-7e9b-4a31-85f4-a7cee6d04215 + Id: account + - RowType: SummaryRow + Cells: + - Value: Total Current Assets + - Value: "179355.72" + - Value: "179351.78" + - Value: "356.50" + - RowType: Section + Title: Fixed Assets + Rows: + - RowType: Row + Cells: + - Value: Office Equipment + Attributes: + - Value: 7132cab3-ce56-4389-8e47-8f60d4c137f8 + Id: account + - Value: "-119.00" + Attributes: + - Value: 7132cab3-ce56-4389-8e47-8f60d4c137f8 + Id: account + - Value: "-119.00" + Attributes: + - Value: 7132cab3-ce56-4389-8e47-8f60d4c137f8 + Id: account + - Value: "0.00" + Attributes: + - Value: 7132cab3-ce56-4389-8e47-8f60d4c137f8 + Id: account + - RowType: SummaryRow + Cells: + - Value: Total Fixed Assets + - Value: "-119.00" + - Value: "-119.00" + - Value: "0.00" + - RowType: Section + Title: "" + Rows: + - RowType: SummaryRow + Cells: + - Value: Total Assets + - Value: "179533.09" + - Value: "179402.78" + - Value: "356.50" + - RowType: Section + Title: Liabilities + Rows: [] + - RowType: Section + Title: Current Liabilities + Rows: + - RowType: Row + Cells: + - Value: Accounts Payable + Attributes: + - Value: a2a4795b-a01f-40eb-afa6-a34b4514875d + Id: account + - Value: "-3469.00" + Attributes: + - Value: a2a4795b-a01f-40eb-afa6-a34b4514875d + Id: account + - Value: "-3469.00" + Attributes: + - Value: a2a4795b-a01f-40eb-afa6-a34b4514875d + Id: account + - Value: "-184.00" + Attributes: + - Value: a2a4795b-a01f-40eb-afa6-a34b4514875d + Id: account + - RowType: Row + Cells: + - Value: GST + Attributes: + - Value: 17d9a4a0-3181-4803-a96b-f0dbe589091b + Id: account + - Value: "-2446.21" + Attributes: + - Value: 17d9a4a0-3181-4803-a96b-f0dbe589091b + Id: account + - Value: "-2461.89" + Attributes: + - Value: 17d9a4a0-3181-4803-a96b-f0dbe589091b + Id: account + - Value: "76.50" + Attributes: + - Value: 17d9a4a0-3181-4803-a96b-f0dbe589091b + Id: account + - RowType: SummaryRow + Cells: + - Value: Total Current Liabilities + - Value: "-5915.21" + - Value: "-5930.89" + - Value: "-107.50" + - RowType: Section + Title: "" + Rows: + - RowType: SummaryRow + Cells: + - Value: Total Liabilities + - Value: "-5915.21" + - Value: "-5930.89" + - Value: "-107.50" + - RowType: Section + Title: "" + Rows: + - RowType: Row + Cells: + - Value: Net Assets + - Value: "185448.30" + - Value: "185333.67" + - Value: "464.00" + - RowType: Section + Title: Equity + Rows: + - RowType: Row + Cells: + - Value: Current Year Earnings + Attributes: + - Value: 00000000-0000-0000-0000-000000000000 + Id: account + - Value: "114.62" + Attributes: + - Value: 00000000-0000-0000-0000-000000000000 + Id: account + - Value: 4/1/2019 + Id: fromDate + - Value: 4/30/2019 + Id: toDate + - Value: "156621.67" + Attributes: + - Value: 00000000-0000-0000-0000-000000000000 + Id: account + - Value: 4/1/2018 + Id: fromDate + - Value: 3/31/2019 + Id: toDate + - Value: "500.00" + Attributes: + - Value: 00000000-0000-0000-0000-000000000000 + Id: account + - Value: 4/1/2018 + Id: fromDate + - Value: 2/28/2019 + Id: toDate + - RowType: Row + Cells: + - Value: Owner A Drawings + Attributes: + - Value: 136ebd08-60ea-4592-8982-be92c153b53a + Id: account + - Value: "28752.00" + Attributes: + - Value: 136ebd08-60ea-4592-8982-be92c153b53a + Id: account + - Value: "28752.00" + Attributes: + - Value: 136ebd08-60ea-4592-8982-be92c153b53a + Id: account + - Value: "0.00" + Attributes: + - Value: 136ebd08-60ea-4592-8982-be92c153b53a + Id: account + - RowType: Row + Cells: + - Value: Owner A Funds Introduced + Attributes: + - Value: 5690f1e8-1d02-4893-90c2-ee1a69eff942 + Id: account + - Value: "-50.00" + Attributes: + - Value: 5690f1e8-1d02-4893-90c2-ee1a69eff942 + Id: account + - Value: "-50.00" + Attributes: + - Value: 5690f1e8-1d02-4893-90c2-ee1a69eff942 + Id: account + - Value: "-46.00" + Attributes: + - Value: 5690f1e8-1d02-4893-90c2-ee1a69eff942 + Id: account + - RowType: Row + Cells: + - Value: Retained Earnings + Attributes: + - Value: 7fc16c06-c342-4f32-995f-889b5f9996fd + Id: account + - Value: "156631.67" + Attributes: + - Value: 7fc16c06-c342-4f32-995f-889b5f9996fd + Id: account + - Value: "" + Id: fromDate + - Value: 4/30/2019 + Id: toDate + - Value: "10.00" + Attributes: + - Value: 7fc16c06-c342-4f32-995f-889b5f9996fd + Id: account + - Value: "" + Id: fromDate + - Value: 3/31/2019 + Id: toDate + - Value: "10.00" + Attributes: + - Value: 7fc16c06-c342-4f32-995f-889b5f9996fd + Id: account + - Value: "" + Id: fromDate + - Value: 2/28/2019 + Id: toDate + - RowType: SummaryRow + Cells: + - Value: Total Equity + - Value: "185448.29" + - Value: "185333.67" + - Value: "464.00" + /Reports/BankSummary: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.reports.read + tags: + - Accounting + operationId: getReportBankSummary + summary: Retrieves report for bank summary + parameters: + - $ref: '#/components/parameters/FromDate' + - $ref: '#/components/parameters/ToDate' + responses: + "200": + description: Success - return response of type ReportWithRows + content: + application/json: + schema: + $ref: '#/components/schemas/ReportWithRows' + example: + Id: ae58d0ec-9c5c-455f-b96e-690107579257 + Status: OK + ProviderName: Java Public Example + DateTimeUTC: /Date(1556035526223)/ + Reports: + - ReportName: Bank Summary + ReportType: BankSummary + ReportTitles: + - Bank Summary + - MindBody Test 10 (AU-2016-02) + - From 1 April 2019 to 30 April 2019 + ReportDate: 23 April 2019 + UpdatedDateUTC: /Date(1556035526223)/ + Fields: [] + Rows: + - RowType: Header + Cells: + - Value: Bank Accounts + - Value: Opening Balance + - Value: Cash Received + - Value: Cash Spent + - Value: Closing Balance + - RowType: Section + Title: "" + Rows: + - RowType: Row + Cells: + - Value: Big City Bank + Attributes: + - Value: 03f9cf1e-2deb-4bf1-b0a8-b57f08672eb8 + Id: accountID + - Value: "0.00" + - Value: "110.00" + Attributes: + - Value: 03f9cf1e-2deb-4bf1-b0a8-b57f08672eb8 + Id: account + - Value: "100.00" + Attributes: + - Value: 03f9cf1e-2deb-4bf1-b0a8-b57f08672eb8 + Id: account + - Value: "10.00" + - RowType: SummaryRow + Cells: + - Value: Total + - Value: "0.00" + - Value: "110.00" + - Value: "100.00" + - Value: "10.00" + /Reports/{ReportID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.reports.read + tags: + - Accounting + operationId: getReportFromId + summary: Retrieves a specific report using a unique ReportID + parameters: + - in: path + required: true + name: ReportID + x-snake: report_id + description: Unique identifier for a Report + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + "200": + description: Success - return response of type ReportWithRows + content: + application/json: + schema: + $ref: '#/components/schemas/ReportWithRows' + /Reports/BudgetSummary: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.reports.read + tags: + - Accounting + operationId: getReportBudgetSummary + summary: Retrieves report for budget summary + parameters: + - in: query + name: date + description: The date for the Bank Summary report e.g. 2018-03-31 + example: "2019-03-31" + schema: + type: string + format: date + - in: query + name: periods + description: The number of periods to compare (integer between 1 and 12) + example: 2 + schema: + type: integer + - in: query + name: timeframe + description: The period size to compare to (1=month, 3=quarter, 12=year) + example: 3 + schema: + type: integer + responses: + "200": + description: success- return a Report with Rows object + content: + application/json: + schema: + $ref: '#/components/schemas/ReportWithRows' + example: + Id: 9f1e2722-0d98-4669-890f-f8f4217c968b + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573755037865)/ + Reports: + - ReportName: Budget Summary + ReportType: BudgetSummary + ReportTitles: + - Overall Budget + - Budget Summary + - Online Test 11 + - November 2019 to October 2022 + ReportDate: 14 November 2019 + UpdatedDateUTC: /Date(1573755037865)/ + Fields: [] + Rows: + - RowType: Header + Cells: + - Value: Account + - Value: Jan-20 + - Value: Apr-20 + - Value: Jul-20 + - Value: Oct-20 + - Value: Jan-21 + - Value: Apr-21 + - Value: Jul-21 + - Value: Oct-21 + - Value: Jan-22 + - Value: Apr-22 + - Value: Jul-22 + - Value: Oct-22 + - RowType: Section + Title: "" + Rows: + - RowType: SummaryRow + Cells: + - Value: Gross Profit + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - RowType: Section + Title: "" + Rows: + - RowType: SummaryRow + Cells: + - Value: Total Expenses + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - RowType: Section + Title: "" + Rows: + - RowType: SummaryRow + Cells: + - Value: Net Profit + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + - Value: "0.00" + /Reports/ExecutiveSummary: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.reports.read + tags: + - Accounting + operationId: getReportExecutiveSummary + summary: Retrieves report for executive summary + parameters: + - in: query + name: date + description: The date for the Bank Summary report e.g. 2018-03-31 + example: "2019-03-31" + schema: + type: string + format: date + responses: + "200": + description: Success - return response of type ReportWithRows + content: + application/json: + schema: + $ref: '#/components/schemas/ReportWithRows' + example: + Id: 068d3505-ac37-43f3-8135-f912a5963d8a + Status: OK + ProviderName: provider-name + DateTimeUTC: /Date(1573755038314)/ + Reports: + - ReportName: Executive Summary + ReportType: ExecutiveSummary + ReportTitles: + - Executive Summary + - Online Test 11 + - For the month of November 2019 + ReportDate: 14 November 2019 + UpdatedDateUTC: /Date(1573755038314)/ + Fields: [] + Rows: + - RowType: Header + Cells: + - Value: "" + - Value: Nov 2019 + - Value: Oct 2019 + - Value: Variance + - RowType: Section + Title: Cash + Rows: + - RowType: Row + Cells: + - Value: Cash received + - Value: "0.00" + - Value: "0.00" + - Value: 0.0% + - RowType: Row + Cells: + - Value: Cash spent + - Value: "0.00" + - Value: "0.00" + - Value: 0.0% + - RowType: Row + Cells: + - Value: Cash surplus (deficit) + - Value: "0.00" + - Value: "0.00" + - Value: 0.0% + - RowType: Row + Cells: + - Value: Closing bank balance + - Value: "79.01" + - Value: "79.01" + - Value: 0.0% + - RowType: Section + Title: Profitability + Rows: + - RowType: Row + Cells: + - Value: Income + - Value: "40.00" + - Value: "0.00" + - Value: 0.0% + - RowType: Row + Cells: + - Value: Direct costs + - Value: "0.00" + - Value: "0.00" + - Value: 0.0% + - RowType: Row + Cells: + - Value: Gross profit (loss) + - Value: "40.00" + - Value: "0.00" + - Value: 0.0% + - RowType: Row + Cells: + - Value: Other Income + - Value: "0.00" + - Value: "0.00" + - Value: 0.0% + - RowType: Row + Cells: + - Value: Expenses + - Value: "205.40" + - Value: "0.00" + - Value: 0.0% + - RowType: Row + Cells: + - Value: Profit (loss) + - Value: "-165.40" + - Value: "0.00" + - Value: 0.0% + - RowType: Section + Title: Balance Sheet + Rows: + - RowType: Row + Cells: + - Value: Debtors + - Value: "590.00" + - Value: "550.00" + - Value: 7.3% + - RowType: Row + Cells: + - Value: Creditors + - Value: "-44.00" + - Value: "-44.00" + - Value: 0.0% + - RowType: Row + Cells: + - Value: Net assets + - Value: "594.16" + - Value: "759.56" + - Value: -21.8% + - RowType: Section + Title: Income + Rows: + - RowType: Row + Cells: + - Value: Number of invoices issued + - Value: "1" + - Value: "0" + - Value: 0.0% + - RowType: Row + Cells: + - Value: Average value of invoices + - Value: "40.00" + - Value: "0.00" + - Value: 0.0% + - RowType: Section + Title: Performance + Rows: + - RowType: Row + Cells: + - Value: Gross profit margin + - Value: 100.0% + - Value: "" + - Value: 0.0% + - RowType: Row + Cells: + - Value: Net profit margin + - Value: -413.5% + - Value: "" + - Value: 0.0% + - RowType: Row + Cells: + - Value: Return on investment (p.a.) + - Value: -334.1% + - Value: 0.0% + - Value: 0.0% + - RowType: Section + Title: Position + Rows: + - RowType: Row + Cells: + - Value: Average debtors days + - Value: "442.50" + - Value: "0" + - Value: 0.0% + - RowType: Row + Cells: + - Value: Average creditors days + - Value: "-6.426484907497565725413826680" + - Value: "0" + - Value: 0.0% + - RowType: Row + Cells: + - Value: Short term cash forecast + - Value: "634.00" + - Value: "594.00" + - Value: 6.7% + - RowType: Row + Cells: + - Value: Current assets to liabilities + - Value: "4.0729764675459012154124644427" + - Value: "-62.034024896265560165975103734" + - Value: 106.6% + - RowType: Row + Cells: + - Value: Term assets to liabilities + - Value: "" + - Value: "" + - Value: 0.0% + /Reports: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.reports.read + tags: + - Accounting + operationId: getReportsList + summary: Retrieves a list of the organistaions unique reports that require a uuid to fetch + responses: + "200": + description: Success - return response of type ReportWithRows + content: + application/json: + schema: + $ref: '#/components/schemas/ReportWithRows' + /Reports/ProfitAndLoss: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.reports.read + tags: + - Accounting + operationId: getReportProfitAndLoss + summary: Retrieves report for profit and loss + parameters: + - $ref: '#/components/parameters/FromDate' + - $ref: '#/components/parameters/ToDate' + - in: query + name: periods + description: The number of periods to compare (integer between 1 and 12) + example: 3 + schema: + type: integer + - in: query + name: timeframe + description: The period size to compare to (MONTH, QUARTER, YEAR) + example: MONTH + schema: + type: string + enum: + - MONTH + - QUARTER + - YEAR + - in: query + name: trackingCategoryID + x-snake: tracking_category_id + description: The trackingCategory 1 for the ProfitAndLoss report + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + - in: query + name: trackingCategoryID2 + x-snake: tracking_category_id_2 + description: The trackingCategory 2 for the ProfitAndLoss report + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + - in: query + name: trackingOptionID + x-snake: tracking_option_id + description: The tracking option 1 for the ProfitAndLoss report + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + - in: query + name: trackingOptionID2 + x-snake: tracking_option_id_2 + description: The tracking option 2 for the ProfitAndLoss report + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + - in: query + name: standardLayout + x-snake: standard_layout + description: Return the standard layout for the ProfitAndLoss report + example: "true" + x-example-python: "True" + schema: + type: boolean + - in: query + name: paymentsOnly + x-snake: payments_only + description: Return cash only basis for the ProfitAndLoss report + example: "false" + x-example-python: "False" + schema: + type: boolean + responses: + "200": + description: Success - return response of type ReportWithRows + content: + application/json: + schema: + $ref: '#/components/schemas/ReportWithRows' + /Reports/TrialBalance: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.reports.read + tags: + - Accounting + operationId: getReportTrialBalance + summary: Retrieves report for trial balance + parameters: + - in: query + name: date + description: The date for the Trial Balance report e.g. 2018-03-31 + example: "2019-10-31" + schema: + type: string + format: date + - in: query + name: paymentsOnly + x-snake: payments_only + description: Return cash only basis for the Trial Balance report + example: "true" + x-example-python: "True" + schema: + type: boolean + responses: + "200": + description: Success - return response of type ReportWithRows + content: + application/json: + schema: + $ref: '#/components/schemas/ReportWithRows' + example: + Id: 0b3ee35e-b97c-4b3c-b7e2-9a465233e329 + Status: OK + ProviderName: Java Public Example + DateTimeUTC: /Date(1556129558740)/ + Reports: + - ReportName: Trial Balance + ReportType: TrialBalance + ReportTitles: + - Trial Balance + - Dev Evangelist - Sid Test 1 (US-2016-06) + - As at 24 April 2019 + ReportDate: 24 April 2019 + UpdatedDateUTC: /Date(1556129558724)/ + Fields: [] + Rows: + - RowType: Header + Cells: + - Value: Account + - Value: Debit + - Value: Credit + - Value: YTD Debit + - Value: YTD Credit + - RowType: Section + Title: Revenue + Rows: + - RowType: Row + Cells: + - Value: Big Expense (002) + Attributes: + - Value: da962997-a8bd-4dff-9616-01cdc199283f + Id: account + - Value: "" + Attributes: + - Value: da962997-a8bd-4dff-9616-01cdc199283f + Id: account + - Value: "0.00" + Attributes: + - Value: da962997-a8bd-4dff-9616-01cdc199283f + Id: account + - Value: "" + Attributes: + - Value: da962997-a8bd-4dff-9616-01cdc199283f + Id: account + - Value: "80.00" + Attributes: + - Value: da962997-a8bd-4dff-9616-01cdc199283f + Id: account + - RowType: Row + Cells: + - Value: Sales (400) + Attributes: + - Value: 02439bca-5fdc-4b62-b281-0bdf9f16fd5b + Id: account + - Value: "" + Attributes: + - Value: 02439bca-5fdc-4b62-b281-0bdf9f16fd5b + Id: account + - Value: "200.00" + Attributes: + - Value: 02439bca-5fdc-4b62-b281-0bdf9f16fd5b + Id: account + - Value: "" + Attributes: + - Value: 02439bca-5fdc-4b62-b281-0bdf9f16fd5b + Id: account + - Value: "1020.22" + Attributes: + - Value: 02439bca-5fdc-4b62-b281-0bdf9f16fd5b + Id: account + - RowType: Row + Cells: + - Value: Sales-35325 (1302) + Attributes: + - Value: 3f50db14-1fe6-450b-bfe8-b2d894f18c62 + Id: account + - Value: "" + Attributes: + - Value: 3f50db14-1fe6-450b-bfe8-b2d894f18c62 + Id: account + - Value: "1000.00" + Attributes: + - Value: 3f50db14-1fe6-450b-bfe8-b2d894f18c62 + Id: account + - Value: "" + Attributes: + - Value: 3f50db14-1fe6-450b-bfe8-b2d894f18c62 + Id: account + - Value: "1000.00" + Attributes: + - Value: 3f50db14-1fe6-450b-bfe8-b2d894f18c62 + Id: account + - RowType: Section + Title: Expenses + Rows: + - RowType: Row + Cells: + - Value: Foobar14043 (123) + Attributes: + - Value: d1602f69-f900-4616-8d34-90af393fa368 + Id: account + - Value: "0.00" + Attributes: + - Value: d1602f69-f900-4616-8d34-90af393fa368 + Id: account + - Value: "" + Attributes: + - Value: d1602f69-f900-4616-8d34-90af393fa368 + Id: account + - Value: "40.00" + Attributes: + - Value: d1602f69-f900-4616-8d34-90af393fa368 + Id: account + - Value: "" + Attributes: + - Value: d1602f69-f900-4616-8d34-90af393fa368 + Id: account + - RowType: Row + Cells: + - Value: MyExp51937 (1231239) + Attributes: + - Value: 90f10e0a-a043-46fe-b87e-630e9a951dae + Id: account + - Value: "0.00" + Attributes: + - Value: 90f10e0a-a043-46fe-b87e-630e9a951dae + Id: account + - Value: "" + Attributes: + - Value: 90f10e0a-a043-46fe-b87e-630e9a951dae + Id: account + - Value: "80.00" + Attributes: + - Value: 90f10e0a-a043-46fe-b87e-630e9a951dae + Id: account + - Value: "" + Attributes: + - Value: 90f10e0a-a043-46fe-b87e-630e9a951dae + Id: account + - RowType: Section + Title: Assets + Rows: + - RowType: Row + Cells: + - Value: Accounts Receivable (120) + Attributes: + - Value: 31ae5bb4-611c-4f89-a369-86e4d56e90b6 + Id: account + - Value: "1190.00" + Attributes: + - Value: 31ae5bb4-611c-4f89-a369-86e4d56e90b6 + Id: account + - Value: "" + Attributes: + - Value: 31ae5bb4-611c-4f89-a369-86e4d56e90b6 + Id: account + - Value: "36555.04" + Attributes: + - Value: 31ae5bb4-611c-4f89-a369-86e4d56e90b6 + Id: account + - Value: "" + Attributes: + - Value: 31ae5bb4-611c-4f89-a369-86e4d56e90b6 + Id: account + - RowType: Row + Cells: + - Value: Business Wells Fargo (088) + Attributes: + - Value: 6f7594f2-f059-4d56-9e67-47ac9733bfe9 + Id: account + - Value: "0.00" + Attributes: + - Value: 6f7594f2-f059-4d56-9e67-47ac9733bfe9 + Id: account + - Value: "" + Attributes: + - Value: 6f7594f2-f059-4d56-9e67-47ac9733bfe9 + Id: account + - Value: "7639.04" + Attributes: + - Value: 6f7594f2-f059-4d56-9e67-47ac9733bfe9 + Id: account + - Value: "" + Attributes: + - Value: 6f7594f2-f059-4d56-9e67-47ac9733bfe9 + Id: account + - RowType: Row + Cells: + - Value: Generic Cash Clearing (8003) + Attributes: + - Value: f4be973a-25fc-48d0-a7df-7f719f239729 + Id: account + - Value: "0.00" + Attributes: + - Value: f4be973a-25fc-48d0-a7df-7f719f239729 + Id: account + - Value: "" + Attributes: + - Value: f4be973a-25fc-48d0-a7df-7f719f239729 + Id: account + - Value: "1443.00" + Attributes: + - Value: f4be973a-25fc-48d0-a7df-7f719f239729 + Id: account + - Value: "" + Attributes: + - Value: f4be973a-25fc-48d0-a7df-7f719f239729 + Id: account + - RowType: Row + Cells: + - Value: Generic Credit Card Clearing (8002) + Attributes: + - Value: a10867ac-0bc4-4aa5-af00-b9e5b207c6c3 + Id: account + - Value: "0.00" + Attributes: + - Value: a10867ac-0bc4-4aa5-af00-b9e5b207c6c3 + Id: account + - Value: "" + Attributes: + - Value: a10867ac-0bc4-4aa5-af00-b9e5b207c6c3 + Id: account + - Value: "" + Attributes: + - Value: a10867ac-0bc4-4aa5-af00-b9e5b207c6c3 + Id: account + - Value: "96.49" + Attributes: + - Value: a10867ac-0bc4-4aa5-af00-b9e5b207c6c3 + Id: account + - RowType: Row + Cells: + - Value: Generic Inventory (1400) + Attributes: + - Value: 7422f1b6-619f-488c-89e1-91bdde20216c + Id: account + - Value: "0.00" + Attributes: + - Value: 7422f1b6-619f-488c-89e1-91bdde20216c + Id: account + - Value: "" + Attributes: + - Value: 7422f1b6-619f-488c-89e1-91bdde20216c + Id: account + - Value: "" + Attributes: + - Value: 7422f1b6-619f-488c-89e1-91bdde20216c + Id: account + - Value: "160.00" + Attributes: + - Value: 7422f1b6-619f-488c-89e1-91bdde20216c + Id: account + - RowType: Row + Cells: + - Value: My Savings (090) + Attributes: + - Value: 7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa + Id: account + - Value: "0.00" + Attributes: + - Value: 7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa + Id: account + - Value: "" + Attributes: + - Value: 7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa + Id: account + - Value: "219.92" + Attributes: + - Value: 7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa + Id: account + - Value: "" + Attributes: + - Value: 7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa + Id: account + - RowType: Row + Cells: + - Value: Payment Wall Clearing Account (8001) + Attributes: + - Value: bc06840c-12c5-4e22-bb57-fef4d64bac10 + Id: account + - Value: "0.00" + Attributes: + - Value: bc06840c-12c5-4e22-bb57-fef4d64bac10 + Id: account + - Value: "" + Attributes: + - Value: bc06840c-12c5-4e22-bb57-fef4d64bac10 + Id: account + - Value: "1.00" + Attributes: + - Value: bc06840c-12c5-4e22-bb57-fef4d64bac10 + Id: account + - Value: "" + Attributes: + - Value: bc06840c-12c5-4e22-bb57-fef4d64bac10 + Id: account + - RowType: Section + Title: Liabilities + Rows: + - RowType: Row + Cells: + - Value: Accounts Payable (200) + Attributes: + - Value: e9132ee7-4dcf-4fad-b76c-86e212af645a + Id: account + - Value: "" + Attributes: + - Value: e9132ee7-4dcf-4fad-b76c-86e212af645a + Id: account + - Value: "0.00" + Attributes: + - Value: e9132ee7-4dcf-4fad-b76c-86e212af645a + Id: account + - Value: "" + Attributes: + - Value: e9132ee7-4dcf-4fad-b76c-86e212af645a + Id: account + - Value: "9223.00" + Attributes: + - Value: e9132ee7-4dcf-4fad-b76c-86e212af645a + Id: account + - RowType: Row + Cells: + - Value: Deferred Revenue (2300) + Attributes: + - Value: f22cd74e-f59d-4f38-a08d-07e14df28c24 + Id: account + - Value: "" + Attributes: + - Value: f22cd74e-f59d-4f38-a08d-07e14df28c24 + Id: account + - Value: "0.00" + Attributes: + - Value: f22cd74e-f59d-4f38-a08d-07e14df28c24 + Id: account + - Value: "" + Attributes: + - Value: f22cd74e-f59d-4f38-a08d-07e14df28c24 + Id: account + - Value: "1854.24" + Attributes: + - Value: f22cd74e-f59d-4f38-a08d-07e14df28c24 + Id: account + - RowType: Row + Cells: + - Value: Rounding (260) + Attributes: + - Value: f0072999-8f7c-4b01-bce9-bd9352f98e02 + Id: account + - Value: "" + Attributes: + - Value: f0072999-8f7c-4b01-bce9-bd9352f98e02 + Id: account + - Value: "0.00" + Attributes: + - Value: f0072999-8f7c-4b01-bce9-bd9352f98e02 + Id: account + - Value: "" + Attributes: + - Value: f0072999-8f7c-4b01-bce9-bd9352f98e02 + Id: account + - Value: "0.01" + Attributes: + - Value: f0072999-8f7c-4b01-bce9-bd9352f98e02 + Id: account + - RowType: Row + Cells: + - Value: Sales Tax (220) + Attributes: + - Value: af0be362-45fe-4730-a8af-634c2fb93f4d + Id: account + - Value: "" + Attributes: + - Value: af0be362-45fe-4730-a8af-634c2fb93f4d + Id: account + - Value: "0.00" + Attributes: + - Value: af0be362-45fe-4730-a8af-634c2fb93f4d + Id: account + - Value: "" + Attributes: + - Value: af0be362-45fe-4730-a8af-634c2fb93f4d + Id: account + - Value: "1578.35" + Attributes: + - Value: af0be362-45fe-4730-a8af-634c2fb93f4d + Id: account + - RowType: Row + Cells: + - Value: Suspense (250) + Attributes: + - Value: 5ec2f302-cd60-4f8b-a915-9229dd45e6fa + Id: account + - Value: "10.00" + Attributes: + - Value: 5ec2f302-cd60-4f8b-a915-9229dd45e6fa + Id: account + - Value: "" + Attributes: + - Value: 5ec2f302-cd60-4f8b-a915-9229dd45e6fa + Id: account + - Value: "41.00" + Attributes: + - Value: 5ec2f302-cd60-4f8b-a915-9229dd45e6fa + Id: account + - Value: "" + Attributes: + - Value: 5ec2f302-cd60-4f8b-a915-9229dd45e6fa + Id: account + - RowType: Row + Cells: + - Value: Unpaid Expense Claims (210) + Attributes: + - Value: 38e6967d-4da1-4a93-85f1-ea3c93b61041 + Id: account + - Value: "" + Attributes: + - Value: 38e6967d-4da1-4a93-85f1-ea3c93b61041 + Id: account + - Value: "0.00" + Attributes: + - Value: 38e6967d-4da1-4a93-85f1-ea3c93b61041 + Id: account + - Value: "" + Attributes: + - Value: 38e6967d-4da1-4a93-85f1-ea3c93b61041 + Id: account + - Value: "135.00" + Attributes: + - Value: 38e6967d-4da1-4a93-85f1-ea3c93b61041 + Id: account + - RowType: Section + Title: Equity + Rows: + - RowType: Row + Cells: + - Value: Retained Earnings (320) + Attributes: + - Value: 6ef53919-b47d-4341-b11a-735a3f8a6515 + Id: account + - Value: "" + Attributes: + - Value: 6ef53919-b47d-4341-b11a-735a3f8a6515 + Id: account + - Value: "" + Id: fromDate + - Value: 12/31/2018 + Id: toDate + - Value: "0.00" + Attributes: + - Value: 6ef53919-b47d-4341-b11a-735a3f8a6515 + Id: account + - Value: "" + Id: fromDate + - Value: 12/31/2018 + Id: toDate + - Value: "" + Attributes: + - Value: 6ef53919-b47d-4341-b11a-735a3f8a6515 + Id: account + - Value: "" + Id: fromDate + - Value: 12/31/2018 + Id: toDate + - Value: "30871.69" + Attributes: + - Value: 6ef53919-b47d-4341-b11a-735a3f8a6515 + Id: account + - Value: "" + Id: fromDate + - Value: 12/31/2018 + Id: toDate + - RowType: Section + Title: "" + Rows: + - RowType: SummaryRow + Cells: + - Value: Total + - Value: "1200.00" + - Value: "1200.00" + - Value: "46019.00" + - Value: "46019.00" + /Setup: + parameters: + - $ref: '#/components/parameters/requiredHeader' + post: + security: + - OAuth2: + - accounting.settings + tags: + - Accounting + operationId: postSetup + summary: Sets the chart of accounts, the conversion date and conversion balances + parameters: + - $ref: '#/components/parameters/idempotencyKey' + x-example: + - account: + is_object: true + key: account + keyPascal: Account + - code: + key: code + keyPascal: Code + default: 123 + object: account + - name: + key: name + keyPascal: Name + default: Business supplies + object: account + - type: + is_last: true + key: type + keyPascal: Type + default: EXPENSE + nonString: true + php: XeroAPI\XeroPHP\Models\Accounting\AccountType::EXPENSE + node: AccountType.EXPENSE + ruby: XeroRuby::Accounting::AccountType::EXPENSE + python: AccountType.EXPENSE + java: com.xero.models.accounting.AccountType.EXPENSE + csharp: AccountType.EXPENSE + object: account + - accounts: + is_list: true + key: accounts + keyPascal: Account + - add_accounts: + is_last: true + is_list_add: true + key: accounts + keyPascal: Accounts + object: account + - conversionDate: + is_object: true + key: conversionDate + keyPascal: ConversionDate + keySnake: conversion_date + - month: + nonString: true + key: month + keyPascal: Month + default: 10 + object: conversionDate + - year: + is_last: true + nonString: true + key: year + keyPascal: Year + default: 2020 + object: conversionDate + - conversionBalances: + is_list: true + key: conversionBalances + keyPascal: ConversionBalances + keySnake: conversion_balances + - Setup: + is_object: true + key: setup + keyPascal: Setup + - set_accounts: + is_variable: true + nonString: true + key: accounts + keyPascal: Accounts + default: accounts + object: setup + - set_conversionDate: + is_variable: true + nonString: true + key: conversionDate + keyPascal: ConversionDate + keySnake: conversion_date + default: conversionDate + python: conversion_date + ruby: conversion_date + object: setup + - set_conversionBalances: + is_last: true + is_variable: true + nonString: true + key: conversionBalances + keyPascal: ConversionBalances + keySnake: conversion_balances + default: conversionBalances + python: conversion_balances + ruby: conversion_balances + object: setup + responses: + "200": + description: Success - returns a summary of the chart of accounts updates + content: + application/json: + schema: + $ref: '#/components/schemas/ImportSummaryObject' + example: + Id: 80dcb65b-4d14-4350-84e6-1438a809244a + Status: OK + ProviderName: Java Public Example + DateTimeUTC: /Date(1604457589645)/ + ImportSummary: + Accounts: + Total: 17 + New: 0 + Updated: 8 + Deleted: 0 + Locked: 0 + System: 9 + Errored: 0 + Present: true + NewOrUpdated: 8 + Organisation: + Present: false + requestBody: + required: true + description: Object including an accounts array, a conversion balances array and a conversion date object in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/Setup' + example: + ConversionDate: {} + ConversionBalances: [] + Accounts: + - Code: "200" + Name: Sales + Type: SALES + ReportingCode: REV.TRA.GOO + - Code: "400" + Name: Advertising + Type: OVERHEADS + ReportingCode: EXP + - Code: "610" + Name: Accounts Receivable + Type: CURRENT + SystemAccount: DEBTORS + ReportingCode: ASS.CUR.REC.TRA + - Code: "800" + Name: Accounts Payable + Type: CURRLIAB + SystemAccount: CREDITORS + ReportingCode: LIA.CUR.PAY + /TaxRates: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.settings + - accounting.settings.read + tags: + - Accounting + operationId: getTaxRates + summary: Retrieves tax rates + parameters: + - in: query + name: where + description: Filter by an any element + example: Status=="ACTIVE" + x-example-csharp: Status==\"ACTIVE\" + x-example-java: Status=="' + TaxRate.StatusEnum.ACTIVE + '" + x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\TaxRate::STATUS_ACTIVE . '" + x-example-ruby: Status==#{XeroRuby::Accounting::TaxRate::ACTIVE} + schema: + type: string + - in: query + name: order + description: Order by an any element + example: Name ASC + schema: + type: string + responses: + "200": + description: Success - return response of type TaxRates array with TaxRates + content: + application/json: + schema: + $ref: '#/components/schemas/TaxRates' + example: + Id: 455d494d-9706-465b-b584-7086ca406b27 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1555086839841)/ + TaxRates: + - Name: 15% GST on Expenses + TaxType: INPUT2 + ReportTaxType: INPUT + CanApplyToAssets: true + CanApplyToEquity: true + CanApplyToExpenses: true + CanApplyToLiabilities: true + CanApplyToRevenue: false + DisplayTaxRate: 15.0000 + EffectiveRate: 15.0000 + Status: ACTIVE + TaxComponents: + - Name: GST + Rate: 15.0000 + IsCompound: false + IsNonRecoverable: false + - Name: 15% GST on Income + TaxType: OUTPUT2 + ReportTaxType: OUTPUT + CanApplyToAssets: true + CanApplyToEquity: true + CanApplyToExpenses: false + CanApplyToLiabilities: true + CanApplyToRevenue: true + DisplayTaxRate: 15.0000 + EffectiveRate: 15.0000 + Status: ACTIVE + TaxComponents: + - Name: GST + Rate: 15.0000 + IsCompound: false + IsNonRecoverable: false + - Name: GST on Imports + TaxType: GSTONIMPORTS + ReportTaxType: GSTONIMPORTS + CanApplyToAssets: false + CanApplyToEquity: false + CanApplyToExpenses: false + CanApplyToLiabilities: true + CanApplyToRevenue: false + DisplayTaxRate: 0.0000 + EffectiveRate: 0.0000 + Status: ACTIVE + TaxComponents: + - Name: GST + Rate: 0.0000 + IsCompound: false + IsNonRecoverable: false + - Name: No GST + TaxType: NONE + ReportTaxType: NONE + CanApplyToAssets: true + CanApplyToEquity: true + CanApplyToExpenses: true + CanApplyToLiabilities: true + CanApplyToRevenue: true + DisplayTaxRate: 0.0000 + EffectiveRate: 0.0000 + Status: ACTIVE + TaxComponents: + - Name: GST + Rate: 0.0000 + IsCompound: false + IsNonRecoverable: false + - Name: Zero Rated + TaxType: ZERORATED + ReportTaxType: OUTPUT + CanApplyToAssets: false + CanApplyToEquity: false + CanApplyToExpenses: false + CanApplyToLiabilities: true + CanApplyToRevenue: true + DisplayTaxRate: 0.0000 + EffectiveRate: 0.0000 + Status: ACTIVE + TaxComponents: + - Name: GST + Rate: 0.0000 + IsCompound: false + IsNonRecoverable: false + put: + security: + - OAuth2: + - accounting.settings + tags: + - Accounting + operationId: createTaxRates + summary: Creates one or more tax rates + parameters: + - $ref: '#/components/parameters/idempotencyKey' + x-hasAccountingValidationError: true + x-example: + - taxComponent: + is_object: true + key: taxComponent + keyPascal: TaxComponent + keySnake: tax_component + - name: + key: name + keyPascal: Name + default: State Tax + object: taxComponent + - rate: + is_last: true + nonString: true + key: rate + keyPascal: Rate + default: 2.25 + is_money: true + object: taxComponent + - taxComponents: + is_list: true + key: taxComponent + keyPascal: TaxComponent + csharp: TaxComponent + - add_taxComponent: + is_last: true + is_list_add: true + key: taxComponents + keyPascal: TaxComponents + keySnake: tax_components + java: TaxComponents + python: tax_component + ruby: tax_component + csharp: TaxComponent + object: taxComponent + - taxRate: + is_object: true + key: taxRate + keyPascal: TaxRate + keySnake: tax_rate + - name: + key: name + keyPascal: Name + default: CA State Tax + object: taxRate + - set_taxComponents: + is_variable: true + nonString: true + key: taxComponents + keyPascal: TaxComponents + object: taxRate + default: taxComponents + - taxRates: + is_object: true + key: taxRates + keyPascal: TaxRates + - add_taxRate: + is_last: true + is_array_add: true + key: taxRates + keyPascal: TaxRates + keySnake: tax_rates + java: TaxRates + python: tax_rate + ruby: tax_rate + csharp: TaxRate + object: taxRate + responses: + "200": + description: Success - return response of type TaxRates array newly created TaxRate + content: + application/json: + schema: + $ref: '#/components/schemas/TaxRates' + example: + Id: 9d2c5e56-fab4-450b-a5ff-d47409508eab + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1555086839080)/ + TaxRates: + - Name: SDKTax29067 + TaxType: TAX002 + ReportTaxType: INPUT + CanApplyToAssets: true + CanApplyToEquity: true + CanApplyToExpenses: true + CanApplyToLiabilities: true + CanApplyToRevenue: false + DisplayTaxRate: 2.2500 + EffectiveRate: 2.2500 + Status: ACTIVE + TaxComponents: + - Name: State Tax + Rate: 2.2500 + IsCompound: false + IsNonRecoverable: false + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: TaxRates array with TaxRate object in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/TaxRates' + example: + TaxRates: + - Name: CA State Tax + TaxComponents: + - Name: State Tax + Rate: 2.25 + post: + security: + - OAuth2: + - accounting.settings + tags: + - Accounting + operationId: updateTaxRate + summary: Updates tax rates + parameters: + - $ref: '#/components/parameters/idempotencyKey' + x-hasAccountingValidationError: true + x-example: + - taxComponent: + is_object: true + key: taxComponent + keyPascal: TaxComponent + keySnake: tax_component + - name: + key: name + keyPascal: Name + default: State Tax + object: taxComponent + - rate: + is_last: true + nonString: true + key: rate + keyPascal: Rate + default: 2.25 + is_money: true + object: taxComponent + - taxComponents: + is_list: true + key: taxComponents + keyPascal: TaxComponents + csharp: TaxComponent + - add_taxComponent: + is_last: true + is_list_add: true + key: taxComponents + keyPascal: TaxComponents + keySnake: tax_components + java: TaxComponents + python: tax_component + ruby: tax_component + csharp: TaxComponent + object: taxComponent + - taxRate: + is_object: true + key: taxRate + keyPascal: TaxRate + keySnake: tax_rate + - name: + key: name + keyPascal: Name + default: CA State Tax + object: taxRate + - set_taxComponents: + is_variable: true + nonString: true + key: taxComponents + keyPascal: TaxComponents + object: taxRate + default: taxComponents + - taxRates: + is_object: true + key: taxRates + keyPascal: TaxRates + - add_taxRate: + is_last: true + is_array_add: true + key: taxRates + keyPascal: TaxRates + keySnake: tax_rates + java: TaxRates + python: tax_rate + ruby: tax_rate + csharp: TaxRate + object: taxRate + responses: + "200": + description: Success - return response of type TaxRates array updated TaxRate + content: + application/json: + schema: + $ref: '#/components/schemas/TaxRates' + example: + Id: 12f4c453-2e25-41aa-a52f-6faaf6c05832 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1555086839658)/ + TaxRates: + - Name: SDKTax29067 + TaxType: TAX002 + ReportTaxType: INPUT + CanApplyToAssets: true + CanApplyToEquity: true + CanApplyToExpenses: true + CanApplyToLiabilities: true + CanApplyToRevenue: false + DisplayTaxRate: 2.2500 + EffectiveRate: 2.2500 + Status: DELETED + TaxComponents: + - Name: State Tax + Rate: 2.2500 + IsCompound: false + IsNonRecoverable: false + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TaxRates' + example: + TaxRates: + - Name: State Tax NY + TaxComponents: + - Name: State Tax + Rate: 2.25 + Status: DELETED + ReportTaxType: INPUT + /TaxRates/{TaxType}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.settings + - accounting.settings.read + tags: + - Accounting + operationId: getTaxRateByTaxType + summary: Retrieves a specific tax rate according to given TaxType code + parameters: + - $ref: '#/components/parameters/TaxType' + responses: + "200": + description: Success - return response of type TaxRates array with one TaxRate + content: + application/json: + schema: + $ref: '#/components/schemas/TaxRates' + example: + Id: 455d494d-9706-465b-b584-7086ca406b27 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1550797359081)/ + TaxRates: + - Name: 15% GST on Expenses + TaxType: INPUT2 + ReportTaxType: INPUT + CanApplyToAssets: true + CanApplyToEquity: true + CanApplyToExpenses: true + CanApplyToLiabilities: true + CanApplyToRevenue: false + DisplayTaxRate: 15.0000 + EffectiveRate: 15.0000 + Status: ACTIVE + TaxComponents: + - Name: GST + Rate: 15.0000 + IsCompound: false + IsNonRecoverable: false + /TrackingCategories: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.settings + - accounting.settings.read + tags: + - Accounting + operationId: getTrackingCategories + summary: Retrieves tracking categories and options + parameters: + - in: query + name: where + description: Filter by an any element + example: Status=="ACTIVE" + x-example-csharp: Status==\"ACTIVE\" + x-example-java: Status=="' + TrackingCategory.StatusEnum.ACTIVE + '" + x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\TrackingCategory::STATUS_ACTIVE . '" + x-example-ruby: Status==#{XeroRuby::Accounting::TrackingCategory::ACTIVE} + schema: + type: string + - in: query + name: order + description: Order by an any element + example: Name ASC + schema: + type: string + - in: query + name: includeArchived + x-snake: include_archived + description: e.g. includeArchived=true - Categories and options with a status of ARCHIVED will be included in the response + example: true + x-example-python: "True" + schema: + type: boolean + responses: + "200": + description: Success - return response of type TrackingCategories array of TrackingCategory + content: + application/json: + schema: + $ref: '#/components/schemas/TrackingCategories' + example: + Id: cec55068-8061-48e5-ac83-c77e7c54cf3d + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1555085855047)/ + TrackingCategories: + - Name: BarFoo + Status: ACTIVE + TrackingCategoryID: 22f10184-0deb-44ae-a312-b1f6ea70e51f + Options: [] + - Name: HelloWorld + Status: ACTIVE + TrackingCategoryID: 0c9fce3e-a111-4d99-803a-62cf3f40e633 + Options: [] + put: + security: + - OAuth2: + - accounting.settings + tags: + - Accounting + operationId: createTrackingCategory + summary: Create tracking categories + parameters: + - $ref: '#/components/parameters/idempotencyKey' + x-hasAccountingValidationError: true + x-example: + - trackingCategory: + is_object: true + key: trackingCategory + keyPascal: TrackingCategory + - name: + is_last: true + key: name + keyPascal: Name + default: Foobar + object: trackingCategory + responses: + "200": + description: Success - return response of type TrackingCategories array of newly created TrackingCategory + content: + application/json: + schema: + $ref: '#/components/schemas/TrackingCategories' + example: + Id: 1a9f8e03-9916-4a42-93a9-e8fa4902d49c + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1555085855988)/ + TrackingCategories: + - Name: FooBar + Status: ACTIVE + TrackingCategoryID: b1df776b-b093-4730-b6ea-590cca40e723 + Options: [] + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: TrackingCategory object in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/TrackingCategory' + example: + name: FooBar + /TrackingCategories/{TrackingCategoryID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.settings + - accounting.settings.read + tags: + - Accounting + operationId: getTrackingCategory + summary: Retrieves specific tracking categories and options using a unique tracking category Id + parameters: + - $ref: '#/components/parameters/TrackingCategoryID' + responses: + "200": + description: Success - return response of type TrackingCategories array of specified TrackingCategory + content: + application/json: + schema: + $ref: '#/components/schemas/TrackingCategories' + example: + Id: b75b8862-39c0-45a8-82b8-30ab4831996b + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1555085855442)/ + TrackingCategories: + - Name: Foo41157 + Status: DELETED + TrackingCategoryID: 22f10184-0deb-44ae-a312-b1f6ea70e51f + Options: [] + post: + security: + - OAuth2: + - accounting.settings + tags: + - Accounting + operationId: updateTrackingCategory + summary: Updates a specific tracking category + x-hasAccountingValidationError: true + x-example: + - trackingCategory: + is_object: true + key: trackingCategory + keyPascal: TrackingCategory + - name: + is_last: true + key: name + keyPascal: Name + default: Foobar + object: trackingCategory + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/TrackingCategoryID' + responses: + "200": + description: Success - return response of type TrackingCategories array of updated TrackingCategory + content: + application/json: + schema: + $ref: '#/components/schemas/TrackingCategories' + example: + Id: 55438774-f87d-4731-b586-799cf0f914ed + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1555085856275)/ + TrackingCategories: + - Name: BarFoo + Status: ACTIVE + TrackingCategoryID: b1df776b-b093-4730-b6ea-590cca40e723 + Options: [] + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TrackingCategory' + example: + Name: Avengers + delete: + security: + - OAuth2: + - accounting.settings + tags: + - Accounting + operationId: deleteTrackingCategory + summary: Deletes a specific tracking category + parameters: + - $ref: '#/components/parameters/TrackingCategoryID' + responses: + "200": + description: Success - return response of type TrackingCategories array of deleted TrackingCategory + content: + application/json: + schema: + $ref: '#/components/schemas/TrackingCategories' + example: + Id: ca7f8145-c8a5-4366-a2fb-784edc0cfbb7 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1555086457922)/ + TrackingCategories: + - Name: Foo46189 + Status: DELETED + TrackingCategoryID: 0390bdfd-94f2-49d6-b7a0-4a38c46ebf03 + Options: [] + "400": + $ref: '#/components/responses/400Error' + /TrackingCategories/{TrackingCategoryID}/Options: + parameters: + - $ref: '#/components/parameters/requiredHeader' + put: + security: + - OAuth2: + - accounting.settings + tags: + - Accounting + operationId: createTrackingOptions + summary: Creates options for a specific tracking category + x-hasAccountingValidationError: true + x-example: + - trackingOption: + is_object: true + key: trackingOption + keyPascal: TrackingOption + - name: + is_last: true + key: name + keyPascal: Name + default: Foobar + object: trackingOption + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/TrackingCategoryID' + responses: + "200": + description: Success - return response of type TrackingOptions array of options for a specified category + content: + application/json: + schema: + $ref: '#/components/schemas/TrackingOptions' + example: + Id: 923be702-d124-4f5c-a568-760906538d8e + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1555085857061)/ + Options: + - TrackingOptionID: 34669548-b989-487a-979f-0787d04568a2 + Name: Bar40423 + Status: ACTIVE + HasValidationErrors: false + IsDeleted: false + IsArchived: false + IsActive: true + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + description: TrackingOption object in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/TrackingOption' + example: + name: ' Bar' + /TrackingCategories/{TrackingCategoryID}/Options/{TrackingOptionID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + post: + security: + - OAuth2: + - accounting.settings + tags: + - Accounting + operationId: updateTrackingOptions + summary: Updates a specific option for a specific tracking category + x-hasAccountingValidationError: true + x-example: + - trackingOption: + is_object: true + key: trackingOption + keyPascal: TrackingOption + - name: + is_last: true + key: name + keyPascal: Name + default: Foobar + object: trackingOption + parameters: + - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/TrackingCategoryID' + - $ref: '#/components/parameters/TrackingOptionID' + responses: + "200": + description: Success - return response of type TrackingOptions array of options for a specified category + content: + application/json: + schema: + $ref: '#/components/schemas/TrackingOptions' + example: + Id: 923be702-d124-4f5c-a568-760906538d8e + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1555085857061)/ + Options: + - TrackingOptionID: 34669548-b989-487a-979f-0787d04568a2 + Name: Bar40423 + Status: ACTIVE + HasValidationErrors: false + IsDeleted: false + IsArchived: false + IsActive: true + "400": + $ref: '#/components/responses/400Error' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TrackingOption' + example: + name: Vision + delete: + security: + - OAuth2: + - accounting.settings + tags: + - Accounting + operationId: deleteTrackingOptions + summary: Deletes a specific option for a specific tracking category + parameters: + - $ref: '#/components/parameters/TrackingCategoryID' + - $ref: '#/components/parameters/TrackingOptionID' + responses: + "200": + description: Success - return response of type TrackingOptions array of remaining options for a specified category + content: + application/json: + schema: + $ref: '#/components/schemas/TrackingOptions' + example: + Id: d985866e-0831-418f-a07c-4d843ff66d25 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1555085857338)/ + Options: + - TrackingOptionID: 34669548-b989-487a-979f-0787d04568a2 + Name: Bar40423 + Status: DELETED + HasValidationErrors: false + IsDeleted: true + IsArchived: false + IsActive: false + "400": + $ref: '#/components/responses/400Error' + /Users: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.settings + - accounting.settings.read + tags: + - Accounting + operationId: getUsers + summary: Retrieves users + parameters: + - $ref: '#/components/parameters/ifModifiedSince' + - in: query + name: where + description: Filter by an any element + example: IsSubscriber==true + schema: + type: string + - in: query + name: order + description: Order by an any element + example: LastName ASC + schema: + type: string + responses: + "200": + description: Success - return response of type Users array of all User + content: + application/json: + schema: + $ref: '#/components/schemas/Users' + example: + Id: 17932a4e-4948-4d50-8672-4ef0e1dd90c5 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1553880796393)/ + Users: + - UserID: 3c37ef1d-cd49-4589-9787-3c418ed8b6ac + EmailAddress: test@email.com + FirstName: Test + LastName: Xero + UpdatedDateUTC: /Date(1508523261613+0000)/ + IsSubscriber: false + OrganisationRole: FINANCIALADVISER + - UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273 + EmailAddress: api@xero.com + FirstName: 'API ' + LastName: Team + UpdatedDateUTC: /Date(1511957179217+0000)/ + IsSubscriber: true + OrganisationRole: FINANCIALADVISER + /Users/{UserID}: + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: + - accounting.settings + - accounting.settings.read + tags: + - Accounting + operationId: getUser + summary: Retrieves a specific user + parameters: + - $ref: '#/components/parameters/UserID' + responses: + "200": + description: Success - return response of type Users array of specified User + content: + application/json: + schema: + $ref: '#/components/schemas/Users' + example: + Id: 51250ce8-1b35-4ba4-b404-dc94ff75bd87 + Status: OK + ProviderName: Provider Name Example + DateTimeUTC: /Date(1553880796732)/ + Users: + - UserID: 3c37ef1d-cd49-4589-9787-3c418ed8b6ac + EmailAddress: test@email.com + FirstName: Test + LastName: Xero + UpdatedDateUTC: /Date(1508523261613+0000)/ + IsSubscriber: false + OrganisationRole: FINANCIALADVISER +components: + securitySchemes: + OAuth2: + type: oauth2 + description: For more information + flows: + authorizationCode: + authorizationUrl: https://login.xero.com/identity/connect/authorize + tokenUrl: https://identity.xero.com/connect/token + scopes: + email: Grant read-only access to your email + openid: Grant read-only access to your open id + profile: your profile information + accounting.attachments: Grant read-write access to attachments + accounting.attachments.read: Grant read-only access to attachments + accounting.contacts: Grant read-write access to contacts and contact groups + accounting.contacts.read: Grant read-only access to contacts and contact groups + accounting.journals.read: Grant read-only access to journals + accounting.reports.read: Grant read-only access to accounting reports + accounting.reports.tenninetynine.read: Grant read-only access to 1099 reports + accounting.settings: Grant read-write access to organisation and account settings + accounting.settings.read: Grant read-only access to organisation and account settings + accounting.transactions: Grant read-write access to bank transactions, credit notes, invoices, repeating invoices + accounting.transactions.read: Grant read-only access to invoices + paymentservices: Grant read-write access to payment services + requestBodies: + historyRecords: + required: true + description: HistoryRecords containing an array of HistoryRecord objects in body of request + content: + application/json: + schema: + $ref: '#/components/schemas/HistoryRecords' + example: + HistoryRecords: + - Details: Hello World + parameters: + requiredHeader: + in: header + name: xero-tenant-id + x-snake: xero_tenant_id + description: Xero identifier for Tenant + example: YOUR_XERO_TENANT_ID + schema: + type: string + required: true + summarizeErrors: + in: query + name: summarizeErrors + x-snake: summarize_errors + description: If false return 200 OK and mix of successfully created objects and any with validation errors + example: true + x-example-python: "True" + schema: + type: boolean + default: false + unitdp: + in: query + name: unitdp + description: e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + example: 4 + schema: + type: integer + ifModifiedSince: + in: header + name: If-Modified-Since + x-snake: if_modified_since + description: Only records created or modified since this timestamp will be returned + example: "2020-02-06T12:17:43.202-08:00" + schema: + type: string + format: date-time + idempotencyKey: + in: header + name: Idempotency-Key + x-snake: idempotency_key + description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. + example: KEY_VALUE + schema: + type: string + includeOnline: + in: query + name: IncludeOnline + x-snake: include_online + description: Allows an attachment to be seen by the end customer within their online invoice + example: true + x-example-python: "True" + schema: + type: boolean + default: false + summaryOnly: + in: query + name: summaryOnly + x-snake: summary_only + description: Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. + example: true + x-example-python: "True" + schema: + type: boolean + default: false + searchTerm: + in: query + name: searchTerm + x-snake: search_term + description: Search parameter that performs a case-insensitive text search across the fields e.g. InvoiceNumber, Reference. + example: SearchTerm=REF12 + x-example-python: "True" + schema: + type: string + FromDate: + in: query + name: fromDate + x-snake: from_date + description: filter by the from date of the report e.g. 2021-02-01 + example: "2019-10-31" + schema: + type: string + format: date + ToDate: + in: query + name: toDate + x-snake: to_date + description: filter by the to date of the report e.g. 2021-02-28 + example: "2019-10-31" + schema: + type: string + format: date + pageSize: + in: query + name: pageSize + description: Number of records to retrieve per page + example: 100 + schema: + type: integer + AccountID: + required: true + in: path + name: AccountID + x-snake: account_id + description: Unique identifier for Account object + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + AllocationID: + required: true + in: path + name: AllocationID + x-snake: allocation_id + description: Unique identifier for Allocation object + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + AttachmentID: + required: true + in: path + name: AttachmentID + x-snake: attachment_id + description: Unique identifier for Attachment object + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + ContentType: + required: true + in: header + name: contentType + x-snake: content_type + description: The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf + example: image/jpg + schema: + type: string + FileName: + required: true + in: path + name: FileName + x-snake: file_name + description: Name of the attachment + example: xero-dev.jpg + schema: + type: string + BatchPaymentID: + required: true + in: path + name: BatchPaymentID + x-snake: batch_payment_id + description: Unique identifier for BatchPayment + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + BankTransactionID: + required: true + in: path + name: BankTransactionID + x-snake: bank_transaction_id + description: Xero generated unique identifier for a bank transaction + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + BankTransferID: + required: true + in: path + name: BankTransferID + x-snake: bank_transfer_id + description: Xero generated unique identifier for a bank transfer + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + BrandingThemeID: + required: true + in: path + name: BrandingThemeID + x-snake: branding_theme_id + description: Unique identifier for a Branding Theme + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + BudgetID: + required: true + in: path + name: BudgetID + x-snake: budget_id + description: Unique identifier for Budgets + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + ContactID: + required: true + in: path + name: ContactID + x-snake: contact_id + description: Unique identifier for a Contact + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + ContactGroupID: + required: true + in: path + name: ContactGroupID + x-snake: contact_group_id + description: Unique identifier for a Contact Group + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + CreditNoteID: + required: true + in: path + name: CreditNoteID + x-snake: credit_note_id + description: Unique identifier for a Credit Note + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + EmployeeID: + required: true + in: path + name: EmployeeID + x-snake: employee_id + description: Unique identifier for a Employee + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + ExpenseClaimID: + required: true + in: path + name: ExpenseClaimID + x-snake: expense_claim_id + description: Unique identifier for a ExpenseClaim + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + InvoiceID: + required: true + in: path + name: InvoiceID + x-snake: invoice_id + description: Unique identifier for an Invoice + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + ItemID: + required: true + in: path + name: ItemID + x-snake: item_id + description: Unique identifier for an Item + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + JournalID: + required: true + in: path + name: JournalID + x-snake: journal_id + description: Unique identifier for a Journal + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + JournalNumber: + required: true + in: path + name: JournalNumber + x-snake: journal_number + description: Number of a Journal + example: 1000 + schema: + type: integer + LinkedTransactionID: + required: true + in: path + name: LinkedTransactionID + x-snake: linked_transaction_id + description: Unique identifier for a LinkedTransaction + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + ManualJournalID: + required: true + in: path + name: ManualJournalID + x-snake: manual_journal_id + description: Unique identifier for a ManualJournal + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + OrganisationID: + required: true + in: path + name: OrganisationID + x-snake: organisation_id + description: The unique Xero identifier for an organisation + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + OverpaymentID: + required: true + in: path + name: OverpaymentID + x-snake: overpayment_id + description: Unique identifier for a Overpayment + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + PaymentID: + required: true + in: path + name: PaymentID + x-snake: payment_id + description: Unique identifier for a Payment + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + PrepaymentID: + required: true + in: path + name: PrepaymentID + x-snake: prepayment_id + description: Unique identifier for a PrePayment + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + PurchaseOrderID: + required: true + in: path + name: PurchaseOrderID + x-snake: purchase_order_id + description: Unique identifier for an Purchase Order + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + QuoteID: + required: true + in: path + name: QuoteID + x-snake: quote_id + description: Unique identifier for an Quote + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + ReceiptID: + required: true + in: path + name: ReceiptID + x-snake: receipt_id + description: Unique identifier for a Receipt + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + RepeatingInvoiceID: + required: true + in: path + name: RepeatingInvoiceID + x-snake: repeating_invoice_id + description: Unique identifier for a Repeating Invoice + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + TrackingCategoryID: + required: true + in: path + name: TrackingCategoryID + x-snake: tracking_category_id + description: Unique identifier for a TrackingCategory + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + TrackingOptionID: + required: true + in: path + name: TrackingOptionID + x-snake: tracking_option_id + description: Unique identifier for a Tracking Option + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + UserID: + required: true + in: path + name: UserID + x-snake: user_id + description: Unique identifier for a User + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + format: uuid + TaxType: + required: true + in: path + name: TaxType + description: A valid TaxType code + example: INPUT2 + schema: + type: string + responses: + 400Error: + description: A failed request due to validation error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + HistoryRecordCreated: + description: Success - return response of type HistoryRecords array of HistoryRecord objects + content: + application/json: + schema: + $ref: '#/components/schemas/HistoryRecords' + example: + Id: d7525479-3392-44c0-bb37-ff4a0b5df5bd + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1550899400362)/ + HistoryRecords: + - DateUTCString: 2019-02-23T05:23:20 + DateUTC: /Date(1550899400362)/ + Details: Hello World + ValidationErrors: [] + HistoryRetrieved: + description: Success - return response of HistoryRecords array of 0 to N HistoryRecord + content: + application/json: + schema: + $ref: '#/components/schemas/HistoryRecords' + example: + Id: cd54cc7b-b721-4207-b11d-7d13c7902f91 + Status: OK + ProviderName: Xero API Partner + DateTimeUTC: /Date(1551311321819)/ + HistoryRecords: + - Changes: Attached a file + DateUTCString: 2018-11-08T15:01:21 + DateUTC: /Date(1541689281470+0000)/ + User: System Generated + Details: Attached the file sample2.jpg through the Xero API using Xero API Partner + - Changes: Credit Applied + DateUTCString: 2016-10-17T20:46:01 + DateUTC: /Date(1476737161173+0000)/ + User: System Generated + Details: Bank transfer from Business Wells Fargo to My Savings on November 12, 2016 for 20.00. + schemas: + AddressForOrganisation: + externalDocs: + url: http://developer.xero.com/documentation/api/types + properties: + AddressType: + description: define the type of address + type: string + enum: + - POBOX + - STREET + - DELIVERY + AddressLine1: + description: max length = 500 + maxLength: 500 + type: string + AddressLine2: + description: max length = 500 + maxLength: 500 + type: string + AddressLine3: + description: max length = 500 + maxLength: 500 + type: string + AddressLine4: + description: max length = 500 + maxLength: 500 + type: string + City: + description: max length = 255 + maxLength: 255 + type: string + Region: + description: max length = 255 + maxLength: 255 + type: string + PostalCode: + description: max length = 50 + maxLength: 50 + type: string + Country: + description: max length = 50, [A-Z], [a-z] only + maxLength: 50 + type: string + AttentionTo: + description: max length = 255 + maxLength: 255 + type: string + type: object + Address: + externalDocs: + url: http://developer.xero.com/documentation/api/types + properties: + AddressType: + description: define the type of address + type: string + enum: + - POBOX + - STREET + AddressLine1: + description: max length = 500 + maxLength: 500 + type: string + AddressLine2: + description: max length = 500 + maxLength: 500 + type: string + AddressLine3: + description: max length = 500 + maxLength: 500 + type: string + AddressLine4: + description: max length = 500 + maxLength: 500 + type: string + City: + description: max length = 255 + maxLength: 255 + type: string + Region: + description: max length = 255 + maxLength: 255 + type: string + PostalCode: + description: max length = 50 + maxLength: 50 + type: string + Country: + description: max length = 50, [A-Z], [a-z] only + maxLength: 50 + type: string + AttentionTo: + description: max length = 255 + maxLength: 255 + type: string + type: object + Phone: + externalDocs: + url: http://developer.xero.com/documentation/api/types + properties: + PhoneType: + type: string + enum: + - DEFAULT + - DDI + - MOBILE + - FAX + - OFFICE + PhoneNumber: + description: max length = 50 + maxLength: 50 + type: string + PhoneAreaCode: + description: max length = 10 + maxLength: 10 + type: string + PhoneCountryCode: + description: max length = 20 + maxLength: 20 + type: string + type: object + Accounts: + type: object + x-objectArrayKey: accounts + properties: + Accounts: + type: array + items: + $ref: '#/components/schemas/Account' + Account: + type: object + externalDocs: + url: http://developer.xero.com/documentation/api/accounts/ + properties: + Code: + description: Customer defined alpha numeric account code e.g 200 or SALES (max length = 10) + type: string + example: 4400 + Name: + description: Name of account (max length = 150) + maxLength: 150 + type: string + example: Food Sales + AccountID: + description: The Xero identifier for an account – specified as a string following the endpoint name e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9 + type: string + format: uuid + example: 00000000-0000-0000-0000-000000000000 + Type: + $ref: '#/components/schemas/AccountType' + type: string + BankAccountNumber: + description: For bank accounts only (Account Type BANK) + type: string + Status: + description: Accounts with a status of ACTIVE can be updated to ARCHIVED. See Account Status Codes + type: string + enum: + - ACTIVE + - ARCHIVED + - DELETED + Description: + description: Description of the Account. Valid for all types of accounts except bank accounts (max length = 4000) + type: string + BankAccountType: + description: For bank accounts only. See Bank Account types + type: string + enum: + - BANK + - CREDITCARD + - PAYPAL + - NONE + - "" + CurrencyCode: + $ref: '#/components/schemas/CurrencyCode' + type: string + TaxType: + description: The tax type from taxRates + type: string + EnablePaymentsToAccount: + description: Boolean – describes whether account can have payments applied to it + type: boolean + ShowInExpenseClaims: + description: Boolean – describes whether account code is available for use with expense claims + type: boolean + Class: + description: See Account Class Types + readOnly: true + type: string + enum: + - ASSET + - EQUITY + - EXPENSE + - LIABILITY + - REVENUE + SystemAccount: + description: If this is a system account then this element is returned. See System Account types. Note that non-system accounts may have this element set as either “” or null. + readOnly: true + type: string + enum: + - DEBTORS + - CREDITORS + - BANKCURRENCYGAIN + - GST + - GSTONIMPORTS + - HISTORICAL + - REALISEDCURRENCYGAIN + - RETAINEDEARNINGS + - ROUNDING + - TRACKINGTRANSFERS + - UNPAIDEXPCLM + - UNREALISEDCURRENCYGAIN + - WAGEPAYABLES + - CISASSETS + - CISASSET + - CISLABOUR + - CISLABOUREXPENSE + - CISLABOURINCOME + - CISLIABILITY + - CISMATERIALS + - "" + ReportingCode: + description: Shown if set + type: string + ReportingCodeName: + description: Shown if set + readOnly: true + type: string + HasAttachments: + description: boolean to indicate if an account has an attachment (read only) + readOnly: true + type: boolean + default: "false" + example: "false" + UpdatedDateUTC: + description: Last modified date UTC format + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + AddToWatchlist: + description: Boolean – describes whether the account is shown in the watchlist widget on the dashboard + type: boolean + ValidationErrors: + description: Displays array of validation error messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + AccountType: + description: See Account Types + type: string + enum: + - BANK + - CURRENT + - CURRLIAB + - DEPRECIATN + - DIRECTCOSTS + - EQUITY + - EXPENSE + - FIXED + - INVENTORY + - LIABILITY + - NONCURRENT + - OTHERINCOME + - OVERHEADS + - PREPAYMENT + - REVENUE + - SALES + - TERMLIAB + - PAYG + Attachments: + type: object + x-objectArrayKey: attachments + properties: + Attachments: + type: array + items: + $ref: '#/components/schemas/Attachment' + Attachment: + type: object + externalDocs: + url: http://developer.xero.com/documentation/api/attachments/ + properties: + AttachmentID: + description: Unique ID for the file + type: string + format: uuid + example: 00000000-0000-0000-0000-000000000000 + FileName: + description: Name of the file + type: string + example: xero-dev.jpg + Url: + description: URL to the file on xero.com + type: string + example: https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg + MimeType: + description: Type of file + type: string + example: image/jpg + ContentLength: + description: Length of the file content + type: integer + IncludeOnline: + description: Include the file with the online invoice + type: boolean + BankTransactions: + type: object + x-objectArrayKey: bank_transactions + properties: + pagination: + $ref: '#/components/schemas/Pagination' + Warnings: + description: Displays array of warning messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + BankTransactions: + type: array + items: + $ref: '#/components/schemas/BankTransaction' + BankTransaction: + externalDocs: + url: http://developer.xero.com/documentation/api/banktransactions/ + properties: + Type: + description: See Bank Transaction Types + type: string + enum: + - RECEIVE + - RECEIVE-OVERPAYMENT + - RECEIVE-PREPAYMENT + - SPEND + - SPEND-OVERPAYMENT + - SPEND-PREPAYMENT + - RECEIVE-TRANSFER + - SPEND-TRANSFER + Contact: + $ref: '#/components/schemas/Contact' + LineItems: + description: See LineItems + type: array + items: + $ref: '#/components/schemas/LineItem' + BankAccount: + $ref: '#/components/schemas/Account' + IsReconciled: + description: Boolean to show if transaction is reconciled + type: boolean + Date: + description: Date of transaction – YYYY-MM-DD + type: string + x-is-msdate: true + Reference: + description: Reference for the transaction. Only supported for SPEND and RECEIVE transactions. + type: string + CurrencyCode: + $ref: '#/components/schemas/CurrencyCode' + type: string + CurrencyRate: + description: Exchange rate to base currency when money is spent or received. e.g.0.7500 Only used for bank transactions in non base currency. If this isn’t specified for non base currency accounts then either the user-defined rate (preference) or the XE.com day rate will be used. Setting currency is only supported on overpayments. + type: number + format: double + x-is-money: true + Url: + description: URL link to a source document – shown as “Go to App Name” + type: string + Status: + description: See Bank Transaction Status Codes + type: string + enum: + - AUTHORISED + - DELETED + - VOIDED + LineAmountTypes: + $ref: '#/components/schemas/LineAmountTypes' + type: string + SubTotal: + description: Total of bank transaction excluding taxes + type: number + format: double + x-is-money: true + TotalTax: + description: Total tax on bank transaction + type: number + format: double + x-is-money: true + Total: + description: Total of bank transaction tax inclusive + type: number + format: double + x-is-money: true + BankTransactionID: + description: Xero generated unique identifier for bank transaction + type: string + format: uuid + example: 00000000-0000-0000-0000-000000000000 + PrepaymentID: + description: Xero generated unique identifier for a Prepayment. This will be returned on BankTransactions with a Type of SPEND-PREPAYMENT or RECEIVE-PREPAYMENT + readOnly: true + type: string + format: uuid + example: 00000000-0000-0000-0000-000000000000 + OverpaymentID: + description: Xero generated unique identifier for an Overpayment. This will be returned on BankTransactions with a Type of SPEND-OVERPAYMENT or RECEIVE-OVERPAYMENT + readOnly: true + type: string + format: uuid + example: 00000000-0000-0000-0000-000000000000 + UpdatedDateUTC: + description: Last modified date UTC format + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + HasAttachments: + description: Boolean to indicate if a bank transaction has an attachment + readOnly: true + type: boolean + default: "false" + example: "false" + StatusAttributeString: + description: A string to indicate if a invoice status + type: string + ValidationErrors: + description: Displays array of validation error messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + required: + - Type + - LineItems + - BankAccount + type: object + LineAmountTypes: + description: Line amounts are exclusive of tax by default if you don’t specify this element. See Line Amount Types + type: string + enum: + - Exclusive + - Inclusive + - NoTax + LineItem: + externalDocs: + url: https://developer.xero.com/documentation/api/invoices#post + properties: + LineItemID: + description: LineItem unique ID + type: string + format: uuid + example: 00000000-0000-0000-0000-000000000000 + Description: + description: Description needs to be at least 1 char long. A line item with just a description (i.e no unit amount or quantity) can be created by specifying just a element that contains at least 1 character + type: string + Quantity: + description: LineItem Quantity + type: number + format: double + x-is-money: true + UnitAmount: + description: LineItem Unit Amount + type: number + format: double + x-is-money: true + ItemCode: + description: See Items + type: string + AccountCode: + description: See Accounts + type: string + AccountID: + description: The associated account ID related to this line item + type: string + format: uuid + example: 00000000-0000-0000-0000-000000000000 + TaxType: + description: The tax type from TaxRates + type: string + TaxAmount: + description: The tax amount is auto calculated as a percentage of the line amount (see below) based on the tax rate. This value can be overriden if the calculated is not correct. + type: number + format: double + x-is-money: true + Item: + $ref: '#/components/schemas/LineItemItem' + LineAmount: + description: If you wish to omit either the Quantity or UnitAmount you can provide a LineAmount and Xero will calculate the missing amount for you. The line amount reflects the discounted price if either a DiscountRate or DiscountAmount has been used i.e. LineAmount = Quantity * Unit Amount * ((100 - DiscountRate)/100) or LineAmount = (Quantity * UnitAmount) - DiscountAmount + type: number + format: double + x-is-money: true + Tracking: + description: Optional Tracking Category – see Tracking. Any LineItem can have a maximum of 2 elements. + type: array + items: + $ref: '#/components/schemas/LineItemTracking' + DiscountRate: + description: Percentage discount being applied to a line item (only supported on ACCREC invoices – ACC PAY invoices and credit notes in Xero do not support discounts + type: number + format: double + x-is-money: true + DiscountAmount: + description: Discount amount being applied to a line item. Only supported on ACCREC invoices and quotes. ACCPAY invoices and credit notes in Xero do not support discounts. + type: number + format: double + x-is-money: true + RepeatingInvoiceID: + description: The Xero identifier for a Repeating Invoice + example: 00000000-0000-0000-0000-000000000000 + type: string + format: uuid + Taxability: + description: The type of taxability + type: string + enum: + - TAXABLE + - NON_TAXABLE + - EXEMPT + - PART_TAXABLE + - NOT_APPLICABLE + SalesTaxCodeId: + description: The ID of the sales tax code + type: number + TaxBreakdown: + description: An array of tax components defined for this line item + type: array + items: + $ref: '#/components/schemas/TaxBreakdownComponent' + type: object + LineItemItem: + properties: + Code: + description: User defined item code (max length = 30) + maxLength: 30 + type: string + Name: + description: The name of the item (max length = 50) + maxLength: 50 + type: string + ItemID: + description: The Xero identifier for an Item + type: string + format: uuid + LineItemTracking: + externalDocs: + url: https://developer.xero.com/documentation/api/invoices#post + properties: + TrackingCategoryID: + description: The Xero identifier for a tracking category + type: string + format: uuid + example: 00000000-0000-0000-0000-000000000000 + TrackingOptionID: + description: The Xero identifier for a tracking category option + type: string + format: uuid + example: 00000000-0000-0000-0000-000000000000 + Name: + description: The name of the tracking category + maxLength: 100 + type: string + example: Region + Option: + description: See Tracking Options + type: string + example: North + type: object + BankTransfers: + type: object + x-objectArrayKey: bank_transfers + properties: + BankTransfers: + type: array + items: + $ref: '#/components/schemas/BankTransfer' + BankTransfer: + externalDocs: + url: http://developer.xero.com/documentation/api/bank-transfers/ + properties: + FromBankAccount: + $ref: '#/components/schemas/Account' + ToBankAccount: + $ref: '#/components/schemas/Account' + Amount: + description: amount of the transaction + type: number + format: double + x-is-money: true + Date: + description: The date of the Transfer YYYY-MM-DD + type: string + x-is-msdate: true + BankTransferID: + description: The identifier of the Bank Transfer + readOnly: true + type: string + format: uuid + CurrencyRate: + description: The currency rate + readOnly: true + type: number + format: double + x-is-money: true + FromBankTransactionID: + description: The Bank Transaction ID for the source account + readOnly: true + type: string + format: uuid + ToBankTransactionID: + description: The Bank Transaction ID for the destination account + readOnly: true + type: string + format: uuid + FromIsReconciled: + description: The Bank Transaction boolean to show if it is reconciled for the source account + type: boolean + default: "false" + example: "false" + ToIsReconciled: + description: The Bank Transaction boolean to show if it is reconciled for the destination account + type: boolean + default: "false" + example: "false" + Reference: + description: Reference for the transactions. + type: string + HasAttachments: + description: Boolean to indicate if a Bank Transfer has an attachment + readOnly: true + type: boolean + default: "false" + example: "false" + CreatedDateUTC: + description: UTC timestamp of creation date of bank transfer + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + ValidationErrors: + description: Displays array of validation error messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + required: + - FromBankAccount + - ToBankAccount + - Amount + type: object + BatchPayments: + type: object + x-objectArrayKey: batch_payments + properties: + BatchPayments: + type: array + items: + $ref: '#/components/schemas/BatchPayment' + BatchPayment: + externalDocs: + url: http://developer.xero.com/documentation/api/BatchPayments/ + properties: + Account: + $ref: '#/components/schemas/Account' + Reference: + description: (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero. + type: string + maxLength: 255 + Particulars: + description: (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero. + type: string + maxLength: 12 + Code: + description: (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero. + type: string + maxLength: 12 + Details: + description: (Non-NZ Only) These details are sent to the org’s bank as a reference for the batch payment transaction. They will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement imported into Xero. Maximum field length = 18 + type: string + Narrative: + description: (UK Only) Only shows on the statement line in Xero. Max length =18 + type: string + maxLength: 18 + BatchPaymentID: + description: The Xero generated unique identifier for the bank transaction (read-only) + readOnly: true + type: string + format: uuid + DateString: + description: Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06 + type: string + Date: + description: Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06 + type: string + x-is-msdate: true + Amount: + description: The amount of the payment. Must be less than or equal to the outstanding amount owing on the invoice e.g. 200.00 + type: number + format: double + x-is-money: true + Payments: + description: An array of payments + type: array + items: + $ref: '#/components/schemas/Payment' + Type: + description: PAYBATCH for bill payments or RECBATCH for sales invoice payments (read-only) + readOnly: true + type: string + enum: + - PAYBATCH + - RECBATCH + Status: + description: AUTHORISED or DELETED (read-only). New batch payments will have a status of AUTHORISED. It is not possible to delete batch payments via the API. + readOnly: true + type: string + enum: + - AUTHORISED + - DELETED + TotalAmount: + description: The total of the payments that make up the batch (read-only) + type: number + format: double + x-is-money: true + readOnly: true + UpdatedDateUTC: + description: UTC timestamp of last update to the payment + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + IsReconciled: + description: Booelan that tells you if the batch payment has been reconciled (read-only) + readOnly: true + type: boolean + ValidationErrors: + description: Displays array of validation error messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + type: object + BatchPaymentDetails: + description: Bank details for use on a batch payment stored with each contact + externalDocs: + url: http://developer.xero.com/documentation/api/Contact/ + properties: + BankAccountNumber: + description: Bank account number for use with Batch Payments + type: string + example: 123-456-1111111 + BankAccountName: + description: Name of bank for use with Batch Payments + type: string + example: ACME Bank + Details: + description: (Non-NZ Only) These details are sent to the org’s bank as a reference for the batch payment transaction. They will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement imported into Xero. Maximum field length = 18 + type: string + example: Hello World + Code: + description: (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero. + type: string + maxLength: 12 + example: ABC + Reference: + description: (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero. + type: string + maxLength: 12 + example: Foobar + BatchPaymentDelete: + externalDocs: + url: http://developer.xero.com/documentation/api/accounting/batchpayments + properties: + BatchPaymentID: + description: The Xero generated unique identifier for the bank transaction (read-only) + type: string + format: uuid + Status: + description: The status of the batch payment. + type: string + default: DELETED + required: + - Status + - BatchPaymentID + type: object + BatchPaymentDeleteByUrlParam: + externalDocs: + url: http://developer.xero.com/documentation/api/accounting/batchpayments + properties: + Status: + description: The status of the batch payment. + type: string + default: DELETED + required: + - Status + type: object + BrandingThemes: + type: object + x-objectArrayKey: branding_themes + properties: + BrandingThemes: + type: array + items: + $ref: '#/components/schemas/BrandingTheme' + BrandingTheme: + externalDocs: + url: http://developer.xero.com/documentation/api/branding-themes/ + properties: + BrandingThemeID: + description: Xero identifier + type: string + format: uuid + Name: + description: Name of branding theme + type: string + LogoUrl: + description: The location of the image file used as the logo on this branding theme + type: string + Type: + description: Always INVOICE + type: string + enum: + - INVOICE + SortOrder: + description: Integer – ranked order of branding theme. The default branding theme has a value of 0 + type: integer + CreatedDateUTC: + description: UTC timestamp of creation date of branding theme + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + type: object + PaymentServices: + type: object + x-objectArrayKey: payment_services + properties: + PaymentServices: + type: array + items: + $ref: '#/components/schemas/PaymentService' + PaymentService: + externalDocs: + url: http://developer.xero.com/documentation/api/branding-themes/ + properties: + PaymentServiceID: + description: Xero identifier + type: string + format: uuid + PaymentServiceName: + description: Name of payment service + type: string + PaymentServiceUrl: + description: The custom payment URL + type: string + PayNowText: + description: The text displayed on the Pay Now button in Xero Online Invoicing. If this is not set it will default to Pay by credit card + type: string + PaymentServiceType: + description: This will always be CUSTOM for payment services created via the API. + type: string + ValidationErrors: + description: Displays array of validation error messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + Contacts: + type: object + x-objectArrayKey: contacts + properties: + pagination: + $ref: '#/components/schemas/Pagination' + Warnings: + description: Displays array of warning messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + Contacts: + type: array + items: + $ref: '#/components/schemas/Contact' + Contact: + externalDocs: + url: http://developer.xero.com/documentation/api/contacts/ + properties: + ContactID: + description: Xero identifier + type: string + format: uuid + MergedToContactID: + description: ID for the destination of a merged contact. Only returned when using paging or when fetching a contact by ContactId or ContactNumber. + type: string + format: uuid + ContactNumber: + description: This can be updated via the API only i.e. This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50). If the Contact Number is used, this is displayed as Contact Code in the Contacts UI in Xero. + maxLength: 50 + type: string + AccountNumber: + description: A user defined account number. This can be updated via the API and the Xero UI (max length = 50) + maxLength: 50 + type: string + ContactStatus: + description: Current status of a contact – see contact status types + type: string + enum: + - ACTIVE + - ARCHIVED + - GDPRREQUEST + Name: + description: Full name of contact/organisation (max length = 255) + maxLength: 255 + type: string + FirstName: + description: First name of contact person (max length = 255) + maxLength: 255 + type: string + LastName: + description: Last name of contact person (max length = 255) + maxLength: 255 + type: string + CompanyNumber: + description: Company registration number (max length = 50) + maxLength: 50 + type: string + EmailAddress: + description: Email address of contact person (umlauts not supported) (max length = 255) + maxLength: 255 + type: string + ContactPersons: + description: See contact persons + type: array + items: + $ref: '#/components/schemas/ContactPerson' + BankAccountDetails: + description: Bank account number of contact + type: string + TaxNumber: + description: Tax number of contact – this is also known as the ABN (Australia), GST Number (New Zealand), VAT Number (UK) or Tax ID Number (US and global) in the Xero UI depending on which regionalized version of Xero you are using (max length = 50) + maxLength: 50 + type: string + AccountsReceivableTaxType: + description: The tax type from TaxRates + type: string + AccountsPayableTaxType: + description: The tax type from TaxRates + type: string + Addresses: + description: Store certain address types for a contact – see address types + type: array + items: + $ref: '#/components/schemas/Address' + Phones: + description: Store certain phone types for a contact – see phone types + type: array + items: + $ref: '#/components/schemas/Phone' + IsSupplier: + description: true or false – Boolean that describes if a contact that has any AP invoices entered against them. Cannot be set via PUT or POST – it is automatically set when an accounts payable invoice is generated against this contact. + type: boolean + IsCustomer: + description: true or false – Boolean that describes if a contact has any AR invoices entered against them. Cannot be set via PUT or POST – it is automatically set when an accounts receivable invoice is generated against this contact. + type: boolean + SalesDefaultLineAmountType: + description: The default sales line amount type for a contact. Only available when summaryOnly parameter or paging is used, or when fetch by ContactId or ContactNumber. + type: string + enum: + - INCLUSIVE + - EXCLUSIVE + - NONE + PurchasesDefaultLineAmountType: + description: The default purchases line amount type for a contact Only available when summaryOnly parameter or paging is used, or when fetch by ContactId or ContactNumber. + type: string + enum: + - INCLUSIVE + - EXCLUSIVE + - NONE + DefaultCurrency: + $ref: '#/components/schemas/CurrencyCode' + type: string + XeroNetworkKey: + description: Store XeroNetworkKey for contacts. + type: string + SalesDefaultAccountCode: + description: The default sales account code for contacts + type: string + PurchasesDefaultAccountCode: + description: The default purchases account code for contacts + type: string + SalesTrackingCategories: + description: The default sales tracking categories for contacts + type: array + items: + $ref: '#/components/schemas/SalesTrackingCategory' + PurchasesTrackingCategories: + description: The default purchases tracking categories for contacts + type: array + items: + $ref: '#/components/schemas/SalesTrackingCategory' + TrackingCategoryName: + description: The name of the Tracking Category assigned to the contact under SalesTrackingCategories and PurchasesTrackingCategories + type: string + TrackingCategoryOption: + description: The name of the Tracking Option assigned to the contact under SalesTrackingCategories and PurchasesTrackingCategories + type: string + PaymentTerms: + $ref: '#/components/schemas/PaymentTerm' + UpdatedDateUTC: + description: UTC timestamp of last update to contact + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + ContactGroups: + description: Displays which contact groups a contact is included in + type: array + items: + $ref: '#/components/schemas/ContactGroup' + Website: + description: Website address for contact (read only) + readOnly: true + type: string + BrandingTheme: + $ref: '#/components/schemas/BrandingTheme' + BatchPayments: + $ref: '#/components/schemas/BatchPaymentDetails' + Discount: + description: The default discount rate for the contact (read only) + readOnly: true + type: number + format: double + x-is-money: true + Balances: + $ref: '#/components/schemas/Balances' + Attachments: + description: Displays array of attachments from the API + type: array + items: + $ref: '#/components/schemas/Attachment' + HasAttachments: + description: A boolean to indicate if a contact has an attachment + type: boolean + default: "false" + example: "false" + ValidationErrors: + description: Displays validation errors returned from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + HasValidationErrors: + description: A boolean to indicate if a contact has an validation errors + type: boolean + default: "false" + example: "false" + StatusAttributeString: + description: Status of object + type: string + type: object + Budgets: + type: object + x-objectArrayKey: budgets + properties: + Budgets: + type: array + items: + $ref: '#/components/schemas/Budget' + Budget: + type: object + externalDocs: + url: http://developer.xero.com/documentation/api/budgets/ + properties: + BudgetID: + description: Xero identifier + type: string + format: uuid + Type: + description: Type of Budget. OVERALL or TRACKING + type: string + enum: + - OVERALL + - TRACKING + Description: + description: The Budget description + maxLength: 255 + type: string + UpdatedDateUTC: + description: UTC timestamp of last update to budget + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + BudgetLines: + type: array + items: + $ref: '#/components/schemas/BudgetLine' + Tracking: + type: array + items: + $ref: '#/components/schemas/TrackingCategory' + BudgetLine: + type: object + externalDocs: + url: http://developer.xero.com/documentation/api/budgets/ + properties: + AccountID: + description: See Accounts + type: string + format: uuid + AccountCode: + description: See Accounts + type: string + example: 090 + BudgetBalances: + type: array + items: + $ref: '#/components/schemas/BudgetBalance' + BudgetBalance: + type: object + properties: + Period: + description: Period the amount applies to (e.g. “2019-08”) + type: string + x-is-msdate: true + Amount: + description: LineItem Quantity + type: number + format: double + x-is-money: true + UnitAmount: + description: Budgeted amount + type: number + format: double + x-is-money: true + Notes: + description: Any footnotes associated with this balance + maxLength: 255 + type: string + Balances: + type: object + description: The raw AccountsReceivable(sales invoices) and AccountsPayable(bills) outstanding and overdue amounts, not converted to base currency (read only) + properties: + AccountsReceivable: + $ref: '#/components/schemas/AccountsReceivable' + AccountsPayable: + $ref: '#/components/schemas/AccountsPayable' + AccountsReceivable: + type: object + properties: + Outstanding: + type: number + format: double + x-is-money: true + Overdue: + type: number + format: double + x-is-money: true + AccountsPayable: + type: object + properties: + Outstanding: + type: number + format: double + x-is-money: true + Overdue: + type: number + format: double + x-is-money: true + CISSettings: + type: object + x-objectArrayKey: cis_settings + properties: + CISSettings: + type: array + items: + $ref: '#/components/schemas/CISSetting' + CISSetting: + externalDocs: + url: http://developer.xero.com/documentation/api/contacts/ + properties: + CISEnabled: + description: Boolean that describes if the contact is a CIS Subcontractor + type: boolean + Rate: + description: CIS Deduction rate for the contact if he is a subcontractor. If the contact is not CISEnabled, then the rate is not returned + type: number + format: double + readOnly: true + x-is-money: true + CISOrgSettings: + type: object + x-objectArrayKey: cis_settings + properties: + CISSettings: + type: array + items: + $ref: '#/components/schemas/CISOrgSetting' + CISOrgSetting: + externalDocs: + url: https://developer.xero.com/documentation/api/organisation + properties: + CISContractorEnabled: + description: true or false - Boolean that describes if the organisation is a CIS Contractor + type: boolean + CISSubContractorEnabled: + description: true or false - Boolean that describes if the organisation is a CIS SubContractor + type: boolean + Rate: + description: CIS Deduction rate for the organisation + type: number + format: double + readOnly: true + x-is-money: true + ContactPerson: + externalDocs: + url: http://developer.xero.com/documentation/api/contacts/ + properties: + FirstName: + description: First name of person + type: string + LastName: + description: Last name of person + type: string + EmailAddress: + description: Email address of person + type: string + IncludeInEmails: + description: boolean to indicate whether contact should be included on emails with invoices etc. + type: boolean + type: object + ContactGroups: + type: object + x-objectArrayKey: contact_groups + properties: + ContactGroups: + type: array + items: + $ref: '#/components/schemas/ContactGroup' + ContactGroup: + externalDocs: + url: http://developer.xero.com/documentation/api/contactgroups/ + properties: + Name: + description: The Name of the contact group. Required when creating a new contact group + type: string + Status: + description: The Status of a contact group. To delete a contact group update the status to DELETED. Only contact groups with a status of ACTIVE are returned on GETs. + type: string + enum: + - ACTIVE + - DELETED + ContactGroupID: + description: The Xero identifier for an contact group – specified as a string following the endpoint name. e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9 + type: string + format: uuid + Contacts: + description: The ContactID and Name of Contacts in a contact group. Returned on GETs when the ContactGroupID is supplied in the URL. + type: array + items: + $ref: '#/components/schemas/Contact' + type: object + RequestEmpty: + externalDocs: + url: http://developer.xero.com/documentation/api/invoice/ + properties: + Status: + description: Need at least one field to create an empty JSON payload + type: string + type: object + CreditNotes: + type: object + x-objectArrayKey: credit_notes + properties: + pagination: + $ref: '#/components/schemas/Pagination' + Warnings: + description: Displays array of warning messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + CreditNotes: + type: array + items: + $ref: '#/components/schemas/CreditNote' + CreditNote: + externalDocs: + url: http://developer.xero.com/documentation/api/credit-notes/ + properties: + Type: + description: See Credit Note Types + type: string + enum: + - ACCPAYCREDIT + - ACCRECCREDIT + Contact: + $ref: '#/components/schemas/Contact' + Date: + description: The date the credit note is issued YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation + type: string + x-is-msdate: true + DueDate: + description: Date invoice is due – YYYY-MM-DD + type: string + x-is-msdate: true + Status: + description: See Credit Note Status Codes + type: string + enum: + - DRAFT + - SUBMITTED + - DELETED + - AUTHORISED + - PAID + - VOIDED + LineAmountTypes: + $ref: '#/components/schemas/LineAmountTypes' + type: string + LineItems: + description: See Invoice Line Items + type: array + items: + $ref: '#/components/schemas/LineItem' + SubTotal: + description: The subtotal of the credit note excluding taxes + type: number + format: double + x-is-money: true + TotalTax: + description: The total tax on the credit note + type: number + format: double + x-is-money: true + Total: + description: The total of the Credit Note(subtotal + total tax) + type: number + format: double + x-is-money: true + CISDeduction: + description: CIS deduction for UK contractors + readOnly: true + type: number + format: double + x-is-money: true + CISRate: + description: CIS Deduction rate for the organisation + type: number + format: double + readOnly: true + x-is-money: true + UpdatedDateUTC: + description: UTC timestamp of last update to the credit note + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + CurrencyCode: + description: The specified currency code + $ref: '#/components/schemas/CurrencyCode' + type: string + FullyPaidOnDate: + description: Date when credit note was fully paid(UTC format) + type: string + x-is-msdate: true + CreditNoteID: + description: Xero generated unique identifier + type: string + format: uuid + CreditNoteNumber: + description: ACCRECCREDIT – Unique alpha numeric code identifying credit note (when missing will auto-generate from your Organisation Invoice Settings) + type: string + Reference: + description: ACCRECCREDIT only – additional reference number + type: string + SentToContact: + description: Boolean to set whether the credit note in the Xero app should be marked as “sent”. This can be set only on credit notes that have been approved + readOnly: true + type: boolean + CurrencyRate: + description: The currency rate for a multicurrency invoice. If no rate is specified, the XE.com day rate is used + type: number + format: double + x-is-money: true + RemainingCredit: + description: The remaining credit balance on the Credit Note + type: number + format: double + x-is-money: true + Allocations: + description: See Allocations + type: array + items: + $ref: '#/components/schemas/Allocation' + AppliedAmount: + description: The amount of applied to an invoice + type: number + format: double + example: 2.00 + x-is-money: true + Payments: + description: See Payments + type: array + items: + $ref: '#/components/schemas/Payment' + BrandingThemeID: + description: See BrandingThemes + type: string + format: uuid + StatusAttributeString: + description: A string to indicate if a invoice status + type: string + HasAttachments: + description: boolean to indicate if a credit note has an attachment + type: boolean + default: "false" + example: "false" + HasErrors: + description: A boolean to indicate if a credit note has an validation errors + type: boolean + default: "false" + example: "false" + ValidationErrors: + description: Displays array of validation error messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + Warnings: + description: Displays array of warning messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + InvoiceAddresses: + description: An array of addresses used to auto calculate sales tax + type: array + items: + $ref: '#/components/schemas/InvoiceAddress' + type: object + Allocations: + type: object + x-objectArrayKey: allocations + properties: + Allocations: + type: array + items: + $ref: '#/components/schemas/Allocation' + Allocation: + externalDocs: + url: http://developer.xero.com/documentation/api/prepayments/ + properties: + AllocationID: + description: Xero generated unique identifier + type: string + format: uuid + Invoice: + $ref: '#/components/schemas/Invoice' + Overpayment: + $ref: '#/components/schemas/Overpayment' + Prepayment: + $ref: '#/components/schemas/Prepayment' + CreditNote: + $ref: '#/components/schemas/CreditNote' + Amount: + description: the amount being applied to the invoice + type: number + format: double + x-is-money: true + Date: + description: the date the allocation is applied YYYY-MM-DD. + type: string + x-is-msdate: true + IsDeleted: + description: A flag that returns true when the allocation is succesfully deleted + type: boolean + readOnly: true + StatusAttributeString: + description: A string to indicate if a invoice status + type: string + ValidationErrors: + description: Displays array of validation error messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + required: + - Amount + - Invoice + - Date + type: object + Currencies: + type: object + x-objectArrayKey: currencies + properties: + Currencies: + type: array + items: + $ref: '#/components/schemas/Currency' + Currency: + externalDocs: + url: http://developer.xero.com/documentation/api/currencies/ + properties: + Code: + $ref: '#/components/schemas/CurrencyCode' + type: string + Description: + description: Name of Currency + type: string + type: object + CurrencyCode: + description: 3 letter alpha code for the currency – see list of currency codes + type: string + x-enum-varnames: + - AED + - AFN + - ALL + - AMD + - ANG + - AOA + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BYR + - BZD + - CAD + - CDF + - CHF + - CLF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EEK + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - INR + - IQD + - IRR + - ISK + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LTL + - LVL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MRU + - MUR + - MVR + - MWK + - MXN + - MXV + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SKK + - SLE + - SLL + - SOS + - SRD + - STN + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY_LIRA + - TTD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VES + - VND + - VUV + - WST + - XAF + - XCD + - XOF + - XPF + - YER + - ZAR + - ZMW + - ZMK + - ZWD + - EMPTY_CURRENCY + enum: + - AED + - AFN + - ALL + - AMD + - ANG + - AOA + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BYR + - BZD + - CAD + - CDF + - CHF + - CLF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EEK + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - INR + - IQD + - IRR + - ISK + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LTL + - LVL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MRU + - MUR + - MVR + - MWK + - MXN + - MXV + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SKK + - SLE + - SLL + - SOS + - SRD + - STD + - STN + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VES + - VND + - VUV + - WST + - XAF + - XCD + - XOF + - XPF + - YER + - ZAR + - ZMW + - ZMK + - ZWD + Employees: + type: object + x-objectArrayKey: employees + properties: + Employees: + type: array + items: + $ref: '#/components/schemas/Employee' + Employee: + externalDocs: + url: http://developer.xero.com/documentation/api/employees/ + properties: + EmployeeID: + description: The Xero identifier for an employee e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9 + type: string + format: uuid + Status: + description: Current status of an employee – see contact status types + type: string + enum: + - ACTIVE + - ARCHIVED + - GDPRREQUEST + - DELETED + FirstName: + description: First name of an employee (max length = 255) + maxLength: 255 + type: string + LastName: + description: Last name of an employee (max length = 255) + maxLength: 255 + type: string + ExternalLink: + $ref: '#/components/schemas/ExternalLink' + UpdatedDateUTC: + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + StatusAttributeString: + description: A string to indicate if a invoice status + type: string + example: ERROR + ValidationErrors: + description: Displays array of validation error messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + type: object + ExpenseClaims: + type: object + x-objectArrayKey: expense_claims + properties: + ExpenseClaims: + type: array + items: + $ref: '#/components/schemas/ExpenseClaim' + ExpenseClaim: + externalDocs: + url: http://developer.xero.com/documentation/api/expense-claims/ + properties: + ExpenseClaimID: + description: Xero generated unique identifier for an expense claim + type: string + format: uuid + Status: + description: Current status of an expense claim – see status types + type: string + enum: + - SUBMITTED + - AUTHORISED + - PAID + - VOIDED + - DELETED + Payments: + description: See Payments + type: array + items: + $ref: '#/components/schemas/Payment' + User: + $ref: '#/components/schemas/User' + Receipts: + type: array + items: + $ref: '#/components/schemas/Receipt' + UpdatedDateUTC: + description: Last modified date UTC format + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + Total: + description: The total of an expense claim being paid + readOnly: true + type: number + format: double + x-is-money: true + AmountDue: + description: The amount due to be paid for an expense claim + readOnly: true + type: number + format: double + x-is-money: true + AmountPaid: + description: The amount still to pay for an expense claim + readOnly: true + type: number + format: double + x-is-money: true + PaymentDueDate: + description: The date when the expense claim is due to be paid YYYY-MM-DD + readOnly: true + type: string + x-is-msdate: true + ReportingDate: + description: The date the expense claim will be reported in Xero YYYY-MM-DD + readOnly: true + type: string + x-is-msdate: true + ReceiptID: + description: The Xero identifier for the Receipt e.g. e59a2c7f-1306-4078-a0f3-73537afcbba9 + type: string + format: uuid + type: object + HistoryRecords: + type: object + x-objectArrayKey: history_records + properties: + HistoryRecords: + type: array + items: + $ref: '#/components/schemas/HistoryRecord' + HistoryRecord: + externalDocs: + url: https://developer.xero.com/documentation/api/history-and-notes + properties: + Details: + description: details + type: string + Changes: + description: Name of branding theme + type: string + User: + description: has a value of 0 + type: string + DateUTC: + description: UTC timestamp of creation date of branding theme + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + type: object + Invoices: + type: object + x-objectArrayKey: invoices + properties: + pagination: + $ref: '#/components/schemas/Pagination' + Warnings: + description: Displays array of warning messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + Invoices: + type: array + items: + $ref: '#/components/schemas/Invoice' + Invoice: + externalDocs: + url: http://developer.xero.com/documentation/api/invoices/ + properties: + Type: + description: See Invoice Types + type: string + enum: + - ACCPAY + - ACCPAYCREDIT + - APOVERPAYMENT + - APPREPAYMENT + - ACCREC + - ACCRECCREDIT + - AROVERPAYMENT + - ARPREPAYMENT + Contact: + $ref: '#/components/schemas/Contact' + LineItems: + description: See LineItems + type: array + items: + $ref: '#/components/schemas/LineItem' + Date: + description: Date invoice was issued – YYYY-MM-DD. If the Date element is not specified it will default to the current date based on the timezone setting of the organisation + type: string + x-is-msdate: true + DueDate: + description: Date invoice is due – YYYY-MM-DD + type: string + x-is-msdate: true + LineAmountTypes: + $ref: '#/components/schemas/LineAmountTypes' + type: string + InvoiceNumber: + description: ACCREC – Unique alpha numeric code identifying invoice (when missing will auto-generate from your Organisation Invoice Settings) (max length = 255) + maxLength: 255 + type: string + Reference: + description: ACCREC only – additional reference number + type: string + BrandingThemeID: + description: See BrandingThemes + type: string + format: uuid + Url: + description: URL link to a source document – shown as “Go to [appName]” in the Xero app + type: string + CurrencyCode: + $ref: '#/components/schemas/CurrencyCode' + type: string + CurrencyRate: + description: The currency rate for a multicurrency invoice. If no rate is specified, the XE.com day rate is used. (max length = [18].[6]) + type: number + format: double + x-is-money: true + Status: + description: See Invoice Status Codes + type: string + enum: + - DRAFT + - SUBMITTED + - DELETED + - AUTHORISED + - PAID + - VOIDED + SentToContact: + description: Boolean to set whether the invoice in the Xero app should be marked as “sent”. This can be set only on invoices that have been approved + type: boolean + ExpectedPaymentDate: + description: Shown on sales invoices (Accounts Receivable) when this has been set + type: string + x-is-msdate: true + PlannedPaymentDate: + description: Shown on bills (Accounts Payable) when this has been set + type: string + x-is-msdate: true + CISDeduction: + description: CIS deduction for UK contractors + readOnly: true + type: number + format: double + x-is-money: true + CISRate: + description: CIS Deduction rate for the organisation + type: number + format: double + readOnly: true + x-is-money: true + SubTotal: + description: Total of invoice excluding taxes + readOnly: true + type: number + format: double + x-is-money: true + TotalTax: + description: Total tax on invoice + readOnly: true + type: number + format: double + x-is-money: true + Total: + description: Total of Invoice tax inclusive (i.e. SubTotal + TotalTax). This will be ignored if it doesn’t equal the sum of the LineAmounts + readOnly: true + type: number + format: double + x-is-money: true + TotalDiscount: + description: Total of discounts applied on the invoice line items + readOnly: true + type: number + format: double + x-is-money: true + InvoiceID: + description: Xero generated unique identifier for invoice + type: string + format: uuid + RepeatingInvoiceID: + description: Xero generated unique identifier for repeating invoices + type: string + format: uuid + HasAttachments: + description: boolean to indicate if an invoice has an attachment + readOnly: true + type: boolean + default: "false" + example: "false" + IsDiscounted: + description: boolean to indicate if an invoice has a discount + readOnly: true + type: boolean + Payments: + description: See Payments + readOnly: true + type: array + items: + $ref: '#/components/schemas/Payment' + Prepayments: + description: See Prepayments + readOnly: true + type: array + items: + $ref: '#/components/schemas/Prepayment' + Overpayments: + description: See Overpayments + readOnly: true + type: array + items: + $ref: '#/components/schemas/Overpayment' + AmountDue: + description: Amount remaining to be paid on invoice + readOnly: true + type: number + format: double + x-is-money: true + AmountPaid: + description: Sum of payments received for invoice + readOnly: true + type: number + format: double + x-is-money: true + FullyPaidOnDate: + description: The date the invoice was fully paid. Only returned on fully paid invoices + readOnly: true + type: string + x-is-msdate: true + AmountCredited: + description: Sum of all credit notes, over-payments and pre-payments applied to invoice + readOnly: true + type: number + format: double + x-is-money: true + UpdatedDateUTC: + description: Last modified date UTC format + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + CreditNotes: + description: Details of credit notes that have been applied to an invoice + readOnly: true + type: array + items: + $ref: '#/components/schemas/CreditNote' + Attachments: + description: Displays array of attachments from the API + type: array + items: + $ref: '#/components/schemas/Attachment' + HasErrors: + description: A boolean to indicate if a invoice has an validation errors + type: boolean + default: "false" + example: "false" + StatusAttributeString: + description: A string to indicate if a invoice status + type: string + ValidationErrors: + description: Displays array of validation error messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + Warnings: + description: Displays array of warning messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + InvoiceAddresses: + description: An array of addresses used to auto calculate sales tax + type: array + items: + $ref: '#/components/schemas/InvoiceAddress' + type: object + OnlineInvoices: + type: object + x-objectArrayKey: online_invoices + properties: + OnlineInvoices: + type: array + items: + $ref: '#/components/schemas/OnlineInvoice' + OnlineInvoice: + externalDocs: + url: http://developer.xero.com/documentation/api/invoices/ + properties: + OnlineInvoiceUrl: + description: the URL to an online invoice + type: string + type: object + InvoiceReminders: + type: object + x-objectArrayKey: invoice_reminders + properties: + InvoiceReminders: + type: array + items: + $ref: '#/components/schemas/InvoiceReminder' + InvoiceReminder: + externalDocs: + url: http://developer.xero.com/documentation/api/invoice-reminders/ + properties: + Enabled: + description: setting for on or off + type: boolean + type: object + Items: + type: object + x-objectArrayKey: items + properties: + Items: + type: array + items: + $ref: '#/components/schemas/Item' + Item: + externalDocs: + url: http://developer.xero.com/documentation/api/items/ + properties: + Code: + description: User defined item code (max length = 30) + maxLength: 30 + type: string + InventoryAssetAccountCode: + description: The inventory asset account for the item. The account must be of type INVENTORY. The COGSAccountCode in PurchaseDetails is also required to create a tracked item + type: string + Name: + description: The name of the item (max length = 50) + maxLength: 50 + type: string + IsSold: + description: Boolean value, defaults to true. When IsSold is true the item will be available on sales transactions in the Xero UI. If IsSold is updated to false then Description and SalesDetails values will be nulled. + type: boolean + IsPurchased: + description: Boolean value, defaults to true. When IsPurchased is true the item is available for purchase transactions in the Xero UI. If IsPurchased is updated to false then PurchaseDescription and PurchaseDetails values will be nulled. + type: boolean + Description: + description: The sales description of the item (max length = 4000) + maxLength: 4000 + type: string + PurchaseDescription: + description: The purchase description of the item (max length = 4000) + maxLength: 4000 + type: string + PurchaseDetails: + $ref: '#/components/schemas/Purchase' + SalesDetails: + $ref: '#/components/schemas/Purchase' + IsTrackedAsInventory: + description: True for items that are tracked as inventory. An item will be tracked as inventory if the InventoryAssetAccountCode and COGSAccountCode are set. + type: boolean + TotalCostPool: + description: The value of the item on hand. Calculated using average cost accounting. + type: number + format: double + x-is-money: true + QuantityOnHand: + description: The quantity of the item on hand + type: number + format: double + x-is-money: true + UpdatedDateUTC: + description: Last modified date in UTC format + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + ItemID: + description: The Xero identifier for an Item + type: string + format: uuid + StatusAttributeString: + description: Status of object + type: string + ValidationErrors: + description: Displays array of validation error messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + required: + - Code + type: object + Purchase: + externalDocs: + url: http://developer.xero.com/documentation/api/items/ + properties: + UnitPrice: + description: Unit Price of the item. By default UnitPrice is rounded to two decimal places. You can use 4 decimal places by adding the unitdp=4 querystring parameter to your request. + type: number + format: double + x-is-money: true + AccountCode: + description: Default account code to be used for purchased/sale. Not applicable to the purchase details of tracked items + type: string + COGSAccountCode: + description: Cost of goods sold account. Only applicable to the purchase details of tracked items. + type: string + TaxType: + description: The tax type from TaxRates + type: string + type: object + Journals: + type: object + x-objectArrayKey: journals + properties: + Warnings: + description: Displays array of warning messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + Journals: + type: array + items: + $ref: '#/components/schemas/Journal' + Journal: + externalDocs: + url: http://developer.xero.com/documentation/api/journals/ + properties: + JournalID: + description: Xero identifier + type: string + format: uuid + JournalDate: + description: Date the journal was posted + type: string + x-is-msdate: true + JournalNumber: + description: Xero generated journal number + type: integer + CreatedDateUTC: + description: Created date UTC format + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + Reference: + description: reference field for additional indetifying information + type: string + SourceID: + description: The identifier for the source transaction (e.g. InvoiceID) + type: string + format: uuid + SourceType: + description: The journal source type. The type of transaction that created the journal + type: string + enum: + - ACCREC + - ACCPAY + - ACCRECCREDIT + - ACCPAYCREDIT + - ACCRECPAYMENT + - ACCPAYPAYMENT + - ARCREDITPAYMENT + - APCREDITPAYMENT + - CASHREC + - CASHPAID + - TRANSFER + - ARPREPAYMENT + - APPREPAYMENT + - AROVERPAYMENT + - APOVERPAYMENT + - EXPCLAIM + - EXPPAYMENT + - MANJOURNAL + - PAYSLIP + - WAGEPAYABLE + - INTEGRATEDPAYROLLPE + - INTEGRATEDPAYROLLPT + - EXTERNALSPENDMONEY + - INTEGRATEDPAYROLLPTPAYMENT + - INTEGRATEDPAYROLLCN + JournalLines: + description: See JournalLines + type: array + items: + $ref: '#/components/schemas/JournalLine' + type: object + JournalLine: + externalDocs: + url: https://developer.xero.com/documentation/api/journals#JournalLines + properties: + JournalLineID: + description: Xero identifier for Journal + type: string + format: uuid + example: 7be9db36-3598-4755-ba5c-c2dbc8c4a7a2 + AccountID: + description: See Accounts + type: string + format: uuid + example: ceef66a5-a545-413b-9312-78a53caadbc4 + AccountCode: + description: See Accounts + type: string + example: 090 + AccountType: + $ref: '#/components/schemas/AccountType' + type: string + AccountName: + description: See AccountCodes + type: string + example: Checking Account + Description: + description: The description from the source transaction line item. Only returned if populated. + type: string + example: My business checking account + NetAmount: + description: Net amount of journal line. This will be a positive value for a debit and negative for a credit + type: number + format: double + x-is-money: true + example: 4130.98 + GrossAmount: + description: Gross amount of journal line (NetAmount + TaxAmount). + type: number + format: double + x-is-money: true + example: 4130.98 + TaxAmount: + description: Total tax on a journal line + type: number + format: double + x-is-money: true + readOnly: true + example: 0.00 + TaxType: + description: The tax type from taxRates + type: string + TaxName: + description: see TaxRates + type: string + example: Tax Exempt + TrackingCategories: + description: Optional Tracking Category – see Tracking. Any JournalLine can have a maximum of 2 elements. + type: array + items: + $ref: '#/components/schemas/TrackingCategory' + type: object + LinkedTransactions: + type: object + x-objectArrayKey: linked_transactions + properties: + LinkedTransactions: + type: array + items: + $ref: '#/components/schemas/LinkedTransaction' + LinkedTransaction: + externalDocs: + url: http://developer.xero.com/documentation/api/linked-transactions/ + properties: + SourceTransactionID: + description: Filter by the SourceTransactionID. Get all the linked transactions created from a particular ACCPAY invoice + type: string + format: uuid + SourceLineItemID: + description: The line item identifier from the source transaction. + type: string + format: uuid + ContactID: + description: Filter by the combination of ContactID and Status. Get all the linked transactions that have been assigned to a particular customer and have a particular status e.g. GET /LinkedTransactions?ContactID=4bb34b03-3378-4bb2-a0ed-6345abf3224e&Status=APPROVED. + type: string + format: uuid + TargetTransactionID: + description: Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice + type: string + format: uuid + TargetLineItemID: + description: The line item identifier from the target transaction. It is possible to link multiple billable expenses to the same TargetLineItemID. + type: string + format: uuid + LinkedTransactionID: + description: The Xero identifier for an Linked Transaction e.g./LinkedTransactions/297c2dc5-cc47-4afd-8ec8-74990b8761e9 + type: string + format: uuid + Status: + description: Filter by the combination of ContactID and Status. Get all the linked transactions that have been assigned to a particular customer and have a particular status e.g. GET /LinkedTransactions?ContactID=4bb34b03-3378-4bb2-a0ed-6345abf3224e&Status=APPROVED. + type: string + enum: + - APPROVED + - DRAFT + - ONDRAFT + - BILLED + - VOIDED + Type: + description: This will always be BILLABLEEXPENSE. More types may be added in future. + type: string + enum: + - BILLABLEEXPENSE + UpdatedDateUTC: + description: The last modified date in UTC format + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + SourceTransactionTypeCode: + description: The Type of the source tranasction. This will be ACCPAY if the linked transaction was created from an invoice and SPEND if it was created from a bank transaction. + type: string + enum: + - ACCPAY + - SPEND + ValidationErrors: + description: Displays array of validation error messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + type: object + ManualJournals: + type: object + x-objectArrayKey: manual_journals + properties: + pagination: + $ref: '#/components/schemas/Pagination' + Warnings: + description: Displays array of warning messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + ManualJournals: + type: array + items: + $ref: '#/components/schemas/ManualJournal' + ManualJournal: + externalDocs: + url: http://developer.xero.com/documentation/api/manual-journals/ + properties: + Narration: + description: Description of journal being posted + type: string + JournalLines: + description: See JournalLines + type: array + items: + $ref: '#/components/schemas/ManualJournalLine' + Date: + description: Date journal was posted – YYYY-MM-DD + type: string + x-is-msdate: true + LineAmountTypes: + $ref: '#/components/schemas/LineAmountTypes' + type: string + Status: + description: See Manual Journal Status Codes + type: string + enum: + - DRAFT + - POSTED + - DELETED + - VOIDED + - ARCHIVED + Url: + description: Url link to a source document – shown as “Go to [appName]” in the Xero app + type: string + ShowOnCashBasisReports: + description: Boolean – default is true if not specified + type: boolean + HasAttachments: + description: Boolean to indicate if a manual journal has an attachment + readOnly: true + type: boolean + default: "false" + example: "false" + UpdatedDateUTC: + description: Last modified date UTC format + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + ManualJournalID: + description: The Xero identifier for a Manual Journal + type: string + format: uuid + StatusAttributeString: + description: A string to indicate if a invoice status + type: string + example: ERROR + Warnings: + description: Displays array of warning messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + ValidationErrors: + description: Displays array of validation error messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + Attachments: + description: Displays array of attachments from the API + type: array + items: + $ref: '#/components/schemas/Attachment' + required: + - Narration + type: object + ManualJournalLine: + externalDocs: + url: http://developer.xero.com/documentation/api/manual-journals/ + properties: + LineAmount: + description: total for line. Debits are positive, credits are negative value + type: number + format: double + x-is-money: true + example: -2569.00 + AccountCode: + description: See Accounts + type: string + example: 720 + AccountID: + description: See Accounts + type: string + format: uuid + Description: + description: Description for journal line + type: string + example: Coded incorrectly Office Equipment should be Computer Equipment + TaxType: + description: The tax type from TaxRates + type: string + Tracking: + description: Optional Tracking Category – see Tracking. Any JournalLine can have a maximum of 2 elements. + type: array + items: + $ref: '#/components/schemas/TrackingCategory' + TaxAmount: + description: The calculated tax amount based on the TaxType and LineAmount + type: number + format: double + x-is-money: true + example: 0.00 + IsBlank: + description: is the line blank + type: boolean + example: false + type: object + Actions: + type: object + x-objectArrayKey: actions + properties: + Actions: + type: array + items: + $ref: '#/components/schemas/Action' + Action: + externalDocs: + url: http://developer.xero.com/documentation/api/organisation/ + properties: + Name: + description: Name of the actions for this organisation + type: string + example: UseMulticurrency + Status: + description: Status of the action for this organisation + type: string + enum: + - ALLOWED + - NOT-ALLOWED + Organisations: + type: object + x-objectArrayKey: organisations + properties: + Organisations: + type: array + items: + $ref: '#/components/schemas/Organisation' + Organisation: + externalDocs: + url: http://developer.xero.com/documentation/api/organisation/ + properties: + OrganisationID: + description: Unique Xero identifier + type: string + format: uuid + example: 8be9db36-3598-4755-ba5c-c2dbc8c4a7a2 + APIKey: + description: Display a unique key used for Xero-to-Xero transactions + type: string + Name: + description: Display name of organisation shown in Xero + type: string + LegalName: + description: Organisation name shown on Reports + type: string + PaysTax: + description: Boolean to describe if organisation is registered with a local tax authority i.e. true, false + type: boolean + Version: + description: See Version Types + type: string + enum: + - AU + - NZ + - GLOBAL + - UK + - US + - AUONRAMP + - NZONRAMP + - GLOBALONRAMP + - UKONRAMP + - USONRAMP + OrganisationType: + description: Organisation Type + type: string + enum: + - ACCOUNTING_PRACTICE + - COMPANY + - CHARITY + - CLUB_OR_SOCIETY + - INDIVIDUAL + - LOOK_THROUGH_COMPANY + - NOT_FOR_PROFIT + - PARTNERSHIP + - S_CORPORATION + - SELF_MANAGED_SUPERANNUATION_FUND + - SOLE_TRADER + - SUPERANNUATION_FUND + - TRUST + BaseCurrency: + $ref: '#/components/schemas/CurrencyCode' + type: string + CountryCode: + $ref: '#/components/schemas/CountryCode' + type: string + IsDemoCompany: + description: Boolean to describe if organisation is a demo company. + type: boolean + OrganisationStatus: + description: Will be set to ACTIVE if you can connect to organisation via the Xero API + type: string + RegistrationNumber: + description: Shows for New Zealand, Australian and UK organisations + type: string + EmployerIdentificationNumber: + description: Shown if set. US Only. + type: string + TaxNumber: + description: Shown if set. Displays in the Xero UI as Tax File Number (AU), GST Number (NZ), VAT Number (UK) and Tax ID Number (US & Global). + type: string + FinancialYearEndDay: + description: Calendar day e.g. 0-31 + type: integer + FinancialYearEndMonth: + description: Calendar Month e.g. 1-12 + type: integer + SalesTaxBasis: + description: The accounting basis used for tax returns. See Sales Tax Basis + type: string + enum: + - PAYMENTS + - INVOICE + - NONE + - CASH + - ACCRUAL + - FLATRATECASH + - FLATRATEACCRUAL + - ACCRUALS + SalesTaxPeriod: + description: The frequency with which tax returns are processed. See Sales Tax Period + type: string + enum: + - MONTHLY + - QUARTERLY1 + - QUARTERLY2 + - QUARTERLY3 + - ANNUALLY + - ONEMONTHS + - TWOMONTHS + - SIXMONTHS + - 1MONTHLY + - 2MONTHLY + - 3MONTHLY + - 6MONTHLY + - QUARTERLY + - YEARLY + - NONE + DefaultSalesTax: + description: The default for LineAmountTypes on sales transactions + type: string + DefaultPurchasesTax: + description: The default for LineAmountTypes on purchase transactions + type: string + PeriodLockDate: + description: Shown if set. See lock dates + type: string + x-is-msdate: true + EndOfYearLockDate: + description: Shown if set. See lock dates + type: string + x-is-msdate: true + CreatedDateUTC: + description: Timestamp when the organisation was created in Xero + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + Timezone: + $ref: '#/components/schemas/TimeZone' + type: string + OrganisationEntityType: + description: Organisation Entity Type + type: string + enum: + - ACCOUNTING_PRACTICE + - COMPANY + - CHARITY + - CLUB_OR_SOCIETY + - INDIVIDUAL + - LOOK_THROUGH_COMPANY + - NOT_FOR_PROFIT + - PARTNERSHIP + - S_CORPORATION + - SELF_MANAGED_SUPERANNUATION_FUND + - SOLE_TRADER + - SUPERANNUATION_FUND + - TRUST + ShortCode: + description: A unique identifier for the organisation. Potential uses. + type: string + Class: + description: Organisation Classes describe which plan the Xero organisation is on (e.g. DEMO, TRIAL, PREMIUM) + type: string + enum: + - DEMO + - TRIAL + - STARTER + - STANDARD + - PREMIUM + - PREMIUM_20 + - PREMIUM_50 + - PREMIUM_100 + - LEDGER + - GST_CASHBOOK + - NON_GST_CASHBOOK + - ULTIMATE + - LITE + - ULTIMATE_10 + - ULTIMATE_20 + - ULTIMATE_50 + - ULTIMATE_100 + - IGNITE + - GROW + - COMPREHENSIVE + Edition: + description: BUSINESS or PARTNER. Partner edition organisations are sold exclusively through accounting partners and have restricted functionality (e.g. no access to invoicing) + type: string + enum: + - BUSINESS + - PARTNER + LineOfBusiness: + description: Description of business type as defined in Organisation settings + type: string + Addresses: + description: Address details for organisation – see Addresses + type: array + items: + $ref: '#/components/schemas/AddressForOrganisation' + Phones: + description: Phones details for organisation – see Phones + type: array + items: + $ref: '#/components/schemas/Phone' + ExternalLinks: + description: Organisation profile links for popular services such as Facebook,Twitter, GooglePlus and LinkedIn. You can also add link to your website here. Shown if Organisation settings is updated in Xero. See ExternalLinks below + type: array + items: + $ref: '#/components/schemas/ExternalLink' + PaymentTerms: + $ref: '#/components/schemas/PaymentTerm' + type: object + CountryCode: + type: string + enum: + - AD + - AE + - AF + - AG + - AI + - AL + - AM + - AN + - AO + - AQ + - AR + - AS + - AT + - AU + - AW + - AZ + - BA + - BB + - BD + - BE + - BF + - BG + - BH + - BI + - BJ + - BL + - BM + - BN + - BO + - BR + - BS + - BT + - BW + - BY + - BZ + - CA + - CC + - CD + - CF + - CG + - CH + - CI + - CK + - CL + - CM + - CN + - CO + - CR + - CU + - CV + - CW + - CX + - CY + - CZ + - DE + - DJ + - DK + - DM + - DO + - DZ + - EC + - EE + - EG + - EH + - ER + - ES + - ET + - FI + - FJ + - FK + - FM + - FO + - FR + - GA + - GB + - GD + - GE + - GG + - GH + - GI + - GL + - GM + - GN + - GQ + - GR + - GT + - GU + - GW + - GY + - HK + - HN + - HR + - HT + - HU + - ID + - IE + - IL + - IM + - IN + - IO + - IQ + - IR + - IS + - IT + - JE + - JM + - JO + - JP + - KE + - KG + - KH + - KI + - KM + - KN + - KP + - KR + - KW + - KY + - KZ + - LA + - LB + - LC + - LI + - LK + - LR + - LS + - LT + - LU + - LV + - LY + - MA + - MC + - MD + - ME + - MF + - MG + - MH + - MK + - ML + - MM + - MN + - MO + - MP + - 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 + - PW + - PY + - QA + - RE + - RO + - RS + - RU + - RW + - SA + - SB + - SC + - SD + - SE + - SG + - SH + - SI + - SJ + - SK + - SL + - SM + - SN + - SO + - SR + - SS + - ST + - SV + - SX + - SY + - SZ + - TC + - TD + - TG + - TH + - TJ + - TK + - TL + - TM + - TN + - TO + - TR + - TT + - TV + - TW + - TZ + - UA + - UG + - US + - UY + - UZ + - VA + - VC + - VE + - VG + - VI + - VN + - VU + - WF + - WS + - XK + - YE + - YT + - ZA + - ZM + - ZW + TimeZone: + description: Timezone specifications + type: string + enum: + - AFGHANISTANSTANDARDTIME + - ALASKANSTANDARDTIME + - ALEUTIANSTANDARDTIME + - ALTAISTANDARDTIME + - ARABIANSTANDARDTIME + - ARABICSTANDARDTIME + - ARABSTANDARDTIME + - ARGENTINASTANDARDTIME + - ASTRAKHANSTANDARDTIME + - ATLANTICSTANDARDTIME + - AUSCENTRALSTANDARDTIME + - AUSCENTRALWSTANDARDTIME + - AUSEASTERNSTANDARDTIME + - AZERBAIJANSTANDARDTIME + - AZORESSTANDARDTIME + - BAHIASTANDARDTIME + - BANGLADESHSTANDARDTIME + - BELARUSSTANDARDTIME + - BOUGAINVILLESTANDARDTIME + - CANADACENTRALSTANDARDTIME + - CAPEVERDESTANDARDTIME + - CAUCASUSSTANDARDTIME + - CENAUSTRALIASTANDARDTIME + - CENTRALAMERICASTANDARDTIME + - CENTRALASIASTANDARDTIME + - CENTRALBRAZILIANSTANDARDTIME + - CENTRALEUROPEANSTANDARDTIME + - CENTRALEUROPESTANDARDTIME + - CENTRALPACIFICSTANDARDTIME + - CENTRALSTANDARDTIME + - CENTRALSTANDARDTIME(MEXICO) + - CHATHAMISLANDSSTANDARDTIME + - CHINASTANDARDTIME + - CUBASTANDARDTIME + - DATELINESTANDARDTIME + - EAFRICASTANDARDTIME + - EASTERISLANDSTANDARDTIME + - EASTERNSTANDARDTIME + - EASTERNSTANDARDTIME(MEXICO) + - EAUSTRALIASTANDARDTIME + - EEUROPESTANDARDTIME + - EGYPTSTANDARDTIME + - EKATERINBURGSTANDARDTIME + - ESOUTHAMERICASTANDARDTIME + - FIJISTANDARDTIME + - FLESTANDARDTIME + - GEORGIANSTANDARDTIME + - GMTSTANDARDTIME + - GREENLANDSTANDARDTIME + - GREENWICHSTANDARDTIME + - GTBSTANDARDTIME + - HAITISTANDARDTIME + - HAWAIIANSTANDARDTIME + - INDIASTANDARDTIME + - IRANSTANDARDTIME + - ISRAELSTANDARDTIME + - JORDANSTANDARDTIME + - KALININGRADSTANDARDTIME + - KAMCHATKASTANDARDTIME + - KOREASTANDARDTIME + - LIBYASTANDARDTIME + - LINEISLANDSSTANDARDTIME + - LORDHOWESTANDARDTIME + - MAGADANSTANDARDTIME + - MAGALLANESSTANDARDTIME + - MARQUESASSTANDARDTIME + - MAURITIUSSTANDARDTIME + - MIDATLANTICSTANDARDTIME + - MIDDLEEASTSTANDARDTIME + - MONTEVIDEOSTANDARDTIME + - MOROCCOSTANDARDTIME + - MOUNTAINSTANDARDTIME + - MOUNTAINSTANDARDTIME(MEXICO) + - MYANMARSTANDARDTIME + - NAMIBIASTANDARDTIME + - NCENTRALASIASTANDARDTIME + - NEPALSTANDARDTIME + - NEWFOUNDLANDSTANDARDTIME + - NEWZEALANDSTANDARDTIME + - NORFOLKSTANDARDTIME + - NORTHASIAEASTSTANDARDTIME + - NORTHASIASTANDARDTIME + - NORTHKOREASTANDARDTIME + - OMSKSTANDARDTIME + - PACIFICSASTANDARDTIME + - PACIFICSTANDARDTIME + - PACIFICSTANDARDTIME(MEXICO) + - PAKISTANSTANDARDTIME + - PARAGUAYSTANDARDTIME + - QYZYLORDASTANDARDTIME + - ROMANCESTANDARDTIME + - RUSSIANSTANDARDTIME + - RUSSIATIMEZONE10 + - RUSSIATIMEZONE11 + - RUSSIATIMEZONE3 + - SAEASTERNSTANDARDTIME + - SAINTPIERRESTANDARDTIME + - SAKHALINSTANDARDTIME + - SAMOASTANDARDTIME + - SAOTOMESTANDARDTIME + - SAPACIFICSTANDARDTIME + - SARATOVSTANDARDTIME + - SAWESTERNSTANDARDTIME + - SEASIASTANDARDTIME + - SINGAPORESTANDARDTIME + - SOUTHAFRICASTANDARDTIME + - SOUTHSUDANSTANDARDTIME + - SRILANKASTANDARDTIME + - SUDANSTANDARDTIME + - SYRIASTANDARDTIME + - TAIPEISTANDARDTIME + - TASMANIASTANDARDTIME + - TOCANTINSSTANDARDTIME + - TOKYOSTANDARDTIME + - TOMSKSTANDARDTIME + - TONGASTANDARDTIME + - TRANSBAIKALSTANDARDTIME + - TURKEYSTANDARDTIME + - TURKSANDCAICOSSTANDARDTIME + - ULAANBAATARSTANDARDTIME + - USEASTERNSTANDARDTIME + - USMOUNTAINSTANDARDTIME + - UTC + - UTC+12 + - UTC+13 + - UTC02 + - UTC08 + - UTC09 + - UTC11 + - VENEZUELASTANDARDTIME + - VLADIVOSTOKSTANDARDTIME + - VOLGOGRADSTANDARDTIME + - WAUSTRALIASTANDARDTIME + - WCENTRALAFRICASTANDARDTIME + - WESTASIASTANDARDTIME + - WESTBANKSTANDARDTIME + - WESTPACIFICSTANDARDTIME + - WEUROPESTANDARDTIME + - WMONGOLIASTANDARDTIME + - YAKUTSKSTANDARDTIME + - YUKONSTANDARDTIME + PaymentTerm: + externalDocs: + url: http://developer.xero.com/documentation/api/organisation/ + properties: + Bills: + $ref: '#/components/schemas/Bill' + Sales: + $ref: '#/components/schemas/Bill' + type: object + PaymentTermType: + type: string + enum: + - DAYSAFTERBILLDATE + - DAYSAFTERBILLMONTH + - OFCURRENTMONTH + - OFFOLLOWINGMONTH + ExternalLink: + externalDocs: + url: http://developer.xero.com/documentation/api/organisation/ + properties: + LinkType: + description: See External link types + type: string + enum: + - Facebook + - GooglePlus + - LinkedIn + - Twitter + - Website + Url: + description: URL for service e.g. http://twitter.com/xeroapi + type: string + Description: + type: string + type: object + Bill: + externalDocs: + url: http://developer.xero.com/documentation/api/organisation/ + properties: + Day: + description: Day of Month (0-31) + type: integer + Type: + $ref: '#/components/schemas/PaymentTermType' + type: object + Overpayments: + type: object + x-objectArrayKey: overpayments + properties: + pagination: + $ref: '#/components/schemas/Pagination' + Warnings: + description: Displays array of warning messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + Overpayments: + type: array + items: + $ref: '#/components/schemas/Overpayment' + Overpayment: + externalDocs: + url: http://developer.xero.com/documentation/api/overpayments/ + properties: + Type: + description: See Overpayment Types + type: string + enum: + - RECEIVE-OVERPAYMENT + - SPEND-OVERPAYMENT + - AROVERPAYMENT + Contact: + $ref: '#/components/schemas/Contact' + Date: + description: The date the overpayment is created YYYY-MM-DD + type: string + x-is-msdate: true + Status: + description: See Overpayment Status Codes + type: string + enum: + - AUTHORISED + - PAID + - VOIDED + LineAmountTypes: + $ref: '#/components/schemas/LineAmountTypes' + type: string + LineItems: + description: See Overpayment Line Items + type: array + items: + $ref: '#/components/schemas/LineItem' + SubTotal: + description: The subtotal of the overpayment excluding taxes + type: number + format: double + x-is-money: true + TotalTax: + description: The total tax on the overpayment + type: number + format: double + x-is-money: true + Total: + description: The total of the overpayment (subtotal + total tax) + type: number + format: double + x-is-money: true + UpdatedDateUTC: + description: UTC timestamp of last update to the overpayment + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + CurrencyCode: + $ref: '#/components/schemas/CurrencyCode' + type: string + OverpaymentID: + description: Xero generated unique identifier + type: string + format: uuid + CurrencyRate: + description: The currency rate for a multicurrency overpayment. If no rate is specified, the XE.com day rate is used + type: number + format: double + x-is-money: true + RemainingCredit: + description: The remaining credit balance on the overpayment + type: number + format: double + x-is-money: true + Allocations: + description: See Allocations + type: array + items: + $ref: '#/components/schemas/Allocation' + AppliedAmount: + description: The amount of applied to an invoice + type: number + format: double + example: 2.00 + Payments: + description: See Payments + type: array + items: + $ref: '#/components/schemas/Payment' + HasAttachments: + description: boolean to indicate if a overpayment has an attachment + readOnly: true + type: boolean + default: "false" + example: "false" + Attachments: + description: See Attachments + type: array + items: + $ref: '#/components/schemas/Attachment' + type: object + Payments: + type: object + x-objectArrayKey: payments + properties: + pagination: + $ref: '#/components/schemas/Pagination' + Warnings: + description: Displays array of warning messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + Payments: + type: array + items: + $ref: '#/components/schemas/Payment' + PaymentDelete: + externalDocs: + url: http://developer.xero.com/documentation/api/payments/ + properties: + Status: + description: The status of the payment. + type: string + default: DELETED + required: + - Status + type: object + Payment: + externalDocs: + url: http://developer.xero.com/documentation/api/payments/ + properties: + Invoice: + $ref: '#/components/schemas/Invoice' + CreditNote: + $ref: '#/components/schemas/CreditNote' + Prepayment: + $ref: '#/components/schemas/Prepayment' + Overpayment: + $ref: '#/components/schemas/Overpayment' + InvoiceNumber: + description: Number of invoice or credit note you are applying payment to e.g.INV-4003 + type: string + CreditNoteNumber: + description: Number of invoice or credit note you are applying payment to e.g. INV-4003 + type: string + BatchPayment: + $ref: '#/components/schemas/BatchPayment' + Account: + $ref: '#/components/schemas/Account' + Code: + description: Code of account you are using to make the payment e.g. 001 (note- not all accounts have a code value) + type: string + Date: + description: Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06 + type: string + x-is-msdate: true + CurrencyRate: + description: Exchange rate when payment is received. Only used for non base currency invoices and credit notes e.g. 0.7500 + type: number + format: double + x-is-money: true + Amount: + description: The amount of the payment. Must be less than or equal to the outstanding amount owing on the invoice e.g. 200.00 + type: number + format: double + x-is-money: true + BankAmount: + description: The amount of the payment in the currency of the bank account. + type: number + format: double + x-is-money: true + Reference: + description: An optional description for the payment e.g. Direct Debit + type: string + IsReconciled: + description: An optional parameter for the payment. A boolean indicating whether you would like the payment to be created as reconciled when using PUT, or whether a payment has been reconciled when using GET + type: boolean + Status: + description: The status of the payment. + type: string + enum: + - AUTHORISED + - DELETED + PaymentType: + description: See Payment Types. + readOnly: true + type: string + enum: + - ACCRECPAYMENT + - ACCPAYPAYMENT + - ARCREDITPAYMENT + - APCREDITPAYMENT + - AROVERPAYMENTPAYMENT + - ARPREPAYMENTPAYMENT + - APPREPAYMENTPAYMENT + - APOVERPAYMENTPAYMENT + UpdatedDateUTC: + description: UTC timestamp of last update to the payment + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + PaymentID: + description: The Xero identifier for an Payment e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9 + type: string + format: uuid + example: 00000000-0000-0000-0000-000000000000 + BatchPaymentID: + description: Present if the payment was created as part of a batch. + type: string + format: uuid + example: 00000000-0000-0000-0000-000000000000 + BankAccountNumber: + description: The suppliers bank account number the payment is being made to + type: string + Particulars: + description: The suppliers bank account number the payment is being made to + type: string + Details: + description: The information to appear on the supplier's bank account + type: string + HasAccount: + description: A boolean to indicate if a contact has an validation errors + type: boolean + default: "false" + example: "false" + HasValidationErrors: + description: A boolean to indicate if a contact has an validation errors + type: boolean + default: "false" + example: "false" + StatusAttributeString: + description: A string to indicate if a invoice status + type: string + ValidationErrors: + description: Displays array of validation error messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + Warnings: + description: Displays array of warning messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + type: object + Prepayments: + type: object + x-objectArrayKey: prepayments + properties: + pagination: + $ref: '#/components/schemas/Pagination' + Warnings: + description: Displays array of warning messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + Prepayments: + type: array + items: + $ref: '#/components/schemas/Prepayment' + Prepayment: + externalDocs: + url: http://developer.xero.com/documentation/api/prepayments/ + properties: + Type: + description: See Prepayment Types + type: string + enum: + - RECEIVE-PREPAYMENT + - SPEND-PREPAYMENT + - ARPREPAYMENT + - APPREPAYMENT + Contact: + $ref: '#/components/schemas/Contact' + Date: + description: The date the prepayment is created YYYY-MM-DD + type: string + x-is-msdate: true + Status: + description: See Prepayment Status Codes + type: string + enum: + - AUTHORISED + - PAID + - VOIDED + LineAmountTypes: + $ref: '#/components/schemas/LineAmountTypes' + type: string + LineItems: + description: See Prepayment Line Items + type: array + items: + $ref: '#/components/schemas/LineItem' + SubTotal: + description: The subtotal of the prepayment excluding taxes + type: number + format: double + x-is-money: true + TotalTax: + description: The total tax on the prepayment + type: number + format: double + x-is-money: true + Total: + description: The total of the prepayment(subtotal + total tax) + type: number + format: double + x-is-money: true + Reference: + description: Returns Invoice number field. Reference field isn't available. + type: string + readOnly: true + UpdatedDateUTC: + description: UTC timestamp of last update to the prepayment + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + CurrencyCode: + $ref: '#/components/schemas/CurrencyCode' + type: string + PrepaymentID: + description: Xero generated unique identifier + type: string + format: uuid + CurrencyRate: + description: The currency rate for a multicurrency prepayment. If no rate is specified, the XE.com day rate is used + type: number + format: double + x-is-money: true + RemainingCredit: + description: The remaining credit balance on the prepayment + type: number + format: double + x-is-money: true + Allocations: + description: See Allocations + type: array + items: + $ref: '#/components/schemas/Allocation' + Payments: + description: See Payments + type: array + items: + $ref: '#/components/schemas/Payment' + AppliedAmount: + description: The amount of applied to an invoice + type: number + format: double + example: 2.00 + HasAttachments: + description: boolean to indicate if a prepayment has an attachment + readOnly: true + type: boolean + default: "false" + example: "false" + Attachments: + description: See Attachments + type: array + items: + $ref: '#/components/schemas/Attachment' + type: object + PurchaseOrders: + type: object + x-objectArrayKey: purchase_orders + properties: + pagination: + $ref: '#/components/schemas/Pagination' + Warnings: + description: Displays array of warning messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + PurchaseOrders: + type: array + items: + $ref: '#/components/schemas/PurchaseOrder' + PurchaseOrder: + externalDocs: + url: http://developer.xero.com/documentation/api/purchase-orders/ + properties: + Contact: + $ref: '#/components/schemas/Contact' + LineItems: + description: See LineItems + type: array + items: + $ref: '#/components/schemas/LineItem' + Date: + description: Date purchase order was issued – YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation + type: string + x-is-msdate: true + DeliveryDate: + description: Date the goods are to be delivered – YYYY-MM-DD + type: string + x-is-msdate: true + LineAmountTypes: + $ref: '#/components/schemas/LineAmountTypes' + type: string + PurchaseOrderNumber: + description: Unique alpha numeric code identifying purchase order (when missing will auto-generate from your Organisation Invoice Settings) + type: string + Reference: + description: Additional reference number + type: string + BrandingThemeID: + description: See BrandingThemes + type: string + format: uuid + CurrencyCode: + $ref: '#/components/schemas/CurrencyCode' + type: string + Status: + description: See Purchase Order Status Codes + type: string + enum: + - DRAFT + - SUBMITTED + - AUTHORISED + - BILLED + - DELETED + SentToContact: + description: Boolean to set whether the purchase order should be marked as “sent”. This can be set only on purchase orders that have been approved or billed + type: boolean + DeliveryAddress: + description: The address the goods are to be delivered to + type: string + AttentionTo: + description: The person that the delivery is going to + type: string + Telephone: + description: The phone number for the person accepting the delivery + type: string + DeliveryInstructions: + description: A free text feild for instructions (500 characters max) + type: string + ExpectedArrivalDate: + description: The date the goods are expected to arrive. + type: string + x-is-msdate: true + PurchaseOrderID: + description: Xero generated unique identifier for purchase order + type: string + format: uuid + CurrencyRate: + description: The currency rate for a multicurrency purchase order. If no rate is specified, the XE.com day rate is used. + type: number + format: double + x-is-money: true + SubTotal: + description: Total of purchase order excluding taxes + readOnly: true + type: number + format: double + x-is-money: true + TotalTax: + description: Total tax on purchase order + readOnly: true + type: number + format: double + x-is-money: true + Total: + description: Total of Purchase Order tax inclusive (i.e. SubTotal + TotalTax) + readOnly: true + type: number + format: double + x-is-money: true + TotalDiscount: + description: Total of discounts applied on the purchase order line items + readOnly: true + type: number + format: double + x-is-money: true + HasAttachments: + description: boolean to indicate if a purchase order has an attachment + readOnly: true + type: boolean + default: "false" + example: "false" + UpdatedDateUTC: + description: Last modified date UTC format + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + StatusAttributeString: + description: A string to indicate if a invoice status + type: string + ValidationErrors: + description: Displays array of validation error messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + Warnings: + description: Displays array of warning messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + Attachments: + description: Displays array of attachments from the API + type: array + items: + $ref: '#/components/schemas/Attachment' + type: object + Pagination: + type: object + properties: + page: + type: integer + pageSize: + type: integer + pageCount: + type: integer + itemCount: + type: integer + Quotes: + type: object + x-objectArrayKey: quotes + properties: + Quotes: + type: array + items: + $ref: '#/components/schemas/Quote' + Quote: + externalDocs: + url: http://developer.xero.com/documentation/api/Quotes/ + properties: + QuoteID: + description: QuoteID GUID is automatically generated and is returned after create or GET. + type: string + format: uuid + QuoteNumber: + description: Unique alpha numeric code identifying a quote (Max Length = 255) + maxLength: 255 + type: string + Reference: + description: Additional reference number + maxLength: 4000 + type: string + Terms: + description: Terms of the quote + maxLength: 4000 + type: string + Contact: + $ref: '#/components/schemas/Contact' + type: string + LineItems: + description: See LineItems + type: array + items: + $ref: '#/components/schemas/LineItem' + Date: + description: Date quote was issued – YYYY-MM-DD. If the Date element is not specified it will default to the current date based on the timezone setting of the organisation + type: string + x-is-msdate: true + DateString: + description: Date the quote was issued (YYYY-MM-DD) + type: string + ExpiryDate: + description: Date the quote expires – YYYY-MM-DD. + type: string + x-is-msdate: true + ExpiryDateString: + description: Date the quote expires – YYYY-MM-DD. + type: string + Status: + $ref: '#/components/schemas/QuoteStatusCodes' + type: string + CurrencyCode: + $ref: '#/components/schemas/CurrencyCode' + type: string + CurrencyRate: + description: The currency rate for a multicurrency quote + type: number + format: double + SubTotal: + description: Total of quote excluding taxes. + readOnly: true + type: number + format: double + x-is-money: true + TotalTax: + description: Total tax on quote + readOnly: true + type: number + format: double + x-is-money: true + Total: + description: Total of Quote tax inclusive (i.e. SubTotal + TotalTax). This will be ignored if it doesn’t equal the sum of the LineAmounts + readOnly: true + type: number + format: double + x-is-money: true + TotalDiscount: + description: Total of discounts applied on the quote line items + readOnly: true + type: number + format: double + x-is-money: true + Title: + description: Title text for the quote + type: string + maxLength: 100 + Summary: + description: Summary text for the quote + type: string + maxLength: 3000 + BrandingThemeID: + description: See BrandingThemes + type: string + format: uuid + UpdatedDateUTC: + description: Last modified date UTC format + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + LineAmountTypes: + $ref: '#/components/schemas/QuoteLineAmountTypes' + type: string + description: See Quote Line Amount Types + StatusAttributeString: + description: A string to indicate if a invoice status + type: string + ValidationErrors: + description: Displays array of validation error messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + type: object + QuoteLineAmountTypes: + description: Line amounts are exclusive of tax by default if you don’t specify this element. See Line Amount Types + type: string + enum: + - EXCLUSIVE + - INCLUSIVE + - NOTAX + QuoteStatusCodes: + description: The status of the quote. + type: string + enum: + - DRAFT + - SENT + - DECLINED + - ACCEPTED + - INVOICED + - DELETED + Receipts: + type: object + x-objectArrayKey: receipts + properties: + Receipts: + type: array + items: + $ref: '#/components/schemas/Receipt' + Receipt: + externalDocs: + url: http://developer.xero.com/documentation/api/receipts/ + properties: + Date: + description: Date of receipt – YYYY-MM-DD + type: string + x-is-msdate: true + Contact: + $ref: '#/components/schemas/Contact' + LineItems: + type: array + items: + $ref: '#/components/schemas/LineItem' + User: + $ref: '#/components/schemas/User' + Reference: + description: Additional reference number + type: string + LineAmountTypes: + $ref: '#/components/schemas/LineAmountTypes' + type: string + SubTotal: + description: Total of receipt excluding taxes + type: number + format: double + x-is-money: true + TotalTax: + description: Total tax on receipt + type: number + format: double + x-is-money: true + Total: + description: Total of receipt tax inclusive (i.e. SubTotal + TotalTax) + type: number + format: double + x-is-money: true + ReceiptID: + description: Xero generated unique identifier for receipt + type: string + format: uuid + Status: + description: Current status of receipt – see status types + type: string + enum: + - DRAFT + - SUBMITTED + - AUTHORISED + - DECLINED + - VOIDED + ReceiptNumber: + description: Xero generated sequence number for receipt in current claim for a given user + readOnly: true + type: string + UpdatedDateUTC: + description: Last modified date UTC format + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + HasAttachments: + description: boolean to indicate if a receipt has an attachment + readOnly: true + type: boolean + default: "false" + example: "false" + Url: + description: URL link to a source document – shown as “Go to [appName]” in the Xero app + readOnly: true + type: string + ValidationErrors: + description: Displays array of validation error messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + Warnings: + description: Displays array of warning messages from the API + type: array + items: + $ref: '#/components/schemas/ValidationError' + Attachments: + description: Displays array of attachments from the API + type: array + items: + $ref: '#/components/schemas/Attachment' + type: object + RepeatingInvoices: + type: object + x-objectArrayKey: repeating_invoices + properties: + RepeatingInvoices: + type: array + items: + $ref: '#/components/schemas/RepeatingInvoice' + RepeatingInvoice: + externalDocs: + url: http://developer.xero.com/documentation/api/repeating-invoices/ + properties: + Type: + description: See Invoice Types + type: string + enum: + - ACCPAY + - ACCREC + Contact: + $ref: '#/components/schemas/Contact' + Schedule: + $ref: '#/components/schemas/Schedule' + LineItems: + description: See LineItems + type: array + items: + $ref: '#/components/schemas/LineItem' + LineAmountTypes: + $ref: '#/components/schemas/LineAmountTypes' + type: string + Reference: + description: ACCREC only – additional reference number + type: string + BrandingThemeID: + description: See BrandingThemes + type: string + format: uuid + CurrencyCode: + $ref: '#/components/schemas/CurrencyCode' + type: string + Status: + description: One of the following - DRAFT or AUTHORISED – See Invoice Status Codes + type: string + enum: + - DRAFT + - AUTHORISED + - DELETED + SubTotal: + description: Total of invoice excluding taxes + type: number + format: double + x-is-money: true + TotalTax: + description: Total tax on invoice + type: number + format: double + x-is-money: true + Total: + description: Total of Invoice tax inclusive (i.e. SubTotal + TotalTax) + type: number + format: double + x-is-money: true + RepeatingInvoiceID: + description: Xero generated unique identifier for repeating invoice template + type: string + format: uuid + ID: + description: Xero generated unique identifier for repeating invoice template + type: string + format: uuid + HasAttachments: + description: Boolean to indicate if an invoice has an attachment + readOnly: true + type: boolean + default: "false" + example: "false" + Attachments: + description: Displays array of attachments from the API + type: array + items: + $ref: '#/components/schemas/Attachment' + ApprovedForSending: + description: Boolean to indicate whether the invoice has been approved for sending + type: boolean + default: "false" + example: "false" + SendCopy: + description: Boolean to indicate whether a copy is sent to sender's email + type: boolean + default: "false" + example: "false" + MarkAsSent: + description: Boolean to indicate whether the invoice in the Xero app displays as "sent" + type: boolean + default: "false" + example: "false" + IncludePDF: + description: Boolean to indicate whether to include PDF attachment + type: boolean + default: "false" + example: "false" + type: object + ReportWithRows: + type: object + properties: + Reports: + type: array + items: + $ref: '#/components/schemas/ReportWithRow' + ReportWithRow: + externalDocs: + url: http://developer.xero.com/documentation/api/reports/ + properties: + ReportID: + description: ID of the Report + type: string + ReportName: + description: Name of the report + type: string + ReportTitle: + description: Title of the report + type: string + ReportType: + description: The type of report (BalanceSheet,ProfitLoss, etc) + type: string + ReportTitles: + description: Report titles array (3 to 4 strings with the report name, orgnisation name and time frame of report) + type: array + items: + type: string + ReportDate: + description: Date of report + type: string + Rows: + type: array + items: + $ref: '#/components/schemas/ReportRows' + UpdatedDateUTC: + description: Updated Date + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + Fields: + type: array + items: + $ref: '#/components/schemas/ReportFields' + ReportRows: + type: object + properties: + RowType: + $ref: '#/components/schemas/RowType' + Title: + type: string + Cells: + type: array + items: + $ref: '#/components/schemas/ReportCell' + Rows: + type: array + items: + $ref: '#/components/schemas/ReportRow' + RowType: + type: string + enum: + - Header + - Section + - Row + - SummaryRow + ReportRow: + type: object + properties: + RowType: + $ref: '#/components/schemas/RowType' + Title: + type: string + Cells: + type: array + items: + $ref: '#/components/schemas/ReportCell' + ReportCell: + type: object + properties: + Value: + type: string + Attributes: + type: array + items: + $ref: '#/components/schemas/ReportAttribute' + ReportAttribute: + externalDocs: + url: http://developer.xero.com/documentation/api/reports/ + properties: + Id: + type: string + Value: + type: string + ReportFields: + type: object + properties: + FieldID: + type: string + Description: + type: string + Value: + type: string + Reports: + type: object + x-objectArrayKey: reports + properties: + Reports: + type: array + items: + $ref: '#/components/schemas/Report' + Report: + externalDocs: + url: http://developer.xero.com/documentation/api/reports/ + properties: + ReportName: + description: See Prepayment Types + type: string + ReportType: + description: See Prepayment Types + type: string + enum: + - AgedPayablesByContact + ReportTitle: + description: See Prepayment Types + type: string + ReportDate: + description: Date of report + type: string + UpdatedDateUTC: + description: Updated Date + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + Contacts: + type: array + items: + $ref: '#/components/schemas/TenNinetyNineContact' + TenNinetyNineContact: + properties: + Box1: + description: Box 1 on 1099 Form + type: number + format: double + x-is-money: true + Box2: + description: Box 2 on 1099 Form + type: number + format: double + x-is-money: true + Box3: + description: Box 3 on 1099 Form + type: number + format: double + x-is-money: true + Box4: + description: Box 4 on 1099 Form + type: number + format: double + x-is-money: true + Box5: + description: Box 5 on 1099 Form + type: number + format: double + x-is-money: true + Box6: + description: Box 6 on 1099 Form + type: number + format: double + x-is-money: true + Box7: + description: Box 7 on 1099 Form + type: number + format: double + x-is-money: true + Box8: + description: Box 8 on 1099 Form + type: number + format: double + x-is-money: true + Box9: + description: Box 9 on 1099 Form + type: number + format: double + x-is-money: true + Box10: + description: Box 10 on 1099 Form + type: number + format: double + x-is-money: true + Box11: + description: Box 11 on 1099 Form + type: number + format: double + x-is-money: true + Box13: + description: Box 13 on 1099 Form + type: number + format: double + x-is-money: true + Box14: + description: Box 14 on 1099 Form + type: number + format: double + x-is-money: true + Name: + description: Contact name on 1099 Form + type: string + FederalTaxIDType: + description: Contact Fed Tax ID type + type: string + City: + description: Contact city on 1099 Form + type: string + Zip: + description: Contact zip on 1099 Form + type: string + State: + description: Contact State on 1099 Form + type: string + Email: + description: Contact email on 1099 Form + type: string + StreetAddress: + description: Contact address on 1099 Form + type: string + TaxID: + description: Contact tax id on 1099 Form + type: string + ContactId: + description: Contact contact id + type: string + format: uuid + LegalName: + description: Contact legal name + type: string + BusinessName: + description: Contact business name + type: string + FederalTaxClassification: + description: Contact federal tax classification + type: string + enum: + - SOLE_PROPRIETOR + - PARTNERSHIP + - TRUST_OR_ESTATE + - NONPROFIT + - C_CORP + - S_CORP + - OTHER + Schedule: + externalDocs: + url: http://developer.xero.com/documentation/api/repeating-invoices/ + properties: + Period: + description: Integer used with the unit e.g. 1 (every 1 week), 2 (every 2 months) + type: integer + Unit: + description: One of the following - WEEKLY or MONTHLY + type: string + enum: + - WEEKLY + - MONTHLY + DueDate: + description: Integer used with due date type e.g 20 (of following month), 31 (of current month) + type: integer + DueDateType: + description: the payment terms + type: string + enum: + - DAYSAFTERBILLDATE + - DAYSAFTERBILLMONTH + - DAYSAFTERINVOICEDATE + - DAYSAFTERINVOICEMONTH + - OFCURRENTMONTH + - OFFOLLOWINGMONTH + StartDate: + description: Date the first invoice of the current version of the repeating schedule was generated (changes when repeating invoice is edited) + type: string + x-is-msdate: true + NextScheduledDate: + description: The calendar date of the next invoice in the schedule to be generated + type: string + x-is-msdate: true + EndDate: + description: Invoice end date – only returned if the template has an end date set + type: string + x-is-msdate: true + type: object + TaxRates: + type: object + x-objectArrayKey: tax_rates + properties: + TaxRates: + type: array + items: + $ref: '#/components/schemas/TaxRate' + TaxType: + description: See Tax Types – can only be used on update calls + type: string + enum: + - OUTPUT + - INPUT + - CAPEXINPUT + - EXEMPTEXPORT + - EXEMPTEXPENSES + - EXEMPTCAPITAL + - EXEMPTOUTPUT + - INPUTTAXED + - BASEXCLUDED + - GSTONCAPIMPORTS + - GSTONIMPORTS + - NONE + - INPUT2 + - ZERORATED + - OUTPUT2 + - CAPEXINPUT2 + - CAPEXOUTPUT + - CAPEXOUTPUT2 + - CAPEXSRINPUT + - CAPEXSROUTPUT + - ECACQUISITIONS + - ECZRINPUT + - ECZROUTPUT + - ECZROUTPUTSERVICES + - EXEMPTINPUT + - REVERSECHARGES + - RRINPUT + - RROUTPUT + - SRINPUT + - SROUTPUT + - ZERORATEDINPUT + - ZERORATEDOUTPUT + - BLINPUT + - DSOUTPUT + - EPINPUT + - ES33OUTPUT + - ESN33OUTPUT + - IGDSINPUT2 + - IMINPUT2 + - MEINPUT + - NRINPUT + - OPINPUT + - OSOUTPUT + - TXESSINPUT + - TXN33INPUT + - TXPETINPUT + - TXREINPUT + - INPUT3 + - INPUT4 + - OUTPUT3 + - OUTPUT4 + - SROUTPUT2 + - TXCA + - SRCAS + - BLINPUT2 + - DRCHARGESUPPLY20 + - DRCHARGE20 + - DRCHARGESUPPLY5 + - DRCHARGE5 + - BADDEBTRELIEF + - IGDSINPUT3 + - SROVR + - TOURISTREFUND + - TXRCN33 + - TXRCRE + - TXRCESS + - TXRCTS + - OUTPUTY23 + - DSOUTPUTY23 + - INPUTY23 + - IMINPUT2Y23 + - IGDSINPUT2Y23 + - TXPETINPUTY23 + - TXESSINPUTY23 + - TXN33INPUTY23 + - TXREINPUTY23 + - TXCAY23 + - BADDEBTRELIEFY23 + - IGDSINPUT3Y23 + - SROVRRSY23 + - SROVRLVGY23 + - SRLVGY23 + - TXRCN33Y23 + - TXRCREY23 + - TXRCESSY23 + - TXRCTSY23 + - IM + - IMY23 + - IMESS + - IMESSY23 + - IMN33 + - IMN33Y23 + - IMRE + - IMREY23 + - BADDEBTRECOVERY + - BADDEBTRECOVERYY23 + - OUTPUTY24 + - DSOUTPUTY24 + - INPUTY24 + - IGDSINPUT2Y24 + - TXPETINPUTY24 + - TXESSINPUTY24 + - TXN33INPUTY24 + - TXREINPUTY24 + - TXCAY24 + - BADDEBTRELIEFY24 + - IGDSINPUT3Y24 + - SROVRRSY24 + - SROVRLVGY24 + - SRLVGY24 + - TXRCTSY24 + - TXRCESSY24 + - TXRCN33Y24 + - TXRCREY24 + - IMY24 + - IMESSY24 + - IMN33Y24 + - IMREY24 + - BADDEBTRECOVERYY24 + - OSOUTPUT2 + - BLINPUT3 + - BLINPUT3Y23 + - BLINPUT3Y24 + Setup: + externalDocs: + url: https://developer.xero.com/documentation/api-guides/conversions + properties: + ConversionDate: + $ref: '#/components/schemas/ConversionDate' + ConversionBalances: + description: Balance supplied for each account that has a value as at the conversion date. + type: array + items: + $ref: '#/components/schemas/ConversionBalances' + Accounts: + type: array + items: + $ref: '#/components/schemas/Account' + ConversionDate: + description: The date when the organisation starts using Xero + type: object + properties: + Month: + description: The month the organisation starts using Xero. Value is an integer between 1 and 12 + type: integer + example: 1 + Year: + description: The year the organisation starts using Xero. Value is an integer greater than 2006 + type: integer + example: 2020 + ConversionBalances: + description: Balance supplied for each account that has a value as at the conversion date. + properties: + AccountCode: + description: The account code for a account + type: string + Balance: + description: The opening balances of the account. Debits are positive, credits are negative values + type: number + format: double + BalanceDetails: + type: array + items: + $ref: '#/components/schemas/BalanceDetails' + type: object + BalanceDetails: + description: An array to specify multiple currency balances of an account + properties: + Balance: + description: The opening balances of the account. Debits are positive, credits are negative values + type: number + format: double + CurrencyCode: + description: The currency of the balance (Not required for base currency) + type: string + CurrencyRate: + description: (Optional) Exchange rate to base currency when money is spent or received. If not specified, XE rate for the day is applied + type: number + format: double + x-is-money: true + type: object + ImportSummaryObject: + externalDocs: + url: https://developer.xero.com/documentation/api-guides/conversions + properties: + ImportSummary: + $ref: '#/components/schemas/ImportSummary' + ImportSummary: + externalDocs: + url: https://developer.xero.com/documentation/api-guides/conversions + description: A summary of the import from setup endpoint + type: object + properties: + Accounts: + $ref: '#/components/schemas/ImportSummaryAccounts' + Organisation: + $ref: '#/components/schemas/ImportSummaryOrganisation' + ImportSummaryAccounts: + description: A summary of the accounts changes + type: object + properties: + Total: + description: The total number of accounts in the org + type: integer + format: int32 + New: + description: The number of new accounts created + type: integer + format: int32 + Updated: + description: The number of accounts updated + type: integer + format: int32 + Deleted: + description: The number of accounts deleted + type: integer + format: int32 + Locked: + description: The number of locked accounts + type: integer + format: int32 + System: + description: The number of system accounts + type: integer + format: int32 + Errored: + description: The number of accounts that had an error + type: integer + format: int32 + Present: + type: boolean + NewOrUpdated: + description: The number of new or updated accounts + type: integer + format: int32 + ImportSummaryOrganisation: + type: object + properties: + Present: + type: boolean + TaxRate: + externalDocs: + url: http://developer.xero.com/documentation/api/tax-rates/ + properties: + Name: + description: Name of tax rate + type: string + TaxType: + description: The tax type + type: string + TaxComponents: + description: See TaxComponents + type: array + items: + $ref: '#/components/schemas/TaxComponent' + Status: + description: See Status Codes + type: string + enum: + - ACTIVE + - DELETED + - ARCHIVED + - PENDING + ReportTaxType: + description: See ReportTaxTypes + type: string + enum: + - AVALARA + - BASEXCLUDED + - CAPITALSALESOUTPUT + - CAPITALEXPENSESINPUT + - ECOUTPUT + - ECOUTPUTSERVICES + - ECINPUT + - ECACQUISITIONS + - EXEMPTEXPENSES + - EXEMPTINPUT + - EXEMPTOUTPUT + - GSTONIMPORTS + - INPUT + - INPUTTAXED + - MOSSSALES + - NONE + - NONEOUTPUT + - OUTPUT + - PURCHASESINPUT + - SALESOUTPUT + - EXEMPTCAPITAL + - EXEMPTEXPORT + - CAPITALEXINPUT + - GSTONCAPIMPORTS + - GSTONCAPITALIMPORTS + - REVERSECHARGES + - PAYMENTS + - INVOICE + - CASH + - ACCRUAL + - FLATRATECASH + - FLATRATEACCRUAL + - ACCRUALS + - TXCA + - SRCAS + - DSOUTPUT + - BLINPUT2 + - EPINPUT + - IMINPUT2 + - MEINPUT + - IGDSINPUT2 + - ESN33OUTPUT + - OPINPUT + - OSOUTPUT + - TXN33INPUT + - TXESSINPUT + - TXREINPUT + - TXPETINPUT + - NRINPUT + - ES33OUTPUT + - ZERORATEDINPUT + - ZERORATEDOUTPUT + - DRCHARGESUPPLY + - DRCHARGE + - CAPINPUT + - CAPIMPORTS + - IMINPUT + - INPUT2 + - CIUINPUT + - SRINPUT + - OUTPUT2 + - SROUTPUT + - CAPOUTPUT + - SROUTPUT2 + - CIUOUTPUT + - ZROUTPUT + - ZREXPORT + - ACC28PLUS + - ACCUPTO28 + - OTHEROUTPUT + - SHOUTPUT + - ZRINPUT + - BADDEBT + - OTHERINPUT + - BADDEBTRELIEF + - IGDSINPUT3 + - SROVR + - TOURISTREFUND + - TXRCN33 + - TXRCRE + - TXRCESS + - TXRCTS + - CAPEXINPUT + - UNDEFINED + - CAPEXOUTPUT + - ZEROEXPOUTPUT + - GOODSIMPORT + - NONEINPUT + - NOTREPORTED + - SROVRRS + - SROVRLVG + - SRLVG + - IM + - IMESS + - IMN33 + - IMRE + - BADDEBTRECOVERY + - USSALESTAX + - BLINPUT3 + CanApplyToAssets: + description: Boolean to describe if tax rate can be used for asset accounts i.e. true,false + readOnly: true + type: boolean + CanApplyToEquity: + description: Boolean to describe if tax rate can be used for equity accounts i.e true,false + readOnly: true + type: boolean + CanApplyToExpenses: + description: Boolean to describe if tax rate can be used for expense accounts i.e. true,false + readOnly: true + type: boolean + CanApplyToLiabilities: + description: Boolean to describe if tax rate can be used for liability accounts i.e. true,false + readOnly: true + type: boolean + CanApplyToRevenue: + description: Boolean to describe if tax rate can be used for revenue accounts i.e. true,false + readOnly: true + type: boolean + DisplayTaxRate: + description: Tax Rate (decimal to 4dp) e.g 12.5000 + readOnly: true + type: number + format: double + x-is-money: true + EffectiveRate: + description: Effective Tax Rate (decimal to 4dp) e.g 12.5000 + readOnly: true + type: number + format: double + x-is-money: true + type: object + TaxComponent: + externalDocs: + url: http://developer.xero.com/documentation/api/tax-rates/ + properties: + Name: + description: Name of Tax Component + type: string + Rate: + description: Tax Rate (up to 4dp) + type: number + format: double + x-is-money: true + IsCompound: + description: Boolean to describe if Tax rate is compounded. + type: boolean + IsNonRecoverable: + description: Boolean to describe if tax rate is non-recoverable. Non-recoverable rates are only applicable to Canadian organisations + type: boolean + type: object + TrackingCategories: + type: object + x-objectArrayKey: tracking_categories + properties: + TrackingCategories: + type: array + items: + $ref: '#/components/schemas/TrackingCategory' + TrackingCategory: + externalDocs: + url: http://developer.xero.com/documentation/api/tracking-categories/ + properties: + TrackingCategoryID: + description: The Xero identifier for a tracking category e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9 + type: string + format: uuid + TrackingOptionID: + description: The Xero identifier for a tracking option e.g. dc54c220-0140-495a-b925-3246adc0075f + type: string + format: uuid + Name: + description: The name of the tracking category e.g. Department, Region (max length = 100) + maxLength: 100 + type: string + Option: + description: The option name of the tracking option e.g. East, West (max length = 100) + maxLength: 100 + type: string + Status: + description: The status of a tracking category + type: string + enum: + - ACTIVE + - ARCHIVED + - DELETED + Options: + description: See Tracking Options + type: array + items: + $ref: '#/components/schemas/TrackingOption' + type: object + TrackingOptions: + type: object + x-objectArrayKey: options + properties: + Options: + type: array + items: + $ref: '#/components/schemas/TrackingOption' + TrackingOption: + externalDocs: + url: http://developer.xero.com/documentation/api/tracking-categories/ + properties: + TrackingOptionID: + description: The Xero identifier for a tracking option e.g. ae777a87-5ef3-4fa0-a4f0-d10e1f13073a + type: string + format: uuid + Name: + description: The name of the tracking option e.g. Marketing, East (max length = 100) + maxLength: 100 + type: string + Status: + description: The status of a tracking option + type: string + enum: + - ACTIVE + - ARCHIVED + - DELETED + TrackingCategoryID: + description: Filter by a tracking category e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9 + type: string + format: uuid + type: object + SalesTrackingCategory: + externalDocs: + url: http://developer.xero.com/documentation/api/tracking-categories/ + properties: + TrackingCategoryName: + description: The default sales tracking category name for contacts + type: string + TrackingOptionName: + description: The default purchase tracking category name for contacts + type: string + type: object + Users: + type: object + x-objectArrayKey: users + properties: + Users: + type: array + items: + $ref: '#/components/schemas/User' + User: + externalDocs: + url: http://developer.xero.com/documentation/api/users/ + properties: + UserID: + description: Xero identifier + type: string + format: uuid + EmailAddress: + description: Email address of user + type: string + FirstName: + description: First name of user + type: string + LastName: + description: Last name of user + type: string + UpdatedDateUTC: + description: Timestamp of last change to user + type: string + x-is-msdate-time: true + example: /Date(1573755038314)/ + readOnly: true + IsSubscriber: + description: Boolean to indicate if user is the subscriber + type: boolean + OrganisationRole: + description: User role that defines permissions in Xero and via API (READONLY, INVOICEONLY, STANDARD, FINANCIALADVISER, etc) + type: string + enum: + - READONLY + - INVOICEONLY + - STANDARD + - FINANCIALADVISER + - MANAGEDCLIENT + - CASHBOOKCLIENT + - UNKNOWN + type: object + Error: + externalDocs: + url: https://developer.xero.com/documentation/api/http-response-codes + properties: + ErrorNumber: + description: Exception number + type: integer + Type: + description: Exception type + type: string + Message: + description: Exception message + type: string + Elements: + description: Array of Elements of validation Errors + type: array + items: + $ref: '#/components/schemas/Element' + type: object + Element: + externalDocs: + url: https://developer.xero.com/documentation/api/http-response-codes + properties: + ValidationErrors: + description: Array of Validation Error message + type: array + items: + $ref: '#/components/schemas/ValidationError' + BatchPaymentID: + description: Unique ID for batch payment object with validation error + type: string + format: uuid + BankTransactionID: + type: string + format: uuid + CreditNoteID: + type: string + format: uuid + ContactID: + type: string + format: uuid + InvoiceID: + type: string + format: uuid + ItemID: + type: string + format: uuid + PurchaseOrderID: + type: string + format: uuid + type: object + ValidationError: + externalDocs: + url: https://developer.xero.com/documentation/api/http-response-codes + properties: + Message: + description: Validation error message + type: string + type: object + InvoiceAddress: + properties: + InvoiceAddressType: + description: Indicates whether the address is defined as origin (FROM) or destination (TO) + type: string + enum: + - FROM + - TO + AddressLine1: + description: First line of a physical address + type: string + AddressLine2: + description: Second line of a physical address + type: string + AddressLine3: + description: Third line of a physical address + type: string + AddressLine4: + description: Fourth line of a physical address + type: string + City: + description: City of a physical address + type: string + Region: + description: Region or state of a physical address + type: string + PostalCode: + description: Postal code of a physical address + type: string + Country: + description: Country of a physical address + type: string + type: object + TaxBreakdownComponent: + properties: + TaxComponentId: + description: The unique ID number of this component + type: string + format: uuid + Type: + description: The type of the jurisdiction + type: string + enum: + - SYSGST/USCOUNTRY + - SYSGST/USSTATE + - SYSGST/USCOUNTY + - SYSGST/USCITY + - SYSGST/USSPECIAL + Name: + description: The name of the jurisdiction + type: string + TaxPercentage: + description: The percentage of the tax + type: number + TaxAmount: + description: The amount of the tax + type: number + TaxableAmount: + description: The amount that is taxable + type: number + NonTaxableAmount: + description: The amount that is not taxable + type: number + ExemptAmount: + description: The amount that is exempt + type: number + StateAssignedNo: + description: The state assigned number of the jurisdiction + type: string + JurisdictionRegion: + description: Name identifying the region within the country + type: string + type: object diff --git a/xero_assets.yaml b/xero_assets.yaml index 8de579482..148ccecc1 100644 --- a/xero_assets.yaml +++ b/xero_assets.yaml @@ -1,16 +1,16 @@ openapi: 3.0.0 info: - version: "6.3.0" + version: 10.1.0 title: Xero Assets API description: The Assets API exposes fixed asset related functions of the Xero Accounting application and can be used for a variety of purposes such as creating assets, retrieving asset valuations etc. - termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" + termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/ contact: - name: "Xero Platform Team" - email: "api@xero.com" - url: "https://developer.xero.com" + name: Xero Platform Team + email: api@xero.com + url: https://developer.xero.com license: - name: MIT - url: 'https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE' + name: MIT + url: https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE servers: - description: Xero API servers url: https://api.xero.com/assets.xro/1.0 @@ -20,172 +20,149 @@ paths: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [assets, assets.read] + - OAuth2: + - assets + - assets.read tags: - Asset - summary: searches fixed asset + summary: searches fixed asset operationId: getAssets - description: By passing in the appropriate options, you can search for - available fixed asset in the system - parameters: + description: By passing in the appropriate options, you can search for available fixed asset in the system + parameters: - name: status in: query description: Required when retrieving a collection of assets. See Asset Status Codes - schema: + schema: $ref: '#/components/schemas/AssetStatusQueryParam' required: true - name: page in: query description: Results are paged. This specifies which page of the results to return. The default page is 1. - schema: + schema: type: integer example: 1 - name: pageSize x-snake: page_size in: query description: The number of records returned per page. By default the number of records returned is 10. - schema: + schema: type: integer example: 5 - name: orderBy x-snake: order_by in: query description: Requests can be ordered by AssetType, AssetName, AssetNumber, PurchaseDate and PurchasePrice. If the asset status is DISPOSED it also allows DisposalDate and DisposalPrice. - schema: + schema: type: string - enum: - - AssetType - - AssetName - - AssetNumber - - PurchaseDate - - PurchasePrice - - DisposalDate - - DisposalPrice + enum: + - AssetType + - AssetName + - AssetNumber + - PurchaseDate + - PurchasePrice + - DisposalDate + - DisposalPrice example: AssetName - name: sortDirection x-snake: sort_direction in: query description: ASC or DESC - schema: + schema: type: string - enum: - - asc - - desc + enum: + - asc + - desc example: ASC - name: filterBy x-snake: filter_by in: query description: A string that can be used to filter the list to only return assets containing the text. Checks it against the AssetName, AssetNumber, Description and AssetTypeName fields. - schema: + schema: type: string - example: "Company Car" + example: Company Car responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Assets' - example: { - "pagination":{ - "page":1, - "pageSize":10, - "pageCount":2, - "itemCount":11, - "links":{ - "first":{ - "href":"http://asset.favorit.xero.com/v1/assets?status=DRAFT&page=1" - }, - "next":{ - "href":"http://asset.favorit.xero.com/v1/assets?status=DRAFT&page=2" - }, - "last":{ - "href":"http://asset.favorit.xero.com/v1/assets?status=DRAFT&page=2" - } - } - }, - "items":[ - { - "assetId":"68f17094-af97-4f1b-b36b-013b45b6ad3c", - "assetName":"Computer47822", - "assetNumber":"123478074", - "purchaseDate":"2020-01-01T00:00:00", - "purchasePrice":100.0000, - "disposalPrice":0.0, - "assetStatus":"Draft", - "trackingItems":[ - ], - "bookDepreciationSetting":{ - "depreciableObjectId":"68f17094-af97-4f1b-b36b-013b45b6ad3c", - "depreciableObjectType":"Asset", - "bookEffectiveDateOfChangeId":"5da77739-7f22-4109-b0a0-67480fb89af0", - "depreciationMethod":"StraightLine", - "averagingMethod":"ActualDays", - "depreciationRate":0.50, - "depreciationCalculationMethod":"None" - }, - "bookDepreciationDetail":{ - "depreciationStartDate":"2020-01-02T00:00:00", - "priorAccumDepreciationAmount":0.000000, - "currentAccumDepreciationAmount":0.000000, - "currentCapitalGain":0.000000, - "currentGainLoss":0.000000 - }, - "taxDepreciationSettings":[ - ], - "taxDepreciationDetails":[ - ], - "canRollback":true, - "accountingBookValue":100.000000, - "taxValues":[ - ], - "isDeleteEnabledForDate":false - }, - { - "assetId":"52ea3adf-f04a-4577-8fd2-43c52a256bd5", - "assetName":"Computer4148", - "assetNumber":"123466620", - "purchaseDate":"2020-01-01T00:00:00", - "purchasePrice":100.0000, - "disposalPrice":0.0, - "assetStatus":"Draft", - "trackingItems":[ - - ], - "bookDepreciationSetting":{ - "depreciableObjectId":"52ea3adf-f04a-4577-8fd2-43c52a256bd5", - "depreciableObjectType":"Asset", - "bookEffectiveDateOfChangeId":"c0d5280f-28b6-4329-b5b7-36e08c662010", - "depreciationMethod":"StraightLine", - "averagingMethod":"ActualDays", - "depreciationRate":0.50, - "depreciationCalculationMethod":"None" - }, - "bookDepreciationDetail":{ - "depreciationStartDate":"2020-01-02T00:00:00", - "priorAccumDepreciationAmount":0.000000, - "currentAccumDepreciationAmount":0.000000, - "currentCapitalGain":0.000000, - "currentGainLoss":0.000000 - }, - "taxDepreciationSettings":[ - ], - "taxDepreciationDetails":[ - ], - "canRollback":true, - "accountingBookValue":100.000000, - "taxValues":[ - - ], - "isDeleteEnabledForDate":false - } - ] - } - '400': + example: + pagination: + page: 1 + pageSize: 10 + pageCount: 2 + itemCount: 11 + links: + first: + href: http://asset.favorit.xero.com/v1/assets?status=DRAFT&page=1 + next: + href: http://asset.favorit.xero.com/v1/assets?status=DRAFT&page=2 + last: + href: http://asset.favorit.xero.com/v1/assets?status=DRAFT&page=2 + items: + - assetId: 68f17094-af97-4f1b-b36b-013b45b6ad3c + assetName: Computer47822 + assetNumber: "123478074" + purchaseDate: 2020-01-01T00:00:00 + purchasePrice: 100.0000 + disposalPrice: 0.0 + assetStatus: Draft + trackingItems: [] + bookDepreciationSetting: + depreciableObjectId: 68f17094-af97-4f1b-b36b-013b45b6ad3c + depreciableObjectType: Asset + bookEffectiveDateOfChangeId: 5da77739-7f22-4109-b0a0-67480fb89af0 + depreciationMethod: StraightLine + averagingMethod: ActualDays + depreciationRate: 0.50 + depreciationCalculationMethod: None + bookDepreciationDetail: + depreciationStartDate: 2020-01-02T00:00:00 + priorAccumDepreciationAmount: 0.000000 + currentAccumDepreciationAmount: 0.000000 + currentCapitalGain: 0.000000 + currentGainLoss: 0.000000 + taxDepreciationSettings: [] + taxDepreciationDetails: [] + canRollback: true + accountingBookValue: 100.000000 + taxValues: [] + isDeleteEnabledForDate: false + - assetId: 52ea3adf-f04a-4577-8fd2-43c52a256bd5 + assetName: Computer4148 + assetNumber: "123466620" + purchaseDate: 2020-01-01T00:00:00 + purchasePrice: 100.0000 + disposalPrice: 0.0 + assetStatus: Draft + trackingItems: [] + bookDepreciationSetting: + depreciableObjectId: 52ea3adf-f04a-4577-8fd2-43c52a256bd5 + depreciableObjectType: Asset + bookEffectiveDateOfChangeId: c0d5280f-28b6-4329-b5b7-36e08c662010 + depreciationMethod: StraightLine + averagingMethod: ActualDays + depreciationRate: 0.50 + depreciationCalculationMethod: None + bookDepreciationDetail: + depreciationStartDate: 2020-01-02T00:00:00 + priorAccumDepreciationAmount: 0.000000 + currentAccumDepreciationAmount: 0.000000 + currentCapitalGain: 0.000000 + currentGainLoss: 0.000000 + taxDepreciationSettings: [] + taxDepreciationDetails: [] + canRollback: true + accountingBookValue: 100.000000 + taxValues: [] + isDeleteEnabledForDate: false + "400": description: bad input parameter post: security: - - OAuth2: [assets] + - OAuth2: + - assets tags: - Asset summary: adds a fixed asset @@ -195,7 +172,7 @@ paths: x-hasAssetsValidationError: true x-example: - asset: - is_object: true + is_object: true key: asset keyPascal: Asset - assetName: @@ -203,7 +180,7 @@ paths: keyPascal: assetName keySnake: asset_name csharp: AssetName - default: "Other Computer" + default: Other Computer object: asset - assetNumber: key: assetnumber @@ -227,180 +204,163 @@ paths: object: asset description: Adds an asset to the system responses: - '200': + "200": description: return single object - create new asset content: application/json: schema: $ref: '#/components/schemas/Asset' - example: { - "assetId":"2257c64a-77ca-444c-a5ea-fa9a588c7039", - "assetName":"Computer74863", - "assetNumber":"123477544", - "purchaseDate":"2020-01-01T00:00:00", - "purchasePrice":100.0000, - "disposalPrice":23.2300, - "assetStatus":"Draft", - "trackingItems":[], - "bookDepreciationSetting":{ - "depreciableObjectId":"2257c64a-77ca-444c-a5ea-fa9a588c7039", - "depreciableObjectType":"Asset", - "bookEffectiveDateOfChangeId":"b58a2ace-1213-4681-9f11-2e30f57b5b8c", - "depreciationMethod":"StraightLine", - "averagingMethod":"ActualDays", - "depreciationRate":0.50, - "depreciationCalculationMethod":"None" - }, - "bookDepreciationDetail":{ - "depreciationStartDate":"2020-01-02T00:00:00", - "priorAccumDepreciationAmount":0.000000, - "currentAccumDepreciationAmount":0.000000, - "currentCapitalGain":0.000000, - "currentGainLoss":0.000000 - }, - "taxDepreciationSettings":[ - ], - "taxDepreciationDetails":[], - "canRollback":true, - "accountingBookValue":76.770000, - "taxValues":[], - "isDeleteEnabledForDate":true - } - '400': - description: 'invalid input, object invalid' + example: + assetId: 2257c64a-77ca-444c-a5ea-fa9a588c7039 + assetName: Computer74863 + assetNumber: "123477544" + purchaseDate: 2020-01-01T00:00:00 + purchasePrice: 100.0000 + disposalPrice: 23.2300 + assetStatus: Draft + trackingItems: [] + bookDepreciationSetting: + depreciableObjectId: 2257c64a-77ca-444c-a5ea-fa9a588c7039 + depreciableObjectType: Asset + bookEffectiveDateOfChangeId: b58a2ace-1213-4681-9f11-2e30f57b5b8c + depreciationMethod: StraightLine + averagingMethod: ActualDays + depreciationRate: 0.50 + depreciationCalculationMethod: None + bookDepreciationDetail: + depreciationStartDate: 2020-01-02T00:00:00 + priorAccumDepreciationAmount: 0.000000 + currentAccumDepreciationAmount: 0.000000 + currentCapitalGain: 0.000000 + currentGainLoss: 0.000000 + taxDepreciationSettings: [] + taxDepreciationDetails: [] + canRollback: true + accountingBookValue: 76.770000 + taxValues: [] + isDeleteEnabledForDate: true + "400": + description: invalid input, object invalid content: application/json: - example: { - "resourceValidationErrors":[ ], - "fieldValidationErrors":[ - { - "fieldName":"BookDepreciationSetting.DepreciationRate", - "valueProvided":"", - "localisedMessage":"Can''t have both Depreciation Rate and Effective Life", - "type":"http://common.service.xero.com/errors/validation/field", - "title":"Validation Error", - "detail":"Can''t have both Depreciation Rate and Effective Life" - } - ], - "type":"http://common.service.xero.com/errors/validation", - "title":"The resource update failed validation.", - "detail":"Validation Errors" - } + example: + resourceValidationErrors: [] + fieldValidationErrors: + - fieldName: BookDepreciationSetting.DepreciationRate + valueProvided: "" + localisedMessage: Can''t have both Depreciation Rate and Effective Life + type: http://common.service.xero.com/errors/validation/field + title: Validation Error + detail: Can''t have both Depreciation Rate and Effective Life + type: http://common.service.xero.com/errors/validation + title: The resource update failed validation. + detail: Validation Errors requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Asset' - example: { - "assetName":"Computer74863", - "assetNumber":"123477544", - "purchaseDate":"2020-01-01", - "purchasePrice":100.0, - "disposalPrice":23.23, - "assetStatus":"Draft", - "bookDepreciationSetting":{ - "depreciationMethod":"StraightLine", - "averagingMethod":"ActualDays", - "depreciationRate":0.5, - "depreciationCalculationMethod":"None" - }, - "bookDepreciationDetail":{ - "currentCapitalGain":5.32, - "currentGainLoss":3.88, - "depreciationStartDate":"2020-01-02", - "costLimit":100.0, - "currentAccumDepreciationAmount":2.25 - }, - "AccountingBookValue":99.5 - } + example: + assetName: Computer74863 + assetNumber: "123477544" + purchaseDate: "2020-01-01" + purchasePrice: 100.0 + disposalPrice: 23.23 + assetStatus: Draft + bookDepreciationSetting: + depreciationMethod: StraightLine + averagingMethod: ActualDays + depreciationRate: 0.5 + depreciationCalculationMethod: None + bookDepreciationDetail: + currentCapitalGain: 5.32 + currentGainLoss: 3.88 + depreciationStartDate: "2020-01-02" + costLimit: 100.0 + currentAccumDepreciationAmount: 2.25 + AccountingBookValue: 99.5 description: Fixed asset you are creating /Assets/{id}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [assets, assets.read] + - OAuth2: + - assets + - assets.read tags: - Asset - summary: Retrieves fixed asset by id + summary: Retrieves fixed asset by id operationId: getAssetById description: | By passing in the appropriate asset id, you can search for a specific fixed asset in the system - parameters: + parameters: - name: id in: path required: true description: fixed asset id for single object - schema: + schema: type: string format: uuid - example: "00000000-0000-0000-0000-000000000000" + example: 00000000-0000-0000-0000-000000000000 responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Asset' - example: { - "assetId":"68f17094-af97-4f1b-b36b-013b45b6ad3c", - "assetName":"Computer47822", - "assetNumber":"123478074", - "purchaseDate":"2020-01-01T00:00:00", - "purchasePrice":100.0000, - "disposalPrice":23.0000, - "assetStatus":"Draft", - "trackingItems":[ - - ], - "bookDepreciationSetting":{ - "depreciableObjectId":"68f17094-af97-4f1b-b36b-013b45b6ad3c", - "depreciableObjectType":"Asset", - "bookEffectiveDateOfChangeId":"5da77739-7f22-4109-b0a0-67480fb89af0", - "depreciationMethod":"StraightLine", - "averagingMethod":"ActualDays", - "depreciationRate":0.50, - "depreciationCalculationMethod":"None" - }, - "bookDepreciationDetail":{ - "depreciationStartDate":"2020-01-02T00:00:00", - "priorAccumDepreciationAmount":0.000000, - "currentAccumDepreciationAmount":0.000000, - "currentCapitalGain":0.000000, - "currentGainLoss":0.000000 - }, - "taxDepreciationSettings":[ - ], - "taxDepreciationDetails":[ - ], - "canRollback":true, - "metaData":{ - "bookDepreciationDetailsCanChange":true, - "taxDepreciationDetailsCanChange":true - }, - "accountingBookValue":77.000000, - "taxValues":[ - ], - "isDeleteEnabledForDate":true - } - '400': + example: + assetId: 68f17094-af97-4f1b-b36b-013b45b6ad3c + assetName: Computer47822 + assetNumber: "123478074" + purchaseDate: 2020-01-01T00:00:00 + purchasePrice: 100.0000 + disposalPrice: 23.0000 + assetStatus: Draft + trackingItems: [] + bookDepreciationSetting: + depreciableObjectId: 68f17094-af97-4f1b-b36b-013b45b6ad3c + depreciableObjectType: Asset + bookEffectiveDateOfChangeId: 5da77739-7f22-4109-b0a0-67480fb89af0 + depreciationMethod: StraightLine + averagingMethod: ActualDays + depreciationRate: 0.50 + depreciationCalculationMethod: None + bookDepreciationDetail: + depreciationStartDate: 2020-01-02T00:00:00 + priorAccumDepreciationAmount: 0.000000 + currentAccumDepreciationAmount: 0.000000 + currentCapitalGain: 0.000000 + currentGainLoss: 0.000000 + taxDepreciationSettings: [] + taxDepreciationDetails: [] + canRollback: true + metaData: + bookDepreciationDetailsCanChange: true + taxDepreciationDetailsCanChange: true + accountingBookValue: 77.000000 + taxValues: [] + isDeleteEnabledForDate: true + "400": description: bad input parameter /AssetTypes: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [assets, assets.read] + - OAuth2: + - assets + - assets.read tags: - Asset summary: searches fixed asset types operationId: getAssetTypes - description: By passing in the appropriate options, you can search for - available fixed asset types in the system + description: By passing in the appropriate options, you can search for available fixed asset types in the system responses: - '200': + "200": description: search results matching criteria content: application/json: @@ -408,53 +368,45 @@ paths: type: array items: $ref: '#/components/schemas/AssetType' - example: [ - { - "assetTypeId":"710255c6-d2ed-4463-b992-06c8685add5e", - "assetTypeName":"Computer Equipment", - "fixedAssetAccountId":"37c35de7-8df0-44bf-8e7c-f1f67cf6a278", - "depreciationExpenseAccountId":"0fbd1820-9dd0-454a-9515-6ec076a84cf7", - "accumulatedDepreciationAccountId":"512eac06-6894-47cd-b421-673b4ca2693a", - "bookDepreciationSetting":{ - "depreciableObjectId":"710255c6-d2ed-4463-b992-06c8685add5e", - "depreciableObjectType":"AssetType", - "bookEffectiveDateOfChangeId":"39b9c2e9-62b1-4efc-ab75-fa9152ffaa5f", - "depreciationMethod":"StraightLine", - "averagingMethod":"FullMonth", - "depreciationRate":25.00, - "depreciationCalculationMethod":"None" - }, - "taxDepreciationSettings":[ - ], - "locks":0, - "lockPrivateUseAccount":false - }, - { - "assetTypeId":"1a398a67-9d9d-4783-8689-14a8efce89d9", - "assetTypeName":"Machinery97704", - "fixedAssetAccountId":"5c93f577-c48f-44cd-8593-01489e319c2b", - "depreciationExpenseAccountId":"adc14376-c960-43f0-b7f3-4063e5098039", - "accumulatedDepreciationAccountId":"9195cadd-8645-41e6-9f67-7bcd421defe8", - "bookDepreciationSetting":{ - "depreciableObjectId":"1a398a67-9d9d-4783-8689-14a8efce89d9", - "depreciableObjectType":"AssetType", - "bookEffectiveDateOfChangeId":"6d09a96d-7768-4f28-95e8-c9ac870fe36e", - "depreciationMethod":"DiminishingValue100", - "averagingMethod":"ActualDays", - "depreciationRate":40.00, - "depreciationCalculationMethod":"None" - }, - "taxDepreciationSettings":[ - ], - "locks":0, - "lockPrivateUseAccount":false - } - ] - '400': + example: + - assetTypeId: 710255c6-d2ed-4463-b992-06c8685add5e + assetTypeName: Computer Equipment + fixedAssetAccountId: 37c35de7-8df0-44bf-8e7c-f1f67cf6a278 + depreciationExpenseAccountId: 0fbd1820-9dd0-454a-9515-6ec076a84cf7 + accumulatedDepreciationAccountId: 512eac06-6894-47cd-b421-673b4ca2693a + bookDepreciationSetting: + depreciableObjectId: 710255c6-d2ed-4463-b992-06c8685add5e + depreciableObjectType: AssetType + bookEffectiveDateOfChangeId: 39b9c2e9-62b1-4efc-ab75-fa9152ffaa5f + depreciationMethod: StraightLine + averagingMethod: FullMonth + depreciationRate: 25.00 + depreciationCalculationMethod: None + taxDepreciationSettings: [] + locks: 0 + lockPrivateUseAccount: false + - assetTypeId: 1a398a67-9d9d-4783-8689-14a8efce89d9 + assetTypeName: Machinery97704 + fixedAssetAccountId: 5c93f577-c48f-44cd-8593-01489e319c2b + depreciationExpenseAccountId: adc14376-c960-43f0-b7f3-4063e5098039 + accumulatedDepreciationAccountId: 9195cadd-8645-41e6-9f67-7bcd421defe8 + bookDepreciationSetting: + depreciableObjectId: 1a398a67-9d9d-4783-8689-14a8efce89d9 + depreciableObjectType: AssetType + bookEffectiveDateOfChangeId: 6d09a96d-7768-4f28-95e8-c9ac870fe36e + depreciationMethod: DiminishingValue100 + averagingMethod: ActualDays + depreciationRate: 40.00 + depreciationCalculationMethod: None + taxDepreciationSettings: [] + locks: 0 + lockPrivateUseAccount: false + "400": description: bad input parameter post: security: - - OAuth2: [assets] + - OAuth2: + - assets tags: - Asset summary: adds a fixed asset type @@ -491,14 +443,14 @@ paths: keyPascal: DepreciationCalculationMethod keySnake: depreciation_calculation_method object: bookDepreciationSetting - default: None - is_last: true + default: None + is_last: true - assetType: key: assetType keyPascal: AssetType keySnake: asset_type x-snake: asset_type - is_object: true + is_object: true - assetTypeName: key: assetTypeName keyPascal: AssetTypeName @@ -536,63 +488,54 @@ paths: default: bookDepreciationSetting python: book_depreciation_setting ruby: book_depreciation_setting - object: assetType + object: assetType x-hasAssetsValidationError: true description: Adds an fixed asset type to the system responses: - '200': + "200": description: results single object - created fixed type content: application/json: schema: $ref: '#/components/schemas/AssetType' - example: { - "assetTypeId":"85509b5d-308e-420d-9532-b85105058916", - "assetTypeName":"Machinery11004", - "fixedAssetAccountId":"3d8d063a-c148-4bb8-8b3c-a5e2ad3b1e82", - "depreciationExpenseAccountId":"d1602f69-f900-4616-8d34-90af393fa368", - "accumulatedDepreciationAccountId":"9195cadd-8645-41e6-9f67-7bcd421defe8", - "bookDepreciationSetting":{ - "depreciableObjectId":"00000000-0000-0000-0000-000000000000", - "depreciableObjectType":"None", - "depreciationMethod":"DiminishingValue100", - "averagingMethod":"ActualDays", - "depreciationRate":0.05, - "depreciationCalculationMethod":"None" - }, - "locks":0, - "lockPrivateUseAccount":false - } - '400': - description: 'invalid input, object invalid' + example: + assetTypeId: 85509b5d-308e-420d-9532-b85105058916 + assetTypeName: Machinery11004 + fixedAssetAccountId: 3d8d063a-c148-4bb8-8b3c-a5e2ad3b1e82 + depreciationExpenseAccountId: d1602f69-f900-4616-8d34-90af393fa368 + accumulatedDepreciationAccountId: 9195cadd-8645-41e6-9f67-7bcd421defe8 + bookDepreciationSetting: + depreciableObjectId: 00000000-0000-0000-0000-000000000000 + depreciableObjectType: None + depreciationMethod: DiminishingValue100 + averagingMethod: ActualDays + depreciationRate: 0.05 + depreciationCalculationMethod: None + locks: 0 + lockPrivateUseAccount: false + "400": + description: invalid input, object invalid content: application/json: - example: { - "resourceValidationErrors":[ - ], - "fieldValidationErrors":[ - { - "fieldName":"FixedAssetAccountId", - "valueProvided":"", - "localisedMessage":"Fixed Asset Account Id is invalid", - "type":"http://common.service.xero.com/errors/validation/field", - "title":"Validation Error", - "detail":"Fixed Asset Account Id is invalid" - }, - { - "fieldName":"DepreciationExpenseAccountId", - "valueProvided":"", - "localisedMessage":"Depreciation Expense Account Id is invalid", - "type":"http://common.service.xero.com/errors/validation/field", - "title":"Validation Error", - "detail":"Depreciation Expense Account Id is invalid" - } - ], - "type":"http://common.service.xero.com/errors/validation", - "title":"The resource update failed validation.", - "detail":"Validation Errors" - } - '409': + example: + resourceValidationErrors: [] + fieldValidationErrors: + - fieldName: FixedAssetAccountId + valueProvided: "" + localisedMessage: Fixed Asset Account Id is invalid + type: http://common.service.xero.com/errors/validation/field + title: Validation Error + detail: Fixed Asset Account Id is invalid + - fieldName: DepreciationExpenseAccountId + valueProvided: "" + localisedMessage: Depreciation Expense Account Id is invalid + type: http://common.service.xero.com/errors/validation/field + title: Validation Error + detail: Depreciation Expense Account Id is invalid + type: http://common.service.xero.com/errors/validation + title: The resource update failed validation. + detail: Validation Errors + "409": description: a type already exists requestBody: required: true @@ -600,55 +543,53 @@ paths: application/json: schema: $ref: '#/components/schemas/AssetType' - example: { - "assetTypeName":"Machinery11004", - "fixedAssetAccountId":"3d8d063a-c148-4bb8-8b3c-a5e2ad3b1e82", - "depreciationExpenseAccountId":"d1602f69-f900-4616-8d34-90af393fa368", - "accumulatedDepreciationAccountId":"9195cadd-8645-41e6-9f67-7bcd421defe8", - "bookDepreciationSetting":{ - "depreciationMethod":"DiminishingValue100", - "averagingMethod":"ActualDays", - "depreciationRate":0.05, - "depreciationCalculationMethod":"None" - } - } + example: + assetTypeName: Machinery11004 + fixedAssetAccountId: 3d8d063a-c148-4bb8-8b3c-a5e2ad3b1e82 + depreciationExpenseAccountId: d1602f69-f900-4616-8d34-90af393fa368 + accumulatedDepreciationAccountId: 9195cadd-8645-41e6-9f67-7bcd421defe8 + bookDepreciationSetting: + depreciationMethod: DiminishingValue100 + averagingMethod: ActualDays + depreciationRate: 0.05 + depreciationCalculationMethod: None description: Asset type to add /Settings: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [assets, assets.read] + - OAuth2: + - assets + - assets.read tags: - Asset summary: searches fixed asset settings operationId: getAssetSettings - description: By passing in the appropriate options, you can search for - available fixed asset types in the system + description: By passing in the appropriate options, you can search for available fixed asset types in the system responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Setting' - example: { - "assetNumberPrefix":"FA-", - "assetNumberSequence":"0007", - "assetStartDate":"2016-01-01T00:00:00", - "optInForTax":false - } - '400': + example: + assetNumberPrefix: FA- + assetNumberSequence: "0007" + assetStartDate: 2016-01-01T00:00:00 + optInForTax: false + "400": description: bad input parameter components: securitySchemes: OAuth2: type: oauth2 description: For more information - flows: + flows: authorizationCode: - authorizationUrl: 'https://login.xero.com/identity/connect/authorize' - tokenUrl: 'https://identity.xero.com/connect/token' + authorizationUrl: https://login.xero.com/identity/connect/authorize + tokenUrl: https://identity.xero.com/connect/token scopes: email: Grant read-only access to your email openid: Grant read-only access to your open id @@ -656,7 +597,7 @@ components: assets: Grant read-write access to fixed assets assets.read: Grant read-only access to fixed assets parameters: - requiredHeader: + requiredHeader: in: header name: xero-tenant-id x-snake: xero_tenant_id @@ -670,7 +611,7 @@ components: name: Idempotency-Key x-snake: idempotency_key description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. - example: "KEY_VALUE" + example: KEY_VALUE schema: type: string schemas: @@ -705,83 +646,83 @@ components: assetId: type: string format: uuid - description: "The Xero-generated Id for the asset" - example: "3b5b3a38-5649-495f-87a1-14a4e5918634" + description: The Xero-generated Id for the asset + example: 3b5b3a38-5649-495f-87a1-14a4e5918634 assetName: type: string - description: "The name of the asset" - example: "Awesome Truck 3" + description: The name of the asset + example: Awesome Truck 3 assetTypeId: type: string format: uuid - description: "The Xero-generated Id for the asset type" - example: "3b5b3a38-5649-495f-87a1-14a4e5918634" + description: The Xero-generated Id for the asset type + example: 3b5b3a38-5649-495f-87a1-14a4e5918634 assetNumber: type: string - description: "Must be unique." - example: "FA-0013" + description: Must be unique. + example: FA-0013 purchaseDate: type: string format: date - description: "The date the asset was purchased YYYY-MM-DD" - example: "2015-07-01T00:00:00" + description: The date the asset was purchased YYYY-MM-DD + example: 2015-07-01T00:00:00 purchasePrice: type: number format: double x-is-money: true - description: "The purchase price of the asset" + description: The purchase price of the asset example: "1000.0000" disposalDate: type: string format: date - description: "The date the asset was disposed" - example: "2020-07-01T00:00:00" + description: The date the asset was disposed + example: 2020-07-01T00:00:00 disposalPrice: type: number format: double x-is-money: true - description: "The price the asset was disposed at" + description: The price the asset was disposed at example: "1.0000" assetStatus: $ref: '#/components/schemas/AssetStatus' warrantyExpiryDate: type: string - description: "The date the asset’s warranty expires (if needed) YYYY-MM-DD" - example: "ca4c6b39-4f4f-43e8-98da-5e1f350a6694" + description: The date the asset’s warranty expires (if needed) YYYY-MM-DD + example: ca4c6b39-4f4f-43e8-98da-5e1f350a6694 serialNumber: type: string - description: "The asset's serial number" - example: "ca4c6b39-4f4f-43e8-98da-5e1f350a6694" + description: The asset's serial number + example: ca4c6b39-4f4f-43e8-98da-5e1f350a6694 bookDepreciationSetting: $ref: '#/components/schemas/BookDepreciationSetting' bookDepreciationDetail: $ref: '#/components/schemas/BookDepreciationDetail' canRollback: type: boolean - description: "Boolean to indicate whether depreciation can be rolled back for this asset individually. This is true if it doesn't have 'legacy' journal entries and if there is no lock period that would prevent this asset from rolling back." + description: Boolean to indicate whether depreciation can be rolled back for this asset individually. This is true if it doesn't have 'legacy' journal entries and if there is no lock period that would prevent this asset from rolling back. example: true accountingBookValue: type: number format: double x-is-money: true - description: "The accounting value of the asset" + description: The accounting value of the asset example: 0 isDeleteEnabledForDate: type: boolean - description: "Boolean to indicate whether delete is enabled" + description: Boolean to indicate whether delete is enabled example: true AssetStatus: type: string - description: "See Asset Status Codes." - example: "Draft" + description: See Asset Status Codes. + example: Draft enum: - Draft - Registered - Disposed AssetStatusQueryParam: type: string - description: "See Asset Status Codes." - example: "DRAFT" + description: See Asset Status Codes. + example: DRAFT enum: - DRAFT - REGISTERED @@ -796,85 +737,85 @@ components: assetTypeId: type: string format: uuid - example: "5da209c5-5e19-4a43-b925-71b776c49ced" - description: "Xero generated unique identifier for asset types" + example: 5da209c5-5e19-4a43-b925-71b776c49ced + description: Xero generated unique identifier for asset types assetTypeName: type: string - example: "Computer Equipment" - description: "The name of the asset type" + example: Computer Equipment + description: The name of the asset type fixedAssetAccountId: type: string format: uuid - example: "24e260f1-bfc4-4766-ad7f-8a8ce01de879" - description: "The asset account for fixed assets of this type" + example: 24e260f1-bfc4-4766-ad7f-8a8ce01de879 + description: The asset account for fixed assets of this type depreciationExpenseAccountId: type: string format: uuid - example: "b23fc79b-d66b-44b0-a240-e138e086fcbc" - description: "The expense account for the depreciation of fixed assets of this type" + example: b23fc79b-d66b-44b0-a240-e138e086fcbc + description: The expense account for the depreciation of fixed assets of this type accumulatedDepreciationAccountId: type: string format: uuid - example: "ca4c6b39-4f4f-43e8-98da-5e1f350a6694" - description: "The account for accumulated depreciation of fixed assets of this type" + example: ca4c6b39-4f4f-43e8-98da-5e1f350a6694 + description: The account for accumulated depreciation of fixed assets of this type bookDepreciationSetting: $ref: '#/components/schemas/BookDepreciationSetting' locks: type: integer example: 33 - description: "All asset types that have accumulated depreciation for any assets that use them are deemed ‘locked’ and cannot be removed." + description: All asset types that have accumulated depreciation for any assets that use them are deemed ‘locked’ and cannot be removed. BookDepreciationSetting: properties: depreciationMethod: type: string - enum: - - NoDepreciation - - StraightLine - - DiminishingValue100 - - DiminishingValue150 - - DiminishingValue200 - - FullDepreciation - example: "StraightLine" - description: "The method of depreciation applied to this asset. See Depreciation Methods" + enum: + - NoDepreciation + - StraightLine + - DiminishingValue100 + - DiminishingValue150 + - DiminishingValue200 + - FullDepreciation + example: StraightLine + description: The method of depreciation applied to this asset. See Depreciation Methods averagingMethod: type: string - enum: - - FullMonth - - ActualDays - example: "ActualDays" - description: "The method of averaging applied to this asset. See Averaging Methods" + enum: + - FullMonth + - ActualDays + example: ActualDays + description: The method of averaging applied to this asset. See Averaging Methods depreciationRate: type: number format: double x-is-money: true example: 0.05 - description: "The rate of depreciation (e.g. 0.05)" + description: The rate of depreciation (e.g. 0.05) effectiveLifeYears: type: integer example: 5 - description: "Effective life of the asset in years (e.g. 5)" + description: Effective life of the asset in years (e.g. 5) depreciationCalculationMethod: type: string - enum: - - Rate - - Life - - None - example: "None" - description: "See Depreciation Calculation Methods" + enum: + - Rate + - Life + - None + example: None + description: See Depreciation Calculation Methods depreciableObjectId: type: string format: uuid - example: "68f17094-af97-4f1b-b36b-013b45b6ad3c" - description: "Unique Xero identifier for the depreciable object" + example: 68f17094-af97-4f1b-b36b-013b45b6ad3c + description: Unique Xero identifier for the depreciable object depreciableObjectType: type: string - example: "Asset" - description: "The type of asset object" + example: Asset + description: The type of asset object bookEffectiveDateOfChangeId: type: string format: uuid - example: "68f17094-af97-4f1b-b36b-013b45b6ad3c" - description: "Unique Xero identifier for the effective date change" + example: 68f17094-af97-4f1b-b36b-013b45b6ad3c + description: Unique Xero identifier for the effective date change BookDepreciationDetail: properties: currentCapitalGain: @@ -882,98 +823,98 @@ components: format: double x-is-money: true example: 5.25 - description: "When an asset is disposed, this will be the sell price minus the purchase price if a profit was made." + description: When an asset is disposed, this will be the sell price minus the purchase price if a profit was made. currentGainLoss: type: number format: double x-is-money: true example: 10.50 - description: "When an asset is disposed, this will be the lowest one of sell price or purchase price, minus the current book value." + description: When an asset is disposed, this will be the lowest one of sell price or purchase price, minus the current book value. depreciationStartDate: type: string format: date - example: "2015-07-01T00:00:00" - description: "YYYY-MM-DD" + example: 2015-07-01T00:00:00 + description: YYYY-MM-DD costLimit: type: number format: double x-is-money: true example: 9000.0000 - description: "The value of the asset you want to depreciate, if this is less than the cost of the asset." + description: The value of the asset you want to depreciate, if this is less than the cost of the asset. residualValue: type: number format: double x-is-money: true example: 10000.0000 - description: "The value of the asset remaining when you've fully depreciated it." + description: The value of the asset remaining when you've fully depreciated it. priorAccumDepreciationAmount: type: number format: double x-is-money: true example: 0.45 - description: "All depreciation prior to the current financial year." + description: All depreciation prior to the current financial year. currentAccumDepreciationAmount: type: number format: double x-is-money: true example: 5.0000 - description: "All depreciation occurring in the current financial year." + description: All depreciation occurring in the current financial year. Setting: required: - - name + - name properties: assetNumberPrefix: type: string - example: "FA-" - description: "The prefix used for fixed asset numbers (“FA-” by default)" + example: FA- + description: The prefix used for fixed asset numbers (“FA-” by default) assetNumberSequence: type: string example: "0022" - description: "The next available sequence number" + description: The next available sequence number assetStartDate: type: string format: date - example: "2015-07-31T00:00:00" - description: "The date depreciation calculations started on registered fixed assets in Xero" + example: 2015-07-31T00:00:00 + description: The date depreciation calculations started on registered fixed assets in Xero lastDepreciationDate: type: string format: date - example: "2015-07-01T00:00:00" - description: "The last depreciation date" + example: 2015-07-01T00:00:00 + description: The last depreciation date defaultGainOnDisposalAccountId: type: string format: uuid - example: "346ddb97-739a-4274-b43b-66aa3218d17c" - description: "Default account that gains are posted to" + example: 346ddb97-739a-4274-b43b-66aa3218d17c + description: Default account that gains are posted to defaultLossOnDisposalAccountId: type: string format: uuid - example: "1b798541-24e2-4855-9309-c023a0b576f3" - description: "Default account that losses are posted to" + example: 1b798541-24e2-4855-9309-c023a0b576f3 + description: Default account that losses are posted to defaultCapitalGainOnDisposalAccountId: type: string format: uuid - example: "6d6a0bdb-e118-45d8-a023-2ad617ec1cb7" - description: "Default account that capital gains are posted to" + example: 6d6a0bdb-e118-45d8-a023-2ad617ec1cb7 + description: Default account that capital gains are posted to optInForTax: type: boolean - description: "opt in for tax calculation" + description: opt in for tax calculation example: false type: object Error: externalDocs: - url: "https://developer.xero.com/documentation/api/http-response-codes" + url: https://developer.xero.com/documentation/api/http-response-codes properties: resourceValidationErrors: description: Array of elements of resource validation errors type: array items: - $ref: "#/components/schemas/ResourceValidationErrorsElement" + $ref: '#/components/schemas/ResourceValidationErrorsElement' fieldValidationErrors: description: Array of elements of field validation errors type: array items: - $ref: "#/components/schemas/FieldValidationErrorsElement" + $ref: '#/components/schemas/FieldValidationErrorsElement' type: description: The internal type of error, not accessible externally type: string @@ -986,7 +927,7 @@ components: type: object ResourceValidationErrorsElement: externalDocs: - url: "https://developer.xero.com/documentation/api/http-response-codes" + url: https://developer.xero.com/documentation/api/http-response-codes properties: resourceName: description: The field name of the erroneous field @@ -1006,7 +947,7 @@ components: type: object FieldValidationErrorsElement: externalDocs: - url: "https://developer.xero.com/documentation/api/http-response-codes" + url: https://developer.xero.com/documentation/api/http-response-codes properties: fieldName: description: The field name of the erroneous field @@ -1026,4 +967,4 @@ components: detail: description: Detail of the field validation error type: string - type: object \ No newline at end of file + type: object diff --git a/xero_bankfeeds.yaml b/xero_bankfeeds.yaml index 41caad755..9fc11b559 100644 --- a/xero_bankfeeds.yaml +++ b/xero_bankfeeds.yaml @@ -1,18 +1,16 @@ openapi: 3.0.0 info: - version: "6.3.0" + version: 10.1.0 title: Xero Bank Feeds API - description: The Bank Feeds API is a closed API that is only available to financial institutions that have an established financial services partnership with Xero. - If you're an existing financial services partner that wants access, contact your local Partner Manager. - If you're a financial institution who wants to provide bank feeds to your business customers, contact us to become a financial services partner. - termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" + description: The Bank Feeds API is a closed API that is only available to financial institutions that have an established financial services partnership with Xero. If you're an existing financial services partner that wants access, contact your local Partner Manager. If you're a financial institution who wants to provide bank feeds to your business customers, contact us to become a financial services partner. + termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/ contact: - name: "Xero Platform Team" - email: "api@xero.com" - url: "https://developer.xero.com" + name: Xero Platform Team + email: api@xero.com + url: https://developer.xero.com license: - name: MIT - url: 'https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE' + name: MIT + url: https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE servers: - description: Xero Bank Feeds API base url url: https://api.xero.com/bankfeeds.xro/1.0 @@ -22,68 +20,62 @@ paths: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [bankfeeds] + - OAuth2: + - bankfeeds tags: - BankFeeds summary: Searches for feed connections operationId: getFeedConnections description: By passing in the appropriate options, you can search for available feed connections in the system. - parameters: + parameters: - name: page in: query - description: Page number which specifies the set of records to retrieve. By default the number of the records per set is 10. Example - https://api.xero.com/bankfeeds.xro/1.0/FeedConnections?page=1 to get the second set of the records. When page value is not a number or a negative number, by default, the first set of records is returned. - schema: + description: Page number which specifies the set of records to retrieve. By default the number of the records per set is 10. Example - https://api.xero.com/bankfeeds.xro/1.0/FeedConnections?page=1 to get the second set of the records. When page value is not a number or a negative number, by default, the first set of records is returned. + schema: type: integer example: 1 - name: pageSize in: query - description: Page size which specifies how many records per page will be returned (default 10). Example - https://api.xero.com/bankfeeds.xro/1.0/FeedConnections?pageSize=100 to specify page size of 100. - schema: + description: Page size which specifies how many records per page will be returned (default 10). Example - https://api.xero.com/bankfeeds.xro/1.0/FeedConnections?pageSize=100 to specify page size of 100. + schema: type: integer example: 100 responses: - '202': + "202": description: search results matching criteria returned with pagination and items array content: application/json: schema: $ref: '#/components/schemas/FeedConnections' - example: - { - "pagination":{ - "page":1, - "pageCount":1, - "pageSize":87654321, - "itemCount":39 - }, - "items":[ - { - "id":"c0eb97b5-4f97-465a-8268-276513c14396", - "accountToken":"foobar31306", - "accountType":"BANK", - "accountNumber":"123496842", - "accountName":"SDK Bank 95921", - "accountId":"aefbf6be-4285-4ca5-bf39-0f486c8515c7", - "currency":"GBP", - "country":"GB" - }, - { - "id":"3b44b539-4e39-4d53-9334-d8ba01674752", - "accountToken":"foobar74770", - "accountType":"BANK", - "accountNumber":"123481122", - "accountName":"SDK Bank 11272", - "accountId":"fc2f3cc2-126e-40d7-9fc1-12e52d0a71f1", - "currency":"GBP", - "country":"GB" - } - ] - } - '400': + example: + pagination: + page: 1 + pageCount: 1 + pageSize: 87654321 + itemCount: 39 + items: + - id: c0eb97b5-4f97-465a-8268-276513c14396 + accountToken: foobar31306 + accountType: BANK + accountNumber: "123496842" + accountName: SDK Bank 95921 + accountId: aefbf6be-4285-4ca5-bf39-0f486c8515c7 + currency: GBP + country: GB + - id: 3b44b539-4e39-4d53-9334-d8ba01674752 + accountToken: foobar74770 + accountType: BANK + accountNumber: "123481122" + accountName: SDK Bank 11272 + accountId: fc2f3cc2-126e-40d7-9fc1-12e52d0a71f1 + currency: GBP + country: GB + "400": description: validation error response post: security: - - OAuth2: [bankfeeds] + - OAuth2: + - bankfeeds tags: - BankFeeds summary: Create one or more new feed connection @@ -100,67 +92,52 @@ paths: schema: $ref: '#/components/schemas/FeedConnections' example: - { - "items":[ - { - "accountToken":"foobar71760", - "accountNumber":"123458637", - "accountName":"SDK Bank 90861", - "accountType":"BANK", - "currency":"GBP" - } - ] - } + items: + - accountToken: foobar71760 + accountNumber: "123458637" + accountName: SDK Bank 90861 + accountType: BANK + currency: GBP responses: - '202': + "202": description: success new feed connection(s)response content: application/json: schema: $ref: '#/components/schemas/FeedConnections' - example: - { - "items":[ - { - "id":"2a19d46c-2a92-4e50-9401-dcf2cb895be7", - "accountToken":"foobar71760", - "status":"PENDING" - } - ] - } - '400': + example: + items: + - id: 2a19d46c-2a92-4e50-9401-dcf2cb895be7 + accountToken: foobar71760 + status: PENDING + "400": description: failed to create new feed connection(s)response content: application/json: schema: $ref: '#/components/schemas/FeedConnections' example: - { - "items": [ - { - "accountToken": "foobar71760", - "status": "REJECTED", - "error": { - "type": "invalid-request", - "title": "Invalid Request", - "status": 400, - "detail": "For the request field 'AccountNumber' exceeded the maximum length of 40." - } - } - ] - } + items: + - accountToken: foobar71760 + status: REJECTED + error: + type: invalid-request + title: Invalid Request + status: 400 + detail: For the request field 'AccountNumber' exceeded the maximum length of 40. /FeedConnections/{id}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [bankfeeds] + - OAuth2: + - bankfeeds tags: - BankFeeds summary: Retrieve single feed connection based on a unique id provided operationId: getFeedConnection description: By passing in a FeedConnection Id options, you can search for matching feed connections - parameters: + parameters: - required: true in: path name: id @@ -169,31 +146,30 @@ paths: type: string format: uuid responses: - '200': + "200": description: success returns a FeedConnection object matching the id in response content: application/json: schema: $ref: '#/components/schemas/FeedConnection' - example: - { - "id":"b58b685a-1bee-4904-91f1-fee30bb6ea52", - "accountToken":"foobar84778", - "accountType":"BANK", - "accountNumber":"123434859", - "accountName":"SDK Bank 5517", - "accountId":"f4c4d595-da94-493b-999a-19d1ae1f508a", - "currency":"GBP", - "country":"GB" - } - '400': + example: + id: b58b685a-1bee-4904-91f1-fee30bb6ea52 + accountToken: foobar84778 + accountType: BANK + accountNumber: "123434859" + accountName: SDK Bank 5517 + accountId: f4c4d595-da94-493b-999a-19d1ae1f508a + currency: GBP + country: GB + "400": description: bad input parameter /FeedConnections/DeleteRequests: parameters: - $ref: '#/components/parameters/requiredHeader' post: security: - - OAuth2: [bankfeeds] + - OAuth2: + - bankfeeds tags: - BankFeeds summary: Delete an existing feed connection @@ -209,46 +185,34 @@ paths: schema: $ref: '#/components/schemas/FeedConnections' example: - { - "items":[ - { - "id":"b4cc693b-24d9-42ec-a6d4-2943d253ff63" - } - ] - } + items: + - id: b4cc693b-24d9-42ec-a6d4-2943d253ff63 responses: - '202': + "202": description: Success response for deleted feed connection content: application/json: schema: $ref: '#/components/schemas/FeedConnections' - example: - { - "items":[ - { - "id":"b4cc693b-24d9-42ec-a6d4-2943d253ff63", - "status":"PENDING" - }, - { - "accountToken": "10000125", - "status": "REJECTED", - "error": { - "type": "feed-connected-in-different-organisation", - "title": "Feed connected in different organisation", - "detail": "The AccountToken is connected to another Xero Bank Account associated with this bank. This Xero Bank Account belongs to a different Xero Organisation." - } - } - ] - } - '400': + example: + items: + - id: b4cc693b-24d9-42ec-a6d4-2943d253ff63 + status: PENDING + - accountToken: "10000125" + status: REJECTED + error: + type: feed-connected-in-different-organisation + title: Feed connected in different organisation + detail: The AccountToken is connected to another Xero Bank Account associated with this bank. This Xero Bank Account belongs to a different Xero Organisation. + "400": description: bad input parameter /Statements: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [bankfeeds] + - OAuth2: + - bankfeeds tags: - BankFeeds summary: Retrieve all statements @@ -264,7 +228,7 @@ paths: format: int32 - in: query name: pageSize - description: Page size which specifies how many records per page will be returned (default 10). Example - https://api.xero.com/bankfeeds.xro/1.0/Statements?pageSize=100 to specify page size of 100. + description: Page size which specifies how many records per page will be returned (default 10). Example - https://api.xero.com/bankfeeds.xro/1.0/Statements?pageSize=100 to specify page size of 100. required: false schema: type: integer @@ -282,78 +246,63 @@ paths: type: string default: 00000000-0000-0000-0000-0000030000000 responses: - '200': + "200": description: success returns Statements array of objects response content: application/json: schema: $ref: '#/components/schemas/Statements' - example: - { - "pagination":{ - "page":1, - "pageCount":210, - "pageSize":3, - "itemCount":3 - }, - "items":[ - { - "id":"9817e4b8-82b3-4526-91f7-040bd278053f", - "feedConnectionId":"6a4b9ff5-3a5f-4321-936b-4796163550f6", - "status":"REJECTED", - "startDate":"2019-08-01", - "endDate":"2019-08-15", - "startBalance":{ - "amount":"100.0000", - "creditDebitIndicator":"CREDIT" - }, - "endBalance":{ - "amount":"150.0000", - "creditDebitIndicator":"CREDIT" - }, - "statementLineCount":"1", - "errors":[ - { - "type":"duplicate-statement", - "title":"Duplicate Statement Received", - "status":409, - "detail":"The received statement was marked as a duplicate." - } - ] - }, - { - "id":"2fc57bac-7aa7-4981-a5cd-8aee83fe698c", - "feedConnectionId":"6a4b9ff5-3a5f-4321-936b-4796163550f6", - "status":"DELIVERED", - "startDate":"2019-08-01", - "endDate":"2019-08-15", - "startBalance":{ - "amount":"100.0000", - "creditDebitIndicator":"CREDIT" - }, - "endBalance":{ - "amount":"150.0000", - "creditDebitIndicator":"CREDIT" - }, - "statementLineCount":"1" - } - ] - } - '400': + example: + pagination: + page: 1 + pageCount: 210 + pageSize: 3 + itemCount: 3 + items: + - id: 9817e4b8-82b3-4526-91f7-040bd278053f + feedConnectionId: 6a4b9ff5-3a5f-4321-936b-4796163550f6 + status: REJECTED + startDate: "2019-08-01" + endDate: "2019-08-15" + startBalance: + amount: "100.0000" + creditDebitIndicator: CREDIT + endBalance: + amount: "150.0000" + creditDebitIndicator: CREDIT + statementLineCount: "1" + errors: + - type: duplicate-statement + title: Duplicate Statement Received + status: 409 + detail: The received statement was marked as a duplicate. + - id: 2fc57bac-7aa7-4981-a5cd-8aee83fe698c + feedConnectionId: 6a4b9ff5-3a5f-4321-936b-4796163550f6 + status: DELIVERED + startDate: "2019-08-01" + endDate: "2019-08-15" + startBalance: + amount: "100.0000" + creditDebitIndicator: CREDIT + endBalance: + amount: "150.0000" + creditDebitIndicator: CREDIT + statementLineCount: "1" + "400": description: bad input parameter content: application/problem+json: schema: $ref: '#/components/schemas/Statements' - example: { - "type": "invalid-request", - "title": "Invalid Request", - "status": 400, - "detail": "For the request field missing parameter." - } + example: + type: invalid-request + title: Invalid Request + status: 400 + detail: For the request field missing parameter. post: security: - - OAuth2: [bankfeeds] + - OAuth2: + - bankfeeds tags: - BankFeeds summary: Creates one or more new statements @@ -362,111 +311,91 @@ paths: operationId: createStatements x-hasBankFeedsValidationError: true responses: - '202': + "202": description: Success returns Statements array of objects in response content: application/json: schema: $ref: '#/components/schemas/Statements' - example: - { - "items":[ - { - "id":"d69b02b7-a30c-464a-99cf-ba9770373c61", - "feedConnectionId":"6a4b9ff5-3a5f-4321-936b-4796163550f6", - "status":"PENDING" - }, - { - "id":"598f255c-015b-4138-93df-2e06c64565b3", - "feedConnectionId":"2ebe6393-f3bb-48ab-9a0e-b04fa8585a70", - "status":"PENDING" - } - ] - } - '400': + example: + items: + - id: d69b02b7-a30c-464a-99cf-ba9770373c61 + feedConnectionId: 6a4b9ff5-3a5f-4321-936b-4796163550f6 + status: PENDING + - id: 598f255c-015b-4138-93df-2e06c64565b3 + feedConnectionId: 2ebe6393-f3bb-48ab-9a0e-b04fa8585a70 + status: PENDING + "400": description: Statement failed validation content: application/problem+json: schema: $ref: '#/components/schemas/Statements' - example: { - "type": "invalid-request", - "title": "Invalid Request", - "status": 400, - "detail": "For the request field 'StatementLine.ChequeNumber' exceeded the maximum length of 20." - } - '403': + example: + type: invalid-request + title: Invalid Request + status: 400 + detail: For the request field 'StatementLine.ChequeNumber' exceeded the maximum length of 20. + "403": description: Invalid application or feed connection content: application/problem+json: schema: $ref: '#/components/schemas/Error' - example: { - "type": "invalid-application", - "title": "Invalid Application", - "status": 403, - "detail": "The application has not been configured to use these API endpoints." - } - '409': + example: + type: invalid-application + title: Invalid Application + status: 403 + detail: The application has not been configured to use these API endpoints. + "409": description: Duplicate statement received content: application/problem+json: schema: $ref: '#/components/schemas/Statements' - example: - { - "items":[ - { - "id":"29fefeb6-f449-470d-9179-f1d8900930d6", - "feedConnectionId":"6a4b9ff5-3a5f-4321-936b-4796163550f6", - "status":"REJECTED", - "errors":[ - { - "type":"duplicate-statement", - "title":"Duplicate Statement Received", - "status":409, - "detail":"The received statement was marked as a duplicate." - } - ] - } - ] - } - '413': + example: + items: + - id: 29fefeb6-f449-470d-9179-f1d8900930d6 + feedConnectionId: 6a4b9ff5-3a5f-4321-936b-4796163550f6 + status: REJECTED + errors: + - type: duplicate-statement + title: Duplicate Statement Received + status: 409 + detail: The received statement was marked as a duplicate. + "413": description: Statement exceeds size limit content: application/problem+json: schema: $ref: '#/components/schemas/Statements' - example: { - "type": "invalid-request", - "title": "Request too large", - "status": 413, - "detail": "Request size of 3500000 bytes exceeds the limit of 3000000 bytes." - } - '422': + example: + type: invalid-request + title: Request too large + status: 413 + detail: Request size of 3500000 bytes exceeds the limit of 3000000 bytes. + "422": description: Unprocessable Entity content: application/problem+json: schema: $ref: '#/components/schemas/Statements' - example: { - "type": "invalid-end-balance", - "title": "Invalid End Balance", - "status": 422, - "detail": "End balance does not match start balance +/- statement line amounts." - } - '500': + example: + type: invalid-end-balance + title: Invalid End Balance + status: 422 + detail: End balance does not match start balance +/- statement line amounts. + "500": description: Intermittent Xero Error content: application/problem+json: schema: $ref: '#/components/schemas/Statements' - example: { - "type": "internal-error", - "title": "Intermittent Internal Xero Error", - "status": 500, - "detail": "The request should be retried. If the error persists, a Xero support issue should be raised." - } + example: + type: internal-error + title: Intermittent Internal Xero Error + status: 500 + detail: The request should be retried. If the error persists, a Xero support issue should be raised. requestBody: description: Statements array of objects in the body required: true @@ -475,68 +404,52 @@ paths: schema: $ref: '#/components/schemas/Statements' example: - { - "items":[ - { - "feedConnectionId":"6a4b9ff5-3a5f-4321-936b-4796163550f6", - "startDate":"2019-08-11", - "endDate":"2019-08-11", - "startBalance":{ - "amount":"100", - "creditDebitIndicator":"CREDIT" - }, - "endBalance":{ - "amount":"150", - "creditDebitIndicator":"CREDIT" - }, - "statementLines":[ - { - "postedDate":"2019-08-11", - "description":"My new line", - "amount":"50", - "creditDebitIndicator":"CREDIT", - "transactionId":"123446422", - "payeeName":"StarLord90315", - "reference":"Foobar95578", - "chequeNumber":"12379009", - "transactionType": "Refund" - } - ] - }, - { - "feedConnectionId":"2ebe6393-f3bb-48ab-9a0e-b04fa8585a70", - "startDate":"2019-08-11", - "endDate":"2019-08-11", - "startBalance":{ - "amount":"100", - "creditDebitIndicator":"CREDIT" - }, - "endBalance":{ - "amount":"150", - "creditDebitIndicator":"CREDIT" - }, - "statementLines":[ - { - "postedDate":"2019-08-11", - "description":"My new line", - "amount":"50", - "creditDebitIndicator":"CREDIT", - "transactionId":"123449402", - "payeeName":"StarLord56705", - "reference":"Foobar67355", - "chequeNumber":"12379350", - "transactionType": "Currency Conversion Fee" - } - ] - } - ] - } + items: + - feedConnectionId: 6a4b9ff5-3a5f-4321-936b-4796163550f6 + startDate: "2019-08-11" + endDate: "2019-08-11" + startBalance: + amount: "100" + creditDebitIndicator: CREDIT + endBalance: + amount: "150" + creditDebitIndicator: CREDIT + statementLines: + - postedDate: "2019-08-11" + description: My new line + amount: "50" + creditDebitIndicator: CREDIT + transactionId: "123446422" + payeeName: StarLord90315 + reference: Foobar95578 + chequeNumber: "12379009" + transactionType: Refund + - feedConnectionId: 2ebe6393-f3bb-48ab-9a0e-b04fa8585a70 + startDate: "2019-08-11" + endDate: "2019-08-11" + startBalance: + amount: "100" + creditDebitIndicator: CREDIT + endBalance: + amount: "150" + creditDebitIndicator: CREDIT + statementLines: + - postedDate: "2019-08-11" + description: My new line + amount: "50" + creditDebitIndicator: CREDIT + transactionId: "123449402" + payeeName: StarLord56705 + reference: Foobar67355 + chequeNumber: "12379350" + transactionType: Currency Conversion Fee /Statements/{statementId}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [bankfeeds] + - OAuth2: + - bankfeeds tags: - BankFeeds summary: Retrieve single statement based on unique id provided @@ -551,65 +464,61 @@ paths: type: string format: uuid responses: - '200': + "200": description: search results matching id for single statement content: application/json: schema: $ref: '#/components/schemas/Statement' - example: - { - "id":"97aca24a-dd10-4cda-98c7-1084a048257b", - "feedConnectionId":"6a4b9ff5-3a5f-4321-936b-4796163550f6", - "status":"DELIVERED", - "startDate":"2019-08-11", - "endDate":"2019-10-11", - "startBalance":{ - "amount":"100.0000", - "creditDebitIndicator":"CREDIT" - }, - "endBalance":{ - "amount":"150.0000", - "creditDebitIndicator":"CREDIT" - }, - "statementLineCount":"1" - } - '404': + example: + id: 97aca24a-dd10-4cda-98c7-1084a048257b + feedConnectionId: 6a4b9ff5-3a5f-4321-936b-4796163550f6 + status: DELIVERED + startDate: "2019-08-11" + endDate: "2019-10-11" + startBalance: + amount: "100.0000" + creditDebitIndicator: CREDIT + endBalance: + amount: "150.0000" + creditDebitIndicator: CREDIT + statementLineCount: "1" + "404": description: Statement not found components: securitySchemes: OAuth2: type: oauth2 description: For more information visit https://developer.xero.com/documentation/oauth2/overview - flows: + flows: authorizationCode: - authorizationUrl: 'https://login.xero.com/identity/connect/authorize' - tokenUrl: 'https://identity.xero.com/connect/token' + authorizationUrl: https://login.xero.com/identity/connect/authorize + tokenUrl: https://identity.xero.com/connect/token scopes: email: Grant read-only access to your email openid: Grant read-only access to your open id profile: your profile information bankfeeds: Grant read-write access to bankfeeds parameters: - requiredHeader: + requiredHeader: in: header name: Xero-Tenant-Id description: Xero identifier for Tenant schema: type: string - required: true + required: true idempotencyKey: in: header name: Idempotency-Key x-snake: idempotency_key description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. - example: "KEY_VALUE" + example: KEY_VALUE schema: type: string schemas: FeedConnections: externalDocs: - url: 'https://developer.xero.com/documentation/bank-feeds-api/feed-connections' + url: https://developer.xero.com/documentation/bank-feeds-api/feed-connections type: object properties: pagination: @@ -620,13 +529,13 @@ components: $ref: '#/components/schemas/FeedConnection' FeedConnection: externalDocs: - url: 'https://developer.xero.com/documentation/bank-feeds-api/feed-connections' + url: https://developer.xero.com/documentation/bank-feeds-api/feed-connections type: object properties: id: type: string format: uuid - example: "0d3cf8d-95dc-4466-8dc0-47e6d1197e28" + example: 0d3cf8d-95dc-4466-8dc0-47e6d1197e28 description: GUID used to identify the Account. accountToken: type: string @@ -640,17 +549,19 @@ components: description: String(40) when AccountType is BANK String(4) when AccountType is CREDITCARD The Account Number is used to match the feed to a Xero Bank Account. The API will create a new Xero Bank Account if a match to an existing Xero Bank Account is not found. Only the last 4 digits must be supplied for Credit Card numbers. Must be included if AccountId is not specified. accountName: type: string - example: "Joe's Savings Account" + example: Joe's Savings Account maximum: 30 description: The Account Name will be used for the creation of a new Xero Bank Account if a matching Xero Bank Account is not found. accountId: type: string format: uuid - example: "079a88ea-276d-41fb-a1f1-366ef3e22921" + example: 079a88ea-276d-41fb-a1f1-366ef3e22921 description: Xero identifier for a bank account in Xero. Must be included if AccountNumber is not specified. accountType: - enum: [BANK,CREDITCARD] - example: "BANK" + enum: + - BANK + - CREDITCARD + example: BANK description: High level bank account type - BANK CREDITCARD BANK encompasses all bank account types other than credit cards. currency: $ref: '#/components/schemas/CurrencyCode' @@ -658,14 +569,16 @@ components: $ref: '#/components/schemas/CountryCode' status: type: string - enum: [PENDING,REJECTED] - example: "REJECTED" + enum: + - PENDING + - REJECTED + example: REJECTED description: the current status of the feed connection error: $ref: '#/components/schemas/Error' Statements: externalDocs: - url: 'https://developer.xero.com/documentation/bank-feeds-api/statements' + url: https://developer.xero.com/documentation/bank-feeds-api/statements type: object properties: pagination: @@ -699,16 +612,19 @@ components: id: type: string format: uuid - example: "ba4f3127-5e46-427d-80ea-dea2fcd26afe" + example: ba4f3127-5e46-427d-80ea-dea2fcd26afe description: GUID used to identify the Statement. feedConnectionId: type: string format: uuid - example: "87cb0dc8-fa32-409c-b622-19f8de8dcc83" + example: 87cb0dc8-fa32-409c-b622-19f8de8dcc83 description: The Xero generated feed connection Id that identifies the Xero Bank Account Container into which the statement should be delivered. This is obtained by calling GET FeedConnections. status: - enum: ["PENDING","REJECTED","DELIVERED"] - example: "PENDING" + enum: + - PENDING + - REJECTED + - DELIVERED + example: PENDING description: Current status of statements startDate: type: string @@ -725,7 +641,7 @@ components: endBalance: $ref: '#/components/schemas/EndBalance' statementLines: - $ref: '#/components/schemas/StatementLines' + $ref: '#/components/schemas/StatementLines' errors: type: array items: @@ -769,41 +685,41 @@ components: format: date example: "2018-06-10" description: The date that the transaction was processed or cleared as seen in internet banking ISO-8601 YYYY-MM-DD - description: + description: type: string - example: "Description for statement line 2" + example: Description for statement line 2 maximum: 2000 description: Transaction description - amount: + amount: type: number format: double x-is-money: true example: "5.00" description: Transaction amount - creditDebitIndicator: + creditDebitIndicator: $ref: '#/components/schemas/CreditDebitIndicator' - transactionId: + transactionId: type: string - example: "transaction-id-2" + example: transaction-id-2 description: Financial institute's internal transaction identifier. If provided this field is factored into duplicate detection. - payeeName: + payeeName: type: string - example: "Payee name for statement line 2" + example: Payee name for statement line 2 description: Typically the merchant or payee name maximum: 255 - reference: + reference: type: string - example: "Reference for statement line 2" + example: Reference for statement line 2 description: Optional field to enhance the Description maximum: 255 - chequeNumber: + chequeNumber: type: string example: "021" description: The cheque/check number maximum: 20 - transactionType: + transactionType: type: string - example: "Refund" + example: Refund description: Descriptive transaction type maximum: 30 Error: @@ -814,7 +730,7 @@ components: type: string maximum: 255 description: Human readable high level error description. - example: "Invalid Application" + example: Invalid Application status: type: integer description: The numeric HTTP Status Code, e.g. 404 @@ -823,33 +739,33 @@ components: type: string maximum: 255 description: Human readable detailed error description. - example: "The application has not been configured to use these API endpoints." + example: The application has not been configured to use these API endpoints. type: type: string description: Identifies the type of error. - enum: - - "invalid-request" - - "invalid-application" - - "invalid-feed-connection" - - "duplicate-statement" - - "invalid-end-balance" - - "invalid-start-and-end-date" - - "invalid-start-date" - - "internal-error" - - "feed-already-connected-in-current-organisation" - - "invalid-end-date" - - "statement-not-found" - - "feed-connected-in-different-organisation" - - "feed-already-connected-in-different-organisation" - - "bank-feed-not-found" - - "invalid-country-specified" - - "invalid-organisation-bank-feeds" - - "invalid-organisation-multi-currency" - - "invalid-feed-connection-for-organisation" - - "invalid-user-role" - - "account-not-valid" - - "feed-not-found-or-already-deleted" - example: "invalid-application" + enum: + - invalid-request + - invalid-application + - invalid-feed-connection + - duplicate-statement + - invalid-end-balance + - invalid-start-and-end-date + - invalid-start-date + - internal-error + - feed-already-connected-in-current-organisation + - invalid-end-date + - statement-not-found + - feed-connected-in-different-organisation + - feed-already-connected-in-different-organisation + - bank-feed-not-found + - invalid-country-specified + - invalid-organisation-bank-feeds + - invalid-organisation-multi-currency + - invalid-feed-connection-for-organisation + - invalid-user-role + - account-not-valid + - feed-not-found-or-already-deleted + example: invalid-application CreditDebitIndicator: type: string description: If the statement balances are credit or debit, the CreditDebitIndicator should be specified from the perspective of the Customer. @@ -858,414 +774,414 @@ components: - DEBIT CurrencyCode: description: 3 letter alpha code for the ISO-4217 currency code, e.g. USD, AUD. - example: "AUD" + example: AUD type: string enum: - - AED - - AFN - - ALL - - AMD - - ANG - - AOA - - ARS - - AUD - - AWG - - AZN - - BAM - - BBD - - BDT - - BGN - - BHD - - BIF - - BMD - - BND - - BOB - - BRL - - BSD - - BTN - - BWP - - BYN - - BZD - - CAD - - CDF - - CHF - - CLP - - CNY - - COP - - CRC - - CUC - - CUP - - CVE - - CZK - - DJF - - DKK - - DOP - - DZD - - EGP - - ERN - - ETB - - EUR - - FJD - - FKP - - GBP - - GEL - - GGP - - GHS - - GIP - - GMD - - GNF - - GTQ - - GYD - - HKD - - HNL - - HRK - - HTG - - HUF - - IDR - - ILS - - IMP - - INR - - IQD - - IRR - - ISK - - JEP - - JMD - - JOD - - JPY - - KES - - KGS - - KHR - - KMF - - KPW - - KRW - - KWD - - KYD - - KZT - - LAK - - LBP - - LKR - - LRD - - LSL - - LYD - - MAD - - MDL - - MGA - - MKD - - MMK - - MNT - - MOP - - MRU - - MUR - - MVR - - MWK - - MXN - - MYR - - MZN - - NAD - - NGN - - NIO - - NOK - - NPR - - NZD - - OMR - - PAB - - PEN - - PGK - - PHP - - PKR - - PLN - - PYG - - QAR - - RON - - RSD - - RUB - - RWF - - SAR - - SBD - - SCR - - SDG - - SEK - - SGD - - SHP - - SLL - - SOS - - SPL - - SRD - - STN - - SVC - - SYP - - SZL - - THB - - TJS - - TMT - - TND - - TOP - - TRY - - TTD - - TVD - - TWD - - TZS - - UAH - - UGX - - USD - - UYU - - UZS - - VEF - - VND - - VUV - - WST - - XAF - - XCD - - XDR - - XOF - - XPF - - YER - - ZAR - - ZMW - - ZMK - - ZWD + - AED + - AFN + - ALL + - AMD + - ANG + - AOA + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRU + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STN + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XCD + - XDR + - XOF + - XPF + - YER + - ZAR + - ZMW + - ZMK + - ZWD CountryCode: type: string - example: "GB" + example: GB description: ISO-3166 alpha-2 country code, e.g. US, AU This element is required only when the Application supports multi-region. Talk to your Partner Manager to confirm if this is the case. enum: - - AD - - AE - - AF - - AG - - AI - - AL - - AM - - AN - - AO - - AQ - - AR - - AS - - AT - - AU - - AW - - AZ - - BA - - BB - - BD - - BE - - BF - - BG - - BH - - BI - - BJ - - BL - - BM - - BN - - BO - - BR - - BS - - BT - - BW - - BY - - BZ - - CA - - CC - - CD - - CF - - CG - - CH - - CI - - CK - - CL - - CM - - CN - - CO - - CR - - CU - - CV - - CW - - CX - - CY - - CZ - - DE - - DJ - - DK - - DM - - DO - - DZ - - EC - - EE - - EG - - EH - - ER - - ES - - ET - - FI - - FJ - - FK - - FM - - FO - - FR - - GA - - GB - - GD - - GE - - GG - - GH - - GI - - GL - - GM - - GN - - GQ - - GR - - GT - - GU - - GW - - GY - - HK - - HN - - HR - - HT - - HU - - ID - - IE - - IL - - IM - - IN - - IO - - IQ - - IR - - IS - - IT - - JE - - JM - - JO - - JP - - KE - - KG - - KH - - KI - - KM - - KN - - KP - - KR - - KW - - KY - - KZ - - LA - - LB - - LC - - LI - - LK - - LR - - LS - - LT - - LU - - LV - - LY - - MA - - MC - - MD - - ME - - MF - - MG - - MH - - MK - - ML - - MM - - MN - - MO - - MP - - 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 - - PW - - PY - - QA - - RE - - RO - - RS - - RU - - RW - - SA - - SB - - SC - - SD - - SE - - SG - - SH - - SI - - SJ - - SK - - SL - - SM - - SN - - SO - - SR - - SS - - ST - - SV - - SX - - SY - - SZ - - TC - - TD - - TG - - TH - - TJ - - TK - - TL - - TM - - TN - - TO - - TR - - TT - - TV - - TW - - TZ - - UA - - UG - - US - - UY - - UZ - - VA - - VC - - VE - - VG - - VI - - VN - - VU - - WF - - WS - - XK - - YE - - YT - - ZA - - ZM - - ZW \ No newline at end of file + - AD + - AE + - AF + - AG + - AI + - AL + - AM + - AN + - AO + - AQ + - AR + - AS + - AT + - AU + - AW + - AZ + - BA + - BB + - BD + - BE + - BF + - BG + - BH + - BI + - BJ + - BL + - BM + - BN + - BO + - BR + - BS + - BT + - BW + - BY + - BZ + - CA + - CC + - CD + - CF + - CG + - CH + - CI + - CK + - CL + - CM + - CN + - CO + - CR + - CU + - CV + - CW + - CX + - CY + - CZ + - DE + - DJ + - DK + - DM + - DO + - DZ + - EC + - EE + - EG + - EH + - ER + - ES + - ET + - FI + - FJ + - FK + - FM + - FO + - FR + - GA + - GB + - GD + - GE + - GG + - GH + - GI + - GL + - GM + - GN + - GQ + - GR + - GT + - GU + - GW + - GY + - HK + - HN + - HR + - HT + - HU + - ID + - IE + - IL + - IM + - IN + - IO + - IQ + - IR + - IS + - IT + - JE + - JM + - JO + - JP + - KE + - KG + - KH + - KI + - KM + - KN + - KP + - KR + - KW + - KY + - KZ + - LA + - LB + - LC + - LI + - LK + - LR + - LS + - LT + - LU + - LV + - LY + - MA + - MC + - MD + - ME + - MF + - MG + - MH + - MK + - ML + - MM + - MN + - MO + - MP + - 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 + - PW + - PY + - QA + - RE + - RO + - RS + - RU + - RW + - SA + - SB + - SC + - SD + - SE + - SG + - SH + - SI + - SJ + - SK + - SL + - SM + - SN + - SO + - SR + - SS + - ST + - SV + - SX + - SY + - SZ + - TC + - TD + - TG + - TH + - TJ + - TK + - TL + - TM + - TN + - TO + - TR + - TT + - TV + - TW + - TZ + - UA + - UG + - US + - UY + - UZ + - VA + - VC + - VE + - VG + - VI + - VN + - VU + - WF + - WS + - XK + - YE + - YT + - ZA + - ZM + - ZW diff --git a/xero_files.yaml b/xero_files.yaml index 3a1ac7cad..df0228703 100644 --- a/xero_files.yaml +++ b/xero_files.yaml @@ -4,13 +4,13 @@ servers: url: https://api.xero.com/files.xro/1.0/ info: title: Xero Files API - version: "6.3.0" - description: "These endpoints are specific to Xero Files API" - termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" + version: 10.1.0 + description: These endpoints are specific to Xero Files API + termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/ contact: - name: "Xero Platform Team" - email: "api@xero.com" - url: "https://developer.xero.com" + name: Xero Platform Team + email: api@xero.com + url: https://developer.xero.com tags: - name: Files description: Operations available to regular developers @@ -20,7 +20,9 @@ paths: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [files, files.read] + - OAuth2: + - files + - files.read tags: - Files operationId: getFiles @@ -45,60 +47,23 @@ paths: description: values to sort by schema: type: string - enum: - - Name - - Size - - CreatedDateUTC - example: "CreatedDateUTC DESC" + enum: + - Name + - Size + - CreatedDateUTC + example: CreatedDateUTC DESC responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Files' - example: '{ - "TotalCount": 100, - "Page": 1, - "PerPage": 2, - "Items": [ - { - "Name": "helo-heros.jpg", - "MimeType": "application/jpg", - "Size": 2878711, - "CreatedDateUtc": "2021-02-10T16:02:54.9930000", - "UpdatedDateUtc": "2021-02-10T16:02:54.9930000", - "User": { - "Name": "sid.maestre@xero.com", - "FirstName": "Sidney", - "LastName": "Maestre", - "FullName": "Sidney Maestre", - "Id": "740add2a-a703-4b8a-a670-1093919c2040" - }, - "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3", - "Id": "3d413bfe-f40f-4807-b953-9a42f834ff15" - }, - { - "Name": "helo-heros.jpg", - "MimeType": "application/jpg", - "Size": 2878711, - "CreatedDateUtc": "2021-02-09T21:16:00.6130000", - "UpdatedDateUtc": "2021-02-09T21:16:00.6130000", - "User": { - "Name": "sid.maestre@xero.com", - "FirstName": "Sidney", - "LastName": "Maestre", - "FullName": "Sidney Maestre", - "Id": "740add2a-a703-4b8a-a670-1093919c2040" - }, - "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3", - "Id": "22f87409-cdfd-4813-a868-559481bcb052" - } - ] - }' + example: '{ "TotalCount": 100, "Page": 1, "PerPage": 2, "Items": [ { "Name": "helo-heros.jpg", "MimeType": "application/jpg", "Size": 2878711, "CreatedDateUtc": "2021-02-10T16:02:54.9930000", "UpdatedDateUtc": "2021-02-10T16:02:54.9930000", "User": { "Name": "sid.maestre@xero.com", "FirstName": "Sidney", "LastName": "Maestre", "FullName": "Sidney Maestre", "Id": "740add2a-a703-4b8a-a670-1093919c2040" }, "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3", "Id": "3d413bfe-f40f-4807-b953-9a42f834ff15" }, { "Name": "helo-heros.jpg", "MimeType": "application/jpg", "Size": 2878711, "CreatedDateUtc": "2021-02-09T21:16:00.6130000", "UpdatedDateUtc": "2021-02-09T21:16:00.6130000", "User": { "Name": "sid.maestre@xero.com", "FirstName": "Sidney", "LastName": "Maestre", "FullName": "Sidney Maestre", "Id": "740add2a-a703-4b8a-a670-1093919c2040" }, "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3", "Id": "22f87409-cdfd-4813-a868-559481bcb052" } ] }' post: security: - - OAuth2: [files] + - OAuth2: + - files tags: - Files summary: Uploads a File to the inbox @@ -106,96 +71,63 @@ paths: - $ref: '#/components/parameters/idempotencyKey' operationId: uploadFile responses: - '201': + "201": description: A successful request content: application/json: schema: $ref: '#/components/schemas/FileObject' - example: '{ - "Name": "helo-heros.jpg", - "MimeType": "application/jpg", - "Size": 2878711, - "CreatedDateUtc": "2021-02-10T23:17:50.1930000", - "UpdatedDateUtc": "2021-02-10T23:17:50.1930000", - "User": { - "Name": "sid.maestre@xero.com", - "FirstName": "Sidney", - "LastName": "Maestre", - "FullName": "Sidney Maestre", - "Id": "740add2a-a703-4b8a-a670-1093919c2040" - }, - "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3", - "Id": "22f87409-cdfd-4813-a868-559481bcb052" - }' - '400': + example: '{ "Name": "helo-heros.jpg", "MimeType": "application/jpg", "Size": 2878711, "CreatedDateUtc": "2021-02-10T23:17:50.1930000", "UpdatedDateUtc": "2021-02-10T23:17:50.1930000", "User": { "Name": "sid.maestre@xero.com", "FirstName": "Sidney", "LastName": "Maestre", "FullName": "Sidney Maestre", "Id": "740add2a-a703-4b8a-a670-1093919c2040" }, "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3", "Id": "22f87409-cdfd-4813-a868-559481bcb052" }' + "400": description: invalid input, object invalid content: application/json: - example: '[ - { - "type":"Validation", - "title":"Validation failure", - "detail":"Extension: boo is not a valid File extension." - } - ]' + example: '[ { "type":"Validation", "title":"Validation failure", "detail":"Extension: boo is not a valid File extension." } ]' requestBody: required: true content: multipart/form-data: - schema: + schema: $ref: '#/components/schemas/UploadObject' /Files/{FileId}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [files, files.read] + - OAuth2: + - files + - files.read tags: - Files summary: Retrieves a file by a unique file ID operationId: getFile - parameters: + parameters: - name: FileId x-snake: file_id in: path required: true description: File id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: - application/json: + application/json: schema: $ref: '#/components/schemas/FileObject' - example: '{ - "Name": "helo-heros.jpg", - "MimeType": "application/jpg", - "Size": 2878711, - "CreatedDateUtc": "2021-02-10T23:17:50.1930000", - "UpdatedDateUtc": "2021-02-10T23:17:50.1930000", - "User": { - "Name": "sid.maestre@xero.com", - "FirstName": "Sidney", - "LastName": "Maestre", - "FullName": "Sidney Maestre", - "Id": "740add2a-a703-4b8a-a670-1093919c2040" - }, - "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3", - "Id": "efd77bfc-7018-4da1-b251-7aa2d438382c" - }' + example: '{ "Name": "helo-heros.jpg", "MimeType": "application/jpg", "Size": 2878711, "CreatedDateUtc": "2021-02-10T23:17:50.1930000", "UpdatedDateUtc": "2021-02-10T23:17:50.1930000", "User": { "Name": "sid.maestre@xero.com", "FirstName": "Sidney", "LastName": "Maestre", "FullName": "Sidney Maestre", "Id": "740add2a-a703-4b8a-a670-1093919c2040" }, "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3", "Id": "efd77bfc-7018-4da1-b251-7aa2d438382c" }' put: security: - - OAuth2: [files] + - OAuth2: + - files tags: - Files - summary: Update a file + summary: Update a file operationId: updateFile - description: Updates file properties of a single file + description: Updates file properties of a single file parameters: - $ref: '#/components/parameters/idempotencyKey' - name: FileId @@ -203,73 +135,51 @@ paths: in: path required: true description: File id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: A successful request content: application/json: schema: $ref: '#/components/schemas/FileObject' - example: '{ - "Name": "helo-heros.jpg", - "MimeType": "application/jpg", - "Size": 2878711, - "CreatedDateUtc": "2021-02-10T23:17:50.1930000", - "UpdatedDateUtc": "2021-02-10T23:58:54.1000000", - "User": { - "Name": "sid.maestre@xero.com", - "FirstName": "Sidney", - "LastName": "Maestre", - "FullName": "Sidney Maestre", - "Id": "740add2a-a703-4b8a-a670-1093919c2040" - }, - "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3", - "Id": "efd77bfc-7018-4da1-b251-7aa2d438382c" - }' - '400': - description: invalid input, object invalid + example: '{ "Name": "helo-heros.jpg", "MimeType": "application/jpg", "Size": 2878711, "CreatedDateUtc": "2021-02-10T23:17:50.1930000", "UpdatedDateUtc": "2021-02-10T23:58:54.1000000", "User": { "Name": "sid.maestre@xero.com", "FirstName": "Sidney", "LastName": "Maestre", "FullName": "Sidney Maestre", "Id": "740add2a-a703-4b8a-a670-1093919c2040" }, "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3", "Id": "efd77bfc-7018-4da1-b251-7aa2d438382c" }' + "400": + description: invalid input, object invalid content: application/json: - example: '[ - { - "type":"Rename", - "title":"Rename failed", - "detail":"Unable to rename efd77bfc-7018-4da1-b251-7aa2d438382c to FooBar" - } - ]' + example: '[ { "type":"Rename", "title":"Rename failed", "detail":"Unable to rename efd77bfc-7018-4da1-b251-7aa2d438382c to FooBar" } ]' requestBody: required: true content: application/json: - schema: - $ref: '#/components/schemas/FileObject' - example: '{ - "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3" - }' + schema: + $ref: '#/components/schemas/FileObject' + example: '{ "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3" }' delete: security: - - OAuth2: [files] + - OAuth2: + - files tags: - Files summary: Deletes a specific file operationId: deleteFile - description: Delete a specific file - parameters: + description: Delete a specific file + parameters: - name: FileId x-snake: file_id in: path required: true description: File id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '204': + "204": description: Successful deletion - return response 204 no content x-isEmpty: true /Files/{FolderId}: @@ -277,7 +187,8 @@ paths: - $ref: '#/components/parameters/requiredHeader' post: security: - - OAuth2: [files] + - OAuth2: + - files tags: - Files summary: Uploads a File to a specific folder @@ -294,71 +205,52 @@ paths: format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '201': + "201": description: A successful request content: application/json: schema: $ref: '#/components/schemas/FileObject' - example: '{ - "Name": "helo-heros.jpg", - "MimeType": "application/jpg", - "Size": 2878711, - "CreatedDateUtc": "2021-02-10T23:17:50.1930000", - "UpdatedDateUtc": "2021-02-10T23:17:50.1930000", - "User": { - "Name": "sid.maestre@xero.com", - "FirstName": "Sidney", - "LastName": "Maestre", - "FullName": "Sidney Maestre", - "Id": "740add2a-a703-4b8a-a670-1093919c2040" - }, - "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3", - "Id": "22f87409-cdfd-4813-a868-559481bcb052" - }' - '400': + example: '{ "Name": "helo-heros.jpg", "MimeType": "application/jpg", "Size": 2878711, "CreatedDateUtc": "2021-02-10T23:17:50.1930000", "UpdatedDateUtc": "2021-02-10T23:17:50.1930000", "User": { "Name": "sid.maestre@xero.com", "FirstName": "Sidney", "LastName": "Maestre", "FullName": "Sidney Maestre", "Id": "740add2a-a703-4b8a-a670-1093919c2040" }, "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3", "Id": "22f87409-cdfd-4813-a868-559481bcb052" }' + "400": description: invalid input, object invalid content: application/json: - example: '[ - { - "type":"Validation", - "title":"Validation failure", - "detail":"Extension: boo is not a valid File extension." - } - ]' + example: '[ { "type":"Validation", "title":"Validation failure", "detail":"Extension: boo is not a valid File extension." } ]' requestBody: required: true content: multipart/form-data: - schema: + schema: $ref: '#/components/schemas/UploadObject' /Files/{FileId}/Content: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [files, files.read] + - OAuth2: + - files + - files.read tags: - Files summary: Retrieves the content of a specific file operationId: getFileContent - description: By passing in the appropriate options, retrieve data for specific file - parameters: + description: By passing in the appropriate options, retrieve data for specific file + parameters: - name: FileId x-snake: file_id in: path required: true description: File id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: returns the byte array of the specific file based on id content: - application/octet-stream: + application/octet-stream: schema: type: string format: binary @@ -367,25 +259,26 @@ paths: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [files, files.read] + - OAuth2: + - files + - files.read tags: - Files summary: Retrieves a specific file associations operationId: getFileAssociations - description: | - By passing in the appropriate options, - parameters: + description: "By passing in the appropriate options, \n" + parameters: - name: FileId x-snake: file_id in: path required: true description: File id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: @@ -393,86 +286,66 @@ paths: type: array items: $ref: '#/components/schemas/Association' - example: '[ - { - "FileId":"6beccb4a-0d7d-4518-93f3-e0cd1dccb254", - "ObjectId":"1270bf7c-5d18-473a-9231-1e36c4bd33ed", - "ObjectType":"Business", - "ObjectGroup":"Contact" - } - ]' + example: '[ { "FileId":"6beccb4a-0d7d-4518-93f3-e0cd1dccb254", "ObjectId":"1270bf7c-5d18-473a-9231-1e36c4bd33ed", "ObjectType":"Business", "ObjectGroup":"Contact" } ]' post: security: - - OAuth2: [files] + - OAuth2: + - files tags: - Files summary: Creates a new file association operationId: createFileAssociation description: By passing in the appropriate options, you can create a new folder parameters: - - $ref: '#/components/parameters/idempotencyKey' + - $ref: '#/components/parameters/idempotencyKey' - name: FileId x-snake: file_id in: path required: true description: File id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '201': + "201": description: A successful request content: application/json: schema: $ref: '#/components/schemas/Association' - example: '{ - "FileId": "6beccb4a-0d7d-4518-93f3-e0cd1dccb254", - "ObjectId": "1270bf7c-5d18-473a-9231-1e36c4bd33ed", - "ObjectType": "Business", - "ObjectGroup": "Contact" - }' - '400': + example: '{ "FileId": "6beccb4a-0d7d-4518-93f3-e0cd1dccb254", "ObjectId": "1270bf7c-5d18-473a-9231-1e36c4bd33ed", "ObjectType": "Business", "ObjectGroup": "Contact" }' + "400": description: invalid input, object invalid content: application/json: - example: '[ - { - "type":"Validation", - "title":"Validation failure", - "detail":"Object is not a Account" - } - ]' + example: '[ { "type":"Validation", "title":"Validation failure", "detail":"Object is not a Account" } ]' requestBody: required: true content: application/json: - schema: - $ref: '#/components/schemas/Association' - example: '{ - "ObjectId": "1270bf7c-5d18-473a-9231-1e36c4bd33ed", - "ObjectGroup": "Contact", - "ObjectType": "Business" - }' + schema: + $ref: '#/components/schemas/Association' + example: '{ "ObjectId": "1270bf7c-5d18-473a-9231-1e36c4bd33ed", "ObjectGroup": "Contact", "ObjectType": "Business" }' /Files/{FileId}/Associations/{ObjectId}: parameters: - $ref: '#/components/parameters/requiredHeader' delete: security: - - OAuth2: [files] + - OAuth2: + - files tags: - Files summary: Deletes an existing file association operationId: deleteFileAssociation description: By passing in the appropriate options, you can create a new folder - parameters: + parameters: - name: FileId x-snake: file_id in: path required: true description: File id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -481,12 +354,12 @@ paths: in: path required: true description: Object id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '204': + "204": description: Successful deletion - return response 204 no content x-isEmpty: true /Associations/{ObjectId}: @@ -494,19 +367,21 @@ paths: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [files, files.read] + - OAuth2: + - files + - files.read tags: - Files summary: Retrieves an association object using a unique object ID operationId: getAssociationsByObject description: By passing in the appropriate options, you can retrieve an association - parameters: + parameters: - name: ObjectId x-snake: object_id in: path required: true description: Object id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -532,7 +407,7 @@ paths: enum: - Name - CreatedDateUTC - example: "Associations/{ObjectId}?sort=CreatedDateUtc" + example: Associations/{ObjectId}?sort=CreatedDateUtc - in: query name: direction description: direction to sort by @@ -541,9 +416,9 @@ paths: enum: - ASC - DESC - example: "Associations/{ObjectId}?sort=CreatedDateUtc&direction=DESC" + example: Associations/{ObjectId}?sort=CreatedDateUtc&direction=DESC responses: - '200': + "200": description: search results matching criteria content: application/json: @@ -551,100 +426,77 @@ paths: type: array items: $ref: '#/components/schemas/Association' - example: '[ - { - "SendWithObject":false, - "Name":"testfile.pdf", - "Size":12357, - "FileId":"6beccb4a-0d7d-4518-93f3-e0cd1dccb254", - "ObjectId":"1270bf7c-5d18-473a-9231-1e36c4bd33ed", - "ObjectType":"Business", - "ObjectGroup":"Contact" - } - ]' + example: '[ { "SendWithObject":false, "Name":"testfile.pdf", "Size":12357, "FileId":"6beccb4a-0d7d-4518-93f3-e0cd1dccb254", "ObjectId":"1270bf7c-5d18-473a-9231-1e36c4bd33ed", "ObjectType":"Business", "ObjectGroup":"Contact" } ]' /Associations/Count: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [files, files.read] + - OAuth2: + - files + - files.read tags: - Files summary: Retrieves a count of associations for a list of objects. operationId: getAssociationsCount description: By passing in the appropriate options, you can retrieve the association count for objects - parameters: + parameters: - name: ObjectIds in: query required: true description: A comma-separated list of object ids - schema: + schema: type: array items: type: string format: uuid example: 1270bf7c-5d18-473a-9231-1e36c4bd33ed responses: - '200': + "200": description: A dictionary of the object Ids and associations count content: application/json: schema: type: object - example: '{ - "19d4fc59-e799-410f-912b-03d4ab294d73": 2, - "82195976-5175-45d4-926e-807ff10892e7": 1, - "a8547af2-2900-4879-98b8-f1a780c78feb": 0}' + example: '{ "19d4fc59-e799-410f-912b-03d4ab294d73": 2, "82195976-5175-45d4-926e-807ff10892e7": 1, "a8547af2-2900-4879-98b8-f1a780c78feb": 0}' /Folders: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [files, files.read] + - OAuth2: + - files + - files.read tags: - Files summary: Retrieves folders operationId: getFolders - description: By passing in the appropriate options, you can search for - available folders + description: By passing in the appropriate options, you can search for available folders parameters: - in: query name: sort description: values to sort by schema: type: string - enum: - - Name - - Size - - CreatedDateUTC - example: "CreatedDateUTC DESC" + enum: + - Name + - Size + - CreatedDateUTC + example: CreatedDateUTC DESC responses: - '200': + "200": description: search results matching criteria content: application/json: schema: type: array - items: + items: $ref: '#/components/schemas/Folder' - example: '[ - { - "Name":"Inbox", - "FileCount":14, - "Email":"xero.inbox.jpf4.6oo29retajkhtfus@xerofiles.com", - "IsInbox":true, - "Id":"bf924975-7097-46f2-a143-1ecfbab3c8c3" - }, - { - "Name":"Contracts", - "FileCount":7, - "IsInbox":false, - "Id":"554ff1ad-4b94-4266-9b45-e29bcb75e6bf" - } - ]' + example: '[ { "Name":"Inbox", "FileCount":14, "Email":"xero.inbox.jpf4.6oo29retajkhtfus@xerofiles.com", "IsInbox":true, "Id":"bf924975-7097-46f2-a143-1ecfbab3c8c3" }, { "Name":"Contracts", "FileCount":7, "IsInbox":false, "Id":"554ff1ad-4b94-4266-9b45-e29bcb75e6bf" } ]' post: security: - - OAuth2: [files] + - OAuth2: + - files tags: - Files summary: Creates a new folder @@ -653,44 +505,33 @@ paths: operationId: createFolder description: By passing in the appropriate properties, you can create a new folder responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Folder' - example: '{ - "Name": "My Docs", - "FileCount": 0, - "IsInbox": false, - "Id": "913970ad-8c8e-4666-8294-35b9cac23206" - }' - '400': + example: '{ "Name": "My Docs", "FileCount": 0, "IsInbox": false, "Id": "913970ad-8c8e-4666-8294-35b9cac23206" }' + "400": description: invalid input, object invalid content: application/json: - example: '[ - { - "type":"Validation", - "title":"Validation failure", - "detail":"Name contains one or more bad characters" - } - ]' + example: '[ { "type":"Validation", "title":"Validation failure", "detail":"Name contains one or more bad characters" } ]' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Folder' - example: '{ - "Name": "My Docs" - }' + example: '{ "Name": "My Docs" }' /Folders/{FolderId}: parameters: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [files, files.read] + - OAuth2: + - files + - files.read tags: - Files summary: Retrieves specific folder by using a unique folder ID @@ -702,26 +543,22 @@ paths: in: path required: true description: Folder id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Folder' - example: '{ - "Name": "My Docs", - "FileCount": 0, - "IsInbox": false, - "Id": "4c5f3fe4-2516-4863-ac88-3029351773bf" - }' + example: '{ "Name": "My Docs", "FileCount": 0, "IsInbox": false, "Id": "4c5f3fe4-2516-4863-ac88-3029351773bf" }' put: security: - - OAuth2: [files] + - OAuth2: + - files tags: - Files summary: Updates an existing folder @@ -734,46 +571,34 @@ paths: in: path required: true description: Folder id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '200': + "200": description: return the updated object content: application/json: schema: $ref: '#/components/schemas/Folder' - example: '{ - "Name": "Your Docs", - "FileCount": 0, - "IsInbox": false, - "Id": "4c5f3fe4-2516-4863-ac88-3029351773bf" - }' - '400': + example: '{ "Name": "Your Docs", "FileCount": 0, "IsInbox": false, "Id": "4c5f3fe4-2516-4863-ac88-3029351773bf" }' + "400": description: invalid input, object invalid content: application/json: - example: '[ - { - "type":"Validation", - "title":"Validation failure", - "detail":"Name contains one or more bad characters" - } - ]' + example: '[ { "type":"Validation", "title":"Validation failure", "detail":"Name contains one or more bad characters" } ]' requestBody: required: true content: application/json: - schema: - $ref: '#/components/schemas/Folder' - example: '{ - "Name": "Your Docs" - }' + schema: + $ref: '#/components/schemas/Folder' + example: '{ "Name": "Your Docs" }' delete: security: - - OAuth2: [files] + - OAuth2: + - files tags: - Files summary: Deletes a folder @@ -785,12 +610,12 @@ paths: in: path required: true description: Folder id for single object - schema: + schema: type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c responses: - '204': + "204": description: Successful deletion - return response 204 no content x-isEmpty: true /Inbox: @@ -798,35 +623,31 @@ paths: - $ref: '#/components/parameters/requiredHeader' get: security: - - OAuth2: [files, files.read] + - OAuth2: + - files + - files.read tags: - Files - summary: Retrieves inbox folder + summary: Retrieves inbox folder operationId: getInbox description: Search for the user inbox responses: - '200': + "200": description: search results matching criteria content: application/json: schema: $ref: '#/components/schemas/Folder' - example: '{ - "Name": "Inbox", - "FileCount": 14, - "Email": "xero.inbox.jpf4.6oo29retajkhtfus@xerofiles.com", - "IsInbox": true, - "Id": "bf924975-7097-46f2-a143-1ecfbab3c8c3" - }' + example: '{ "Name": "Inbox", "FileCount": 14, "Email": "xero.inbox.jpf4.6oo29retajkhtfus@xerofiles.com", "IsInbox": true, "Id": "bf924975-7097-46f2-a143-1ecfbab3c8c3" }' components: securitySchemes: OAuth2: type: oauth2 description: For more information - flows: + flows: authorizationCode: - authorizationUrl: 'https://login.xero.com/identity/connect/authorize' - tokenUrl: 'https://identity.xero.com/connect/token' + authorizationUrl: https://login.xero.com/identity/connect/authorize + tokenUrl: https://identity.xero.com/connect/token scopes: email: Grant read-only access to your email openid: Grant read-only access to your open id @@ -834,7 +655,7 @@ components: files: Grant read-write access to files and folders files.read: Grant read-only access to files and folders parameters: - requiredHeader: + requiredHeader: in: header name: xero-tenant-id x-snake: xero_tenant_id @@ -848,7 +669,7 @@ components: name: Idempotency-Key x-snake: idempotency_key description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. - example: "KEY_VALUE" + example: KEY_VALUE schema: type: string schemas: @@ -861,7 +682,7 @@ components: Page: type: integer example: 1 - PerPage: + PerPage: type: integer example: 50 Items: @@ -883,7 +704,7 @@ components: MimeType: description: MimeType of the file (image/png, image/jpeg, application/pdf, etc..) type: string - example: image/jpeg + example: image/jpeg Size: description: Numeric value in bytes type: integer @@ -891,11 +712,11 @@ components: CreatedDateUtc: description: Created date in UTC type: string - example: '2020-12-03T19:04:58.6970000' + example: 2020-12-03T19:04:58.6970000 UpdatedDateUtc: description: Updated date in UTC type: string - example: '2020-12-03T19:04:58.6970000' + example: 2020-12-03T19:04:58.6970000 User: $ref: '#/components/schemas/User' Id: @@ -914,7 +735,7 @@ components: - body - name - filename - properties: + properties: body: type: string format: byte @@ -975,11 +796,11 @@ components: type: string example: foo@bar.com IsInbox: - description: to indicate if the folder is the Inbox. The Inbox cannot be renamed or deleted. + description: to indicate if the folder is the Inbox. The Inbox cannot be renamed or deleted. type: boolean example: true Id: - description: Xero unique identifier for a folder Files + description: Xero unique identifier for a folder Files type: string format: uuid example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c @@ -987,102 +808,102 @@ components: type: object properties: SendWithObject: - description: Boolean flag to determines whether the file is sent with the document it is attached to on client facing communications. Note- The SendWithObject element is only returned when using /Associations/{ObjectId} endpoint. + description: Boolean flag to determines whether the file is sent with the document it is attached to on client facing communications. Note- The SendWithObject element is only returned when using /Associations/{ObjectId} endpoint. type: boolean example: true Name: - description: The name of the associated file. Note- The Name element is only returned when using /Associations/{ObjectId} endpoint. + description: The name of the associated file. Note- The Name element is only returned when using /Associations/{ObjectId} endpoint. type: string example: Test.pdf Size: - description: The size of the associated file in bytes. Note- The Size element is only returned when using /Associations/{ObjectId} endpoint. + description: The size of the associated file in bytes. Note- The Size element is only returned when using /Associations/{ObjectId} endpoint. type: integer example: 12357 FileId: - description: The unique identifier of the file + description: The unique identifier of the file type: string format: uuid - ObjectId: - description: The identifier of the object that the file is being associated with (e.g. InvoiceID, BankTransactionID, ContactID) + ObjectId: + description: The identifier of the object that the file is being associated with (e.g. InvoiceID, BankTransactionID, ContactID) type: string format: uuid ObjectGroup: $ref: '#/components/schemas/ObjectGroup' ObjectType: - $ref: '#/components/schemas/ObjectType' + $ref: '#/components/schemas/ObjectType' ObjectGroup: - description: The Object Group that the object is in. These roughly correlate to the endpoints that can be used to retrieve the object via the core accounting API. + description: The Object Group that the object is in. These roughly correlate to the endpoints that can be used to retrieve the object via the core accounting API. type: string enum: - - Account - - BankTransaction - - Contact - - CreditNote - - Invoice - - Item - - ManualJournal - - Overpayment - - Payment - - Prepayment - - Quote - - Receipt + - Account + - BankTransaction + - Contact + - CreditNote + - Invoice + - Item + - ManualJournal + - Overpayment + - Payment + - Prepayment + - Quote + - Receipt ObjectType: description: The Object Type type: string enum: - - Unknown - - Accpay - - AccPayCredit - - AccPayPayment - - AccRec - - AccRecCredit - - AccRecPayment - - Adjustment - - ApCreditPayment - - ApOverPayment - - ApOverPaymentPayment - - ApOverPaymentSourcePayment - - ApPrepayment - - ApPrepaymentPayment - - ApPrepaymentSourcePayment - - ArCreditPayment - - ArOverPayment - - ArOverpaymentPayment - - ArOverpaymentSourcePayment - - ArPrepayment - - ArPrepaymentPayment - - ArPrepaymentSourcePayment - - CashPaid - - CashRec - - ExpPayment - - ManJournal - - PurchaseOrder - - Receipt - - Transfer - - Account - - Contact - - Business - - Employee - - Person - - User - - Org - - FixedAsset - - PayRun - - PriceListItem - - Bank - - Current - - Equity - - Expense - - Fixed - - Liability - - Prepayment - - Revenue - - Sales - - Overheads - - Depreciatn - - OtherIncome - - DirectCosts - - Currliab - - Termliab - - NonCurrent - - SalesQuote \ No newline at end of file + - Unknown + - Accpay + - AccPayCredit + - AccPayPayment + - AccRec + - AccRecCredit + - AccRecPayment + - Adjustment + - ApCreditPayment + - ApOverPayment + - ApOverPaymentPayment + - ApOverPaymentSourcePayment + - ApPrepayment + - ApPrepaymentPayment + - ApPrepaymentSourcePayment + - ArCreditPayment + - ArOverPayment + - ArOverpaymentPayment + - ArOverpaymentSourcePayment + - ArPrepayment + - ArPrepaymentPayment + - ArPrepaymentSourcePayment + - CashPaid + - CashRec + - ExpPayment + - ManJournal + - PurchaseOrder + - Receipt + - Transfer + - Account + - Contact + - Business + - Employee + - Person + - User + - Org + - FixedAsset + - PayRun + - PriceListItem + - Bank + - Current + - Equity + - Expense + - Fixed + - Liability + - Prepayment + - Revenue + - Sales + - Overheads + - Depreciatn + - OtherIncome + - DirectCosts + - Currliab + - Termliab + - NonCurrent + - SalesQuote